NFTPositionInfo

Encapsulates the logic for getting info about a NFT token ID

Functions

getPositionInfo

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

Parameters:

NameTypeDescription

factory

contract IDragonswapV2Factory

The address of the DragonswapV2 Factory used in computing the pool address

nonfungiblePositionManager

contract INonfungiblePositionManager

The address of the nonfungible position manager to query

tokenId

uint256

The unique identifier of an DragonswapV2 LP token

Return Values:

NameTypeDescription

pool

IDragonswapV2Pool

The address of the DragonswapV2 pool

tickLower

int24

The lower tick of the DragonswapV2 position

tickUpper

int24

The upper tick of the DragonswapV2 position

liquidity

uint128

The amount of liquidity staked

Last updated