BaseSwapDeposit

Methods

baseSwap

function baseSwap() external view returns (contract ISwap)

Returns

baseTokens

function baseTokens(uint256) external view returns (contract IERC20)

Parameters

Returns

calculateSwap

function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) external view returns (uint256)

Calculate amount of tokens you receive on swap

Parameters

Returns

getToken

function getToken(uint256 index) external view returns (contract IERC20)

Returns the address of the pooled token at given index. Reverts if tokenIndex is out of range.

Parameters

Returns

swap

function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) external nonpayable returns (uint256)

Swap two underlying tokens using the meta pool and the base pool

Parameters

Returns

Last updated