Token Approval
User approves the Permit2 contract to spend ERC20 tokens. This is an on-chain transaction and requires gas.
Node.js + Wallet UI
Approve Permit2 once, sign an off-chain EIP-712 Permit2 message, then optionally execute a demo transfer with the connected wallet as spender.
User approves the Permit2 contract to spend ERC20 tokens. This is an on-chain transaction and requires gas.
User signs Permit2 typed data off-chain. Signing has no gas cost.
The spender uses the signature to transfer tokens under the signed amount, nonce, and expiry.
{}
No signature yet.
If a token supports EIP-2612 permit, token approval can also be done with a signature. If it does not, the user first approves Permit2 and then signs the Permit2 authorization.