IApproveAndCall

Functions

getApprovalType

Lens to be called off-chain to determine which (if any) of the relevant approval functions should be called

function getApprovalType(address token, uint256 amount) external returns (ApprovalType);

Parameters

Name
Type
Description

token

address

The token to approve

amount

uint256

The amount to approve

Returns

Name
Type
Description

<none>

ApprovalType

The required approval type

approveMax

Approves a token for the maximum possible amount

function approveMax(address token) external payable;

Parameters

Name
Type
Description

token

address

The token to approve

approveMaxMinusOne

Approves a token for the maximum possible amount minus one

function approveMaxMinusOne(address token) external payable;

Parameters

Name
Type
Description

token

address

The token to approve

approveZeroThenMax

Approves a token for zero, then the maximum possible amount

Parameters

Name
Type
Description

token

address

The token to approve

approveZeroThenMaxMinusOne

Approves a token for zero, then the maximum possible amount minus one

Parameters

Name
Type
Description

token

address

The token to approve

callPositionManager

Calls the position manager with arbitrary calldata

Parameters

Name
Type
Description

data

bytes

Calldata to pass along to the position manager

Returns

Name
Type
Description

result

bytes

The result from the call

mint

Calls the position manager's mint function

Parameters

Name
Type
Description

params

MintParams

Calldata to pass along to the position manager

Returns

Name
Type
Description

result

bytes

The result from the call

increaseLiquidity

Calls the position manager's increaseLiquidity function

Parameters

Name
Type
Description

params

IncreaseLiquidityParams

Calldata to pass along to the position manager

Returns

Name
Type
Description

result

bytes

The result from the call

Structs

MintParams

IncreaseLiquidityParams

Enums

ApprovalType

Last updated