blockful-io / shutter-staking-dapp

https://shutter-staking-dapp.vercel.app
MIT License
0 stars 0 forks source link

[Data Source] Get total stkSHU unlocked #41

Open FrancoAguzzi opened 3 months ago

FrancoAguzzi commented 3 months ago

Get user stakes and analyze which stakes are unlocked

This can be done by either calling Staking or Delegate contract, based on the address "isKeyper" truth. Then, "getUserStakeIds" must be called, followed by individual "stakes" function call for each stake id. Lastly, by getting to know wether this stake is locked or unlocked, a sum of all unlocked stakes shall be done to achieve the desired total stkSHU unlocked amount.