feat(eip2612): declare the permit surface in IEip2612 - #19
Merged
Conversation
The counterpart of IEip3009: OpenZeppelin's IERC20Permit carries the EIP as written -- permit with the (v, r, s) triple, nonces, DOMAIN_SEPARATOR -- and IEip2612 extends it with the bytes-signature permit an ERC-1271 account needs. Eip2612 implements it; the only override is nonces, which both the nonce mixin and the interface declare. Integrators compile against one file per payment module. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Re-audit item R-8:
Eip3009hasIEip3009,Eip2612had no counterpart, so integrators could compile against one payment module's interface but not the other's.What
IEip2612(new):is IERC20Permit(OpenZeppelin's declaration of the EIP —permit(v,r,s),nonces,DOMAIN_SEPARATOR) plus thebytes signaturepermit, the same ERC-1271 extensionIEip3009declares.Eip2612implements it. The only override isnonces, whichNoncesUpgradeableandIERC20Permitboth declare;permit/DOMAIN_SEPARATORneed no marker. (ListingIEip2612in the override instead ofIERC20Permitdoes not compile — checked.)type(IEip2612).interfaceIdto the one selector this repo declares; the EIP surface is OpenZeppelin's constant, not re-derived here.Checks
npm run check— fmt · lint · lock:check · 140 tests; Slither 0 locally; Halmos in CI. Runtime sizes +~90 B (thenonceswrapper).🤖 Generated with Claude Code