SwapETHForExactTokens
Uniswap Action Plugin - SwapETHForExactTokens
Description
Receive an exact amount of tokens for as little ETH as possible, along the route determined by the path.
Method
swapETHForExactTokens(uint256, address[], address, uint256)
Input Parameters
Name | Plugin Type | Description |
---|---|---|
to |
| Uniswap V2 Router address |
value |
| The maximum amount of ETH that can be required before the transaction reverts. |
Method Parameters
Name | Plugin Type | Description |
---|---|---|
amountOut |
| The amount of tokens to receive. |
path |
| An array of token addresses. |
to |
| Recipient of the output tokens. |
deadline |
| Unix timestamp after which the transaction will revert. |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Uniswap SwapETHForExactTokens function here
Last updated