expectedTradeInput()
Last updated
Last updated
Using this function, one can query the contract indicating the target token amount they would like to receive, and receive an indication of the expected source token amount required.
Note that since the rate changes over time, the required amount might reduce with time as the price changes.
Name | Type | Description |
---|---|---|
token
Token
The token address of the token you would like to trade out of the contract
targetAmount
uint128
The amount of target tokens you would like to receive at the end of the trade