Skip to content

[PT1-347] Feature/permit2 without witness#400

Merged
ifelsedeveloper merged 10 commits intomasterfrom
feature/permit2-without-witness
Feb 3, 2026
Merged

[PT1-347] Feature/permit2 without witness#400
ifelsedeveloper merged 10 commits intomasterfrom
feature/permit2-without-witness

Conversation

@ifelsedeveloper
Copy link
Contributor

@ifelsedeveloper ifelsedeveloper commented Jan 30, 2026

Change Summary

What does this PR change?
Adds Permit2Proxy contract - a non-witness version of Permit2WitnessProxy that uses permitTransferFrom instead of permitWitnessTransferFrom, enabling simpler Permit2 integrations without witness data.

Related Issue/Ticket:
https://1inch.atlassian.net/browse/PT1-347

Testing & Verification

How was this tested?

  • Unit tests
  • Integration tests
  • Manual testing (describe steps)
  • Verified on staging
yarn test test/Permit2Proxy.js

  Permit2Proxy
    ✔ permit2 example (without witness)

  1 passing (802ms)

Risk Assessment

Risk Level:

  • Low - Minor changes, no operational impact
  • Medium - Moderate changes, limited impact, standard rollback available
  • High - Significant changes, potential operational impact, complex rollback

Risks & Impact

  • New contract addition only, no changes to existing contracts
  • No migration required
  • No breaking changes to existing functionality

Files Changed

  • contracts/extensions/Permit2Proxy.sol - New proxy contract without witness
  • contracts/interfaces/IPermit2TransferFrom.sol - New interface for permitTransferFrom
  • test/Permit2Proxy.js - Unit test for the new contract
  • test/WitnessProxyExample.js - Updated test with proper nonce handling
  • test/helpers/nonce.js - Helper for unique Permit2 nonce generation
  • docs/extensions/Permit2Proxy.md - Documentation for the new contract
  • dev.md - Development guide with reference to selector bruteforce tool

- Introduced Permit2Proxy contract for proxy transfer functionality using Permit2.
- Added IPermit2TransferFrom interface defining structures and methods for permit-based token transfers.
- Implemented a script for ABI selector extraction to facilitate selector management.
- Updated Permit2Proxy contract to use IPermit2TransferFrom interface and corrected function selectors.
- Removed obsolete abi_selectors.py script to streamline the codebase.
- Added a new selector bruteforce script for enhanced functionality.
- Introduced ProxyExample test to demonstrate permit2 usage without witness.
- Introduced a new development guide in `dev.md` detailing the usage of the selector bruteforce tool for proxy contracts.
- Removed the obsolete `selector_bruteforce.py` script to streamline the codebase and encourage the use of the new guide.
- Created a new documentation file for the Permit2Proxy contract, detailing its purpose, functions, and error handling.
- Included descriptions for the constructor and the `func_nZHTch` method, along with the associated error `Permit2ProxyBadSelector`.
@ifelsedeveloper ifelsedeveloper merged commit a6148e1 into master Feb 3, 2026
6 checks passed
@ifelsedeveloper ifelsedeveloper deleted the feature/permit2-without-witness branch February 3, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants