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

Add Staking precompile delegation amount getter #2005

Merged
merged 9 commits into from Jan 4, 2023

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Dec 14, 2022

Revives stale #1015 against master. Description from original PR:

[MOON-1099] was a feature requested by Henry:

There is currently no way to get the current nomination amount given a nominator and a collator, through our staking precompile, and this is a commonly used method for a lot of staking related scenarios and dapps, so would be good to add support for this.

Also added a precompile method to check if the delegation is in the top delegations

@4meta5 4meta5 added A0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit labels Dec 14, 2022
@4meta5 4meta5 requested a review from nanocryk December 14, 2022 02:35
Copy link
Collaborator

@crystalin crystalin left a comment

Choose a reason for hiding this comment

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

Can we get ts test in smart contracts using it too please ?

@crystalin
Copy link
Collaborator

Also make sure the pre-compiled contracts are up to date npm run pre-build-contracts

@4meta5 4meta5 merged commit a58498c into master Jan 4, 2023
@4meta5 4meta5 deleted the amar-staking-delegation-getter2 branch January 4, 2023 11:32
@crystalin crystalin changed the title [MOON-1099] Staking precompile delegation amount getter Add Staking precompile delegation amount getter Jan 20, 2023
imstar15 pushed a commit to OAK-Foundation/moonbeam that referenced this pull request May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants