Day 62 of #100DaysOfDeFI 🚀 Today I continued deploying smart contracts on Ethereum testnet Rinkeby and uploaded a duck 🦆 NFT on OpenSea 👩🏻💻
#womenwhocode #100DaysOfCode
Summary 🧵
1/ First, prepare the jpeg file and metadata for the NFT. We’ll use Pinata platform for hosting files 🦙 A jpeg is an image we want to deploy as an NFT and a json file is the metadata. So, create an account in pinata.cloud and first upload the image.
2/ There will be a CID generated that we have to add to the json file. In name section add “gateway.pinata.cloud/ipfs/” and the image CID. Upload the json file too 👩🏻💻
3/ Now we’ll go to Remix and create an NFT smart contract. As we learned on day 58 of the challenge, ERC721 is a token standard for NFTs 👩🏻💻
4/ Compile and deploy the contract 👾 Don’t forget to choose “Injected web3” environment!
5/ Now we can use the create function awardItem and mint an NFT! Here we have to use the following data:
🔹 recipient: your address (or the one who will get the NFT);
🔹 hash: json file CID;
🔹 “gateway.pinata.cloud/ipfs/” + json file cid.
6/ Go to testnets.opensea.io, connect with MetaMask wallet and in “My collections” tab you’ll see the minted NFT 🎉
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.