Uniswap V3 - Optimism

Decentralized Exchange. UniswapV3-v1 connector on optimism triggers methods like mint, deposit, withdraw, collect, burn. You can view details like source code, ABIs on Etherscan.

  • Use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee to indicate ETH.
  • use -1 or dsa.maxValue for the maximum amount in function.
  • If not sure about the arguments getId and setId, pass 0.

Mint

Mint New NFT LP Position

spells.add({  connector: "UNISWAP-V3-A",  method: "mint",  args: [tokenA, tokenB, fee, tickLower, tickUpper, amtA, amtB, slippage, getIds, setId]});
Parameter Type Description
tokenA address tokenA addreess
tokenB address tokenB addreess
fee uint24 fee percentage
tickLower int24 Lower tick
tickUpper int24 Upper tick
amtA uint256 amount of tokenA
amtB uint256 amount of tokenB
slippage uint256 slippage percentage
getIds uint256[] ID to retrieve amtA
setId uint256 ID stores the amount of LP token

Deposit

Increase Liquidity of NFT Position

spells.add({  connector: "UNISWAP-V3-A",  method: "deposit",  args: [tokenId, amountA, amountB, slippage, getIds, setId]});
Parameter Type Description
tokenId uint256 NFT LP Token ID.
amountA uint256 tokenA amounts.
amountB uint256 tokenB amounts.
slippage uint256 slippage.
getIds uint256[] IDs to retrieve token amounts
setId uint256 stores the liquidity amount

Withdraw

Decrease Liquidity of NFT Position

spells.add({  connector: "UNISWAP-V3-A",  method: "withdraw",  args: [tokenId, liquidity, amountAMin, amountBMin, getId, setIds]});
Parameter Type Description
tokenId uint256 NFT LP Token ID.
liquidity uint256 LP Token amount.
amountAMin uint256 Min amount of tokenA.
amountBMin uint256 Min amount of tokenB.
getId uint256 ID to retrieve LP token amounts
setIds uint256[] stores the amount of output tokens

Collect

Collect from NFT Position

spells.add({  connector: "UNISWAP-V3-A",  method: "collect",  args: [tokenId, amount0Max, amount1Max, getIds, setIds]});
Parameter Type Description
tokenId uint256 NFT LP Token ID.
amount0Max uint256 Max amount of token0.
amount1Max uint256 Max amount of token1.
getIds uint256[] IDs to retrieve amounts
setIds uint256[] stores the amount of output tokens

Burn

Burn NFT LP Position

spells.add({  connector: "UNISWAP-V3-A",  method: "burn",  args: [tokenId]});
Parameter Type Description
tokenId uint256 NFT LP Token ID

If you still can't find something you're looking for or have any questions, ask them at our developers community on Discord or simply send an Email.


Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.