-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Non-Fungible Votes - assign NFTs with different voting weight #3755
base: master
Are you sure you want to change the base?
Conversation
…oting power - user _unitsBalance() to map current user power balance - delegates() default to current address, instead of zero address - _getVotingUnits() is no longer virtual and shouldn't be overridden
Function powerOfToken(tokenId) used to return token power for token Id
Removed the forced opt-in to make things more compatible with the existing Votes extension. Everything's much simpler and more elegant now. Still wondering what to do about the behaviour tests. It passes only if the voting power for each token is worth 1 vote. |
👋
As a follow-up on a forum thread regarding the assignment of different voting power for different ERC721 tokens.
https://forum.openzeppelin.com/t/erc721-voting-power-based-on-some-property/24550/22
Problems
Solution
Remove the opt-out option and track all voting power movements for all accounts at all time.
Drawbacks:
However, in some cases, post merge, and on L2s this increase in transaction fees might be worth it.
Description
This PR includes a new version of Votes, dubbed VotesForced, with a new integration for ERC721 that uses an arbitrary token power function to determine the voting power for each token.
PR Checklist