Uniswap v3 on Optimism
Deployments
| Name | Address |
|---|---|
PositionsNFT | 0xC36442b4a4522E871399CD717aBDD847Ab11FE88 (opens in a new tab) |
Action: deposit
Parameters
| Name | Type | Description |
|---|---|---|
targets | string[] (optional) | NftId position NFT Id |
tokens | string[] (optional) | Token symbol | Token address |
fees | string[] (optional) | Fee fee |
For safety reasons and to prevent potential ETH losses, sending ETH directly is prohibited for any function. Instead, ETH must be wrapped into WETH (Wrapped Ether) before interacting with the protocol.
If targets is unspecified tokens must be passed. New positions in any pair
of these tokens can be minted. Existing positions in any pair of these tokens
can be managed.
If tokens is unspecified, minting of new positions won't be allowed.
If the avatar has approved the Uniswap v3 Positions NFT contract to spend
tokens other than the ones specified in tokens, the role will be able to
increase any existing positions' liquidity in these tokens as well.
TARGET below refers to the ERC-721 token id (NFT Id) of each element given
in targets.
TARGET_TOKEN below refers to the ERC-20 token address of each element given
in targets.
TOKEN below refers to the ERC-20 token address of each element given in
tokens.
FEE below refers to the fee percentage of each element given in fees.
TARGET_TOKEN · approve
Approve PositionsNFT to spend TARGET_TOKEN tokens on behalf of the avatar.
-
Contract:
TARGET_TOKEN -
Function:
approve(address,uint256)Parameter Constraint spenderequal to PositionsNFTamount-
TOKEN · approve
Approve PositionsNFT to spend TOKEN tokens on behalf of the avatar.
-
Contract:
TOKEN -
Function:
approve(address,uint256)Parameter Constraint spenderequal to PositionsNFTamount-
mint · PositionsNFT
Deposit TOKEN tokens to the corresponding Uniswap v3 pool and receive an ERC-721 token (NFT) representing the newly minted liquidity position.
-
Contract:
PositionsNFT -
Function:
mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))Parameter Constraint params.token0equal to TOKENparams.token1equal to TOKENparams.feeequal to FEEparams.tickLower- params.tickUpper- params.amount0Desired- params.amount1Desired- params.amount0Min- params.amount1Min- params.deadline-
increaseLiquidity · PositionsNFT
Increase the liquidity in a NFT position by adding the desired amounts of token0 and token1.
-
Contract:
PositionsNFT -
Function:
increaseLiquidity((uint256,uint256,uint256,uint256,uint256,uint256))Parameter Constraint params.tokenIdequal to TARGETparams.amount0Desired- params.amount1Desired- params.amount0Min- params.amount1Min- params.deadline-
If targets is not specified then all positions owned by the avatar will be
considered. Ownership is checked dynamically at condition evaluation time
through the
AvatarIsOwnerOfERC721 (opens in a new tab)
custom condition applied to params.tokenId.
decreaseLiquidity · PositionsNFT
Decrease the liquidity in a NFT position by removing the desired liquidity amount.
-
Contract:
PositionsNFT -
Function:
decreaseLiquidity((uint256,uint128,uint256,uint256,uint256))Parameter Constraint params.tokenIdequal to TARGETparams.liquidity- params.amount0Min- params.amount1Min- params.deadline-
collect · PositionsNFT
Collect accumulated fees from a specific NFT position.
-
Contract:
PositionsNFT -
Function:
collect((uint256,address,uint128,uint128))Parameter Constraint params.tokenIdequal to TARGETparams.recipientequal to AVATARparams.amount0Max- params.amount1Max-