0

As a developer,I want to use the interface to search this information: which can get the amount which nominator has been rewarded at every era and staking?

1
  • What is "the interface"? What have you already tried?
    – Shawn Tabrizi
    Oct 3, 2022 at 15:48

1 Answer 1

1

Probably what you are looking for is to inspect the Rewarded event and find the one that corresponds to your nominator of choice. Some useful links to docs/tools:

https://paritytech.github.io/substrate/master/pallet_staking/enum.Event.html#variant.Rewarded https://polkadot.js.org/docs/substrate/events#rewardedaccountid32-u128 https://polkadot.subscan.io/event?address=&module=staking&event=rewarded&startDate=&endDate=&startBlock=&endBlock=&timeType=date&version=9281

1
  • how to use api.events.staking.Rewarded.is to get reward? like this: let event:IEventLike={ index:9281, method:"staking", section:"rewarded", }; const nominatorReward = api.events.staking.Rewarded.is(event) console.log(nominatorReward)
    – Rose
    Oct 5, 2022 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.