简体   繁体   English

ERC721 - tokenURI 中提及的元数据资产的真实性

[英]ERC721 - Authenticity of metadata assets mentioned in a tokenURI

How do we prove the authenticity of the metadata of an NFT asset?我们如何证明 NFT 资产元数据的真实性?

According to the ERC721 spec, to get the metadata of an NFT asset, we need to go to the URI mentioned in the tokenURI function.根据 ERC721 规范,要获取 NFT 资产的元数据,我们需要 go 到tokenURI function 中提到的 URI。 What happens if this metadata is on a centralised server, and the owner changes the metadata pointed to by the tokenURI ?如果此元数据位于集中式服务器上,并且所有者更改了tokenURI指向的元数据,会发生什么情况?

Let's consider a use case - suppose I buy an NFT digital art on OpenSea, which has a tokenURI of the format https://opensea.io/<contract_address>/123 which points to an image called awesome_art.png which is on an AWS server.让我们考虑一个用例——假设我在 OpenSea 上购买了 NFT 数字艺术,它的tokenURI格式https://opensea.io/<contract_address>/123 ,它指向 AWS 上名为awesome_art.png的图像服务器。 Now, what if the owner thereafter uploads another random image with the same name?现在,如果所有者随后上传另一个具有相同名称的随机图像怎么办?

In this case, the NFT would still be valid;在这种情况下,NFT 仍然有效; the metadata will still be valid since they follow the standards.元数据仍然有效,因为它们遵循标准。

I guess the best way to avoid this is to hash the metadata images/asset content when it is first minted and put that on the blockchain, but just wondering if there is any other proven way/standard out there to achieve this?我想避免这种情况的最佳方法是 hash 元数据图像/资产内容在首次铸造并将其放在区块链上时,但只是想知道是否有任何其他经过验证的方法/标准可以实现这一目标?

FYI - I know one solution is to use decentralised solutions like IPFS, but it doesn't really solve the issue at the heart of this question.仅供参考 - 我知道一种解决方案是使用像 IPFS 这样的分散式解决方案,但它并不能真正解决这个问题的核心问题。

ERC-2477 is one proposed standard for attaching digests of metadata to tokens: https://eips.ethereum.org/EIPS/eip-2477 ERC-2477 是一种将元数据摘要附加到令牌的建议标准: https://eips.ethereum.org/EIPS/eip-2477

A digest of the JSON schema can also be added to the blockchain. JSON 模式的摘要也可以添加到区块链中。 Or alternatively a $schema reference to the JSON schema embedded in the metadata JSON along with $schemaIntegrity holding a digest of the JSON schema.或者,对嵌入在元数据 JSON 中的 JSON 模式的 $schema 引用以及包含 JSON 模式摘要的 $schemaIntegrity 。

FYI - I know one solution is to use decentralised solutions like IPFS, but it doesn't really solve the issue at the heart of this question.仅供参考 - 我知道一种解决方案是使用像 IPFS 这样的分散式解决方案,但它并不能真正解决这个问题的核心问题。

IPFS CIDs have digests built in so IPFS does cover this I think. IPFS CID 内置了摘要,因此我认为 IPFS 确实涵盖了这一点。 A number of ERC721s are using this already storing the CID on chain.许多 ERC721 正在使用它,已经将 CID 存储在链上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM