ExchangeWithBestRate
Curve Action Plugin - ExchangeWithBestRate
Description
Perform an exchange using the pool that offers the best rate.
Method
exchange_with_best_rate(address, address, uint256, uint256, address)
Input Parameters
No required input parameters
Method Parameters
Name | Type | Description |
---|---|---|
from |
| Address of coin being sent. |
to |
| Address of coin being received. |
amount |
| Quantity of |
expected |
| Minimum quantity of |
receiver |
| Optional address to transfer the received tokens to. If not specified, defaults to the caller. |
Returned Values
Name | Plugin Type | Description |
---|---|---|
amountReceived |
| Amount received in the exchange |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Curve exchange here
Last updated