ISeawaterAMM

Git Source

Inherits: ISeawaterEvents, ISeawaterExecutorSwap, ISeawaterExecutorSwapPermit2, ISeawaterExecutorQuote, ISeawaterExecutorPosition, ISeawaterExecutorUpdatePosition, ISeawaterExecutorAdminExposed

Functions

swapIn32502CA71

swaps _token for USDC

function swapIn32502CA71(address _token, uint256 _amount, uint256 _minOut) external returns (int256, int256);

Parameters

NameTypeDescription
_tokenaddressthe token to swap
_amountuint256input amount (token)
_minOutuint256the minimum output amount (usdc), reverting if the actual output is lower

Returns

NameTypeDescription
<none>int256amount of usdc out
<none>int256

swapInPermit2CEAAB576

swaps _token for USDC

function swapInPermit2CEAAB576(
    address _token,
    uint256 _amount,
    uint256 _minOut,
    uint256 _nonce,
    uint256 _deadline,
    uint256 _maxAmount,
    bytes memory _sig
) external returns (int256, int256);

Parameters

NameTypeDescription
_tokenaddressthe token to swap
_amountuint256input amount (token)
_minOutuint256the minimum output amount (usdc), reverting if the actual output is lower
_nonceuint256the nonce for the token
_deadlineuint256the deadline for the token
_maxAmountuint256the max amount of the token
_sigbytesthe signature for the token

Returns

NameTypeDescription
<none>int256amount of usdc out
<none>int256

swapOut5E08A399

swaps USDC for _token

function swapOut5E08A399(address _token, uint256 _amount, uint256 _minOut) external returns (int256, int256);

Parameters

NameTypeDescription
_tokenaddressthe token to swap
_amountuint256input amount (usdc)
_minOutuint256the minimum output amount (token), reverting if the actual output is lower

Returns

NameTypeDescription
<none>int256amount of token out
<none>int256

swapOutPermit23273373B

swaps USDC for _token

function swapOutPermit23273373B(
    address _token,
    uint256 _amount,
    uint256 _minOut,
    uint256 _nonce,
    uint256 _deadline,
    uint256 _maxAmount,
    bytes memory _sig
) external returns (int256, int256);

Parameters

NameTypeDescription
_tokenaddressthe token to swap
_amountuint256input amount (usdc)
_minOutuint256the minimum output amount (token), reverting if the actual output is lower
_nonceuint256the nonce for the token
_deadlineuint256the deadline for the token
_maxAmountuint256the max amount of the token
_sigbytesthe signature for the token

Returns

NameTypeDescription
<none>int256amount of token out
<none>int256

swap2ExactIn41203F1D

swaps tokenA for tokenB

function swap2ExactIn41203F1D(address _tokenA, address _tokenB, uint256 _amount, uint256 _minOut)
    external
    returns (uint256, uint256);

Parameters

NameTypeDescription
_tokenAaddressthe input token
_tokenBaddressthe output token
_amountuint256input amount (tokenA)
_minOutuint256the minimum output amount (tokenB), reverting if the actual output is lower

Returns

NameTypeDescription
<none>uint256amount of token A in, amount of token B out
<none>uint256