After addressing the prerequisites, documented below, the general process for creating and operating a Candy Machine is:
- Prepare your NFT Assets
- Upload your Assets
- Verify your Upload
- Create your Candy Machine
- Update your Candy Machine
- Create your Candy Machine Mint Website
- Operate your Candy Machine Drop
Before starting this journey, you'll need to install and understand how to operate a handful of developer tools.
Ensure you have recent versions of
We recommend confirming these tools are working before proceeding further. Some sensible tests are running the following commands:
$ git versiongit version 2.31.1 $ node --versionv14.17.0 $ yarn --version1.22.11 $ ts-node --versionv10.2.1
The specific version numbers don't matter that much, but make sure you're running something recent. The more important thing is confirming these tools are installed and on your system PATH correctly.
Creating and controlling a Candy Machine is typically done through command line tool, currently distributed as source code in a GitHub repository.
You can clone this repository anywhere you like, but the recommended practice is:
git clone --branch v1.0.0 https://github.com/metaplex-foundation/metaplex.git ~/metaplex-foundation/metaplex
If you use a different location, you'll need to adjust for it in subsequent instructions.
You also need to install the projects node/npm dependencies. The recommended way of doing this is:
$ yarn install --cwd ~/metaplex-foundation/metaplex/js/
Future versions of this tooling will be "npx runnable". For now though,
ts-node is recommended for most users.
ts-node is installed and cloning the repo run the following commands to confirm the command line tool is operating correctly:
$ ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts --version0.0.2
The Candy Machine was built by Metaplex (and Solana) to operate on the Solana blockchain.
To work with it effectively you will need to understand tools and practices from that ecosystem.
To get started, we recommend you begin by:
- Reading the Solana Command-line Guide
- Installing the Solana Command-line Tools
- And practice with the examples they provide in their documents.
The Solana 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. NFT publishers should target devnet before going for mainnet.
We highly recommend making devnet your default Solana url
solana config set --url https://api.devnet.solana.com
Read the fine manual
solana-keygen help new
If your me, you'll redact your mnemonic, store it somewhere safe and take advantage of the
$ solana-keygen new --outfile ~/.config/solana/devnet.jsonGenerating a new keypair For added security, enter a BIP39 passphrase NOTE! This passphrase improves security of the recovery seed phrase NOT thekeypair file itself, which is stored as insecure plain text BIP39 Passphrase (empty for none): Wrote new keypair to ~/.config/solana/devnet.json=====================================================================pubkey: 7zMqBkHowtpEC8iayNmCoT42T8dKjikzmTbZX5aNJbhJ=====================================================================Save this seed phrase and your BIP39 passphrase to recover your new keypair:# REDACTED=====================================================================
We also recommend making devnet your default keypair:
solana config set --keypair ~/.config/solana/devnet.json
To get started, read the fine manuals in the help system
solana help config,
solana help balance and
solana help airdrop
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. Here's how you check it:
$ solana config getConfig File: ~/.config/solana/cli/config.ymlRPC URL: https://api.devnet.solana.comWebSocket URL: wss://api.devnet.solana.com/ (computed)Keypair Path: ~/.config/solana/devnet.jsonCommitment: confirmed
And here's how you can fund that wallet:
$ solana balance # check your initial balance0 SOL $ solana airdrop 5 # request fundsRequesting airdrop of 5 SOL Signature: 2s8FE29f2fAaAoWphbiyb5b4iSKYWznLG64w93Jzx8k2DAbFGsmbyXhe3Uix8f5X6m9HRL5c6WB58j2t2WrUh88d 5 SOL $ solana balance # confirm your balance5 SOL