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

Abhinav Singh
Jun 11 · 4 min read

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

Coinmonks

Coinmonks is a non-profit Crypto educational publication.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store