简体   繁体   English

NFT Collections 和供应 - ERC721 与 ERC 1155

[英]NFT Collections and Supply - ERC721 vs ERC 1155

I'm building an NFT marketplace, say a copycat of OpenSea.我正在建立一个 NFT 市场,比如说 OpenSea 的模仿者。

I need to make my users able to mint their own tokens.我需要让我的用户能够铸造他们自己的代币。 That's ok, that would be an ERC721 contract.没关系,那将是 ERC721 合同。 But I want to allow my users to mint different collections (as OpenSea does) with different supplies as follows:但我想让我的用户使用不同的供应品铸造不同的 collections(如 OpenSea 所做的),如下所示:

  • (1) Have a single collection (1) 有一个集合

  • (2) Have multiple collections (2)有多个collections

  • (A) Mint 1/1 NFTs (A) 铸造 1/1 NFT

  • (B) Mint 1/N NFTs (say, for instance, 100 in total of the same NFT) (B) 铸造 1/N 个 NFT(例如,总共 100 个相同的 NFT)

That makes a set of combinations:这构成了一组组合:

  • Single collections (1) of 1/1 NFTs (A)单个 collections (1) 的 1/1 NFT (A)

  • Single collections (1) of 1/N NFTs (B)单个 collections (1) 的 1/N 个 NFT (B)

  • Multiple collections (2) of 1/1 NFTs (A) 1/1 NFT (A) 的多个 collections (2)

  • Multiple collections (2) of 1/N NFTs (B) 1/N NFT (B) 的多个 collections (2)

  • Single or multiple collections (1 or 2) of both 1/1 and 1/N NFTS (A and B) 1/1 和 1/N NFTS(A 和 B)的单个或多个 collections(1 个或 2 个)

When using ERC721 I would be able to make (A) and (B), yet for every collection I would have to deploy a new contract.使用 ERC721 时,我可以制作 (A) 和 (B),但对于每个集合,我都必须部署一个新合约。 I want to avoid this.我想避免这种情况。

Is this covered by ERC1155?这是否包含在 ERC1155 中?

(A) Mint 1/1 NFTs (A) 铸造 1/1 NFT

(B) Mint 1/N NFTs (say, for instance, 100 in total of the same NFT) (B) 铸造 1/N 个 NFT(例如,总共 100 个相同的 NFT)

Both options are in accordance with the ERC-1155 standard.这两个选项都符合ERC-1155标准。

The ERC-1155 defines a collection of tokens, where each token has an ID and an amount (specified as a value in the standard). ERC-1155 定义了一个令牌集合,其中每个令牌都有一个 ID 和一个数量(在标准中指定为一个value )。 Which means, you can have for example:这意味着,您可以拥有例如:

  • Token ID 1 that has amount of 1. At any point in time, it's always owned by just one address.令牌 ID 1,数量为 1。在任何时间点,它始终只属于一个地址。 (Case A) (案例A)
  • Token ID 2 that has amount of 10. Five of these tokens ID 2 is owned by Alice, and other five tokens ID 2 is owned by Bob.数量为 10 的令牌 ID 2。其中五个令牌 ID 2 由 Alice 拥有,其他五个令牌 ID 2 由 Bob 拥有。 (Case B) (案例 B)

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

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