-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Add EIP-712 name
and version
getters
#4303
Conversation
🦋 Changeset detectedLatest commit: ce00023 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
IMO, eip712Domain() public
should use these two new internal function (in case they are ever overriden)
EDIT: actually, if the values ever change (because of an override) that would cause a lot of trouble ... so I'll remove the virtual keyword for the 2 internal functions.
Yes, agreed how about an internal setFunction(atring) so it can also be overriden? Edit: saw your edit now |
I don't think this values should ever be changed. If they were, the caches would be invalid ... and we can't update the immutable cache. Also I don't think frontends are designed to handle such changes |
Makes sense, I commited with the getters used internaly and there are no more changes to be done, right? Also the checks / tests-upgradeable is failling but I gess it it some conflict with the upgradeable contract that already have this getters, I`ll see how to fix this |
It looks good to me, but I'd like @ernestognw and @frangio 's opinion on whether the getters should be virtual. Its critical that the values returned by the getters are constant in time, because the |
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.
LGTM
Perhaps there's a use case in overriding any of those values. For example, if a contract wants to invalidate a domain within an upgrade (eg. reject signatures based on the version). Still, I'm not convinced it's worth the risk of letting users override them. Are you really sure those values will never change? @Amxx |
@jbcarpanelli suggested making all functions E.g.:
|
2338b79
to
2aa48e8
Compare
Fixes #4226
Add internal name and version getters for EIP712
PR Checklist
npx changeset add
)