Search
K
Comment on page
🎨

PFP Collection

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.

Get Started

To get started, you will need to prepare your images and metadata.

Images

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.

Token Metadata

Next we need to prepare our metadata files. Each token will have a JSON file called Token Id which describes the token. It is important that we don't add any file extension for this type of contract.
Information about how to create these files and the available options can be found here.
For our example, token 1 will have the following metadata.
{
"description": "Although called a lighthouse, this structure is actually quite heavy",
"external_url": "https://hypermint.com",
"image": "https://demo.hypermint.com/nfts/images/0.jpg",
"name": "'Light' house"
}

Contract Metadata

The last file to create is the contract metadata. This tells marketplaces about the collection and what to show.
Information about how to create this file and the available options can be found here.
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.",
"image": "https://demo.hypermint.com/nfts/images/logo.jpg",
"external_url": "https://hypermint.com",
"seller_fee_basis_points": 100,
"fee_recipient": "0x894BEE1735cCd4AbC811e30645cd981938B39f18"
}

Hosting Metadata

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.
For more hosting options, see here.
With the images uploaded, we can fill in the image property 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.
For example:
Adding a token id to the end of the token url should return the metadata. E.g. https://demo.hypermint.com/nfts/1

Creating the Contract

With our assets deployed, it is time to create the contract. From the contracts list, we can click the Create button 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.

Configuring 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 0
  • Price: How much each token will be sold for
With that information provided, the contract is ready to configure our tokens.

Configuring Tokens

Tokens are configured in the Tokens tab on the contract. We have two options to create our tokens: One at a time or on bulk.
Clicking the Create Token button 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
Clicking Bulk Create Token will allow us to enter the number of tokens we want to create.
For our case, we will use the bulk option and enter 12 as that is the number of tokens our demo site has prepared. Enter your number of tokens here or use the Create Token option 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.

Deploying

To deploy the contract, we click the Deploy button 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.

Next Steps

The contract is now public and users can buy tokens for the price specified. From here you have multiple options:
  • NFTs purchased via website: Use the Client SDK to build your storefront
  • NFTs minted to wallets directly: Learn how to mint through the UI or API
  • NFTs minted to a wallet for reservation: Mint tokens ahead and transfer to users later

Feedback

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.