Skip to main content

NFTPositionInfo

Encapsulates the logic for getting info about a NFT token ID

Functions

getPositionInfo

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

Parameters:

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

Return Values:

NameTypeDescription
poolIPegasysV3PoolThe address of the Pegasys V3 pool
tickLowerint24The lower tick of the Pegasys V3 position
tickUpperint24The upper tick of the Pegasys V3 position
liquidityuint128The amount of liquidity staked