UniV3Wrapper
function name() external view returns (string)
SwapWrapper name.
Name | Type | Description |
---|---|---|
_0 | string | undefined |
function swap(address _tokenIn, address _tokenOut, address _recipient, uint256 _amount, bytes _data) external payable returns (uint256)
swap
handles all swaps on Uniswap v3.In the case of an ERC20 swap, this contract first possesses the
_amount
via transferFrom
and therefore preconditionally requires an ERC20 approval from the caller.Name | Type | Description |
---|---|---|
_tokenIn | address | Token in (or for ETH, 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE). |
_tokenOut | address | Token out (or for ETH, 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE). |
_recipient | address | Recipient of the swap output. |
_amount | uint256 | Amount of _tokenIn . |
_data | bytes | Abi encoded fee , deadline , amountOutMinimum , sqrtPriceLimitX96 . e.g. bytes memory _data = abi.encode(uint24(3000), uint256(1649787227), uint256(0), uint160(0)); |
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
function swapRouter() external view returns (contract ISwapRouter)
A deployed Uniswap v3 SwapRouter. See https://docs.uniswap.org/protocol/reference/deployments.
Name | Type | Description |
---|---|---|
_0 | contract ISwapRouter | undefined |
function weth() external view returns (contract IWETH9)
WETH contract.
Name | Type | Description |
---|---|---|
_0 | contract IWETH9 | undefined |
event WrapperSwapExecuted(address indexed tokenIn, address indexed tokenOut, address sender, address indexed recipient, uint256 amountIn, uint256 amountOut)
Event emitted after a successful swap.
Name | Type | Description |
---|---|---|
tokenIn indexed | address | undefined |
tokenOut indexed | address | undefined |
sender | address | undefined |
recipient indexed | address | undefined |
amountIn | uint256 | undefined |
amountOut | uint256 | undefined |
error ETHAmountInMismatch()
Last modified 2d ago