Comment on page
tradeBySourceAmount()
Trade an exact amount of source tokens for as many target tokens as possible
BancorNetwork.sol
function tradeBySourceAmount(
Token sourceToken,
Token targetToken,
uint256 sourceAmount,
uint256 minReturnAmount,
uint256 deadline,
address beneficiary
) external payable
Trades the exact amount of source tokens for as many target tokens as possible.
Name | Type | Description |
---|---|---|
sourceToken | Token | The source token address |
targetToken | Token | The target token address |
sourceAmount | uint256 | The amount of source tokens |
minReturnAmount | uint256 | The minimum amount of target tokens that must be received for the transaction to not revert |
deadline | uint256 | Unix timestamp after which the transaction will revert |
beneficiary | address | The address receiving the target tokens |
To trade directly with the Ether token, use the contract address: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
Last modified 1yr ago