Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ERC20 Permit (EIP-2612) #2237
Add ERC20 Permit (EIP-2612) #2237
Changes from 10 commits
19a413a
48c41df
d1e0f4b
cf718ee
53516bc
be37397
743fe9a
0c02fdc
255e11a
d5037d2
b11d7ab
58c7098
1bd9922
cb00f8a
c5d01e9
aacea0c
b57f655
0560ea8
4552f52
9a916f7
91e98a4
e331820
ade3af2
9a661c9
f4b7f93
8f7f47c
b7b5abd
24e4582
737fa3b
f410734
9d60a71
3beaf01
837586d
add4067
f26f0e3
acd82cd
4444d3b
71c9e3d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It seems we should use pure internal method
version()
orpermitVersion()
for this.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.
Are you suggesting an internal setter for users to set their own version field? I'm actually not sure what all the use cases for
version
are, if you have insights on this that'd be extremely helpful.That said we do need to provide a way for either the version or domain separator to be queried, as noted here.
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.
I believe version makes sense when behaviour changes without address change (upgradablity?). So I mean version method could be overrided by user, or maybe should be even abstract.
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.
I see. It'd be great to have some examples to show in the docs.
Regarding implementation, we could have a setter and a getter, where the setter also calls
_updateDomainSeparator
and not increase gas costs ofpermit
that way.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.
@k06a In this case though the semantics of the signature are defined by the EIP, so I don't see a reason for
version
to change.