solidityerc721

What is the purpose of symbol and name in ERC721?


I'm new to ERC721 and have some question on it. I was following some tutorial and have question on constructor. The question parts are below.

constructor(string memory baseURI) ERC721("NFT Collectible", "NFTC") {
        setBaseURI(baseURI);
}

I understood what is memory but still don't know what is symbol and name in there. Can I change it randomly? What is the purpose of those? And Where can I find that symbol and name? That's my question. I'm freshman in blockchain so some terms are unfamiliar. So it will be great help if someone tells in details.


Solution

  • Yes, you can change it randomly. It does not matter if you have ERC20 or ERC721 token. Both of them need to have a name and a symbol. Let's say we have us dollar. So the name is "United States dollar" and symbol is "USD".

    It is same for your tokens, you need to give them some name and symbol according to the ERC721 technical standard.