-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Staking] query response should be Coins #513
Comments
There are quite a few steps between this. And two calls for the delegations - simple and full. Here is the full Delegation type in CosmWasm. This is returned from This amount an only be a coin, as it must be the bonded denom (only one is allowed) and returns the total amount bonded. However, digging down a bit more, there is a 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. |
I issue raised is not an issue but rather a confusion of the API. However, it did reveal two other issues (maybe we rename this issue or make new ones):
I am happy to modify the type of accumuated_rewards in CosmWasm, that is quite straightforward, but if you have any idea how I can get such information on rewards from the delegation module, please let me know. |
Replaced this with those two above issues: #515 and CosmWasm/wasmd#263 Thank you for reporting this and I would be grateful for any insights into CosmWasm/wasmd#263 |
ok Thanks |
The staking delegation query response's rewards must be []Coin not Coin, https://github.com/cosmos/cosmos-sdk/blob/6a624c3f68900e99255846b4a63fb79285af54ce/x/distribution/types/query.go#L14
cosmwasm/packages/std/src/query.rs
Line 126 in c9a5141
The text was updated successfully, but these errors were encountered: