#3 - A Complete Guide to Mint Solana NFTs with Metaplex
Last updated
Last updated
Author:
[Updated at 2022.4.27]
See the example repo
Generate profile pictures (pfp) from trait materials with configurable weights
Use Metaplex Standard
Upload pfp and metadata to Arweave, which is a decentralized storage network
Mint NFT on , a mainnet-fork developed by Dappio
Some handy tools
hashlips_art_generator
arweave-image-uploader
metaboss
What does Metaplex do?
Metaplex Standard is adopted by popular wallets such as Phantom
What is in Metaplex standard?
See for more details
This tutorial only works on x86_64 chip and does not work on Apple Sillicon (M1 Chip). Some C++ libraries (ex: cairo
) may fail. If you are on M1 chip, I strongly recommend you to use a Linux VPS. Here are some options:
rust
solana
solmeet-3-sandbox
gdown
(For Ubuntu User)Install gdown
:
Download background
, base
, clothes
, faces
, hats
separately:
scp
Download the folder to local machine first
hashlips_art_engine
https://github.com/HashLips/hashlips_art_engine
arweave-image-uploader
https://github.com/thuglabs/arweave-image-uploader
metaboss
https://github.com/samuelvanderwaal/metaboss
proxyman
https://proxyman.io/release/osx/Proxyman_latest.dmg
This should be installed on your local machine.
For Linux / Windows developers, you could choose whistle (open source) or postman.
You should have a downloaded key file after the setup. We will need the keyfile in the rest of the tutorial.
hashlips_art_engine
Additionally, we have to make a few small changes in the codebase to export the data with desired format.
Here are the changes we made:
hashlips_art_engine
Here are the changes we made:
Copy solmeet-3-sandbox
to hashlips_art_engine
:
Set the rarity for each trait by adding a weight number in filename. In this tutorial, we will keep every value the same weight in a certain trait.
After updating the filenames, you should have the following results:
Finally, build the images:
This will export the images to images
folder and a _metadata.csv
file, both under build
folder.
Note: You can compute the distribution of rarity by this command:
You should have a downloaded key file after the setup. We will need the keyfile in the rest of the tutorial.
arweave-image-uploader
Install dotenv
:
Copy the whole string from the downloaded key file and paste to new .env
file:
Here are the changes we made:
Notice: make sure that the address of creators
is the same as the mint transaction sender, which is the Solana cli wallet. You can double check via this command:
Copy the images and metadata to arweave-image-uploader
:
Upload to Arweave:
After uploading, you should see a output file arweave-uris.json
under public
folder. This is the uris of all the metadata. We will soon use it for minting in the next step.
Also, you can access your image and metadata by visiting the uri. For example:
https://arweave.net/hcekmHUHRlQhTHSh0wc0m7zL_EyUahr_IjGlBk-4EO8
https://viewblock.io/arweave/tx/hcekmHUHRlQhTHSh0wc0m7zL_EyUahr_IjGlBk-4EO8
Here, we use solana-mf
for deploying and testing:
Don't forget to request for airdrop at the first place:
We will use metaboss
for interacting with Metaplex. Here we have to do 3 things in order:
Create Collection
Mint NFTs
Set and verify the Collection for NFTs
First, create a folder mint
an empty file mint.js
:
Then, run the minting script:
The results can be found in mint/mints.json
as well.
Config proxyman
for redirecting the http requests that are sent to testnet. This is a hack for customizing Phantom RPC endpoint.
Open proxyman
and press option
+ command
+ r
to set the Map Remote rules:
Here, we redirect every requests to https://rpc-mainnet-fork.dappio.xyz
, which is a solana-mf
RPC operated by Dappio.
Note: make sure you are not running any VPN software other than Proxyman in order to make the mapping work.
Change the network to testnet
in Phantom:
Now, the NFTs should all be displaying:
That's it!
https://github.com/ilmoi/awesome-solana-nfts
https://hackmd.io/@levicook/HJcDneEWF
https://medium.com/metaplex/metaplex-metadata-standard-45af3d04b541
https://medium.com/coinmonks/structure-of-metaplex-nft-c6ef4834a803
https://github.com/metaplex-foundation/metaplex-program-library/tree/master/token-metadata
https://pencilflip.medium.com/how-to-use-arweave-to-store-and-access-nft-metadata-823552293f62
https://pencilflip.medium.com/how-to-use-arweave-to-store-and-access-nft-metadata-part-2-21cb87f4091e
See for more discussion and work arounds
See for more details
See for more details
Folder link
Notice: Make sure your node
version >= v16.13.0. See this for more details.
Follow this to setup your Arweave wallet and claim free AR token by completing assigned .
Next, replace the source code of hashlips_art_engine/src/main.js
with the code from the .
Replace the source code of hashlips_art_engine/src/config.js
with the code from the .
Follow this to setup your Arweave wallet and claim free AR token by completing assigned task.
Replace the source code of arweave-image-uploader/uploader.js
with the code from the .
Next, replace the source code of mint/mint.js
with the code from the .