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

Subgraph: fix issue with delegation changes on transfer events #820

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

pedropregueiro
Copy link
Contributor

Fixes #819

The handleTransfer event wrongly updates the delegate field of existing token holder accounts when transferring all nouns.

The delegate value should only change either a) when explicitly changed via contract; or b) when a new holder buys their first noun, in which case it should self-delegate the votes. Otherwise, if the delegate has been set to another account, it should remain until explicitly changed.

Created a new test file for testing these erc-721 actions.

@pedropregueiro
Copy link
Contributor Author

hey @solimander, got some time to take a look at this in the coming days? the issue is currently affecting most noun frontend clients including nouns.wtf and nouns.camp

thanks! 🙌

Copy link
Collaborator

@solimander solimander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution, thank you @pedropregueiro 🙏

@solimander solimander merged commit 30ac868 into nounsDAO:master Dec 12, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subgraph: nounsRepresented in delegate query seem out of sync
2 participants