IRouterSwapExecutor

Git Source

Functions

swap

function used to swap tokens.

function swap(SwapAndAddData memory _swapData)
    external
    payable
    returns (uint256 amount0Diff, uint256 amount1Diff);

Parameters

NameTypeDescription
_swapDataSwapAndAddDatastruct containing all the informations for swapping.

Returns

NameTypeDescription
amount0Diffuint256the difference in token0 amount before and after the swap.
amount1Diffuint256the 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();