Saturday, March 19, 2022
In last week’s edition I introduced you all to the concept of NFTs. If you somehow missed out on the 55th edition of The Passion Pad, check it out here.
Taking the momentum forward, let’s learn about how can we create our own NFT and list it on a marketplace like OpenSea. Before I dive into the technical side of it, let’s define a few terms so that you are at par with the crypto jargon.
What are smart contracts?
According to Investopedia, a smart contract is a self-executing contract with the terms of the agreement between buyer and seller being directly written into lines of code. The code and the agreements contained therein exist across a distributed, decentralized blockchain network. The code controls the execution, and transactions are trackable and irreversible. Think of it as your bank ATM. Based on a set of preconditions, the ATM will always dispense cash, if the withdrawl amount is less than your balance account. In layman terms, smart contracts creates a trusted flow by eliminating the middle men from the process.
What is Ethereum? Why is there a need of MATIC?
Ethereum is a decentralized, open-source blockchain with smart contract functionality. Ether is the native cryptocurrency of the platform. Among cryptocurrencies, Ether is second only to Bitcoin in market capitalization. If you have heard of the term WEB3.0, ethereum is the token that powers it. Ethereum is not just a coin, it’s an ecosystem. However, every time you transact with a blockchain, you need to pay some amount in the form of gas fees. Ethereum gas fees are pretty high, hence came MATIC. Polygon chain is a second layer solution to the ethereum blockchain and reduces the gas fees by a huge amount. Therefore, we will be deploying out NFT on the MATIC mainnet instead of Ethereum to save up some money on gas fees.
What is ERC20 and ERC721 ?
ERC stands for Ethereum Request for Comments. If you purchase a token, you would definitely try to trade it for another valuable token or probably for Ether. Therefore, the standardization of tokens is crucial, hence came the term ERC.
ERC20 and ERC721 are two of the most widely used ERC token specifications. They are used to symbolize fungible and non-fungible assets, respectively. EIP on the other hand stands for Ethereum Improvement Proposals (EIPs) -focused on the Ethereum protocol improvement. This is a complete topic in itself, I will try to cover this topic in a different post.
We are now ready to get to dpeloy our NFT onto the mainnet. Let’s go!!!!!!!!!!!!!!11
The Sample NFT Collection Smart Contract -
Don’t worry, the above picture and the lines it contains may look a bit foreign to you, but this is pretty much what your NFT is. Each of your NFT will have the same format, all you need to do is change the name and the symbol of your NFT collection (which is “Finland” and “FIN“ in the above picture).
Once you deploy your smart contract, you can create a collectible using the createCollectible() function. The input it takes is a link to your metadata and returns a unique id of your NFT.
Here’s what metadata of my NFT looks like -
{
"name": "TourDe100",
"description": "A global 100 days cycling challenge from team HDOR. Won a medal by acquiring 1500 points in the 100 days cycling challenge.",
"image": "https://ipfs.io/ipfs/QmPWVqcvavETv6jyWfYZFoTDcqGLyy1NbZFbSvT7UkAwNC"
}
You can upload the metadata of your NFT on IPFS, a decentralised storage system, using this tool (free of cost), which I created ages ago. You can also upload your image to IPFS, as I did.
And we are done! YES. That’s it.
You can access your NFT on OpenSea using the following link - https://opensea.io/assets/matic/<contract address deployed on matic chain>/<collectible number>
You can check out my NFT here. It is live on the mainnet no and feel free to loosen your pockets and bid some money…xD!
You can also check out the details of my NFT on the block explorer. That’s the power of BLOCKCHAIN!
I hope to see a lot of you making NFTs of your own. Feel free to reach out to me in case you face any difficulty.
See you next Saturday, until then have a great weekend :)
Cheers!
Some things that you may find interesting-
Article: How COVID stole our time and how we can get it back by Tim Urban
Movie of the week: The Big Short
Song I am listening to: Always Remember Us This Way by Lady Gaga
Thought of the week: “Write the book you want to read.”
Here are the last three posts if you were too occupied to read them: