Uniswap V3

UniswapV3-v1 resolver triggers methods like getPoolDetails, getPositionInfoByTokenId, getPositionsInfo, getMintAmount, getDepositAmount, getSingleDepositAmount, getSingleMintAmount, getWithdrawAmount, getCollectAmount, getUserNFTs. You can view details like source code, ABIs on Polygonscan.

getPoolDetails

Returns the pool details

function getPoolDetails(PoolConfig[] memory poolConfigs) public view returns (PoolData[] memory poolDatas);
paramstypeDescription
poolConfigsPoolConfigStruct containing tokenA, tokenB addresses and the fee.

getPositionInfoByTokenId

Returns the positIon info by token id.

function getPositionInfoByTokenId(uint256 tokenId) public view returns (PositionInfo memory pInfo);
paramstypeDescription
tokenIduint256NFT LP Token ID.

getPositionsInfo

Returns the position info of tokens the user has used as stakes.

 function getPositionsInfo(    address user,     uint256[] memory stakedTokenIds    ) public view returns (uint256[] memory tokenIds, PositionInfo[] memory positionsInfo);
paramstypeDescription
useraddressThe address of the user whose tokens position you want.
stakedTokenIdsuint256uint256 array of tokens-ids, the user has staked.

getMintAmount

Get the mint amount

function getMintAmount(MintParams memory mintParams) public view returns         (            address token0,            address token1,            uint256 liquidity,            uint256 amount0,            uint256 amount1,            uint256 amount0Min,            uint256 amount1Min        );
paramstypeDescription
mintParamsMintParamsStruct of mint params containing tokenA, tokenB, fee, lowerTick, upperTick, amountA, amountB, slippage.

getDepositAmount

Get the Deposit amount

    function getDepositAmount (        uint256 tokenId,        uint256 amountA,        uint256 amountB,        uint256 slippage    ) public view returns (         uint256 liquidity,         uint256 amount0,         uint256 amount1,         uint256 amount0Min,         uint256 amount1Min        );
paramstypeDescription
tokenIduint256NFT LP Token ID.
amountAuint256tokenA amounts.
amountBuint256tokenB amounts.
slippageuint256slippage

getSingleDepositAmount

Get single deposit amount

    function getSingleDepositAmount(        uint256 tokenId,        address tokenA,        uint256 amountA,        uint256 slippage    ) public view returns (         uint256 liquidity,         address tokenB,         uint256 amountB,         uint256 amountAMin,         uint256 amountBMin        );
paramstypeDescription
tokenIduint256NFT LP Token ID.
tokenAaddresstokenA address.
amountAuint256tokenA amounts.
slippageuint256slippage.

getSingleMintAmount

Get single mint amount

     function getSingleMintAmount(        address tokenA,        address tokenB,        uint256 amountA,        uint256 slippage,        uint24 fee,        int24 tickLower,        int24 tickUpper    )        public        view        returns (            uint256 liquidity,            uint256 amountB,            uint256 amountAMin,            uint256 amountBMin        );
paramstypeDescription
tokenAaddresstokenA address.
tokenBaddresstokenB address.
amountAuint256tokenA amounts.
slippageuint256slippage.
tickLoweruint24Lower tick.
tickUpperuint24Upper tick.

getWithdrawAmount

Get withdraw amount

    function getWithdrawAmount(        uint256 tokenId,        uint256 liquidity,        uint256 slippage    )        public        view        returns (            uint256 amount0,            uint256 amount1,            uint256 amount0Min,            uint256 amount1Min        );
paramstypeDescription
tokenIduint256NFT LP Token ID.
liquidityuint256LP Token amount.
slippageuint256slippage.

getCollectAmount

Get collect amount using token-id

function getCollectAmount(uint256 tokenId) public view returns (uint256 amountA, uint256 amountB);
paramstypeDescription
tokenIduint256NFT LP Token ID.

getUserNFTs

Get userNft token-ids

function getUserNFTs(address user) public view returns (uint256[] memory tokenIds);
paramstypeDescription
useraddressThe address of the user whose token-ids you want.


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.