You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Digging in, I see this was left as a TODO as I had no idea how to get such info from the staking module.
The implementation to calculate that was not done and needs to be implemented. Looking into this again, the calculation is done in distribution.Keeper.calculateDelegationRewards, which is a private method. Even the query method is private. And many of the functions used inside are private.
The text was updated successfully, but these errors were encountered:
This came from CosmWasm/cosmwasm#513 (comment) and also requires CosmWasm/cosmwasm#515 and CosmWasm/wasmvm#134 to properly implement the return value.
There is a
FullDelegation
response, which does have anaccumulated_rewards
field, which is what you are looking for.If you look into the go query handler, which calls into the Keeper to get the rewards. This is then transformed into the cosmwasm type to pass it into Rust. And should have the reward info.
Digging in, I see this was left as a TODO as I had no idea how to get such info from the staking module.
The implementation to calculate that was not done and needs to be implemented. Looking into this again, the calculation is done in
distribution.Keeper.calculateDelegationRewards
, which is a private method. Even the query method is private. And many of the functions used inside are private.The text was updated successfully, but these errors were encountered: