ExactOutputSlim
Inherits: Payment, IExactOutputSlim
Functions
maverickV2SwapCallback
Callback function called by Maverick V2 pools when swapping tokens.
function maverickV2SwapCallback(IERC20 tokenIn, uint256 amountToPay, uint256, bytes calldata data) external virtual;
Parameters
tokenIn
IERC20
The input token.
amountToPay
uint256
The amount to pay.
<none>
uint256
data
bytes
Additional data.
exactOutputSingleMinimal
Perform a swap with an exact output amount.
function exactOutputSingleMinimal(
address recipient,
IMaverickV2Pool pool,
bool tokenAIn,
uint256 amountOut,
int32 tickLimit
) public payable returns (uint256 amountIn, uint256 amountOut_);
Parameters
recipient
address
The recipient of the swapped tokens.
pool
IMaverickV2Pool
The MaverickV2 pool to use for the swap.
tokenAIn
bool
Whether token A is the input token.
amountOut
uint256
The exact output amount.
tickLimit
int32
The tick limit for the swap.
Returns
amountIn
uint256
The input amount required to achieve the exact output.
amountOut_
uint256
The actual output amount received from the swap.
_exactOutputSingleWithTickCheck
Perform an exact output single swap with tick limit validation.
function _exactOutputSingleWithTickCheck(
IMaverickV2Pool pool,
address recipient,
uint256 amountOut,
bool tokenAIn,
int32 tickLimit
) internal returns (uint256 amountIn, uint256 _amountOut);
Parameters
pool
IMaverickV2Pool
The MaverickV2 pool to use for the swap.
recipient
address
The recipient of the swapped tokens.
amountOut
uint256
The exact output amount.
tokenAIn
bool
Whether token A is the input token.
tickLimit
int32
The tick limit for the swap.
Returns
amountIn
uint256
The input amount required to achieve the exact output.
_amountOut
uint256
The actual output amount received from the swap.
Last updated