令牌和数字产品之间的NFT连接
我了解什么是NFT - 它是区块链中的条目,我了解数字产品是什么 - 例如,它是带有图像的物理文件。
我想为此图像创建一个NFT。这是我到目前为止尚不了解的 - NFT和图像之间的信息将在哪里存储以证明该特定的NFT是专门针对该特定图像的?
I understand what NFT is – it is an entry in the Blockchain, I understand what a digital product is - for example, it is a physical file with an image.
I want to create an NFT for this image. This is what I don't understand so far - where will the information between the NFT and the image be stored to prove that this particular NFT is made specifically for that particular image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 erc721 和 erc1155 标准,只有一个从令牌到图像的单向链接。从理论上讲,这允许多个代表同一图像的NFT。
每个集合合同都实现一个函数来检索元数据JSON文件。如果是
tokenuri(uint256 tokenid)
,而对于ERC1155,则是uri(uint256 tokenid)
元数据文件位置。该文件可以存储在专用服务器,分散的存储(例如IPFS),FTP,...仅在任何有效的URI后面。并且根据这两个标准,元数据文件应包含一个名为
Image
包含实际图像文件的URI的JSON字段。TLDR:从NFT到图像的单向链接在每个NFT的元数据中。没有标准化的方法可以链接从图像回到NFT。
As per the ERC721 and ERC1155 standards, there is just a one-way link from the token to the image. Which theoretically allows multiple NFTs representing the same image.
Each collection contract implements a function to retrieve a metadata JSON file. In case of ERC721 that's
tokenURI(uint256 tokenId)
, and in case of ERC1155 that'suri(uint256 tokenId)
, both returning astring
with the metadata file location. This file can be stored on a private server, a decentralized storage (e.g. IPFS), an FTP, ... simply behind any valid URI.And according to both standards, the metadata file should contain a JSON field named
image
containing URI of the actual image file.TLDR: A one-way link from the NFT to the image is in the metadata file of each NFT. There is no standardized way to link from the image back to the NFT.