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
token
address
The token to approve
amount
uint256
The amount to approve
Returns
<none>
ApprovalType
The required approval type
approveMax
Approves a token for the maximum possible amount
function approveMax(address token) external payable;
Parameters
token
address
The token to approve
approveMaxMinusOne
Approves a token for the maximum possible amount minus one
function approveMaxMinusOne(address token) external payable;
Parameters
token
address
The token to approve
approveZeroThenMax
Approves a token for zero, then the maximum possible amount
function approveZeroThenMax(address token) external payable;
Parameters
token
address
The token to approve
approveZeroThenMaxMinusOne
Approves a token for zero, then the maximum possible amount minus one
function approveZeroThenMaxMinusOne(address token) external payable;
Parameters
token
address
The token to approve
callPositionManager
Calls the position manager with arbitrary calldata
function callPositionManager(bytes memory data) external payable returns (bytes memory result);
Parameters
data
bytes
Calldata to pass along to the position manager
Returns
result
bytes
The result from the call
mint
Calls the position manager's mint function
function mint(MintParams calldata params) external payable returns (bytes memory result);
Parameters
params
MintParams
Calldata to pass along to the position manager
Returns
result
bytes
The result from the call
increaseLiquidity
Calls the position manager's increaseLiquidity function
function increaseLiquidity(IncreaseLiquidityParams calldata params) external payable returns (bytes memory result);
Parameters
params
IncreaseLiquidityParams
Calldata to pass along to the position manager
Returns
result
bytes
The result from the call
Structs
MintParams
struct MintParams {
address token0;
address token1;
uint24 fee;
int24 tickLower;
int24 tickUpper;
uint256 amount0Min;
uint256 amount1Min;
address recipient;
}
IncreaseLiquidityParams
struct IncreaseLiquidityParams {
address token0;
address token1;
uint256 tokenId;
uint256 amount0Min;
uint256 amount1Min;
}
Enums
ApprovalType
enum ApprovalType {
NOT_REQUIRED,
MAX,
MAX_MINUS_ONE,
ZERO_THEN_MAX,
ZERO_THEN_MAX_MINUS_ONE
}
Last updated