Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Staking and nomination pools runtime API improvements #13069

Closed
gpestana opened this issue Jan 4, 2023 · 0 comments · Fixed by #13119
Closed

Staking and nomination pools runtime API improvements #13069

gpestana opened this issue Jan 4, 2023 · 0 comments · Fixed by #13119
Labels
A3-in_progress Pull request is in progress. No review needed at this stage. B1-note_worthy Changes should be noted in the release notes C1-low PR touches the given topic and has a low impact on builders. J2-unconfirmed Issue might be valid, but it’s not yet known. T2-API This PR/Issue is related to APIs.

Comments

@gpestana
Copy link
Contributor

gpestana commented Jan 4, 2023

As discussed in this Polkadot forum thread and elsewhere, it would be useful for the staking pallet to expose a few runtime APIs that can be called through the state_call RPC to help UIs and clients to query dynamic onchain data that is required for showing stats in UIs and help building extrinsic parameters.

Examples of RPC methods:

  • StakingApi_nominationsQuota: Returns the number of nominations quota per bonded balance, to help UIs calculating the max nominations for the account (implemented in this PR);
  • NominationPoolsApi_balance_to_point
  • NominationPoolsApi_points_to_balance
@gpestana gpestana added A3-in_progress Pull request is in progress. No review needed at this stage. B3-apinoteworthy J2-unconfirmed Issue might be valid, but it’s not yet known. C1-low PR touches the given topic and has a low impact on builders. labels Jan 4, 2023
@gpestana gpestana changed the title Staking custom RPC calls Staking and nomination pools runtime API improvements Jan 10, 2023
@the-right-joyce the-right-joyce added B1-note_worthy Changes should be noted in the release notes T2-API This PR/Issue is related to APIs. and removed B3-apinoteworthy labels Feb 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A3-in_progress Pull request is in progress. No review needed at this stage. B1-note_worthy Changes should be noted in the release notes C1-low PR touches the given topic and has a low impact on builders. J2-unconfirmed Issue might be valid, but it’s not yet known. T2-API This PR/Issue is related to APIs.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants