IAdaptor

Adaptor - is a smart contract that allows seamless interaction with various protocols by same interface. Its address is usually calculated by its deployer and nonce.

Functions

quote

function quote(
    address tokenIn,
    uint256 amountIn,
    bytes calldata data
) external view returns (uint256 amountOut);
Parameter
Description

tokenIn

input token for a swap

amountIn

input amount for a swap

data

raw, protocol-specific data, decoded inside of adaptor

swap

function swap(
    address tokenIn,
    uint256 amountIn,
    bytes calldata data,
    address recipient
) external;
Parameters
Description

...

same as for "quote"

recipient

output token receiver

Last updated