Skip to main content

NFTPositionInfo

Encapsulates the logic for getting info about a NFT token ID

Functions

getPositionInfo

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

Parameters:

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

Return Values:

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