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

feature: support for delegated ERC20 (OpenZeppelin version) #93

Closed
wants to merge 4 commits into from

Conversation

lucasmenendez
Copy link
Collaborator

Solving #92:

We need to support a flavour of an ERC20 token created by OpenZeppelin that allows to delegate voting power to other holders, and return the correct amount of voting power exposing a special method for that: getVotes(sender).
This task includes the compilation of the OpenZeppelin ERC20 to Go and the creation of a new TokenType that identifies this new token. The holder scanner will use the getVotes(sender) method to track the balances of holders of this token.

There are two possible log events to be tracked:

  • LOG_TOPIC_ERC20_TRANSFER (0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef): Which is emitted when a holder transfers some balance of the token to other address.
  • LOG_TOPIC_ERC20VOTES_DELEGATE (0xdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724): Which is emitted when a user voting power changes. So when a user delegates some power voting, this event will be emitted twice: the first time includes the address, the previous and the current power voting of the user who performs the delegation, and the second time includes the address, the previous and the current power voting of the user who receives the delegation.

…egateVoteChange event to keep the voting power between holders updated
@lucasmenendez lucasmenendez linked an issue Oct 4, 2023 that may be closed by this pull request
@lucasmenendez lucasmenendez added the enhancement New feature or request label Oct 4, 2023
@lucasmenendez lucasmenendez self-assigned this Oct 4, 2023
@lucasmenendez lucasmenendez added this to the v0.2.0 milestone Oct 4, 2023
@lucasmenendez lucasmenendez deleted the feature/openzepellin_erc20_support branch October 4, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: support for delegated ERC20 (OpenZeppelin version)
1 participant