Hi~ I have some questions about the developer staking process. I am using polkadot-api, developer staking part on shibuya-network.
At portal.astar.network, I can see staking info on the dApp Staking dashboard.
1st_Question)
"Available to claim" shows "#-Era". If I claim 1 Era, how much SBY can I get?
On my Test Result, I got 0.00181..SBY by calculating on 'Not Re-stake after claiming' option 'off'. ( [after-transferable-balance] - [prev-transferable-balance] + [claim-transaction-fee] = [1 Era-Reward] ).
Can you give me some feedback about the above actions or some other guide?
2nd_Question) I try to retrieve by using the API wth:
await api.query.dappsStaking.generalStakerInfo(staker, getDappAddressEnum(dAppCa));
Where staker
is a user-wallet and dAppCa is an EVM Contracts Account.
The result returns Quantity of SBY that staked at Era like below:
[currentEra : 2828 | Available to claim : 18 Era]
.
{
"stakes": [
{ "staked": "0", "era": "2,805" },
{ "staked": "7,000,000,000,000,000,000", "era": "2,811" },
{ "staked": "7,007,761,889,397,804,870", "era": "2,817" }
]
}
How can I get "Available to claim-Era" by using polkadot-API?
How can I get 'A-staker' staking "dApp-list and each dApp's staked value" by using polkadot-API?
I just want to get the above information, like below function returns.
If 'staker-wallet-address' staked on "dApp-A : 7 SBY, 3Era", "dApp-B : 5 SBY, 4Era", "dApp-C : 9 SBY, 8Era"
input-parameter(staker-wallet-address) =>
{
"dApp-A" : ["3Era(Meaning-Reward)", "7 SBY"],
"dApp-B" : ["4Era(Meaning-Reward)", "5 SBY"],
"dApp-C" : ["8Era(Meaning-Reward)", "9 SBY"]
}
3rd_Question) How is the 'Available to claim'-value increased by the staking quantity and multi-dAapp Staking situation like in the above example?
Where can I get some infomation about my questions above? thx~^^