- Install instructions
- update PATH env var if needed
- check installation with
solana --version
- config solana to run on devnet
solana config set --url https://api.devnet.solana.com
- confirm configs
solana config get
- clone the Metaplex repo
git clone --branch v1.0.0 https://github.com/metaplex-foundation/metaplex.git ~/metaplex
- install dependencies
yarn install --cwd ~/metaplex/js/
- check installation
ts-node ~/metaplex/js/packages/cli/src/candy-machine-cli.ts --version
- Create a keypair
solana-keygen new --outfile ~/.config/solana/devnet.json
- Config the keypair to be used locally
solana config set --keypair ~/.config/solana/devnet.json
- Confirm the wallet is configured correctly
solana balance
- Fund the wallet with some fake SOL (since it's run on devnet)
solana airdrop 5
- Get your public address
solana address
- Update NFT creator in all NFT JSON files (
assets/*.json
)- Paste the public wallet address on
properties.creators.address
- Paste the public wallet address on
- Upload NFTs
ts-node ~/metaplex/js/packages/cli/src/candy-machine-cli.ts upload ./assets --env devnet --keypair ~/.config/solana/devnet.json
- Verify NFTs
ts-node ~/metaplex/js/packages/cli/src/candy-machine-cli.ts verify --keypair ~/.config/solana/devnet.json
- Deploy on devnet
- Note:
-p {number}
sets the desired NFT price ts-node ~/metaplex/js/packages/cli/src/candy-machine-cli.ts create_candy_machine --env devnet --keypair ~/.config/solana/devnet.json -p 1
- Note:
- Set drop date
--date "dd mmm yyyy hh:MM:ss GMT"
sets the datemmm
= Jan/Feb/.../Dects-node ~/metaplex/js/packages/cli/src/candy-machine-cli.ts update_candy_machine --date "1 Dec 2021 00:12:00 GMT" --env devnet --keypair ~/.config/solana/devnet.json
Name | Description | How to find / value |
---|---|---|
REACT_APP_CANDY_MACHINE_CONFIG | Candy machine config ID | program.config key inside .cache/devnet-temp |
REACT_APP_CANDY_MACHINE_ID | Candy machine deploy address | candyMachineAddress key inside .cache/devnet-temp |
REACT_APP_TREASURY_ADDRESS | Local wallet address | authority key inside .cache/devnet-temp (or run solana address ) |
REACT_APP_SOLANA_NETWORK | Network to connect to | devnet |
REACT_APP_SOLANA_RPC_HOST | RPC to connect to | https://explorer-api.devnet.solana.com |
To mint NFTs you're going to need SOL on your Solana devnet wallet
Run solana airdrop 5 YOUR_WALLET_ADDRESS
(max 5 tokens per airdrop)
To run this project, clone this repo and follow these commands:
- cd into the
app
folder - Run
npm install
at the root of your directory - Run
npm run start
to start the project - Start coding!
If you use VSCode to build your app, we included a list of suggested extensions that will help you build this project! Once you open this project in VSCode, you will see a popup asking if you want to download the recommended extensions :).
If you have already uploaded your NFT assets and you want to change something, here are the steps you need to take:
- Delete the
.cache
folder - Update the NFT asset files
- Upload NFTs to Metaplex
- Deploy candy machine
- Set a drop date (optional)
- Setup env vars