NFT positions
Wraps Algebra positions in the ERC721 non-fungible token interface
Developer note: Credit to Uniswap Labs under GPL-2.0-or-later license: https://github.com/Uniswap/v3-periphery
modifier isAuthorizedForToken(uint256 tokenId)
internal
Name | Type | Description |
---|---|---|
Developer note: The address of the farming center contract, which handles farmings logic
Developer note: mapping tokenId => farmingCenter
Developer note: mapping tokenId => farmingCenter
constructor(address _factory, address _WNativeToken, address _tokenDescriptor_, address _poolDeployer) public
public
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 tokenURI(uint256 tokenId) public view returns (string)
view public
Returns:
function baseURI() public pure returns (string)
pure public
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 toFarming) 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
function getApproved(uint256 tokenId) public view returns (address)
view public
*Developer note: Returns the account approved for `tokenId` token.
Requirements:
`tokenId` must exist.*
Returns:
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 |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|