Part 6: Uploading and Creating Your Candy Machine

With all of our assets loaded and programs configured, we can now create a Candy Machine and upload it to the Solana Devnet.

To do so, run the following command:

ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload \
   -e devnet \
   -k ~/.config/solana/devnet-wallet.json \
   -cp ~/dev/config.json \
   -c example \
   --rpc-url <YOUR_QUICKNODE_URL> \
   ~/dev/assets

📘

Note:

You might see a signatureUnsubscribe error: Invalid subscription id error. This will not impact your upload, and you should not stop the process upon seeing these errors. If for some reason your upload stops before it has finished, you can run this command repeatedly until your upload is successful.

Save the CMv2's public key from the output. If you forget this step, you can always find it from wherever you ran the command from, at /.cache/devnet-example.json.

After running that command, you should see the processing of assets. Once the process is complete, we need to verify that everything has been uploaded successfully. Use the verify_upload command to do so:

ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts verify_upload \
-e devnet \
-k ~/.config/solana/devnet-wallet.json \
-c example

Your output should look like the picture below just with your specific address instead of ours:

947

Now, we can spin up the frontend to deploy our page to the internet and give others the ability to mint our NFT.