SwapTokensForExactTokens
Uniswap Action Plugin - SwapTokensForExactTokens
Description
Swaps an exact amount of tokens for as much ETH as possible, along the route determined by the path.
Method
swapTokensForExactTokens(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 output tokens 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 output tokens. |
deadline |
| Unix timestamp after which the transaction will revert. |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Uniswap SwapTokensForExactTokens function here
Last updated