TIP-62
TIP-62 is an NFT smart contract standard on TON finalized on 01.02.2022.1
In TON every NFT is a smart contract, and there's a separate smart contract for a collection.
Contract | Number of contracts |
---|---|
NFT | |
Collection | 1 |
An :
An NFT contract may have any arbitrary functionality as long as it implements the following obligatory functions:
transfer
- which moves ownership from the current owner to a new one. It has the following parameters:query_id:uint64
- an arbitrary request numbernew_owner:MsgAddress
- an address of the token receiverresponse_destination
- an address for notification messages and unused tokens refundcustom_payload:(Maybe ^Cell)
- optional arbitrary data of any typeforward_amount:(VarUInteger 16)
- several TONs to be transferred to the NFT recipientforward_payload:(Either Cell ^Cell)
- optional arbitrary data, for example, a message to the receiver
get_static_data
- it has only one parameter,query_id:uint64
An :
get_collection_data()
- returns a tuple:int next_item_index
- the number of the last minted NFT + 1cell collection_content
- the collection metadata defined by the standard TIP-64slice owner_address
- the address of the collection owner
get_nft_address_by_index(int index)
- gets an NFT token ID calledindex
and returns the smart contract address of the selected NFT.get_nft_content(int index, cell individual_content)
- queried by an NFT ID and individual data and returns the complete NFT metadata defined by the standard TIP-64
Yet Unsolved
- The contract cannot be queried for a list of NFT owners.
safeTransfer
returning the NFTs to the original owner should the contract fail to execute is not implemented.
Accepted and discussed extensions
NFTRoyalty (TIP-66)2 (Accepted)
royalty_params()
- returns a tuple:- `int numerator` - the divided
- `int denominator` - the divisor
- `slice destination` - the address of the beneficiary
Example:
NFTBouncable (TIP-67) - standardizes the rollback in case of an error.
NFTEditable(TIP-68) - an account with an
editor
role can massively update NFT content.NFTUpgradable (TIP-69) - currently closed without being accepted.