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
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
Name | Type | Description |
---|---|---|
event DecreaseLiquidity(uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1)
Emitted when liquidity is decreased for a position NFT
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
event FarmingFailed(uint256 tokenId)
Emitted if farming failed in call from NonfungiblePositionManager. Developer note: Should never be emitted
function positions(uint256 tokenId) external view returns (uint88 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:
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:
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:
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:
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:
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.
function approveForFarming(uint256 tokenId, bool approve) external payable
payable external
Changes approval of token ID for farming.
function switchFarmingStatus(uint256 tokenId, bool isFarmed) external
external
Changes farming status of token to 'farmed' or 'not farmed' Developer note: can be called only by farmingCenter
function setFarmingCenter(address newFarmingCenter) external
external
Changes address of farmingCenter Developer note: can be called only by factory owner or NONFUNGIBLE_POSITION_MANAGER_ADMINISTRATOR_ROLE
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|