Skip to main content
Helpful?

NFTPositionInfo

Encapsulates the logic for getting info about a NFT token ID

Functions

getPositionInfo

  function getPositionInfo(
contract IUniswapV3Factory factory,
contract INonfungiblePositionManager nonfungiblePositionManager,
uint256 tokenId
) internal view returns (contract IUniswapV3Pool pool, int24 tickLower, int24 tickUpper, uint128 liquidity)

Parameters:

NameTypeDescription
factorycontract IUniswapV3FactoryThe address of the Uniswap V3 Factory used in computing the pool address
nonfungiblePositionManagercontract INonfungiblePositionManagerThe address of the nonfungible position manager to query
tokenIduint256The unique identifier of an Uniswap V3 LP token

Return Values:

NameTypeDescription
poolIUniswapV3PoolThe address of the Uniswap V3 pool
tickLowerint24The lower tick of the Uniswap V3 position
tickUpperint24The upper tick of the Uniswap V3 position
liquidityuint128The amount of liquidity staked
Helpful?