ISwapRouterPancake
Git Source (opens in a new tab)
Inherits: IUniswapV3SwapCallback
Functions
exactInputSingle
Swaps amountIn
of one token for as much as possible of another token
function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
Parameters
Name | Type | Description |
---|---|---|
params | ExactInputSingleParams | The parameters necessary for the swap, encoded as ExactInputSingleParams in calldata |
Returns
Name | Type | Description |
---|---|---|
amountOut | uint256 | The amount of the received token |
exactInput
Swaps amountIn
of one token for as much as possible of another along the specified path
function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);
Parameters
Name | Type | Description |
---|---|---|
params | ExactInputParams | The parameters necessary for the multi-hop swap, encoded as ExactInputParams in calldata |
Returns
Name | Type | Description |
---|---|---|
amountOut | uint256 | The amount of the received token |
Structs
ExactInputSingleParams
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
ExactInputParams
struct ExactInputParams {
bytes path;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
}