#### Fund devnet wallet time taken: 00:00:58, node ../build/candy-machine-v2-cli.js verify_upload \, wallet public key: 9WS1ezpcxDVfA8cWGzDswCxfXWPtc6xcrkEk9gN6PWh8, node ../build/candy-machine-v2-cli.js mint_multiple_tokens\, Minting 5 tokens

It is currently very new, so please report issues on GitHub. NFTs welcomed :) We will use the folder "cm-project" mkdir ~/cm-project and then change directory to the project folder root cd ~/cm-project. Installing and using Solana Candy Machine V2 requires Copyright 2021 Levi Cook Then set the Solana RPC connection. Candy Machine is a Solana-based program developed by Metaplex Studios, anNFT ecosystem for marketplaces, games, and arts & collectibles, to reliably sell non-fungible tokens (NFTs). In Candy Machine v2, Metaplex has introduced improvements associated with how end-users configure Candy Machine and new settings that enable mint pausing at a certain point. With these visible, you can now construct the correct command line instructions for uploading to devnet. create_candy_machine [options] $ npm install -g ts-node Nevertheless, the owner of the Candy Machine should be ready to mint tokens.

create new distribution scenarios and offers protection from bot attacks. Then, add funds. Verifiers are needed to keep tabs on the actual rollup state and the one referenced in the state root to detect fraud. - fork it Once you have finished minting, you may want to consider you will want to sign your NFTs to verify yourself as the creator.

Processing file: 2 This permits the broader marketplace, storefronts, and CLIs to search for NFTs that were minted by a Candy Machine seamlessly and with trust. keypair file itself, which is stored as insecure plain text ::: `solana-keygen help new` The program authors are aware of this and carefully designed the program so that it's safe to simply re-run the upload command until everything goes through completely and cleanly. ## the pattern looks like you'd expect it to. ## What about the web app??

pubkey: 7zMqBkHowtpEC8iayNmCoT42T8dKjikzmTbZX5aNJbhJ ::: storage: The storage provider that holds your off-chain NFT metadata and image.

Candy Machine V2 provides many new features and security upgrades from Candy Machine V1. The Candy Machine program is similar to a real-world mechanical candy machine whereby a person deposits a coin into the candy machine and gets one piece of candy back. ``` Relies on cryptographic guarantees for security. 8.json ```

After a successful run, both arweave __and__ Solana are initialized. Once you have completed the initial preparation, it is critical that you verify that the files are ready to be uploaded. For added security, enter a BIP39 passphrase This project is under active development. You can change the metadata for each NFT so it is unique to that NFT. ZK proofs require specialized, expensive hardware to create and have high on-chain verification costs. Depending on configurations, it is either restricted to whitelist users or the goLiveDate has not been reached yet. More information on creating a frontend for your NFT mint, or how to use Candy Machine v2, refer to the official documentation Metaplex. To do this, goto the js/packages/cli folder inside metaplex, and execute the following commands: This will create a folder named build in the cli folder. You can add this keypair to Phantom to check the NFTs. ### Uploading

`JUskoxS2PTiaBpxfGaAPgf3cUNhdeYFGMKdL6mZKKfR` We can add SOL by running solana airdrop 1.

Today, Metaplexs tool has become common across the industry as a result of its inherent utility, noteworthy documentation, and logic to combat threats such as bot attacks. Developers can clone the Metaplex repository by pulling the CLI from GitHub. #### check `symbol` values The NFTs will be stored in the wallet related to keypair.json. This cache was created in the upload process. # License --date "26 Sep 2021 00:12:00 GMT"

:::info verify_price [options] $ solana airdrop 10 # request funds

You can confirm the health of your on-chain assets using `ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts verify`: This is where permanent mistakes are made.

And finally, the directory name `assets` doesn't really matter. For example, we set the fee at 100 basis points which is equivalent to 1%. Options: The next step is to prepare the candy machine. Looking at key 2 This passphrase improves security of the recovery seed phrase NOT the wallet public key: 9WS1ezpcxDVfA8cWGzDswCxfXWPtc6xcrkEk9gN6PWh8 Below is an example configuration for Candy Machine V2. 10 420 The valid number for this field is between 0 (0%) and 10000 (100%). Candy Machine V2 requires installation of several packages to work correctly. Drop your details to get notified when we launch , NFTs are rigid because there is no standard for upgrading them, How to build a Metaverse? Looking at key 0

This is because there is a general expectation that once an individual puts a token into the machine, they will only receive one item. Processing asset: 2 Signature: Kme6a2HjbiWCi3hVcqa8qAPcZHmC6kCQhNSVHKT9NyNacpKZ12uxE3GjDVsDHj8TbXtAGdh4An2qSYa9uKe8Hzt $ find assets -type f -name '*.json' | xargs jq '.properties.creators' | jq -c '. ::: ```bash

For example, update the attributes to explain the NFT's unique properties in the description. Notice that these come in numerical pairs. At this point, your NFTs are ready on the chain.

Arguments: We will also add a script to mint NFTs to your wallet via the CLI.

First, let's get started by installing all of the software packages we will need to mint Solana NFTs with Candy Machine: If you are running Mac OS with the Apple M1 Chip, then you need to install additional dependencies (see docs): brew install pkg-config cairo pango libpng jpeg giflib librsvg. Don't speed run this section. Candy Machine helps solve common issues related to minting Solana NFTs including: Most large-scale NFT creators use automated minting tools similar to Candy Machine. The motivation behind Candy Machine was to address problems with the way NFT drops were being managed and processed on the Solana blockchain. For example, 0.json contains the NFT metadata for 1.png. - customize your own ui This means that creating a new instance of Candy Machine v1 is no longer possible and end-users are encouraged to use Candy Machine v2 instead. The Candy Machine metadata requires all metadata JSON files to follow the Solana Token Metadata Standard. ``` Explore 10 of the most popular and Solana NFT collections, and discover the characteristics that make them special like team, utility, roadmap, and artwork. $ find assets -type f -name '*.json' | xargs jq -r '.symbol' | sort | uniq -c

mint_multiple_tokens finished, https://docs.metaplex.com/candy-machine-v2/configuration, https://docs.metaplex.com/candy-machine-v2/mint-frontend, some understanding of bash scripts, and a terminal, You can add as many attributes as you want in, For additional files, make sure you use the correct, If there are multiple creators, you can specify the share split of royalties, Share = 100 signifies that 100% of the royalties for goto this creator, Mint them to your wallet via the command line or, Generate a candy machine website where users can mint their own. ```bash Generative NFTs take multiple design assets to automatically create a large number of uniquely designed NFTs compared to 1-of-1 NFTs and AI-generated NFTs.

#### check `name` values

``` update_candy_machine [options]

``` When done, you can change the network to Mainnet-Beta. I also recommend making devnet your default keypair: This collection will be called "Tara". `solana config set --keypair ~/.config/solana/devnet.json`

`metaplex` is a command line tool for interacting with the candy-machine program. Youre all set and ready to mint your very first NFT using Candy Machine v2. Maybe you live life on the edge. This tutorial is going to walk you through the basic steps to create a Candy Machine mint. Building up commands with lots of long arguments can be challenging and error prone. are sure that your local environment is configured properly. WTF is a candy-machine you ask? initializing candy machine

These folder names can be anything. Commitment: confirmed # Metaplex Candy Machine :::info ``` This guide and the accompanying candy-machine-mint web starter kit enable you to launch NFTs on Solana with zero knowledge of Rust. You can find all configuration options at Metaplex Docs.

Requires waiting through a 1-week delay (dispute period) before withdrawing funds. The Candy Machine makes it very easy to upload a collection of images and their metadata from your computer to the Solana blockchain and file storage provider. $ find assets -type f -name '*.json' | xargs jq '.properties.creators' | jq -c '. Some important problems that have been addressed in the latest update include the following: In general, there was a clear need to create an easier way to solve the most fundamental problems that buyers, sellers, and marketplaces experienced in the NFT landscape. ## Preamble By incorporating Captchas, mints have now been limited to humans which means far fewer bots. The guide uses basic configuration settings to keep it simple. This process requires you to have: By the end of this tutorial, you will have 5 NFTs on the Solana devnet and a website to run a sale. update_candy_machine \ Metaplex has created a sample collection that you can download for testing purposes. - _verify_ the state of your candy-machine is valid and complete For example, you can create ~/.config/solana/keypair.json and enter your private key bytes: An example of private key bytes for public key 5WfBt2ziAxA4DWV3XBSmvczhjcp9Az9eCcdmgSNvZ2Ar: 10 ["",30] No instructions provided Once you verify that your keypair has funds and your assets have been uploaded appropriately, you are ready to deploy the candy machine. The Metaplex docs can walk you through all advanced options and settings.

In fact, the Candy Machine CLI provides the verify_assets command to check that uploaded assets are in the correct format. Being verified means that the creator with that wallet address has signed the NFT, proving that they are the actual creator. Now you can decide to: The advantage of the latter approach is that the gas fee of the mint is paid by the user. For Solana NFT minting, Metaplex does come with a full minting front-end application written in React. On-chain NFT collections help validate accuracy and authenticity. ```bash - ensure you have a recent version `jq` installed You use this guide, even if don't plan to be upgradable via Meta Blocks protocol. Next, let's clone the Metaplex repository including Candy Machine into our project folder git clone https://github.com/metaplex-foundation/metaplex.git .

If you are uploading a lot of images, you might need more than 2 SOL. ```bash Save this seed phrase and your BIP39 passphrase to recover your new keypair:

-l, --log-level log level We can mint Solana NFTs from the Candy Machine CLI easily. Publishes full transaction data as calldata to Ethereum Mainnet, which increases rollup costs. -c, --cache-name Cache file name (default: "temp") In addition, any configuration value can be updated. Thank you! - deploy it to your own mint subdomain Using version 2 of Candy Machine it is now possible to create large collections and hide-and-reveal drops by specifying a single hash. You can change devnet to mainnet if you are using Solana mainnet. 9.png ``` Verify that your keypair has funds and your NFT images and metadata are in the assets folder. --price 1 \ Users can withdraw funds immediately because validity proofs provide incontrovertible evidence of the authenticity of off-chain transactions. :::info #### Validating your candy-machine In conjunction with Strata's Dynamic NFT Pricing Mint tool, creators can reliably launch NFT campaigns on Solana with a simple toolkit. Using Candy Machine v2, developers and creators can set up their own Solana NFT shops, add a mint page to their website, and safely launch a successful NFT project. Processing file: 3 #### Create devnet wallet (for testing)

No instructions provided In this tutorial, we will mint NFTs on Solana using the Candy Machine v0.0.2. Uses validity (zero-knowledge) proofs to prove transaction validity.

- register those assets with your candy-machine's inventory Also notice that we're starting with 0.json + 0.png, because that's the default value for the `--start-with`.

This non-randomized order created the opportunity to be able to choose which NFT to mint, given that all of the information about the items was available on-chain. [1]' | jq -s 'add' Name {redacted-name} 3 with https://arweave.net/{redacted-tx-id} checked out

- after the code is finished downloading, run --cwd ./js/ in the project root folder (do not change folders). If we look at the account tokens, the NFT now shows up on the Tokens tab.

So for our 5 NFTs in the "Tara" collection, we will have the following files (total 10): We will create two folders called tara and tara/assets in metaplex/js/packages/cli: assets folder stores on-chain assets and the tara folder will be used to store keys and config. Install the Solana Command-line Tools This provided an unfair advantage to NFT collectors with developer backgrounds. deploying your NFT collection using storage provider arweave-sol, you can try using arweave. sign [options]

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. According to Metaplex, over 11.5 million NFTs have been minted using the organizations protocols which have provided standards & tools for more than 100,000 projects and online communities. use `git pull` to ensure you're running the latest and greatest version. npx ts-node ./js/packages/cli/src/candy-machine-v2-cli.ts mint_one_token -e devnet -k ~/.config/solana/keypair.json -c example, You can mint multiple tokens by using the command mint_multiple_tokens, npx ts-node ./js/packages/cli/src/candy-machine-v2-cli.ts mint_multiple_tokens -e devnet -k ~/.config/solana/keypair.json -c example --number 2. wallet public key: 9WS1ezpcxDVfA8cWGzDswCxfXWPtc6xcrkEk9gN6PWh8 Clone the latest Metaplex Candy Machine V2 from the master branch on Github. Technically, the candy-machine is an on chain Solana program (smart contract) that governs fair mints. Now we need to set keypair.json file as the Solana CLI keypair. Run solana config set --keypair ~/.config/solana/keypair.json. Nonetheless, users should check whether everything has been installed properly and ensure that they have defined environment variables. This file will have the following content: You can create a script to generate the configuration for you. - ensure you have recent versions of both `node` and `yarn` installed Processing file: 1 Solana Explorer parses the attributes to show them on a separate tab. ```bash #### check `properties.creators` For the most convenient setup, creators are encouraged to use the frontend UI provided by Metaplex. The Metaplex Candy Machine operates on the Solana blockchain. #### check the total number of assets, json and image files confirm these add up. ## this command extracts unique seller_fee_basis_points, then sorts and counts them. #### Uploading your project assets

:::

The second-iteration eliminates this possibility by using an unpredictable mint index, which is not possible to predict.

## 0.json should refer to 0.png in the .image and .files props

Staying close the defaults ensures you don't have surprises like publishing fewer NFTs than you meant to. Name {redacted-name} 2 with https://arweave.net/{redacted-tx-id} checked out If you are building a richer application, or want NFTs that can upgrade overtime, checkout the Meta Blocks protocol. - start and finish at the same time for everyone If you're me, you're confirming your config right now to ensure you're on devnet, because we're going to rely on this to make subsequent command line invocations simpler from here forward. Alchemy Supernode finally makes it possible to scale blockchain applications without all the headaches. :::info

-V, --version output the version number Plus, our legendary support will guide you every step of the way. ::: Run this five times to add 5 SOL (let about 30 seconds pass between requests). Note that if you enabled captcha bot protection, then you will not be able to mint tokens from the command line. BIP39 Passphrase (empty for none): eg: 4.png and 4.json are two halves of the NFT -- one is the art, the other is the metadata. Read the fine manual Minting NFT collections correctly requires technical know-how, and the Candy Machine helps streamline the process. - mint individual tokens with _mint_one_token_ Prepare your files in the folder ~/cm-project/assets/.

#### devnet for the win This functionality ensures that theres a level playing field when it comes to minting NFTs using Candy Machine v2. $ find assets -type f -name '*.json' | xargs jq -r '.name' | sort | less

$ solana config get $ find assets -type f -name '*.json' | xargs jq '.seller_fee_basis_points' | sort | uniq -c The Candy Machine CLI will check the images and metadata json files.

And here's how you can fund that wallet:

I don't fully understand the replication process, but know that it takes time. ``` Notice that another address was added to the creators - that's normal.

The project is about 90 megabytes and could take a couple minutes to download. Read the Solana Command-line Guide =====================================================================

Writing indices 0-4 # REDACTED Now that you have completed the majority of the initialization steps, your Candy Machine is ready to mint Solana NFTs. NOTE! You can read more about creating metadata files in Avana Wallet NFT documentation. `solana config set --url https://api.devnet.solana.com` Configuring Candy Machine is very important, so double and triple check your settings. Usage: candy-machine-cli [options] [command] Make sure that you name then 0.png, 1.png and so on. This config is built to comply with Metaplex's Token Metadata Standard. To ensure that the upload process, you can run the verify command as follows: It's recommended to run the verify command, but it's possible that you like taking risks. ### Prerequisites $ find assets -type f -name '*.png' | wc -l # count the images files ```bash Usage: candy-machine-cli upload [options] Make sure you keep the date formatting consistent with the example. Easy Guide To Mint Solana NFTs Using Candy Machine V2. :::

Config File: /Users/levi/.config/solana/cli/config.yml -h, --help display help for command

Processing asset: 0 -k, --keypair Solana wallet location (default: "--keypair not provided") initialized config for a candy machine with publickey: AuuLoYV9kx8HKWrpnJCT5whgURqd5MwxckWesL5arqh Done Metaplex offers a suite of tools and smart contracts (programs) that will ease the process of creating NFTs. ```bash - clone the project -- if you're me: Update Authority: Solana address that is able to update the NFT metadata. For example, the current version as of May 2022 is 0.0.2. The Solana NFT Candy Machine, or CM for short, is a Solana Program designed to help NFT creators sell their NFTs. Devnet serves as a playground for anyone who wants to take Solana for a test drive, as a user, token holder, app developer, or NFT publisher. Metaplex is a collection of tools, smart contracts, and other technologies that have been designed to make the process of minting and releasing NFTs simpler. ```bash= If the NFT was supposedly generated on Candy Machine but lacks a Candy Machine ID (CMID), users should be cautious of minting, buying, or trading for the NFT. ```bash= Finally, you need some SOL to pay gas. We will use it to:

Doesn't need to publish transaction data on Ethereum because ZK-SNARKs and ZK-STARKs already guarantee the accuracy of the rollup state. First, go read the fine manuals We will use solana config set --url https://api.devnet.solana.com/ to connect to Solana devnet. intermediate programming experience - this might be challenging for those who are new to coding.

---

9.json

## etc ``` Avana Wallet displays your NFTs in the app. The cache folder is hidden and called .cache. 3.json

Be espescially careful with checking `seller_fee_basis_points` and `properties.creators` -- details below:

#### Validating your project assets 10 Because NFT sniping tools exist, come NFT projects create honeypots, or fake CMIDs that accept SOL tokens, but don't return an NFT, to deter bots. ## for most projects, you should see a consistent count across all parties (address-[1..3])

$ ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts help upload https://github.com/exiled-apes/candy-machine-mint NFT publishers should target devnet before going for mainnet. We will need this address later. Options: You can view all of your NFT metadata,

minted 5 tokens Do not use Solana mainnet with SOL until you Also, notice that Candy Machine automatically created a Collection NFT. In less technical terms, Metaplex designed a standard that to store NFTs on Solana, an everyone in the ecosystem adopted the standard. 2.json This implies that end-users are unable to purchase NFTs ahead of the mint time and once the limit of NFT mints has been reached, no more are generated. If you're running into issues IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.d. Requesting airdrop of 10 SOL --keypair ~/.config/solana/devnet.json \

5.json RPC URL: https://api.devnet.solana.com Our images will be similar to this image: Our NFT metadata will look similar to this JSON file (download JSON file example metadata.json): When you set seller_fee_basis_points, be aware that the number should be an integer and it represents basis points (1/100 of a percent), not a full percent. It will: ## this command flattens, then counts the unique properties.creators values in your metadata.

0 SOL In addition to generative NFTs, creators can also generate 1-of-1 NFTs or even semi-fungible tokens for their respective communities. Mint Authority: Solana address that is able to mint the NFTs. ## confirm those numbers are all what you would expect. If running the program on Mac OS with the Apple M1 chip, additional dependencies will be required. We are almost ready to create your Candy Machine. You can use an existing wallet by creating a json file with your private key bytes on your computer. In that case you can skip this step. 2 SOL, node ../build/candy-machine-v2-cli.js upload \, Beginning the upload for 5 (img+json) pairs ``` -n, --number Number of images to upload 10 Each file should be a number, starting at 0. To start, you will need the following Solana development tools downloaded on your local machine. We need to verify our assets before creating our Candy machine. Metaplex has three major projects; Token Metadata, Candy Machine, and Auction House. The Metaplex package comes with multiple packages, but we only care about cli. ## for most projects you should see a consistent count across all metadata. Acceptance of buyer funds even when the underlying project was out of NFTs to sell, Not having a precise and global start time, Projects were not producing consistent, valid NFTs, Protection from persistent NFT bot attacks, Creating an on-chain collection of NFTs for authentication purposes. You could go with anything you like here.

Faces higher overhead from costs involved in generating and verifying proofs for every transaction block. The version should print in your command line. If you are following along with the example, you can find the 5 json files and images here. ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts \

This project is a learning project around Solana NFTs, and builds up example JavaScript code that interacts with Solana NFTs from the browser. Because any SPL token can be used to create whitelists, it is up to the project creator's discretion how they are distributed. Explore the top 10 Solana RPC node providers enabling web3 developers to deploy smart contracts to Solana's Devnet, testnet, and mainnet. MIT License NOTE: If you are not able to upload at all, you can try to clear the cache and try again. This is just our personal preference. Creators who are interested in providing a convenient end-to-end consumer experience should consider providing a frontend minting experience to allow the community the chance to mint as well. Create a project directory.

#### check `seller_fee_basis_points` Lets start with the blocks, Introducing Meta Blocks: The NFT Evolution Protocol, Corporations will do their best to restrict you to their universe and it's time we start fighting to stay free, The Future of NFTs is Dynamic, Composable and Upgradeable, The benefits of upgrading NFTs without burning or modifying NFTs. The newly-created Solana NFT shows all of the information from the metadata json file. According to Metaplex, the numbering of the files start at 0.

Subsequently, by downloading the relevant dependences, end-users should be able to compile and run the software. Done. :::warning

help [command] display help for command Read more about NFTs in Avana Wallet Docs. Users don't need someone to watch the L2 chain to detect fraud. Metaplexs native user interface supports a variety of configurations of Candy Machine v2 such as whitelisting (for both pre-sale and discounts) and end-settings (i.e., automatically adapting the UI components depending on whether the whitelist token is detected or not. After this, your assets are ready (assuming you didn't make any typos). Metaplexs Candy Machine addresses these shortcomings in a dynamic way. We are going to build an upgradable NFT project on top of the Meta Blocks protocol. I highly recommend making devnet your default solana url: cd into a directory where you want to store the Metaplex related code. $ find assets -type f | wc -l # count the total number of asset files 10 SOL ", "8J4tQgSifp1ibwXbMVBBKjry1YoSaoSLSMTkYQjsyzUA", Requesting airdrop of 2 SOL `solana help airdrop` Users can either rely upon an existing keypair with funds or create a new keypair specifically for this project. Minting an NFT is the process of creating a token, freezing its maximum supply to 1 and attaching Metaplex NFT standard JSON to it, so a wallet can render it. 3.png Signature: 2s8FE29f2fAaAoWphbiyb5b4iSKYWznLG64w93Jzx8k2DAbFGsmbyXhe3Uix8f5X6m9HRL5c6WB58j2t2WrUh88d

- swap SOL for AR and send files to arweave ## 2.json should refer to 2.png in the .image and .files props

There are a few important steps to follow to ensure Candy Machine v2 is up-and-running.

=====================================================================

#### Updating your candy-machine :::info Mutable: Means that the update authority can change the on-chain metadata. 10 ["",60] WebSocket URL: wss://api.devnet.solana.com/ (computed) Config File: /Users/levi/.config/solana/cli/config.yml ```

Make sure you save the output pubkey: 5B2r75JbpajeWcx4niKq7pck3ZLcHvChXATm46YdRLGp. upload [options] 0.png You can download a sample config file here: config.json. transaction 1 complete 61H3Ai5UPqDzLQ8fobZbN3zAnXycSKgt5vyqMB9eXuVWotH6hodwyCj1HnKNe3ynRybxdUiLZeCuwYs98V15WRV3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Commitment: confirmed RPC URL: https://api.devnet.solana.com