Exchange
Curve Action Plugin - Exchange
Description
Perform a token exchange using a specific pool.
Method
exchange(address, address, address, uint256, uint256, address)
Input Parameters
No required input parameters
Method Parameters
Name | Type | Description |
---|---|---|
pool |
| Address of the pool to use for the swap. |
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