-
Notifications
You must be signed in to change notification settings - Fork 13
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
refactor EIP712 #458
refactor EIP712 #458
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referencing: #453 (comment)
I'd be more incline to approve this change if we at least use ECDSA.recover
from OZ
I think #444 can be linked to this PR too |
fe7c3ff
I haven't tested, but just to give you a quick answer I believe that ECDSA.sol is a big culprit in bytecode waste due to its numerous error messages in the form of strings. |
Approved in the end, because I just compared OZ's implementation to ours. With this change, our way of doing it is very similar to OZ's |
There's a catch: each Morpho instance will share the same EIP712 version, because it's stored as a constant. This has no impact as we've discussed before and would require further changes to move it to immutable, so I approve this PR as is. |
I am not sure to understand your point. What does it change to go from constant to immutable ? |
Moving to an immutable would allow it to be set at deployment, customized according to the e-mode or set by governance, for example. So each Morpho instance could in practice have a specific eip712 version |
Pull Request
Issue(s) fixed
This pull request:
This POC limits EIP712 changes to only the changes needed to have the domain separator be calculated on runtime so that the proxy contract is the verifying authority rather than the implementation.
It doesn't seem viable to use the full EIP712 openzeppelin implementation right now because it takes up too much bytecode.