Skip to main content

Reference

Interfaces, signatures, parameters, and generated references.

Lookup friendly
TOC available

Permit2Forwarder

Git Source - Generated with forge doc

Inherits: IPermit2Forwarder

Permit2Forwarder 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)

Returns

NameTypeDescription
errbytesthe error returned by a reverting permit call, empty if successful

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)

Returns

NameTypeDescription
errbytesthe error returned by a reverting permit call, empty if successful