-
Notifications
You must be signed in to change notification settings - Fork 59
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
Calculate supply in REST #285
Calculate supply in REST #285
Conversation
freak12techno
commented
Feb 24, 2024
- add query for app to calculate supply
- use this query in nom supply endpoint
- add new endpoint to return supply on all denoms to return nom supply there (need to add BTC supply there as well, will probably add it in another PR)
src/app.rs
Outdated
let community_pool_rewards_minted: u64 = self.community_pool_rewards.amount_minted.into(); | ||
let incentive_pool_rewards_minted: u64 = self.incentive_pool_rewards.amount_minted.into(); | ||
|
||
Ok(Amount::new(initial_supply + staking_rewards_minted + dev_rewards_minted + community_pool_rewards_minted + incentive_pool_rewards_minted)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need someone to review this part and verify this is how total supply is calculated on cosmos-sdk, not sure if cosmos-sdk considers all of these values or not
Sorry for the delay - looks like this just needs |
@mappum you may try squash + merging this btw, to have 1 commit on main instead of 4 after merging |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #285 +/- ##
========================================
Coverage 36.84% 36.84%
========================================
Files 25 25
Lines 9459 9459
========================================
Hits 3485 3485
Misses 5974 5974 ☔ View full report in Codecov by Sentry. |