ISeawaterExecutorSwap

Git Source

Functions

swap904369BE

swaps within a pool

function swap904369BE(address pool, bool zeroForOne, int256 amount, uint256 priceLimit)
    external
    returns (int256, int256);

Parameters

NameTypeDescription
pooladdressthe pool to swap on
zeroForOnebooltrue if swapping token->fluid token
amountint256the amount of token to swap, positive if exactIn, negative if exactOut
priceLimituint256the price limit for swaps, encoded as a sqrtX96 price

Returns

NameTypeDescription
<none>int256(token0, token1) delta
<none>int256

swap2ExactIn41203F1D

performs a two stage swap across two pools

function swap2ExactIn41203F1D(address from, address to, uint256 amount, uint256 minOut)
    external
    returns (uint256, uint256);

Parameters

NameTypeDescription
fromaddressthe input token
toaddressthe output token
amountuint256the amount of the input token to use
minOutuint256the minimum valid amount of the output token, reverts if not reached

Returns

NameTypeDescription
<none>uint256(amount in, amount out)
<none>uint256