SelfPermit
Inherits: ISelfPermit
Functionality to call permit on any EIP-2612-compliant token for use in the route.
These functions are expected to be embedded in multicalls to allow EOAs to approve a contract and call a function that requires an approval in a single transaction.
Functions
selfPermit
Allows the contract to call the permit function on the specified token.
Parameters
token
address
The address of the token to permit.
value
uint256
The amount to permit.
deadline
uint256
The deadline for the permit.
v
uint8
The v value from the permit signature.
r
bytes32
The r value from the permit signature.
s
bytes32
The s value from the permit signature.
selfPermitIfNecessary
Allows the contract to call selfPermit if necessary based on the token's allowance.
Parameters
token
address
The address of the token to permit.
value
uint256
The amount to permit.
deadline
uint256
The deadline for the permit.
v
uint8
The v value from the permit signature.
r
bytes32
The r value from the permit signature.
s
bytes32
The s value from the permit signature.
selfPermitAllowed
Allows the contract to call the permit function with unlimited allowance on the specified token.
Parameters
token
address
The address of the token to permit.
nonce
uint256
The nonce for the permit.
expiry
uint256
The expiry time for the permit.
v
uint8
The v value from the permit signature.
r
bytes32
The r value from the permit signature.
s
bytes32
The s value from the permit signature.
selfPermitAllowedIfNecessary
Allows the contract to call selfPermitAllowed if necessary based on the token's allowance.
Parameters
token
address
The address of the token to permit.
nonce
uint256
The nonce for the permit.
expiry
uint256
The expiry time for the permit.
v
uint8
The v value from the permit signature.
r
bytes32
The r value from the permit signature.
s
bytes32
The s value from the permit signature.
Last updated