Skip to main content

NFTPositionInfo

Encapsulates the logic for getting info about a NFT token ID

Functions

getPositionInfo

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

Parameters:

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

Return Values:

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