Skip to content
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

On withdraw rewards event, there's no value for delegator address #15457

Closed
freak12techno opened this issue Mar 19, 2023 · 1 comment · Fixed by #15462
Closed

On withdraw rewards event, there's no value for delegator address #15457

freak12techno opened this issue Mar 19, 2023 · 1 comment · Fixed by #15462

Comments

@freak12techno
Copy link
Contributor

Summary

When claiming rewards, the events emitted does not have a field for a delegator address:

ctx.EventManager().EmitEvent(

Problem Definition

I am building a tool to track transactions matching the required filters: https://github.com/QuokkaStake/cosmos-transactions-bot.
I am mostly using it to track transactions related to my validator, and one of the use cases for me is tracking the transactions where I claim rewards for my own validator's self stake. I can track transactions for the filter like the following: withdraw_rewards.validator = "xxxx", but that will give me all transactions where someone claimed rewards from my validator, which is not something like I need.

Proposal

I propose to add a "delegator" field to the event emitted, so we can write filters like the following: withdraw_rewards.validator = "xxx" AND withdraw_rewards.delegator = "yyy". This should be backwards compatible while adding more flexibility in how one can write queries.

I can also implement that if needed, as I want to get involved with cosmos-sdk development itself.

@github-actions github-actions bot added the needs-triage Issue that needs to be triaged label Mar 19, 2023
@tac0turtle tac0turtle added C:x/staking C:events T:Sprint and removed needs-triage Issue that needs to be triaged labels Mar 20, 2023
@tac0turtle tac0turtle self-assigned this Mar 20, 2023
@freak12techno
Copy link
Contributor Author

Appreciate that a lot, especially given how fast this was resolved. Way to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants