INonfungiblePositionManager

Non-fungible token for positions

Wraps Algebra positions in a non-fungible token interface which allows for them to be transferred and authorized.

Developer note: Credit to Uniswap Labs under GPL-2.0-or-later license: https://github.com/Uniswap/v3-periphery

Events

IncreaseLiquidity

event IncreaseLiquidity(uint256 tokenId, uint128 liquidity, uint128 actualLiquidity, uint256 amount0, uint256 amount1, address pool)

Emitted when liquidity is increased for a position NFT Developer note: Also emitted when a token is minted

DecreaseLiquidity

event DecreaseLiquidity(uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1)

Emitted when liquidity is decreased for a position NFT

Collect

event Collect(uint256 tokenId, address recipient, uint256 amount0, uint256 amount1)

Emitted when tokens are collected for a position NFT Developer note: The amounts reported may not be exactly equivalent to the amounts transferred, due to rounding behavior

Functions

positions

function positions(uint256 tokenId) external view returns (uint96 nonce, address operator, address token0, address token1, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1) view external

Returns the position information associated with a given token ID. Developer note: Throws if the token ID is not valid.

Returns:

mint

function mint(struct INonfungiblePositionManager.MintParams params) external payable returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1) payable external

Creates a new position wrapped in a NFT Developer note: Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized a method does not exist, i.e. the pool is assumed to be initialized.

Returns:

increaseLiquidity

function increaseLiquidity(struct INonfungiblePositionManager.IncreaseLiquidityParams params) external payable returns (uint128 liquidity, uint256 amount0, uint256 amount1) payable external

Increases the amount of liquidity in a position, with tokens paid by the `msg.sender`

Returns:

decreaseLiquidity

function decreaseLiquidity(struct INonfungiblePositionManager.DecreaseLiquidityParams params) external payable returns (uint256 amount0, uint256 amount1) payable external

Decreases the amount of liquidity in a position and accounts it to the position

Returns:

collect

function collect(struct INonfungiblePositionManager.CollectParams params) external payable returns (uint256 amount0, uint256 amount1) payable external

Collects up to a maximum amount of fees owed to a specific position to the recipient

Returns:

burn

function burn(uint256 tokenId) external payable payable external

Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens must be collected first.