
NFT deployment
The collection deploys NFT items with the initial owner and the item-specific metadata.
How to verify an NFT belongs to a collection?
High level
You can do it with a single request:TypeScript
Low level
First read the NFT item index. If the collection, for that index, returns the same NFT item address, the item belongs to the collection.TypeScript
How to get full metadata of an NFT
High level
Playground link for metadataLow level
Metadata is split into two parts: one part is stored on the item, another on the collection. We need to merge them. To get metadata for an NFT of a particular index, first fetch the NFT item address from the collection, then read the item metadata, then combine it with the collection metadata to get the final result.
NFT transfer
transfer parameters
Parameter | Purpose | Value |
---|---|---|
query_id | Request identifier | Any number (e.g., timestamp or counter), usually 0 |
new_owner | Address that should receive ownership | New owner address |
response_destination | Where to send confirmation and excess | Address to receive confirmation/excess |
custom_payload | Custom information passed to the NFT | Not used in standard NFTs; can be used by protocols |
forward_amount | Amount to forward to the new owner with a notification | 0 if no notification; >0 to send notification |
forward_payload | Message for the new owner | Any payload; leave empty if not required |
Optional
To send a notification to the new owner from the NFT, set a positiveforward_amount
.
If you want to receive the excess (all remaining TON), set response_destination
accordingly.
NFT sale
Often a sale contract is created. First, the sale contract becomes the owner; upon successful purchase, it transfers the NFT to the buyer. See more:- NFT Standard TEP-62
Best practices
- Metadata referenced by each link should be permanent. If you need to change it, send a transaction that updates the reference.