Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Koin KCS-4 #105

Merged
merged 8 commits into from
Aug 7, 2024
Merged

Koin KCS-4 #105

merged 8 commits into from
Aug 7, 2024

Conversation

mvandeberg
Copy link
Member

@mvandeberg mvandeberg commented Aug 2, 2024

Resolves #104

Brief description

Implements Koin as a KCS-4

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

@mvandeberg mvandeberg marked this pull request as ready for review August 5, 2024 17:26
contracts/get_contract_metadata/package.json Outdated Show resolved Hide resolved
contracts/get_contract_metadata/yarn.lock Outdated Show resolved Hide resolved
contracts/get_contract_metadata/yarn.lock Outdated Show resolved Hide resolved
contracts/koin/abi/vhp.abi Outdated Show resolved Hide resolved
contracts/koin/abi/vhp.abi Outdated Show resolved Hide resolved
contracts/koin/assembly/Koin.ts Outdated Show resolved Hide resolved
contracts/koin/assembly/Koin.ts Outdated Show resolved Hide resolved
}
}

function min<T>(a: T, b: T): T {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function unused?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used here.

const delta = min(head_block_time - balanceObj.last_mana_update, this._mana_regen_time_ms);

The built in Math.min only works on floating point numbers for JS compatibility.

contracts/koin/koinos Outdated Show resolved Hide resolved
@sgerbino sgerbino changed the base branch from master to min_block_time August 7, 2024 17:14
@sgerbino sgerbino changed the base branch from min_block_time to master August 7, 2024 17:14
@sgerbino sgerbino merged commit 7a0f185 into master Aug 7, 2024
6 checks passed
@sgerbino sgerbino deleted the 104-koin-kcs-4 branch August 7, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Make KOIN KCS-4 compliant
2 participants