DEV Community

Cover image for How to Create an NFT(ERC-721) using OpenZeppelin

How to Create an NFT(ERC-721) using OpenZeppelin

Abdul Maajid on January 29, 2022

Introduction Now a days blockchain is very trending lot of people are earning by selling and creating NFTs. If you want to build your ow...
Collapse
 
marsifeanyi profile image
Marcellus Ifeanyi

Great Article.

please can you explain the work of this function

function _burn(uint256 tokenId)
internal
override(ERC721, ERC721URIStorage)
{
super._burn(tokenId);
}

Collapse
 
abdulmaajid profile image
Abdul Maajid

Here we are simply overriding function from ERC721 contract and ERC721URIStorage contract which will be used to burn an NFT and will decrease total supply.

Collapse
 
saadbh13 profile image
SAAD Bh

My brother Abdul Majeed is with you Saad, can you explain to us how to create a symbol and make it available for sale and purchase, may God reward you with goodness

Collapse
 
abdulmaajid profile image
Abdul Maajid

In the above contract you can see the constructor here we are passing NFT name and symbol check it out.
constructor() ERC721("ZPunks", "ZPK") {}