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

Capacity runtime api with list_unclaimed_rewards endpoint #2088

Merged

Conversation

shannonwells
Copy link
Collaborator

@shannonwells shannonwells commented Jul 18, 2024

Goal

The goal of this PR is to implement a capacity runtime api for the list_unclaimed_rewards endpoint.

Following the current recommendation of Parity, there is no custom RPC matching this runtime API endpoint; instead, use state.call to access the endpoint. For examples using either Observable or APIPromise, see the e2e tests.

Closes #1698

Checklist

  • Custom RPC OR Runtime API added/changed? Updated js/api-augment.
  • Tests added

@shannonwells shannonwells changed the base branch from main to feat/capacity-staking-rewards-impl July 18, 2024 23:53
@shannonwells shannonwells marked this pull request as ready for review July 18, 2024 23:56
@shannonwells shannonwells requested review from a team, mattheworris, enddynayn, aramikm, claireolmstead and JoeCap08055 and removed request for a team July 18, 2024 23:56
@shannonwells shannonwells changed the title Capacity runtime api 1698 Capacity runtime api with list_unclaimed_rewards endpoint Jul 18, 2024
Copy link
Collaborator

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

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

nice work!! Nothing unusual stood out, looks good to me

Copy link
Collaborator

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

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

LGTM 👍

earned_amount: 'Balance',
}
},
runtime: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice. By the way, do this show up in PolkadotUI now?

Copy link
Collaborator Author

@shannonwells shannonwells Jul 19, 2024

Choose a reason for hiding this comment

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

It won't until it merges to main and is released, and I think you also have to post a PR with the updated release to PolkadotJS ui

Copy link
Collaborator

@mattheworris mattheworris left a comment

Choose a reason for hiding this comment

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

  • Read through changes
  • Executed unit tests (All Passed)
  • Executed e2e-test-serial (All passed)
  • nit: one typo
    🚀 LGTM 🚀

Co-authored-by: Matthew Orris <1466844+mattheworris@users.noreply.github.com>
@shannonwells shannonwells merged commit 454421c into feat/capacity-staking-rewards-impl Jul 19, 2024
@shannonwells shannonwells deleted the capacity-runtime-api-1698 branch July 19, 2024 22:32
shannonwells added a commit that referenced this pull request Jul 23, 2024
# Goal
The goal of this PR is to implement a capacity runtime api for the `list_unclaimed_rewards` endpoint.

Following the current recommendation of Parity, there is no custom RPC matching this runtime API endpoint; instead, use state.call to access the endpoint. For examples using either Observable or APIPromise, see the e2e tests.

Closes #1698
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom RPC to get info about rewards that are about to expire
4 participants