简体   繁体   中英

How many NFTs does a smart contract have?

I am not understanding, does the smart contract have 1 NFT or many NFTs.

Or is it that I deploy one smart contract for each type of my NFTs like dogs, cats... ? or it doesn't matter ?

And when I own a NFT, is it that I own a mapping in the contract token id => my eth wallet adress ?

does the smart contract have 1 NFT or many NFTs

The ERC-721 standard defines a smart contract as a collection of multiple NFTs.

one smart contract for each type of my NFTs like dogs, cats... ? or it doesn't matter ?

It depends on your use case. There's no "best" or "correct" way.

And when I own an NFT, is it that I own a mapping

Technically, nobody owns the mapping. But in most cases, your address is the value for the token ID key in the mapping.

There are two standards of NFT contracts ERC-721 and ERC-1155. There is a solidity code behind the contract that could set a limitation of the collection.For example - 10000 NFT to be created on this contract, or another value that the developer decide. The ERC-721 is the gold standard for NFTs. There is only one copy of the NFT(something unique that could be owned only by 1 person at specific time). The ERC-1155 is Semi-non fungible token. There could be many copies of the token. This is often used in games. Like creating game tokens for gold, wood, stones, ect. The developer deploy a solidity code, that is recording the owner address of every tokenID. You can explore some contracts on https://etherscan.io

https://medium.com/coinmonks/token-standards-erc20-vserc721-vs-erc1155-3106f1e3f2f3

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