Comment on page
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.
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
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.
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.
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: