简体   繁体   中英

NFT Collections and Supply - ERC721 vs ERC 1155

I'm building an NFT marketplace, say a copycat of OpenSea.

I need to make my users able to mint their own tokens. That's ok, that would be an ERC721 contract. But I want to allow my users to mint different collections (as OpenSea does) with different supplies as follows:

  • (1) Have a single collection

  • (2) Have multiple collections

  • (A) Mint 1/1 NFTs

  • (B) Mint 1/N NFTs (say, for instance, 100 in total of the same NFT)

That makes a set of combinations:

  • Single collections (1) of 1/1 NFTs (A)

  • Single collections (1) of 1/N NFTs (B)

  • Multiple collections (2) of 1/1 NFTs (A)

  • Multiple collections (2) of 1/N NFTs (B)

  • Single or multiple collections (1 or 2) of both 1/1 and 1/N NFTS (A and B)

When using ERC721 I would be able to make (A) and (B), yet for every collection I would have to deploy a new contract. I want to avoid this.

Is this covered by ERC1155?

(A) Mint 1/1 NFTs

(B) Mint 1/N NFTs (say, for instance, 100 in total of the same NFT)

Both options are in accordance with the ERC-1155 standard.

The ERC-1155 defines a collection of tokens, where each token has an ID and an amount (specified as a value in the standard). 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. (Case 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. (Case B)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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