-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Make ERC20Votes independent from ERC20Permit #3160
Comments
We would love to, but that would change the storage layout, which is a big breaking change for the upgradeable version of the contract :/ |
The storage layout is incompatible because of the nonces mapping in The nonces are an issue but interestingly it's part of @k06a's proposa to change that as well. However:
How would this work? The Votes interface is not standardized but the EIP712 signatures for voting by sig should use the value returned by the
This is a breaking change but we agree, we will have to do it in the next major release. @k06a Is there something in particular that motivates these suggestions? |
@frangio was just browsing library code and wondered when saw code duplications and unexpected dependencies. |
Changed the title to make it clearer but as the description says this also implies changing |
Fixed by #3816 for future 5.0 release. |
🧐 Motivation
We need a more clear and independent structure of
ERC20
extensions.📝 Details
Now
ERC20Votes
inheritsERC20Permit
to useEIP712
inheritance and moreover to abuse its permitnonces
. I believe we can remove theERC20Permit
constructor to keep it abstract and makeERC20Votes
have its own nonces for delegation and direct inheritance fromEIP712
.Moreover, I see you have
Votes
implementation since 4.5, so hopefully, you are going to use this implementation inERC20Votes
.The text was updated successfully, but these errors were encountered: