EmelyanenkoK / nft-standard-draft

11 stars 4 forks source link

NFT Standard

State

Draft to not be used in production. Example collection can be seen https://emelyanenkok.github.io/nft-standard-draft/.

Acknowledgments

Standard is greatly based on TonWhales https://github.com/tonwhales/ton-nft code. Thanks @Naltox, @ex3ndr for fruitful discussions.

Architecture

NFT

Each NFT is separate smart-contract which has

Owner controls NFT via internal messages. Upon receiving transfer request from current owner, NFT updates ownership information in storage. Additionally transfer request may contain payload and TONs which will be transferred to new owner for notification or more complex actions (for instance trigger auction start)

Editor controls NFT via internal messages as well. Editor has transfer_editorship (with capability to send notification to new editor as well), update_code and update_content commands.

There is rule of content represention that if collection is defined, total content, uri and other parameters are calculated on collection contract from individual content of the NFT and common content of whole collection

Minimal balance of NFT is 0.05 TON, this limit may be increased for NFT storing huge content data, but should not be lowered.

Get-methods

Collection

Collection contract is special wallet-type contract with ability to deploy NFTs. Addresses of NFT are calculatbale by collection and only collection can initialise NFT with content, ownership and other information. Minimal balance of Collection is 1 TON, this limit may be increased for NFT storing huge content data, but should not be lowered.

Get-methods

Note all string in getmethod responses are organized as follows: it should be slices with at most one reference; if reference is presented it content concantenated to the end of parent slice; this procedure is recursively applyed to reference as well.