December 10, 2021
As we continued building on the Evmos Testnet, we decided it would be a fun idea to launch our own PFP NFT project. For those unfamiliar, that stands for "Profile Picture Non Fungible Tokens" and is one of the most popular kinds of collectible NFTs. At Alt, all of our team members are known as "Otters" & what better way to pay homage than by releasing a bunch of fun & sporty Otters!
Image Generation Process
The first step in building any NFT project is getting the artwork, so we quickly drafted up a proposal for our artist (essentially just that we wanted a bunch of otters doing sports) and they got to work!
What's special about Generative PFP projects is that with just a small collection of "traits" or "attributes" made by an artist, you can generate a large collection of unique profile pictures. Each image layer is randomly stacked on top of the others, so just 5 layers with 10 possible choices each, already lets us generate 100,000 (10^5) unique Otters.
One of the best things about Evmos is that it supports Solidity & EVM so all code written for Ethereum runs perfectly! With that in mind we were able to start the NFT contract with a great base using OpenZeppelin's ERC 721 contract. In addition, all of Ethereums tools are compatible as well, so we were able to use the Remix IDE & Metamask for all of our testing & our deploy.
Past just a basic NFT, we wanted to have a special feature for those who sent it to others and added a leveling system. Every time an Otter was transferred, we had the level increase by 1 (up to 10 max), and your Otter's background color would change by updating image & metadata via setTokenURI.
To make it easier for other to view & mint their Otters, we integrated our NFTs with our web wallet as seen below. Helps to abstract away any direct contract interaction & make it doable for anyone brand new to web3!
To finish up, we used the great poa-solidity-flattener to flatten all of our dependencies + our contract down into one file and verified on the Evmos Explorer! You can view the source code of our NFT contract right here.
**😊 Thanks for reading, and please mint yourself an otter right here → http://evmos-wallet.onlyalt.com:3000/mint
And join us in the Evmos community! → https://discord.gg/8Xd29MU4DE**