Now, we can begin the configuration portion. We will need to clone the Metaplex repo and install all of the dependencies.
All commands shown are run on a unix machine.
Refer to the official Metaplex documentation for more information on each step within this part.
Let’s start by opening a Terminal window and navigating to the folder you’d like to set up your project in. Next, create a new directory,
solana-nft and navigate inside it:
mkdir solana-nft cd solana-nft
Now that we’re in the right location, let’s clone the repo with the following command:
git clone https://github.com/metaplex-foundation/metaplex.git ~/metaplex
Then to install the dependencies, run this command from outside the metaplex directory:
yarn install --cwd ~/metaplex/js/
This should have installed everything properly. To test that it has, we can check the version by running:
ts-node ~/metaplex/js/packages/cli/src/candy-machine-v2-cli.ts --version
Your output should be:
Now we’re ready to set up the Solana CLI for devnet testing. We’ll want to create a new wallet for devnet testing. It is always good practice to separate our testing keys from the keys that hold our mainnet assets. Still inside the same solana-nft folder, run the following command to create a Solana wallet.
solana-keygen new --outfile ~/.config/solana/devnet-wallet.json
We can skip the password (by hitting enter) as we will only use this wallet on devnet, so the funds are not important. We can ensure that the wallet we generated is the wallet that the Solana CLI will use by running this next command:
solana config set --keypair ~/.config/solana/devnet-wallet.json
We will want to fund our wallet by requesting an airdrop. To do so, we will need to ensure that our Solana CLI is connected to a Node. We will do this with QuickNode.
Updated about 2 months ago