Skip to main content
Helpful?

Permit2Forwarder

Git Source | Generated with forge doc

PermitForwarder allows permitting this contract as a spender on permit2

This contract does not enforce the spender to be this contract, but that is the intended use case

State Variables

permit2

the Permit2 contract to forward approvals

IAllowanceTransfer public immutable permit2;

Functions

constructor

constructor(IAllowanceTransfer _permit2);

permit

allows forwarding a single permit to permit2

this function is payable to allow multicall with NATIVE based actions

function permit(address owner, IAllowanceTransfer.PermitSingle calldata permitSingle, bytes calldata signature)
external
payable
returns (bytes memory err);

Parameters

NameTypeDescription
owneraddressthe owner of the tokens
permitSingleIAllowanceTransfer.PermitSinglethe permit data
signaturebytesthe signature of the permit; abi.encodePacked(r, s, v)

permitBatch

allows forwarding batch permits to permit2

this function is payable to allow multicall with NATIVE based actions

function permitBatch(address owner, IAllowanceTransfer.PermitBatch calldata _permitBatch, bytes calldata signature)
external
payable
returns (bytes memory err);

Parameters

NameTypeDescription
owneraddressthe owner of the tokens
_permitBatchIAllowanceTransfer.PermitBatcha batch of approvals
signaturebytesthe signature of the permit; abi.encodePacked(r, s, v)
Helpful?