tradeBySourceAmount()
Trade an exact amount of source tokens for as many target tokens as possible
Last updated
Trade an exact amount of source tokens for as many target tokens as possible
Last updated
Trades the exact amount of source tokens for as many target tokens as possible.
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
See for a list of common errors and how to resolve them.