ISeawaterExecutorSwapPermit2B

Git Source

Functions

swap2ExactInPermit254A7DBB1

performs a two stage swap across two pools using permit2 for token transfers

permit2's max amount must be set to amount

function swap2ExactInPermit254A7DBB1(
    address from,
    address to,
    uint256 amount,
    uint256 minOut,
    uint256 nonce,
    uint256 deadline,
    bytes memory sig
) 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
nonceuint256the permit2 nonce
deadlineuint256the permit2 deadline
sigbytesthe permit2 signature

Returns

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