SwapExactETHForTokens
Uniswap Action Plugin - SwapExactETHForTokens
Description
Swaps an exact amount of ETH for as many output tokens as possible, along the route determined by the path.
Method
swapExactETHForTokens(uint256, address[], address, uint256)
Input Parameters
Name | Plugin Type | Description |
---|---|---|
to |
| Uniswap V2 Router address |
value |
| The amount of ETH to send. |
Method Parameters
Name | Plugin Type | Description |
---|---|---|
amountOutMin |
| The minimum amount of output tokens that must be received for the transaction not to revert. |
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 SwapExactETHForTokens function here
Last updated