Deploying NFT on Solana

December 16, 2022

Using Candy Machine To Deploy NFT On Solana

What is Solana Candy Machine?

Solana NFT Candy Machine is a short program designed for NFT creators to sell NFTs. The candy machines work similarly to mechanical candy machines where a coin has to be deposited to get one piece of candy. The candy machine helps to streamline the processes for NFT enthusiasts in the following ways.

  • Ensures that projects product consistent and well-formed valid NFTs
  • Provides protection from bot attacks
  • Creates on–chain collection NFTs for authentication
  • Accepts buyer’s funds when the project is out of NFTs to sell

Features of Candy Machine V2

Recently, Candy Machine V2, the second iteration of the Candy Machine, works on the full chain – generative NFT distribution program. The distinct features of the Candy Machine V2 include –

  • Unpredictable NFT minting index
  • Whitelist feature
  • Captcha settings
  • Hide – and – Reveal drops
  • Better configuration options

How To Use Candy Machine To Deploy NFT On Solana?

Installing  Solana Candy Machine V2 requires a good understanding of intermediate programming and expertise in the same.


Installing the Software Packages

Begin by installing the packages that would be used to mint the Solana NFTs. This popular software includes Git, Typescript Node, and Node. JS, Yarn, Avana Wallet, Solana CLI, and Metaplex. The MaC Os users might need additional dependencies installed to perform the task.


Clone and Install Metaplex Candy Machine

This step requires cloning the latest Metaplex Candy Machine V2 on GitHub and creating a project directory. Then, clone the Metaplex repository into the project folder and write the npx code to operate on Candy Machine.


Set up Solana CLI Wallet

The Candy Machine operates on the Solana blockchain and needs to be connected to the Solana wallet to add funds as this helps to create and deploy a Candy Machine. There are two options: using the existing keypair with funds or creating a new keypair for adding funds.  However, the existing wallet can also be used by creating a JSON file along with the private key on the computer. Then, set the Solana RPC connection and connect to Solana Devnet.


Configuring  Candy Machine

After installing the CLI wallet, the configuration of the Candy Machine is an important step. Since the Candy Machine V2 is configured in a single JSON file, therefore, it can be saved and reused across multiple drops which means that a single account on–chain holds all configurations of the Candy Machine. All the configuration options can be found at Metaplex Docs which includes GoLive Date, Price, Number, Sol Treasure Account, noRetain Authority, noMutable, Storage, etc.


Preparing and Verifying NFT Images and Metadata

The candy machine makes it easier to upload a collection of images and metadata from the computer to the Solana blockchain. All these files need to follow Solana Metadata Token Standard to ensure they are deployed rightly. Each file shall be a number starting from 0 and each png and JSON file when combined represent a single Solana NFT. Alongside this, the verification of the assets (NFTs) is extremely important before creating the candy machine.


Creating the own NFT Candy Machine

While creating the Candy Machine it’s important to ensure that the key pair has funds and that NFT images and metadata are already there in the assets folder of the blockchain. Then, the npx ts – node is run to create the NFT Candy Machine for verifying the upload using Metaplex.


Minting Tokens

Now the candy Machine is ready to mint the Solana NFTs. However, these NFTs can be minted only after the goLiveDate setting in the config.json file is updated. Using the mint_mulitple _tokens multiple tokens can be minted. One can view the Solana NFT mint transaction on Solana Explore.

Final Words

After successfully minting the tokens, the newly–created Solana NFT shows all the information from the metadata depository. This information includes the Mutability status of the token, its collection address, mint authority, and the authority that is able to update the NFT metadata.

Exclusively hand curated news, written precisely in short by our editors for a 60 seconds read! We understand that reading multiple news from various resources could be monotonous, time consuming and less interesting. At Dcryptonews, you will experience a new style of reading news with smart keyword, ease of language that is easy to read for a quick news grasp.