IRouterSwapExecutor
Functions
swap
function used to swap tokens.
function swap(SwapAndAddData memory _swapData)
external
payable
returns (uint256 amount0Diff, uint256 amount1Diff);
Parameters
Name | Type | Description |
---|---|---|
_swapData | SwapAndAddData | struct containing all the informations for swapping. |
Returns
Name | Type | Description |
---|---|---|
amount0Diff | uint256 | the difference in token0 amount before and after the swap. |
amount1Diff | uint256 | the difference in token1 amount before and after the swap. |
Errors
OnlyRouter
error OnlyRouter(address caller, address router);
AddressZero
error AddressZero();
SwapCallFailed
error SwapCallFailed();
ReceivedBelowMinimum
error ReceivedBelowMinimum();