Build
Architecture
contracts
contracts
evm
tools
interfaces
TridentIPoolRouter.sol
Interface.ipoolrouter

Git Source (opens in a new tab)

exactInputSingle

Swap amountIn of one token for as much as possible of another token

function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

Parameters

NameTypeDescription
paramsExactInputSingleParamsThe parameters necessary for the swap, encoded as ExactInputSingleParams in calldata

exactInput

Swap 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

NameTypeDescription
paramsExactInputParamsThe parameters necessary for the multi-hop swap, encoded as ExactInputParams in calldata

exactOutputSingle

Swaps as little as possible of one token for amountOut of another token

function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

Parameters

NameTypeDescription
paramsExactOutputSingleParamsThe parameters necessary for the swap, encoded as ExactOutputSingleParams in calldata

exactOutput

Swaps as little as possible of one token for amountOut of another along the specified path (reversed)

function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);

Parameters

NameTypeDescription
paramsExactOutputParamsThe parameters necessary for the multi-hop swap, encoded as ExactOutputParams in calldata

sweep

Recover mistakenly sent tokens

function sweep(address token, uint256 amount, address recipient) external payable;

ExactInputSingleParams

struct ExactInputSingleParams {
    address tokenIn;
    uint256 amountIn;
    uint256 amountOutMinimum;
    address pool;
    address to;
    bool unwrap;
}

ExactInputParams

struct ExactInputParams {
    address tokenIn;
    uint256 amountIn;
    uint256 amountOutMinimum;
    address[] path;
    address to;
    bool unwrap;
}

ExactOutputSingleParams

struct ExactOutputSingleParams {
    address tokenIn;
    uint256 amountOut;
    uint256 amountInMaximum;
    address pool;
    address to;
    bool unwrap;
}

ExactOutputParams

struct ExactOutputParams {
    address tokenIn;
    uint256 amountOut;
    uint256 amountInMaximum;
    address[] path;
    address to;
    bool unwrap;
}