TESTNET ONLINE: PECORINO PECORINO

Permit2

Signet smart contracts integrate with permit2 for token-based flows.
Tests for Permit2 functionality are implemented as mainnet fork tests against the official Permit2 contract on Ethereum.

Things to know

Signet’s permit2 integration:

  • Enables intent-based Orders with user signatures and Filler submissions
  • Allows multiple token inputs with a single user signature
  • Improves UX by enabling single-transaction flows instead of the two-transaction approve + transfer process
  • Works with tokens lacking native permit support

Identifying functions that integreate with permit2

Contracts and functions that integrate with Permit2 are clearly named.

UsesPermit2 is a convenience contract that stores the address of the permit2 contract and implements helper structs for passing permit2 information through contract functions.

OrdersPermit2 implements the integration with permit2 used by the Orders smart contracts:

  • Utilizes batch token transfers, enabling multiple token inputs for Orders
  • Used in initiatePermit2 and fillPermit2
  • witness field consists of an array of Outputs

PassagePermit2 implements the integration with permit2 used by the Passage smart contracts:

  • Utilizes single token transfers
  • Used in enterPermit2 and exitPermit2
  • witness field contains information about the recipient of the tokens on the Host or on the Rollup.