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

feat(x/precisebank): Add remainder amount to genesis #1911

Merged
merged 14 commits into from
May 15, 2024

Conversation

drklee3
Copy link
Member

@drklee3 drklee3 commented May 13, 2024

Description

  • Validate total fractional amounts in genesis type
  • Validate against fractional balances such that (sum(balances) + remainder) % conversionFactor == 0
  • Add new utility type SplitBalance for splitting up full balances into each

Checklist

  • Previous changelog entry covers this change.

@drklee3 drklee3 marked this pull request as ready for review May 13, 2024 23:17
x/precisebank/types/fractional_balance.go Outdated Show resolved Hide resolved
ci/env/kava-protonet/genesis.json Show resolved Hide resolved
@drklee3 drklee3 changed the title feat(x/precisebank): Add remainder amount to genesis feat(x/precisebank): Add aggregate validations for FractionalBalances May 15, 2024
@drklee3 drklee3 changed the title feat(x/precisebank): Add aggregate validations for FractionalBalances feat(x/precisebank): Add remainder amount to genesis May 15, 2024
@drklee3 drklee3 force-pushed the dl-precisebank/03-remainder-type branch from ac78c5d to 0749d76 Compare May 15, 2024 18:10
Copy link
Member

@nddeluca nddeluca left a comment

Choose a reason for hiding this comment

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

Validation & tests are great, I don't see any issues with the behavior.

My comments are not blockers, just points for discussion and possible simplifications.

x/precisebank/genesis.go Show resolved Hide resolved
x/precisebank/types/fractional_balance.go Show resolved Hide resolved
x/precisebank/types/split_balance.go Outdated Show resolved Hide resolved
// IntegerCoinDenom is the denomination for integer coins that are managed by
// x/bank. This is the "true" denomination of the coin, and is also used for
// the reserve to back all fractional coins.
const IntegerCoinDenom = "ukava"
Copy link
Member

@nddeluca nddeluca May 15, 2024

Choose a reason for hiding this comment

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

Filed #1914, I'm still split if adding the staking and evm keeper params as depedencies is worth it atm or we should pursue this later after the module is complete and we have a better picture of when & where we have to inject those parameters.

@drklee3 drklee3 merged commit 025b7b2 into master May 15, 2024
11 checks passed
@drklee3 drklee3 deleted the dl-precisebank/03-remainder-type branch May 15, 2024 21:07
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.

3 participants