BaseSwapDeposit
Last updated
Last updated
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Calculate amount of tokens you receive on swap
Returns the address of the pooled token at given index. Reverts if tokenIndex is out of range.
Swap two underlying tokens using the meta pool and the base pool
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_0
contract ISwap
undefined
_0
uint256
undefined
_0
contract IERC20
undefined
tokenIndexFrom
uint8
the token the user wants to sell
tokenIndexTo
uint8
the token the user wants to buy
dx
uint256
the amount of tokens the user wants to sell. If the token charges a fee on transfers, use the amount that gets transferred after the fee.
_0
uint256
amount of tokens the user will receive
index
uint256
the index of the token
_0
contract IERC20
address of the token at given index
tokenIndexFrom
uint8
the token the user wants to swap from
tokenIndexTo
uint8
the token the user wants to swap to
dx
uint256
the amount of tokens the user wants to swap from
minDy
uint256
the min amount the user would like to receive, or revert.
deadline
uint256
latest timestamp to accept this transaction
_0
uint256
undefined