快速上手了解智能合約(NFT標準) | TON Blockchain, TEP62
Summary
TLDR大家好,我是霍华德。在上周的工作坊后,一些人私信我询问关于NFT的问题。今天我们将快速录制一个视频,帮助大家理解Tact语言的结构以及如何理解这个NFT合约。首先,让我们回顾一下我们的报告,我会在视频底部发送链接,你可以直接用你的本地IDE打开数据。在开始之前,我想先介绍它的通信方式。首先,你需要有一个自己的TonKeeper钱包,或者任何一个你通用的钱包。它本身是一个合约,发生在其中的铸造交易将是你发送消息给NFT集合的合约,然后它会生成一条消息并发送给NFT项目,这意味着如果你以Azuki为例,你可能有10,000个Azuki,最终你将有10,001个智能合约地址,这与我们熟悉的以太坊非常不同。理解了基本概念后,我们可以回到上面查看代码。首先,我们汇聚了代码的几个范围,你可以清楚地看到关键字“合约”代表什么。第一个是集合合约,第二个合约将是项目合约。这与我们熟悉的以太坊NFT结构也不同。我们可以一步步解释。一个常见的整数,一个共同的常量,所以它被称为常量,对吧?然后我们可以标准化TON这个词,并说它是0.03。至于为什么我们选择存储这两个数据,因为TON合约有一个特殊的余额来支付这个合约的存储费用。成本就是这样,但我们可以在未来提到细节。在我们扩展了集合合约之后,你可以看到它非常基础。显然这是一个集合,有点像这个合约的数量。它是最基本的,从最大的合约开始,父合约,它存储一些常规参数。例如,它现在有几个铸造ID,所以它的ID和索引实际上是一个ID。它从0开始,增加到你设置的数量。上限,第二个是你的所有者是谁,第三个是你的版税费用参数。我们在这里设置了一个数据类型,这是数据的类型。我们可以稍后调用这个东西。事实上,Tact支持自定义数据结构。让我们继续。你需要使用一组URL链接,这些是一些字符串,它们是字符串。你需要将字符串压缩成单元。我们熟悉这种细胞核形式,以存储在合约中,所以你可以看到它非常标准,我们会先压缩它,然后将其存储在单元中,因为简单的字符字符串不能传递给合约,然后你会看到你知道的“函数”。你将文本铸造传递给合约,它将是铸造。一个成功的NFT。第一行相当特殊。它是一个上下文消息。什么是上下文消息?我们可以回到这个仓库,我这里有,一个以前的文档,这是一个Tact语言的文件。你可以输入它并看到上下文实际上有这些消息附加。也就是说,你可以使用这个文本作为一个对话框,它会有弹跳。消息将有谁是发送者等。所以你可以调用这个上下文,然后你可以使用这个“ctx.value”或“ctx.sender”来进行过滤操作,也就是说,这个消息意味着我传入了这个数据,这个值,是这个文本对话框窗口的发送者,即调用这个铸造交易的人。当你进入合约时,这很容易理解。然后你在这里打开铸造,你会看到有一些细节需要写在这里。我们可能有需要和其他东西。铸造成功后,它将有一笔转移行动的交易,所以你必须满足我们的铸造要求。它会在这里设置,然后帮助你发送,下一步的相应交易信息继续下去。值得一提的是,如果我们在这里写一个函数,你将有不同的初始代码。你需要知道的是,你输入这个关键字匹配。这个初始代码将生成合约地址,因为我们的合约地址是要给出参数“到”,所以为什么ID有区别?事实上,每个NFT项目都有一个不同的ID,所以你需要输入一个不同的参数。到集合合约,它将返回,你所说的项目是什么样的地址,等等。如果你可以看细节,我们这边实际上是一个自我获取的功能,仍然在底部。那么你怎么做到呢?什么样的索引ID是值?通过这个描述,我们将返回一个初始代码。正如我刚才解释的,你将生成不同的NFT项目地址。原因是,有不同的初始代码。在这里,你只能确定生成地址的区别,取决于你这边的索引ID。这应该很容易理解。接下来,我们可以,传递一些基本参数给它。“SendParameter”是标准的,你想要什么,当发送消息时需要什么参数?你需要准备到,价值,反弹和模式。你可以,在刚刚分享的Tact文件中看到这些东西的细节。值得一提的是,你需要,第一次调用一个。合约,带有你的初始代码,所以这就是为什么你需要放置,初始DOT代码,并且数据是附加的。此外,如果你是最初部署这个合约,你需要这两个值被传递到新合约,以帮助合约成功部署,因为每个合约都需要这两个参数。如果我们在下一行,那么我们必须,告诉这个集合的主合约这个ID。父合约知道这是可以的。现在ID被添加下来了。如果有人将来发送这个铸造消息,它的ID将继续被添加下来。通过类比,让我们继续。这个接收实际上是一个标准的,如果没有扩展,也就是说,可能有人想从这个版税中拿走一些引用,等等。这并不重要,但它以标准的方式编写,所以我相信,让我们继续,呃,正如我们在下面谈论的,我还将使用,我们的结构结构在这里。结构是,我们首先定义,数据结构看起来像什么,然后这里将有一个标准的。需要返回的参数,以帮助大家理解,为什么这些参数被定义?你可以看到你回到我们的仓库,将有一个TEP。TEP的真正名称是,(Ton)增强提案,实际上它有点像,我们熟悉的一些规范,如ERC20。我们需要这些规范来帮助我们理解,NFT将具有什么功能,以及你需要在NFT本身上发送什么信息,所以我们不会在这里。关于这个TEP有太多细节,所以让我们继续,所以你需要设置这些标准,获取函数,以帮助大家获取,一些关于这个合约的相关信息。值得一提的是,这个获取函数,属于离链的,它是一个从你的链上获取数据的函数。它不是用于调用其他智能合约的。例如,如果你在以太坊上,你实际上可以调用,一些其他智能合约的函数,以获取,以太坊上其他合约的数据,因为在TON上它是异步的,所以你不能简单地依赖一个获取函数来获取,其他智能合约的数据。至于如何获取它,我们稍后会提到,所以接下来的,实际上是标准的,以帮助我们计算,也就是说,帮助我们计算,一些当前需要的信息,还获取一些标准化的返回值,以帮助我们。例如,当我们的前端需要调用,然后继续下去,包括消息旁边的参数。它实际上是有点像一个函数ID,也帮助我们定义并获取,我们想要来回发送的,这个交易的消息簿的,接口,所以这也是在TEP上首先定义的,我们可以继续。这里的消息,值得一提的是。它的整数侧实际上可以广泛地定义你是什么类型的数据。与Solidity相比,它更严格。最明显的区别当然是,当然,燃气费是不同的。例如,未签名的Intefer 16和uint64消耗的存储空间是不同的,但这有点太详细了。事实上,如果你写涂鸦。结构是这里更重要的一点,但它也很容易理解。你可以自定义数据结构的类型,所以,你可以自由使用它,它的灵活性相对较大。接下来,让我们看看NFT项目。当我们谈论NFT项目时,我想提醒你让我们看看NFT转移其所有者许可的情况。例如,这里有两个钱包地址。原来,我们需要发送转移数据结构,这是,以0X5F开头的数据格式,到我们自己的。这个NFT项目的拥有者,NFD项目接收到这个消息,并确认这是真正的所有者,也就是说,这个项目的拥有者可以发送这个消息。通过后,他将同时发送这两个消息。其中一条消息是发送给新所有者的,告诉新所有者,你现在是这个NFT项目的持有者,第二条消息是发送回原始持有者,说你的转移许可已经被转移了。这与我们在以太坊上的概念不同,因为我们知道,这是一个异步合约在Tom上,所以它需要这样的设计,同时通知原始持有者和新持有者,你有一个新合约。到达通知类似于这个概念,这与以太坊非常不同。让我们看看NFT项目需要什么信息。例如,可能有这些参数。你需要通过哪个地址传递集合,因为这可以帮助我们知道,某些消息只能由集合传递和调用,这是一种权限限制的行动。接下来的部分与上述类似。这部分,将是我们刚刚提到的转移行动,所以你可以看到,这一边的这个消息意味着,这个条件只会在使用初始化是第一次铸造时使用。另一种情况是,我刚才说的转移,所以下面的范围将被使用,当我只是说转移时,所以下面的范围将触发这个,所有者分配和访问,刚刚提到的是,标准转移行动的一部分。接下来的段落,实际上是一个链接,用于计算和维护余额。至于为什么它被写成这样,我们可以在以后提到。嗯,它将是一样的。标准采取一些基本信息等。总的来说,大致就是这样。这是一个标准的NFT集合,带有Tect语言的NFT项目的解释。我不想这个视频太长。如果你有其他问题,请随时在下面留言。在这段解释视频的结尾,我想强调并推广一件事,我们现在正在准备将TON的相关资源本地化。虽然这是本地化志愿者的工作,但他将是一个有偿的,有偿的链接。所以如果你感兴趣,请尽快联系我们。好的,这是一个简单的概述,带你了解Tact语言的结构是什么样的,以及每一段意味着什么。这就是今天的视频。
Takeaways
- 📚 了解NFT结构:视频旨在帮助理解Tact语言的结构以及NFT合约的构成。
- 💡 TON钱包使用:需要拥有TonKeeper钱包或任何通用钱包,这些钱包本身是合约。
- 🔗 Mint交易机制:在TON中,Mint交易会生成消息并发送给NFT集合,然后集合生成消息并发送给NFT项目。
- 📈 智能合约地址:在TON中,每个Azuki NFT可能对应一个智能合约地址,与以太坊的NFT结构不同。
- 🔑 合约关键词:代码中有两个关键位置使用“contract”关键词,分别代表集合合约和项目合约。
- 🗃️ 数据存储:TON合约有特殊的余额要求,用于支付合约存储费用,这与存储的数据类型有关。
- 📝 自定义数据结构:Tact支持自定义数据结构,允许开发者根据需要定义数据类型。
- 🔑 函数和消息:合约中的Mint函数将处理NFT的铸造,并且会有一个特殊的上下文消息,用于交互。
- 🔍 上下文消息:上下文消息允许过滤和识别消息的发送者,这对于理解交易的发起者很重要。
- 🚀 初始代码和部署:每个NFT项目都有不同的初始代码,这决定了生成的合约地址的差异。
- 💻 函数参数:发送消息时需要准备的参数包括To、Value、Bounce和Mode,这些参数在Tact文件中有详细说明。
- 🔗 函数和数据获取:合约中的get函数用于从链上获取数据,不同于以太坊,TON的get函数不能用于调用其他智能合约。
- 📝 TEP规范:TEP(Ton Enhancement Proposals)类似于ERC20,是TON网络上NFT功能和信息传递的规范。
- 🛠️ 消息和数据类型:TON中的消息和数据类型定义比Solidity更严格,这影响了合约的存储和计算。
- 🔄 NFT所有权转移:在TON中,NFT所有权转移涉及到发送给新旧所有者的消息,以确保双方同时得到通知。
Q & A
什么是NFT的Tact语言结构?
-Tact语言结构是用于编写和理解TON区块链上NFT智能合约的一种编程语言。它包括集合合约和物品合约,以及用于定义数据结构和函数的关键字。
为什么要使用TonKeeper钱包或通用钱包?
-TonKeeper钱包或通用钱包是TON区块链上用户与NFT智能合约交互的工具。它们允许用户发送交易,如铸造(Mint) NFT,并接收相关的反馈信息。
在TON区块链上,NFT集合和NFT物品是如何通过智能合约区分的?
-在TON区块链上,NFT集合和NFT物品通过两种不同的智能合约来区分。集合合约负责管理整个NFT系列,而物品合约则管理单个NFT的具体信息。
TON区块链上的NFT与以太坊上的NFT在结构上有什么不同?
-TON区块链上的NFT结构与以太坊不同,主要在于TON上的NFT集合和NFT物品是通过两个不同的智能合约来管理的,而以太坊上的NFT通常使用单一的智能合约来管理整个系列。此外,TON上的NFT地址数量会随着NFT物品的增加而增加,这与以太坊也有所不同。
什么是常量(constant)在TON合同中的作用?
-在TON合同中,常量用于定义一些固定值,如TON的单位值,这些值在合同执行过程中不会改变,用于标准化操作和计算。
为什么需要压缩字符串并将其存储在细胞(cell)中?
-在TON区块链上,简单的字符字符串不能直接传递给智能合约。因此,需要将字符串压缩成细胞(cell)的形式存储在合约中,以便于管理和调用。
Mint函数在NFT合同中的作用是什么?
-Mint函数是NFT合同中用于铸造新NFT的函数。当用户调用Mint函数并满足合约中的条件时,合约将生成一个新的NFT并记录相关的交易信息。
上下文消息(context message)在TON智能合约中扮演什么角色?
-上下文消息在TON智能合约中用于传递关于消息发送者和接收者的信息,如发送者的身份和消息内容。它允许合约根据消息的上下文进行相应的处理。
为什么每个NFT项目都有一个不同的初始代码?
-每个NFT项目都有一个不同的初始代码,这是因为初始代码与NFT项目的特定属性相关联,如索引ID。不同的初始代码会导致生成不同的NFT项目地址,增加了系统的灵活性和可定制性。
如何通过TEP来理解NFT的功能和所需信息?
-TEP(Ton Enhancement Proposals)类似于以太坊上的ERC20标准,它提供了一组规范,帮助开发者和用户理解NFT将具有哪些功能,以及在NFT本身上需要发送哪些信息。
TON区块链上的NFT转移与以太坊有何不同?
-TON区块链上的NFT转移是异步的,需要同时通知原始持有者和新持有者关于NFT所有权转移的情况。这与以太坊上NFT转移的概念不同,因为以太坊上的转移通常是同步的。
为什么在TON区块链上部署智能合约时需要初始代码和数据?
-在TON区块链上部署智能合约时,需要初始代码和数据来帮助合约成功部署。这是因为每个合约都需要这两个参数来初始化其状态和功能。
Outlines
😀 NFT与Tact语言结构概览
Howard在视频中首先介绍了NFT和Tact语言的基础知识。他提到了在TON区块链上,NFT的实现方式与以太坊有所不同,包括使用TonKeeper钱包和智能合约的交互方式。Howard解释了如何通过发送消息来铸造NFT,并介绍了NFT集合合约和单个NFT项合约的区别。他还提到了TON合约的特殊存储费用和数据结构的自定义能力。最后,Howard强调了上下文消息的重要性,以及如何通过'ctx.value'和'ctx.sender'进行过滤操作。
📚 Tact语言的详细解析与NFT部署
在第二段中,Howard深入讲解了Tact语言的语法和NFT合约的部署过程。他说明了在部署新合约时需要传递的两个关键参数,以及如何通过父合约来管理NFT的ID。Howard还讨论了版税费用的参数设置,以及如何使用标准函数来获取合约信息。此外,他还提到了TEP(Ton Enhancement Proposals)的重要性,这是TON区块链上类似于ERC20的规范。最后,Howard强调了异步智能合约的特点,以及如何在NFT转移所有权时通知新旧所有者。
📢 Tact语言结构与NFT项目介绍
Howard在视频的最后部分提供了Tact语言结构和NFT项目的简单概述。他提到了如何通过不同的初始代码生成不同的NFT项目地址,并且解释了发送消息时需要的基本参数,如'To', 'Value', 'Bounce', 和 'Mode'。此外,Howard还提到了TON区块链上NFT的异步特性,以及如何通过TEP定义消息类型和数据结构。他还提到了Gas费用的不同,以及如何在TON上实现数据结构的自定义。最后,Howard鼓励观众如果对TON的资源汉化工作感兴趣,可以主动联系他们。
Mindmap
Keywords
💡NFT
💡Tact语言
💡TON区块链
💡智能合约
💡TonKeeper钱包
💡Mint交易
💡集合合约和物品合约
💡常量(Constant)
💡数据结构(Data Structure)
💡上下文消息(Context Message)
💡转移(Transfer)
Highlights
霍华德在上周的研讨会后,通过私人信息回答了有关NFT的问题,并录制了一个视频来帮助理解Tact语言的结构以及如何理解NFT合约。
介绍了如何通过TonKeeper钱包或任何通用钱包与NFT合约进行通信。
解释了在TON中,每个NFT项目都有一个智能合约地址,与以太坊的结构不同。
强调了TON合约存储的特殊余额支付方式,以及如何选择存储数据。
展示了集合合约和项目合约的代码结构,并解释了它们在TON中的作用。
介绍了如何使用常量和数据类型来标准化TON合约。
讨论了如何使用URL链接和字符串压缩来存储在合约中。
解释了Mint函数的工作原理,以及如何通过上下文消息进行过滤操作。
强调了合约地址生成的重要性,以及如何通过不同的初始代码生成不同的NFT项目地址。
介绍了发送参数的标准过程,包括To、Value、Bounce和Mode。
讨论了初始代码和数据对合约部署成功的重要性。
解释了如何通过ID和索引来管理NFT集合的增长。
介绍了接收函数的标准形式,以及它在版税等场景中的应用。
讨论了TEP(Ton Enhancement Proposals)在定义NFT功能和所需信息方面的作用。
强调了get函数在获取链上数据而非调用其他智能合约数据中的作用。
讨论了TON中消息传递的严格数据类型定义,以及与Solidity的比较。
解释了NFT项目在转移所有权时的异步处理方式,以及与以太坊的不同。
介绍了NFT项目所需的参数,以及如何通过集合来限制权限。
讨论了转移操作的标准流程,包括所有者分配和访问。
强调了计算和维护余额的重要性,以及其在合约中的标准实现。
霍华德强调了正在准备将TON相关资源汉化的工作,并邀请对此感兴趣的人参与。
视频最后提供了对Tact语言结构和每个段落含义的简单概述。
Transcripts
Hi everyone, I’m Howard.
After our workshop last week,
some people came to private message me
with some questions about NFT
. Today we will quickly record a video
to help you understand the structure of the Tact language
and how to understand the contract of this NFT.
First of all, let's go back to our report,
you can go to it
, I will send the link to the bottom of the video
, and then you can click
to open the data
directly with your local IDE.
First, before we start,
I would like to introduce
its communication. How is the method?
First, you will have your own TonKeeper wallet
or a wallet created by any of
your general Wallets
. It is itself a contract
, and the Mint
transaction that occurs in it will be the contract that you send a message to
the NFT collection
and then It will generate a message and
send it to the NFT item
, which means that if you
are Azuki, for example,
you may have 10,000 Azuki,
then you will have 10,001
Smart Contract addresses in the end
, which is very, very different from Ethereum In the same way,
after you understand the basic concept,
we can go back to the above
to look at the code.
First, we
converge several scopes of the code
, and you can clearly see what
the keyword contract represents. There are two
places. The first is the collection contract
, and the second contract will be the item contract.
This is also
different from the NFT structure of Ethereum
that we are familiar with. We can
explain it step by step. A common
integer, a common constant
, so it’s called constant, right?
Then we can standardize the word TON and
say it’s 0.03.
As for why we choose to store these two data
, because
the TON contract has a special
balance to pay for this contract storage. The cost
is simply like this,
but we can mention the details in the future.
After we expand the collection contract,
you can see that it is very basic.
It is obvious that this is a collection,
which is a bit like the number of this contract.
It’s a bit like
the most basic Starting with the largest contract, the
parent contract
, it stores some normal arguments.
For example, it has several IDs in Mint now,
so its ID
and index
are actually an ID.
It starts from 0
and adds up to what you set. The upper limit
, the second is who is your owner,
and the third is
the parameter of
your Royalties fees
. We have set a data type here, which is the type of the data
. We can call
this thing later.
You can quickly understand it here. In
fact, Tact supports
customized data structures
. Let’s continue.
You need to use a set of URL
links, which are some strings, which are strings.
You need to compress the strings into cells
. We are familiar with this form of cell nucleus
to store in the contract
, so you can see that it
is very standard,
we will compress it first and then store it in the cell
, because
simple character strings cannot be passed to the contract,
then we will You will normally see
the "Function" that you know
. You pass the text Mint into the contract,
and it will be Mint. A successful
NFT
. The first line is quite special.
It is a context message.
What is the context message?
We can Going back to
this repo, I have
a previous document here
, which is a file in the Tact language
. You can enter it and see that the context
will actually have these messages attached.
That is
to say, you can use this text as a dialogue box,
and it will have a bounce. The message
will have who the sender is, etc.
So you can call this context and then
you can use this "ctx.value"
or "ctx.sender" to do a filtering action
, that is, this message means that
I pass in This data
and this value
are the Sender of this text dialogue window, that
is, the person who calls
this Mint Transaction. It is easy to understand
when you enter the contract.
Then you open Mint here
and you will see that
there are some details to be written here.
We may have Require and other things
. After your Mint is successful,
it will have a transaction
of the transfer action
, so you must meet the requirements of our Mint. It
will be set here
and then help you to send
the corresponding The transaction information
of the next step
continues down.
Here it is worth mentioning that
if we write a Function here,
you will have a different initial code.
What you need to know here is that
you enter this keyword match. This initial code
will generate the contract address
because our
contract address is to give the argument "To",
so why is there a difference in the ID?
In fact, each NFT item has a different ID
, so you need to enter a different argument. To
the collection contract,
it will return
what kind of address you said the item is,
and so on.
If you can look at the details,
our side is actually
a function of
a get of a self , which is still at the bottom.
So how do you do
this ? What kind of index ID is the value?
Through this description,
we will return an initial code.
As I just explained,
you will generate different NFT item addresses.
The reason is
that there are different initial codes. Here
you can only determine the difference in the generated address
depends on the index ID on your side. It
should be quite easy to understand.
Next, we can
pass some basic parameters to it
. "SendParameter" is a standard
you want
What kind of arguments will be needed
when sending a message ? You need to prepare To, Value, Bounce, and Mode.
You can
see the details
of these things in the Tact file we just shared.
It is worth mentioning that you need to
call one for the first time. The contract
comes with your initial code
, so this is why you need to put
Initial DOT Code
and data are attached.
In addition, if you are initially deploying this contract,
you need these two values to be passed to the new contract
to help the contract deploy successfully
, because each contract needs these two parameters
. If we are in the next line,
then we have to
tell the main contract of this collection to this ID.
The parent contract knows that it is OK.
Now the ID is added down.
If someone sends this Mint message
in the future,
its ID will continue to be
added down . By analogy,
let’s move on . This receive
is actually a standard if it’s
not expanded ,
that is, maybe someone will want to take
some quotations from this royalty, etc.
It’s not really important
, but it’s written in a standard way, so I believe
that. Let's continue down,
er, as we talked about below,
I will also use
our structure structure here. The
structure is that
we first define
what the data structure looks like
, and then there will be a standard one here
. The parameters need to be returned
to help everyone understand
why
these parameters are defined?
You can see that you go back to our repo
and there will be a TEP.
The real name of TEP is
(Ton) Enhancement Proposals
In fact, it is a bit like
some specifications such as ERC20 that we are familiar with
. We need these specifications to help us understand
what functions NFT will have
and what information you need to send on the NFT
itself
, so we will not be here. There are too many details
about this TEP
, so let’s go on
, so you need to set these standard
get functions
to help everyone get
some relevant information about this contract
. It is worth mentioning that
this get function
belongs to the off-chain It is a
function for obtaining data from your chain.
It is not for calling other Smart Contracts.
For example, if you are on Ethereum,
you can actually call
some functions of other Smart Contracts
to obtain
data of other contracts on TON because it It is asynchronous
, so you cannot simply rely on a get
function to obtain
other Smart Contract data
. As for how to obtain it, we will mention it later,
so the following
are actually standard to help us calculate,
that is, to help us calculate
some of the current needs The information
also obtains some standardized return values
to help us.
For example, when our front-end needs to call,
then continue down and
include the
parameters next to the Messages below.
It is actually a bit like a function ID
, which also helps us to define And to get
the
interface that tells us which message we want to send
back and forth to the
message book of this Transaction,
so this is also defined on the TEP first, and
we can continue.
The message here
is worth mentioning. It will be that its integer
side can actually broadly
define what kind of data type you are.
Compared with Solidity, it is stricter.
The most obvious difference is
of course that the Gas Fee is different.
For example Say that
the storage space consumed by unsighed Intefer 16 and uint64
is different
, but this is a bit too detailed.
In fact,
it
doesn’t matter if you write scribbles. The structure is a more important point here
, but it is
also easy to understand
. You can customize the type of a data structure,
so
you can use it freely,
and its flexibility is relatively large.
Next, let’s look at NFT items.
When we talk about NFT items,
I want to remind you Let’s take a
look at the situation
when an NFT transfers its owner’s permission.
For example,
there are two wallet addresses here.
Originally, we
will need to send the transfer data structure
, which is
the data format starting
with 0X5F , to our own. The owner of
this NFT item
, the NFD Item receives this message
and confirms that this is the real Owner, that
is,
the owner of this Item can send this message.
After passing, he will
send these two messages at the same time. One of the messages is sent
to the new Owner, telling the new Owner that
you are now the holder of this NFT Item,
and the second message
is to send back to the original holder to say that
your transfer permission has been transferred
. This is different
from the concept on our Ethereum
, because as we know,
this is an asynchronous contract on Tom
, so it needs such a design
to inform the original holder
and the new holder at the same time that
you have a new contract. The
arrival notification
is similar to this concept,
which is very different from Ethereum.
Let's look down at
what information NFT Item needs.
For example, there may be these parameters. Which
address you need to pass the collection
Because this can help us know that
certain messages
can only be passed in and called by
the collection , which is an action of permission restriction.
The following are similar to the above.
This part
will be the transfer action we just mentioned,
so you can Seeing
this message on this side means that
this condition will only be used
when the initialization is the first Mint.
Another situation
is that the following range will be used
when I just said the transfer,
so the following range will trigger this
. The owner assign and access
mentioned just now are
part of a standard transfer action.
The following paragraph
is actually a link to calculate and maintain the balance.
As for why it is written like this,
we can mention it in the future
. Well, it will be the same below. The standard take some
basic information and
so on. Overall, it is roughly like this
. It is a
standard NFT collection with
an explanation of the Tect language of NFT item
. I don’t want this video to be too long.
If you have other questions,
please feel free to leave
a message below . At the end of this explanatory video,
I want to emphasize and promote one thing with you
We are now preparing to Sinicize
the relevant resources of TON
. Although it is the work of a Sinicization volunteer
, he will be a paid
and paid link.
So if you are interested, please contact us as soon as possible.
OK Then this is a simple overview
that takes you to understand
what kind of structure the Tact language is like
and helps you understand
what each paragraph means.
That's the video
for today.
تصفح المزيد من مقاطع الفيديو ذات الصلة
Build Todo List in SwiftUI with MVVM architecture | Todo List #0
Beginning Graphic Design: Branding & Identity
Enchanting Plus mod Bit-by-Bit by Mischief of Mice!
PID TUNING Betafpv Pavo20 con Eliche 5 pale Gemfan 2020 5 blade: più preciso, stabile e silenzioso
Multi-Agent Conversation using CrewAI
7 Wonders of Manitoba Episode 3: Pimachiowin Aki
5.0 / 5 (0 votes)