Position NFT
Last updated
Last updated
This is a modified NFT contract to store user position. To minimize data, actual content is not stored inside the contract so far kept empty by the pool. It is appended on the fly with nft values. Pool then adds all the other fields to form valid metadata.
Index | Type | Size (b/r) | Cell | Name | Description |
---|---|---|---|---|---|
(slice) getPoolAddress ()
This function returns pool address that created this Position NFT
@return0 address in question
(slice) getUserAddress ()
This function returns user address that owned created this Position NFT
@return0 address in question
(int, int, int, int, int) getPositionInfo ()
This function returns data stored in Position NFT and is related to the position
@return0 liquidity that this position owns
@return1 lower tick of the position
@return2 upper tick of the position
@return3 fee growth of jetton0 in the given range at moment of the creation or latest collect of the NFT position
@return4 fee growth of jetton1 in the given range at moment of the creation or latest collect of the NFT position
(int, int, slice, slice, cell) get_nft_data ()
This function returns data of this Position NFT that is related to NFT as TEP-62 It also attaches some values to transfer them to pool
Opcode : 0xd5ecca2a
Initial message that pools sends to the NFT after state_init Access Rights: This operation is allowed for positionv3::pool_address
Opcode : 0x46ca335a
Message from the pool that is part of burn process. This message carries new feeGrowthInside?Last values form the pool Access Rights: This operation is allowed for positionv3::user_address
Opcode : 0x5fcc3d14
Thansfer LP NFT to another user. Please be warned that some UI elements could be unable to track it. However with SDK it still can be burned Access Rights: This operation is allowed for positionv3::user_address
Name | Size | Free |
---|---|---|
Path | Mnemonic | Type | Description |
---|---|---|---|
Path | Mnemonic | Type | Description |
---|---|---|---|
Path | Mnemonic | Type | Description |
---|---|---|---|
1
uint64
64 / 0
1
positionv3::index
The position number. Also the nft index
2
addr
267 / 0
1
positionv3::pool_address
Address of the pool that created this NFT
3
addr
267 / 0
1
positionv3::user_address
Address of the user ton wallet that currently owns the position
4
cell
0 / 1
1
positionv3::content
NFT metadata that contains image url, name and description packed in standard format
5
uint128
128 / 0
1
positionv3::liquidity
Position liquidity
6
int24
24 / 0
1
positionv3::tickLower
Position lower tick number
7
int24
24 / 0
1
positionv3::tickUpper
Position upper tick number
8
uint256
256 / 0
11
positionv3::feeGrowthInside0LastX128
Fees collected before the position was opened or updated for jetton0 (in pool terms)
9
uint256
256 / 0
11
positionv3::feeGrowthInside1LastX128
Fees collected before the position was opened or updated for jetton1 (in pool terms)
1
774
249
11
512
511
op
Uint(32),op
query_id
Uint(64)
queryid as of the TON documentation
user_address
Address(267)
NFT owner
liquidity
Uint(128)
Amount of the liquidity
tickLower
Int(24)
Lower tick of the NFT
tickUpper
Int(24)
Upper tick of the NFT
0
Cell(0) old_fee_cell
Fee counters From
0
feeGrowthInside0LastX128
Uint(256),x128
0
feeGrowthInside1LastX128
Uint(256),x128
0
nftIndex
Uint(64),Indexer
0
jetton0Amount
Coins(124),Indexer
0
jetton1Amount
Coins(124),Indexer
0
tick
Int(24),Indexer
op
Uint(32),op
query_id
Uint(64)
queryid as of the TON documentation
nft_owner
Address(267)
NFT owner to receive funds
liquidity2Burn
Uint(128)
Amount of the liquidity to burn, 0 is a valid amount, in this case only collected fees would be returned
tickLower
Int(24)
Lower tick of the NFT. NFT would check that it is the same as in position
tickUpper
Int(24)
Upper tick of the NFT. NFT would check that it is the same as in position
0
Cell(0) old_fee_cell
Fee counters From
0
feeGrowthInside0LastX128
Uint(256),x128
0
feeGrowthInside1LastX128
Uint(256),x128
op
Uint(32),op
query_id
Uint(64)
queryid as of the TON documentation
new_owner
Address(267)
New NFT owner
response_destination
Address(267)
Address to receive response
custom_payload
Cell(0),Maybe
Custom information for NFT. Ignored by our implementation
forward_amount
Coins(124)
Amount of coins to forward for processing
forward_payload
Cell(0),Either
Payload for processing