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