AddLiquidityETH
Uniswap Action Plugin - AddLiquidityETH
Description
Adds liquidity to an ERC-20⇄WETH pool with ETH.
Method
addLiquidityETH(address, uint256, uint256, uint256, address, uint256)
Input Parameters
Name | Plugin Type | Description |
---|---|---|
to |
| Uniswap V2 Router address |
value |
| The amount of ETH to add as liquidity if the token/WETH price is <= amountTokenDesired/value (WETH depreciates). |
Method Parameters
Name | Plugin Type | Description |
---|---|---|
token |
| A pool token |
amountTokenDesired |
| The amount of token to add as liquidity if the WETH/token price is <= value/amountTokenDesired (token depreciates). |
amountTokenMin |
| Bounds the extent to which the WETH/token price can go up before the transaction reverts. Must be <= amountTokenDesired. |
amountETHMin |
| Bounds the extent to which the token/WETH price can go up before the transaction reverts. Must be <= value |
to |
| Recipient of the liquidity tokens. |
deadline |
| Unix timestamp after which the transaction will revert. |
Returned Values
Name | Plugin Type | Description |
---|---|---|
amountA |
| The amount of token sent to the pool. |
amountB |
| The amount of ETH converted to WETH and sent to the pool. |
liquidity |
| The amount of liquidity tokens minted. |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Uniswap AddLiquidity function here
Last updated