feat(tip-1004): add EIP-2612 permit to TIP-20 precompile#2748
Open
feat(tip-1004): add EIP-2612 permit to TIP-20 precompile#2748
Conversation
Implements permit(), nonces(), and DOMAIN_SEPARATOR() for TIP-20 tokens, gated behind the T2 hardfork. Only EOA signatures are supported (no EIP-1271). Includes Solidity reference implementation and comprehensive tests. Amp-Thread-ID: https://ampcode.com/threads/T-019c6da0-59df-709e-ba03-6613b5571b2d Co-authored-by: Amp <amp@ampcode.com>
📊 Tempo Precompiles CoverageprecompilesCoverage: 20661/21689 lines (95.26%) File details
contractsCoverage: 209/383 lines (54.57%) File details
Total: 20870/22072 lines (94.55%) |
howydev
commented
Feb 18, 2026
The TIP20 struct field was renamed from `_nonces` to `permit_nonces`, but the storage layout tests still referenced `nonces`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vm.skip() inside an invariant handler causes [FAIL: skipped] in Foundry. Use vm.assume(!isTempo) to discard the fuzz run instead. Also formats all PR-changed Solidity files. Amp-Thread-ID: https://ampcode.com/threads/T-019c6f1f-917c-75d8-a908-1621cd459d6f Co-authored-by: Amp <amp@ampcode.com>
The file was accidentally deleted, causing test_tip20_layout to fail when solc is not available (CI and most dev environments). Amp-Thread-ID: https://ampcode.com/threads/T-019c6f1f-917c-75d8-a908-1621cd459d6f Co-authored-by: Amp <amp@ampcode.com>
Restores the original file from main and only changes the 'nonces' label to 'permitNonces' to match the Rust field name (permit_nonces -> permitNonces via camelCase conversion). Amp-Thread-ID: https://ampcode.com/threads/T-019c6f1f-917c-75d8-a908-1621cd459d6f Co-authored-by: Amp <amp@ampcode.com>
8ac02f1 to
fdb2fc7
Compare
ca014f4 to
fdb2fc7
Compare
fgimenez
approved these changes
Feb 18, 2026
Member
fgimenez
left a comment
There was a problem hiding this comment.
deferring to others about invariant tests, otherwise lgtm
fgimenez
requested changes
Feb 18, 2026
fgimenez
approved these changes
Feb 18, 2026
howydev
commented
Feb 19, 2026
Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c76d4-c191-703b-a1da-a66c517ebed4
e17d93b to
e13c21e
Compare
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.
Implements TIP-1004: adds
permit(),nonces(), andDOMAIN_SEPARATOR()to TIP-20 precompile (EIP-2612).