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
There's an explicit transaction to claim staking rewards (as seen in this CLI command) which emits an event of type withdraw_rewards. This Event has attributes to describe the tokens claimed by the calling account.
There are a few other transactions which, in certain circumstances, result in pending rewards being claimed such as delegate, redelegate, and undelegate. When these transactions are executed they emit a transfer event which describes the tokens that claimed but they do not emit a withdraw_rewards event which I would expect.
Can the transactions I list above emit a withdraw_rewards event similar to when a user explicitly withdraw rewards through the withdraw-rewards transaction.
Version
I've been experiencing this issue on chains that run 0.45.X version of the CosmosSDK but I believe this behavior is present in all past versions of the SDK.
Steps to Reproduce
Using the Provenance Explorer to display an example:
This delegate transaction has a transfer event which shows rewards being claimed by the caller. It does not have a withdraw_rewards event emitted.
The text was updated successfully, but these errors were encountered:
So this event is emitted in WithdrawDelegationRewards, but as you've pointed out, the other mechanisms which automatically withdraw rewards rely on x/distribution hooks, which internally call withdrawDelegationRewards (notice the private method).
So by moving the event emission to the private method should cover all cases. Will open a PR.
Summary of Bug
There's an explicit transaction to claim staking rewards (as seen in this CLI command) which emits an event of type
withdraw_rewards
. This Event has attributes to describe the tokens claimed by the calling account.There are a few other transactions which, in certain circumstances, result in pending rewards being claimed such as
delegate
,redelegate
, andundelegate
. When these transactions are executed they emit a transfer event which describes the tokens that claimed but they do not emit awithdraw_rewards
event which I would expect.Can the transactions I list above emit a
withdraw_rewards
event similar to when a user explicitly withdraw rewards through the withdraw-rewards transaction.Version
I've been experiencing this issue on chains that run 0.45.X version of the CosmosSDK but I believe this behavior is present in all past versions of the SDK.
Steps to Reproduce
Using the Provenance Explorer to display an example:
transfer
event which shows rewards being claimed by the caller. It does not have awithdraw_rewards
event emitted.The text was updated successfully, but these errors were encountered: