NFT stands for non-fungible token, it can represent ownership for a digital asset. NFT can take the form of an in-game item for GameFi (play-to-earn application), or a digital art piece, or even as PFP like CryptoPunks.
What is CryptoPunks or Pudgy Penguins
If you have chanced into this blog post, chances are you know what NFT is and have landed here after googling. Both CryptoPunks and Pudgy Penguins belong to the PFP (profile picture) category. They usually come in a huge number of editions, in the thousands at least. The idea is to programmatically generate an avatar for each edition with different traits such as Head, Face, etc.. with some of the editions having the rarer traits, which might be valued higher. Users then buy the NFT and likely use the image as their social media profile picture.
If you have never heard of Crypto Punks or Pudgy Penguins,
View CryptoPunks collection at https://opensea.io/collection/cryptopunks — most of the punks are currently last traded at 6 digitis and above at the time of this blogpost.
And for Pudgy penguins — https://opensea.io/collection/pudgypenguins
An example of how different pudgy penguin looks like, each with different traits — lovely 😍
Step by Step guide
The next section describes a step-by-step guide for individuals who are keen to know the steps to create a PFP project. You will need to have a programming background to perform the steps. If you followed the guide, your edition should eventually be available on OpenSea eg. https://testnets.opensea.io/collection/pokerface-v2 .
On a high level, these are the steps required:
Generate the NFT images and meta-data for OpenSea
Host the image and meta-data on either IPFS or somewhere else
Deploy the smart contract
Mint NFT
Step 1: Generate the NFT images and meta-data for OpenSea
From OpenSea documentation , there are 4 attributes required for each NFT, this would be used by OpenSea to display information about each NFT.
Example:
{ name : "Pudgy Penguin #6520", description : "A collection 8888 Cute Chubby ...", image : "https://api.pudgypenguins.io/penguin/image/6520 ", attributes : [ { trait_type: "Background", value: "Beige" }, { trait_type: "Skin", value: "Normal" }, { trait_type: "Body", value: "Turtleneck Greuy" }, { trait_type: "Face", value: "Winking" }, { trait_type: "Head", value: "Flat Cap Tan" } ] }
The above meta-data will map to this Pudgy Penguin on OpenSea
In this step, we’ll leverage the https://github.com/NotLuksus/nft-art-generator library to help us randomly generate NFT images and their metadata.
Pre-requisite In order to generate an NFT with random traits, the project creator has to prepare the image for each different trait such as eye, head, etc.. I’ve pre-generated those traits at https://github.com/steve-ng/pokerface-nft/tree/main/assets/images for you to keep this simple. Pardon my drawing — I'm a software engineer with 0 artistic talent.
Follow the commands below to generate an NFT image
There will be a ton of questions in the terminal during nft-generate
, you can set the image url
as some random URL for now as we need to perform step 2 to get a URL first and come back to this step.
The below are the value I’ve keyed in.
By the end of nft-generate
the command, you should see a output
folder created with different NFT assets and a metadata.json
file. metadata.json
is an aggregate of all edition information and I’ve split them into metadata folders.
If you would like to skip this step, you can find the result in the output folder at Github. there are already 12 assets generated randomly and the metadata folder with the metadata for the 12 assets.
0 Comments