Picture for Profile (PFP) NFTs have taken NFTs mainstream with massively popular projects such as Bored Ape Yacht Club (BAYC) and CryptoPunks selling for enormous amounts on various marketplaces.
The basic premise is an image with attributes which are semi-randomised to create collections which people can then purchase and use on social media.
For this example, we will be using an ERC721 contract which means there will be only one copy of each token. More information about contract types here.
To get started, you will need to prepare your images and metadata.
Images are typically square (but not always) and can be any size from 300x300px to 1200x1200px depending on your art style and user needs. Inspiration can be found here: https://medium.com/web-design-web-developer-magazine/at-what-pixel-dimensions-are-most-generative-nft-art-projects-built-9344d3998ac0
For our example, we will be using 800x800px squares and picking royalty free images from Pixabay (https://pixabay.com/) as we have no intention of selling these.
We will number these images from 1 to 12 which will be their
Token Id. Each image will be named
Token Id.jpeg to keep things simple.
Next we need to prepare our metadata files. Each token will have a JSON file called
Token Idwhich describes the token. It is important that we don't add any file extension for this type of contract.
For our example, token 1 will have the following metadata.
"description": "Although called a lighthouse, this structure is actually quite heavy",
"name": "'Light' house"
The last file to create is the contract metadata. This tells marketplaces about the collection and what to show.
For our example, we will use this:
"name": "Enlightenment V4"
"description": "This collection was created as a demo to showcase the HyperMint app and client sdk. All information for this page is coming from the network via the sdk to show what is possible.",
With our files prepared, we need to make them publicly accessible. To keep things simple, we will upload them all to a simple web server, starting with the images.
With the images uploaded, we can fill in the
imageproperty on the contract and token metadata files (e.g. https://demo.hypermint.com/nfts/images/0.jpg) and upload the JSON files.
We should end up with two urls: One for the contract metadata file and another which can have the token id appended to for the image.
Adding a token id to the end of the token url should return the metadata. E.g. https://demo.hypermint.com/nfts/1
With our assets deployed, it is time to create the contract. From the contracts list, we can click the
Createbutton in the top right to open the contract creation wizard.
The first step is to enter the basic information about the contract such as its name and network. For this example, we will be deploying to the testnet version of Polygon called Mumbai.
Next, we choose the contract type. As mentioned at the start, we will be using ERC721 to have only one copy of each of our tokens.
Next, we can choose to allow users to buy the tokens directly from the network. For our example, this makes sense as we will eventually have a webpage for users to buy them from using their wallet. More information about the ways users can buy tokens can be found here.
To keep things simple, we will will ignore the sale window dates and allow users to buy straight away.
Next we need to tell the contract where the metadata is stored. We will select Self Hosted as we uploaded to our server and enter the two urls from the Hosting Metadata step.
Clicking next shows us the final page where we can create the contract.
There are a few last pieces of configuration which are required before deploying the contract.
- Primary Sale Address: This is wallet which will receive the funds when a user buys a token
- Presale Address: This is the wallet which has authority to approve presales
For our example, we will enter an address we have control of into these fields in the Overview section.
- Secondary Sales Royalties: This is how much we will charge when the token is sold on a marketplace. As this is a test, this can be
- Price: How much each token will be sold for
With that information provided, the contract is ready to configure our tokens.
Tokens are configured in the
Tokenstab on the contract. We have two options to create our tokens: One at a time or on bulk.
Create Tokenbutton will open a dialog showing a preview of the token based on the metadata that we configured.
If you don't see a preview, check that your metadata and images have been configured and uploaded correctly
Bulk Create Tokenwill allow us to enter the number of tokens we want to create.
For our case, we will use the bulk option and enter
12as that is the number of tokens our demo site has prepared. Enter your number of tokens here or use the
Create Tokenoption if you only have one.
The tokens will be created in the system and shown in the list.
You can click on a token to see its image and metadata at any time.
When a token is created, our servers will sync the metadata so you can preview the token through the dashboard. If your tokens show "Syncing..." you can use the refresh button in the top right to see the latest
With that, we are ready to deploy the contract.
To deploy the contract, we click the
Deploybutton in the top right. If this button is disabled, enter the missing information.
The deployment goes through various stages depending on the network. The status of the deployment can be found within the General tab.
Once all of the steps are complete, the contract is deployed.
The contract is now public and users can buy tokens for the price specified. From here you have multiple options:
- NFTs minted to a wallet for reservation: Mint tokens ahead and transfer to users later
Something not quite right, unclear or can't find what you are looking for? Please let us know at [email protected] and we will get back to you as soon as we can.