How to create a Non-Fungible Token (NFT) of your digital artwork

Abhinav Singh
Coinmonks
Published in
4 min readJun 11, 2021

--

NFT’s are the latest in a long list of points of discussion that blockchain has produced. Named Non-Fungible Token, it basically means that it’s a unique token of a digital asset. To make it more clear, you can trade one bitcoin for another and it wouldn’t make a difference because they’re not unique(fungible), however, that’s not the case with NFT’s.

How I got into it

Twitter exploded with vastly different opinions as CryptoPunk #7523, a part of a 10000 pixelated art series of the alien CryptoPunk made by Larva labs, sold for more than 7 Mn USD 💵 . That made me curious enough to get out of my lazy chair and research a bit about it.

CryptoPunk #7523

Prerequisites

To create an NFT of your digital artwork, you need something you can call artwork, to begin with. Given that I’m not a modern Van Gogh, I just went to Google Autodraw and converted a few hazy lines into “art”. This is what I came up with (Insert I’m somewhat of an artist myself meme here) :

How did I had the Audacity to sign this

Now that we have our questionable “artwork”, we’re all set. I found out that an average 100 $ worth of cryptocurrency is required to make a NFT of a digital artwork, so I decided to use Ropsten’s Testnet Network to get some dummy ether coins. Now you’ll also need a crypto wallet that supports this network. You can use MetaMask for this. You’ll also need Etherium remix IDE to create your solidity contract.

Setting up your file network

P2P file-sharing: You’ll need a file hosting and sharing platform for your digital artwork. IPFS(InterPlanetary File System) is great for that. It’s a P2P file storing and sharing distributed system. You can install IPFS CLI using the steps given here.

Post installation, you can check the IPFS version using ipfs — version

  1. Change directory to go-ipfs.

cd go-ipfs

2. Initialize IPFS repo.

ipfs init

3. Open a separate terminal to start the IPFS deamon.

ipfs daemon

4. Add your artwork to IPFS.

ipfs add art.png

5. Copy the hash (it’ll start from “Qm”) and add “https://ipfs.io/ipfs/” prefix to it.

https://ipfs.io/ipfs/QmW5xvmcJNS3fSQBs7X1bkJsaAbdkDPtJh2h3PXsKDt5gH art.png

6. Create a new json file (nft.json) and add the name, description and the image hash url.

7. Now add that json file to get the hash of the file. Add the same prefix to get the hash url of the file

Creating your solidity contract

I used Solidity’s ERC-721 as a reference. You can create a similar contract. The contract I created can be found here. Add your contract to Etherium Remix IDE.

My compiling configuration

Once your contract is created, you can deploy your contract by Injecting Web3 and selecting “Solidity” as language and your contract as the file.

Once deployed, you can find your execution in “Deployed Contracts” tab. Select the mint option. Add your wallet address(can be copied from Metamask), a token id (this can be any integer value), and the hash url of your artwork’s json file. Click on transact to complete the transaction and add it to your Etherium network.

Transacting the NFT

You will get an option to approve the transaction in Metamask, select that option to complete the transaction

Approving the transaction

And there you have it! Your NFT is now on your Etherium network! Make sure to check your transaction in Metamask to verify the operation. The transaction should look something like this.

Transaction details

Congratulations on making it to the end! Feel free to talk tech or any cool projects on Twitter, Github, Medium, LinkedIn or Instagram.

Thanks for reading!!

Join Coinmonks Telegram Channel and learn about crypto trading and investing

Also, Read

--

--

Abhinav Singh
Coinmonks

Talks tech when excited, anxious, free or bored