unshETHZap - Dependencies

ISwapRouter.sol

This is the interface for the Uniswap V3 Swap Router, which provides functions for swapping tokens. The Swap Router facilitates the exchange of one token for another, either directly or along a specified path. The interface provides functions for exact input swaps, where a specified amount of one token is exchanged for as much as possible of another token, and exact output swaps, where as little as possible of one token is exchanged for a specified amount of another token.

ISwapRouter

The interface for the Uniswap V3 Swap Router. It provides the functions for executing token swaps.

exactInputSingle

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

Swaps amountIn of one token for as much as possible of another token.

Parameters

  • params ExactInputSingleParams: The parameters necessary for the swap

Return Values

  • uint256: The amount of the received token.

exactInput

function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut)

Swaps amountIn of one token for as much as possible of another along the specified path.

Parameters

  • params ExactInputParams: The parameters necessary for the multi-hop swap

Return Values

  • uint256: The amount of the received token.

exactOutputSingle

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

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

Parameters

  • params ExactOutputSingleParams: The parameters necessary for the swap

Return Values

  • uint256: The amount of the input token.

exactOutput

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

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

Parameters

  • params ExactOutputParams: The parameters necessary for the multi-hop swap

Return Values

  • uint256: The amount of the input token.
Previous
IERC20.sol