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

How to solve voter address not available in EventVote? #43

Open
ryanchristo opened this issue Sep 6, 2023 · 0 comments
Open

How to solve voter address not available in EventVote? #43

ryanchristo opened this issue Sep 6, 2023 · 0 comments
Labels
dev Engineering task

Comments

@ryanchristo
Copy link
Member

ryanchristo commented Sep 6, 2023

Summary

In the current implementation, we index group votes. EventVote is emitted when a single voter has submitted their vote but the event only includes the proposal id. In order to then query the vote to index, we need to query all current votes by proposal id and then loop through the votes rather than querying the single vote by proposal id and voter address.

Possible Solutions

  • The voter address could be added to EventVote enabling us to query a specific vote (historical events would not be updated so this would only solve future votes).
  • We could extract the voter address from the transaction messages (this would solve historical events and future events but there is some complexity as to how we would do this to account for MsgVote being wrapped in other messages, i.e. gov and group proposal messages, authz authorization messages, and interchain transactions). See golang example here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Engineering task
Projects
None yet
Development

No branches or pull requests

1 participant