rksh1997
rksh1997

Reputation: 1203

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?

Upvotes: 0

Views: 1731

Answers (2)

h.mavrodiev
h.mavrodiev

Reputation: 126

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

Upvotes: 0

Petr Hejda
Petr Hejda

Reputation: 43521

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.

Upvotes: 3

Related Questions