From c9475ba1d5bc967ac0cba6d42076b39d531bf348 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sun, 14 Aug 2022 10:56:48 +0700 Subject: [PATCH 01/12] Create 0062-nft-standard.md --- text/0062-nft-standard.md | 214 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 text/0062-nft-standard.md diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md new file mode 100644 index 00000000..c2f7092d --- /dev/null +++ b/text/0062-nft-standard.md @@ -0,0 +1,214 @@ +# Summary +A standard interface for non-fungible tokens. + +# Motivation +A standard interface will greatly simplify interaction and display of different entities representing right of ownership. + +NFT standard describes: + +* The way of ownership changing. +* The way of association of items into collections. +* The way of deduplication of common part of collection. + +# Specification +The NFT collection and each NFT item are separate smart contracts. + +Example: if you release a collection that contains 10 000 items, then you will deploy 10 001 smart contracts. + +## NFT item smart contract +Must implement: + +### Internal message handlers +### 1. `transfer` +**Request** + +TL-B schema of inbound message: + +`transfer#5fcc3d14 query_id:uint64 new_owner:MsgAddress response_destination:MsgAddress custom_payload:(Maybe ^Cell) forward_amount:(VarUInteger 16) forward_payload:(Either Cell ^Cell) = InternalMsgBody;` + +`query_id` - arbitrary request number. + +`new_owner` - address of the new owner of the NFT item. + +`response_destination` - address where to send a response with confirmation of a successful transfer and the rest of the incoming message coins. + +`custom_payload` - optional custom data. + +`forward_amount` - the amount of nanotons to be sent to the new owner. + +`forward_payload` - optional custom data that should be sent to the new owner. + +**Should be rejected if:** + +1. message is not from current owner. +2. there is no enough coins (with respect to NFT own storage fee guidelines) to process operation and send `forward_amount`. +3. After processing the request, the contract **must** send at least `in_msg_value - forward_amount - max_tx_gas_price` to the `response_destination` address. + If the contract cannot guarantee this, it must immediately stop executing the request and throw error. + `max_tx_gas_price` is the price in Toncoins of maximum transaction gas limit of NFT habitat workchain. For the basechain it can be obtained from [`ConfigParam 21`](https://github.com/ton-blockchain/ton/blob/78e72d3ef8f31706f30debaf97b0d9a2dfa35475/crypto/block/block.tlb#L660) from `gas_limit` field. + +**Otherwise should do:** + +1. change current owner of NFT to `new_owner` address. +2. if `forward_amount > 0` send message to `new_owner` address with `forward_amount` nanotons attached and with the following layout: + TL-B schema: `ownership_assigned#05138d91 query_id:uint64 prev_owner:MsgAddress forward_payload:(Either Cell ^Cell) = InternalMsgBody;` + `query_id` should be equal with request's `query_id`. + `forward_payload` should be equal with request's `forward_payload`. + `prev_owner` is address of the previous owner of this NFT item. + If `forward_amount` is equal to zero, notification message should not be sent. +3. Send all excesses of incoming message coins to `response_destination` with the following layout: + TL-B schema: `excesses#d53276db query_id:uint64 = InternalMsgBody;` + `query_id` should be equal with request's `query_id`. + +### 2 `get_static_data` +**Request** + +TL-B schema of inbound message: + +`get_static_data#2fcb26a2 query_id:uint64 = InternalMsgBody;` + +`query_id` - arbitrary request number. + +**should do:** + +1. Send back message with the following layout and send-mode `64` (return msg amount except gas fees): + TL-B schema: `report_static_data#8b771735 query_id:uint64 index:uint256 collection:MsgAddress = InternalMsgBody;` + `query_id` should be equal with request's `query_id`. + `index` - numerical index of this NFT in the collection, usually serial number of deployment. + `collection` - address of the smart contract of the collection to which this NFT belongs. + +### Get-methods +1. `get_nft_data()` returns `(int init?, int index, slice collection_address, slice owner_address, cell individual_content)` + `init?` - if not zero, then this NFT is fully initialized and ready for interaction. + `index` - numerical index of this NFT in the collection. For collection-less NFT - arbitrary but constant value. + `collection_address` - (MsgAddress) address of the smart contract of the collection to which this NFT belongs. For collection-less NFT this parameter should be addr_none; + `owner_address` - (MsgAddress) address of the current owner of this NFT. + `individual_content` - if NFT has collection - individual NFT content in any format; + if NFT has no collection - NFT content in format that complies with standard [TIP-64](https://github.com/ton-blockchain/TIPs/issues/64). + +## NFT Collection smart contract +It is assumed that the smart contract of the collection deploys smart contracts of NFT items of this collection. + +Must implement: + +### Get-methods +1. `get_collection_data()` returns `(int next_item_index, cell collection_content, slice owner_address)` + `next_item_index` - the count of currently deployed NFT items in collection. Generally, collection should issue NFT with sequential indexes (see Rationale(2) ). `-1` value of `next_item_index` is used to indicate non-sequential collections, such collections should provide their own way for index generation / item enumeration. + `collection_content` - collection content in a format that complies with standard [TIP-64](https://github.com/ton-blockchain/TIPs/issues/64). + `owner_address` - collection owner address, zero address if no owner. +2. `get_nft_address_by_index(int index)` returns `slice address` + Gets the serial number of the NFT item of this collection and returns the address (MsgAddress) of this NFT item smart contract. +3. `get_nft_content(int index, cell individual_content)` returns `cell full_content` + Gets the serial number of the NFT item of this collection and the individual content of this NFT item and returns the full content of the NFT item in format that complies with standard [TIP-64](https://github.com/ton-blockchain/TIPs/issues/64). + As an example, if an NFT item stores a metadata URI in its content, then a collection smart contract can store a domain (e.g. "https://site.org/"), and an NFT item smart contract in its content will store only the individual part of the link (e.g "kind-cobra"). + In this example the `get_nft_content` method concatenates them and return "https://site.org/kind-cobra". + +# Implementation example +https://github.com/ton-blockchain/token-contract/tree/main/nft + +# Rationale +1. "One NFT - one smart contract" simplifies fees calculation and allows to give gas-consumption guarantees. +2. NFT collection with sequential NFT index provide easy way of association and search of linked NFTs. +3. Division of NFT content into individual and common (collection) part allows to deduplicate storage as well as cheap mass update. + +## Why not a single smart contract with a token_id -> owner_address dictionary? +1. Unpredictable gas consumption + In TON, gas consumption for dictionary operations depends on exact set of keys. + Also, TON is an asynchronous blockchain. This means that if you send a message to a smart contract, then you do not know how many messages from other users will reach the smart contract before your message. + Thus, you do not know what the size of the dictionary will be at the moment when your message reaches the smart contract. + This is OK with a simple wallet -> NFT smart contract interaction, but not acceptable with smart contract chains, e.g. wallet -> NFT smart contract -> auction -> NFT smart contract. + If we cannot predict gas consumption, then a situation may occur like that the owner has changed on the NFT smart contract, but there were no enough Toncoins for the auction operation. + Using smart contracts without dictionaries gives deterministic gas consumption. +2. Does not scale (becomes a bottleneck) + Scaling in TON is based on the concept of sharding, i.e. automatic partitioning of the network into shardchains under load. + The single big smart contract of the popular NFT contradicts this concept. In this case, many transactions will refer to one single smart contract. + The TON architecture provides for sharded smart contracts(see whitepaper), but at the moment they are not implemented. + +## Why are there no "Approvals"? +TON is an asynchronous blockchain, so some synchronous blockchain approaches are not suitable. + +You cannot send the message "is there an approval?" because the response may become irrelevant while the response message is getting to you. + +If a synchronous blockchain can check `alowance` and if everything is OK do `transferFrom` in one transaction, then in an asynchronous blockchain you will always need to send a `transferFrom` message at random, and in case of an error, catch the response message and perform rollback actions. + +This is a complex and inappropriate approach. + +Fortunately, all cases that arose during the discussion can be implemented by a regular transfer with notification of the new owner. In some cases, this will require an additional smart contract. + +The case when you want to place NFT on several marketplaces at the same time is solved by creating auction smart contracts that first accept payment, and then NFT is sent to one of auction smart contracts. + +## Why are there no obligatory royalties to the author from all sales? +In the process of developing this idea, we came to the conclusion that it is possible to guarantee royalties to the author from absolutely any sale on the blockchain only in 1 case: + +All transfers must be carried out through an open long-term auction, and other types of transfers are prohibited. + +If you want to transfer NFT to yourself to another wallet, then you need to start an auction and win it. + +Another variation of this scheme is to make all transfers chargeable. + +By prohibiting the free transfer of tokens, we make tokens inconvenient in many cases - the user simply updated the wallet, the user wants to donate NFT, the user wants to send NFT to some smart contract. + +Given the poor usability and that NFTs are a general concept and not all of them are created for sale - this approach was rejected. + +# Standard extensions +The functionality of the basic NFT standard can be extended: + +* [NFTRoyalty (Release Candidate)](https://github.com/ton-blockchain/TIPs/issues/66) +* [NFTBounceable (Draft)](https://github.com/ton-blockchain/TIPs/issues/67) +* [NFTEditable (Draft)](https://github.com/ton-blockchain/TIPs/issues/68) +* [NFTUpgradable (Draft)](https://github.com/ton-blockchain/TIPs/issues/69) + +# TL-B schema +``` +nothing$0 {X:Type} = Maybe X; +just$1 {X:Type} value:X = Maybe X; +left$0 {X:Type} {Y:Type} value:X = Either X Y; +right$1 {X:Type} {Y:Type} value:Y = Either X Y; +var_uint$_ {n:#} len:(#< n) value:(uint (len * 8)) + = VarUInteger n; + +addr_none$00 = MsgAddressExt; +addr_extern$01 len:(## 9) external_address:(bits len) + = MsgAddressExt; +anycast_info$_ depth:(#<= 30) { depth >= 1 } + rewrite_pfx:(bits depth) = Anycast; +addr_std$10 anycast:(Maybe Anycast) + workchain_id:int8 address:bits256 = MsgAddressInt; +addr_var$11 anycast:(Maybe Anycast) addr_len:(## 9) + workchain_id:int32 address:(bits addr_len) = MsgAddressInt; +_ _:MsgAddressInt = MsgAddress; +_ _:MsgAddressExt = MsgAddress; + +transfer query_id:uint64 new_owner:MsgAddress response_destination:MsgAddress custom_payload:(Maybe ^Cell) forward_amount:(VarUInteger 16) forward_payload:(Either Cell ^Cell) = InternalMsgBody; + +ownership_assigned query_id:uint64 prev_owner:MsgAddress forward_payload:(Either Cell ^Cell) = InternalMsgBody; + +excesses query_id:uint64 = InternalMsgBody; +get_static_data query_id:uint64 = InternalMsgBody; +report_static_data query_id:uint64 index:uint256 collection:MsgAddress = InternalMsgBody; +``` + +Tags were calculated via tlbc as follows (request_flag is equal to `0x7fffffff` and response flag is equal to `0x80000000`): + +`crc32('transfer query_id:uint64 new_owner:MsgAddress response_destination:MsgAddress custom_payload:Maybe ^Cell forward_amount:VarUInteger 16 forward_payload:Either Cell ^Cell = InternalMsgBody') = 0x5fcc3d14 & 0x7fffffff = 0x5fcc3d14` + +`crc32('ownership_assigned query_id:uint64 prev_owner:MsgAddress forward_payload:Either Cell ^Cell = InternalMsgBody') = 0x85138d91 & 0x7fffffff = 0x05138d91 ` + +`crc32('excesses query_id:uint64 = InternalMsgBody') = 0x553276db | 0x80000000 = 0xd53276db` + +`crc32('get_static_data query_id:uint64 = InternalMsgBody') = 0x2fcb26a2 & 0x7fffffff = 0x2fcb26a2` + +`crc32('report_static_data query_id:uint64 index:uint256 collection:MsgAddress = InternalMsgBody') = 0xb771735 | 0x80000000 = 0x8b771735` + +# Changelog +[01 Feb 2022](https://github.com/ton-blockchain/TIPs/issues/62#issuecomment-1027167743) + +[02 Feb 2022](https://github.com/ton-blockchain/TIPs/issues/62#issuecomment-1028289413) + +[04 Feb 2022](https://github.com/ton-blockchain/TIPs/issues/64#issuecomment-1029767906) + +[08 Feb 2022](https://github.com/ton-blockchain/TIPs/issues/62#issuecomment-1032979666) + +[11 Feb 2022](https://github.com/ton-blockchain/TIPs/issues/62#issuecomment-1036003434) + +[30 Jul 2022](https://github.com/ton-blockchain/TIPs/issues/62#issuecomment-1200095572) + From 877fc0f3634d6c6a5c38277ddb77965839e25382 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sun, 14 Aug 2022 11:03:11 +0700 Subject: [PATCH 02/12] Add header and sections from TEP-1 --- text/0062-nft-standard.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index c2f7092d..af83a0ec 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -1,3 +1,12 @@ +- **TEP**: [0](https://github.com/ton-blockchain/TEPs/pull/0) +- **title**: NFT Standard +- **status**: Draft +- **type**: Contract Interface +- **authors**: [Tolya](https://github.com/tolya-yanot) +- **created**: 14.08.2022 +- **replaces**: - +- **replaced by**: - + # Summary A standard interface for non-fungible tokens. @@ -10,6 +19,8 @@ NFT standard describes: * The way of association of items into collections. * The way of deduplication of common part of collection. +# Guide + # Specification The NFT collection and each NFT item are separate smart contracts. @@ -105,7 +116,7 @@ Must implement: # Implementation example https://github.com/ton-blockchain/token-contract/tree/main/nft -# Rationale +# Rationale and alternatives 1. "One NFT - one smart contract" simplifies fees calculation and allows to give gas-consumption guarantees. 2. NFT collection with sequential NFT index provide easy way of association and search of linked NFTs. 3. Division of NFT content into individual and common (collection) part allows to deduplicate storage as well as cheap mass update. @@ -149,6 +160,12 @@ By prohibiting the free transfer of tokens, we make tokens inconvenient in many Given the poor usability and that NFTs are a general concept and not all of them are created for sale - this approach was rejected. +# Prior art + +# Unresolved questions + +# Future possibilities + # Standard extensions The functionality of the basic NFT standard can be extended: From a186d2250b175a0f8b128ea9edf958ad687a36fe Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sun, 14 Aug 2022 11:05:54 +0700 Subject: [PATCH 03/12] Fix author and date --- text/0062-nft-standard.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index af83a0ec..5e9fba34 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -2,8 +2,8 @@ - **title**: NFT Standard - **status**: Draft - **type**: Contract Interface -- **authors**: [Tolya](https://github.com/tolya-yanot) -- **created**: 14.08.2022 +- **authors**: [EmelyanenkoK](https://github.com/EmelyanenkoK) +- **created**: 01.02.2022 - **replaces**: - - **replaced by**: - From 857dc9b1baa46e04af56156884a9d0f6bf634c1a Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sun, 14 Aug 2022 12:35:26 +0700 Subject: [PATCH 04/12] Add prior art --- text/0062-nft-standard.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index 5e9fba34..e06104a8 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -161,6 +161,10 @@ By prohibiting the free transfer of tokens, we make tokens inconvenient in many Given the poor usability and that NFTs are a general concept and not all of them are created for sale - this approach was rejected. # Prior art +1. [Ethereum NFT Standard (EIP-721)](https://eips.ethereum.org/EIPS/eip-721) +2. [Polkadot NFT Standard (RMRK)](https://github.com/rmrk-team/rmrk-spec) +3. [Cosmos InterNFT Standards](https://github.com/interNFT/nft-rfc) +4. [Everscale NFT Standard (TIP-4.1)](https://docs.everscale.network/standard/TIP-4.1) # Unresolved questions From 64221accca4bba649c4542ad307b6d22f43a8df9 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Mon, 15 Aug 2022 10:51:10 +0700 Subject: [PATCH 05/12] Add acknowledgements --- text/0062-nft-standard.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index e06104a8..ea05cfe5 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -2,7 +2,7 @@ - **title**: NFT Standard - **status**: Draft - **type**: Contract Interface -- **authors**: [EmelyanenkoK](https://github.com/EmelyanenkoK) +- **authors**: [EmelyanenkoK](https://github.com/EmelyanenkoK), [Tolya](https://github.com/tolya-yanot) - **created**: 01.02.2022 - **replaces**: - - **replaced by**: - @@ -220,6 +220,9 @@ Tags were calculated via tlbc as follows (request_flag is equal to `0x7fffffff` `crc32('report_static_data query_id:uint64 index:uint256 collection:MsgAddress = InternalMsgBody') = 0xb771735 | 0x80000000 = 0x8b771735` +# Acknowledgements +We are grateful to the [Tonwhales](https://github.com/tonwhales) developers for collaborating on the current draft of the standard 🤝 + # Changelog [01 Feb 2022](https://github.com/ton-blockchain/TIPs/issues/62#issuecomment-1027167743) From bf9dacb331a236580ac3e67f479831c44170a1df Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Mon, 15 Aug 2022 10:52:12 +0700 Subject: [PATCH 06/12] Assign TEP number 62 --- text/0062-nft-standard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index ea05cfe5..1c05304b 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -1,4 +1,4 @@ -- **TEP**: [0](https://github.com/ton-blockchain/TEPs/pull/0) +- **TEP**: [62](https://github.com/ton-blockchain/TEPs/pull/2) - **title**: NFT Standard - **status**: Draft - **type**: Contract Interface From 68bb44d4af34e722dae463c15484739011e8bdfe Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Thu, 18 Aug 2022 18:13:40 +0700 Subject: [PATCH 07/12] Update sections --- text/0062-nft-standard.md | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index 1c05304b..7bb9c7c4 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -20,6 +20,45 @@ NFT standard describes: * The way of deduplication of common part of collection. # Guide +Non-Fungible Token (NFT) represents an ownership over unique digital asset (kitten images, title deeds, artworks, etc). Each separate token is an _NFT Item_. It is also convenient to gather NFT Items into an _NFT Collection_. In TON, each NFT Item and NFT Collection are separate smart contracts. + +## NFT Metadata +_Main article_: TEP-64 + +Each NFT Item and NFT Collection itself has its own metadata (TEP-64). It contains some info about NFT, such as title and associated image. Metadata can be stored offchain (smart contract will contain only a link to json) or onchain (all data will be stored in smart contract). + +Collection metadata example (offchain): +```json +{ + "image": "https://s.getgems.io/nft/b/c/62fba50217c3fe3cbaad9e7f/image.png", + "name": "TON Smart Challenge #2", + "description": "TON Smart Challenge #2 Winners Trophy", + "social_links": [], + "marketplace": "getgems.io" +} +``` + +Item metadata example (offchain): +```json +{ + "name": "TON Smart Challenge #2 Winners Trophy", + "description": "TON Smart Challenge #2 Winners Trophy 1 place out of 181", + "image": "https://s.getgems.io/nft/b/c/62fba50217c3fe3cbaad9e7f/images/943e994f91227c3fdbccbc6d8635bfaab256fbb4", + "content_url": "https://s.getgems.io/nft/b/c/62fba50217c3fe3cbaad9e7f/content/84f7f698b337de3bfd1bc4a8118cdfd8226bbadf", + "attributes": [] +} +``` + +Offchain metadata needs to be published on web. It is recommended to use IPFS, so you don't need to host your own server. + +## Single NFT Item deployment +TODO + +## NFT Collection deployment +TODO + +## Useful links +TODO # Specification The NFT collection and each NFT item are separate smart contracts. @@ -167,8 +206,11 @@ Given the poor usability and that NFTs are a general concept and not all of them 4. [Everscale NFT Standard (TIP-4.1)](https://docs.everscale.network/standard/TIP-4.1) # Unresolved questions +1. Owner index is not implemented yet, should we implement it in future standards? +2. There is no standard methods to perform "safe transfer", which will revert ownership transfer in case of contract execution failure. # Future possibilities +None # Standard extensions The functionality of the basic NFT standard can be extended: From a4bf2667542772ffb1b71b1f3ef4332b1e146c9b Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Thu, 18 Aug 2022 18:15:37 +0700 Subject: [PATCH 08/12] Add Drawbacks section --- text/0062-nft-standard.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index 7bb9c7c4..0e43e53a 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -152,6 +152,9 @@ Must implement: As an example, if an NFT item stores a metadata URI in its content, then a collection smart contract can store a domain (e.g. "https://site.org/"), and an NFT item smart contract in its content will store only the individual part of the link (e.g "kind-cobra"). In this example the `get_nft_content` method concatenates them and return "https://site.org/kind-cobra". +# Drawbacks +TODO + # Implementation example https://github.com/ton-blockchain/token-contract/tree/main/nft From bcd9897b5ec0965f8c660a7fca3d3a596716ac96 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sat, 20 Aug 2022 21:13:14 +0700 Subject: [PATCH 09/12] Add useful links --- text/0062-nft-standard.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index 0e43e53a..a79550c9 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -51,14 +51,14 @@ Item metadata example (offchain): Offchain metadata needs to be published on web. It is recommended to use IPFS, so you don't need to host your own server. -## Single NFT Item deployment -TODO - ## NFT Collection deployment TODO ## Useful links -TODO +1. [Reference NFT implementation](https://github.com/ton-blockchain/token-contract/tree/main/nft) +2. [Getgems NFT contracts](https://github.com/getgems-io/nft-contracts) +3. [TON NFT Deployer](https://github.com/tondiamonds/ton-nft-deployer) +4. FunC Lesson - NFT Standard ([en](https://github.com/romanovichim/TonFunClessons_Eng/blob/889424ae6a28453c4188ad65cdd9dbfeb750ecdb/10lesson/tenthlesson.md)/[ru](https://github.com/romanovichim/TonFunClessons_ru/blob/427037e7937f0e2e9caa4b866ee29f9d8e19b3c0/10lesson/tenthlesson.md)) # Specification The NFT collection and each NFT item are separate smart contracts. From 22c055f190a7eb7dd9089d4ccaf47a379fe82732 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sat, 20 Aug 2022 21:22:57 +0700 Subject: [PATCH 10/12] Add drawbacks --- text/0062-nft-standard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index a79550c9..04dcf366 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -153,7 +153,7 @@ Must implement: In this example the `get_nft_content` method concatenates them and return "https://site.org/kind-cobra". # Drawbacks -TODO +There is no way to get current owner of NFT onchain because TON is an asynchronous blockchain. When the message with info about NFT owner will be delivered, this info may become irrelevant, so we can't guarantee that current owner hasn't changed. # Implementation example https://github.com/ton-blockchain/token-contract/tree/main/nft From 6bf8f0ad6b56542d509fbaa6f0c4219ba0437144 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sat, 20 Aug 2022 21:25:17 +0700 Subject: [PATCH 11/12] Add TON NFT Explorer --- text/0062-nft-standard.md | 1 + 1 file changed, 1 insertion(+) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index 04dcf366..7af8af3b 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -59,6 +59,7 @@ TODO 2. [Getgems NFT contracts](https://github.com/getgems-io/nft-contracts) 3. [TON NFT Deployer](https://github.com/tondiamonds/ton-nft-deployer) 4. FunC Lesson - NFT Standard ([en](https://github.com/romanovichim/TonFunClessons_Eng/blob/889424ae6a28453c4188ad65cdd9dbfeb750ecdb/10lesson/tenthlesson.md)/[ru](https://github.com/romanovichim/TonFunClessons_ru/blob/427037e7937f0e2e9caa4b866ee29f9d8e19b3c0/10lesson/tenthlesson.md)) +5. [TON NFT Explorer](https://explorer.tonnft.tools/) # Specification The NFT collection and each NFT item are separate smart contracts. From 14f729d75d271b6dc5af126503f2f16213c24de3 Mon Sep 17 00:00:00 2001 From: Vladimir Lebedev Date: Sun, 21 Aug 2022 16:20:34 +0700 Subject: [PATCH 12/12] Update 0062-nft-standard.md --- text/0062-nft-standard.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/text/0062-nft-standard.md b/text/0062-nft-standard.md index 7af8af3b..8db99e7c 100644 --- a/text/0062-nft-standard.md +++ b/text/0062-nft-standard.md @@ -51,9 +51,6 @@ Item metadata example (offchain): Offchain metadata needs to be published on web. It is recommended to use IPFS, so you don't need to host your own server. -## NFT Collection deployment -TODO - ## Useful links 1. [Reference NFT implementation](https://github.com/ton-blockchain/token-contract/tree/main/nft) 2. [Getgems NFT contracts](https://github.com/getgems-io/nft-contracts)