-
Notifications
You must be signed in to change notification settings - Fork 515
Description
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 an accumulated_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.