Making NFT’s Using Metaplex

NftDownUnder
4 min readNov 5, 2021

There are so many NFT projects appearing and the documentation for creating the tools required to launch are quite difficult to follow. After figuring it out ourselves, we decided to put together a guide for the community ❤

Find out more about our project at: https://nftdownunder.art/

Prerequisites

  1. Have GIT installed on your computer: https://git-scm.com/downloads
  2. Have the Solana CLI installed on your computer: https://docs.solana.com/cli/install-solana-cli-tools

Creating A Wallet For Minting

  1. Create your wallet
solana-keygen new --outfile ~/.config/solana/wallet.json

2. Set this as your default wallet

solana config set --keypair ~/.config/solana/wallet.json

3. Connect to the solana cluster of your choice ( mainnet for real deploy, devnet for test deploy)

solana config set --url https://api.devnet.solana.com
OR
solana config set --url https://api.mainnet-beta.solana.co

4. Airdrop yourself some money ( if doing a test deploy on devnet ). Note if doing mainnet you must send funds to this account which will be used for the uploading

solana airdrop 3

5. Store your wallet location as a variable

export KEY=~/.config/solana/wallet.json

6. Store a variable for the cluster you are using

export SOLANA_NETWORK=devnet
OR
export SOLANA_NETWORK=mainnet-beta

Initialising The Metaplex Repo

  1. Create a folder and cd into that directory.
  2. Download the Metaplex repo using the following command
git clone https://github.com/metaplex-foundation/metaplex.git ./

3. Install the repo’s dependencies in the

cd js 
yarn install

Preparing Your Assets

  1. Create a folder in the js directory called assets ( you may want to overwrite the existing one )
  2. In this folder, you want to create an image + JSON file for each one of your NFT’s
- 0.png
- 0.json
- 1.png
- 1.json
… ( order is used for mint order )

3. An example JSON looks like the following:

{
“name”: “Display Name Of NFT 1”,
“image”: “1.png”,
“properties”: {
“creators”: [
{
“address”: “44Q7X9ukfXs5Hn5wuUbAimkayrN2orToAHeNN4sS1Hdt”,
“share”: 100
}
],
“files”: [
{
“uri”: “1.png”,
“type”: “image/png”
}
]
}
}

The standard is defined here: https://docs.metaplex.com/nft-standard

Uploading Your Assets To Arweave

Note: If you are restarting the process you should delete the .cache folder in the JS repo at this stage.

  1. Upload the prepared assets. This should take a while it uploads the content to Arweave.
ts-node ./packages/cli/src/candy-machine-cli.ts \
upload \
./assets \
--env $SOLANA_NETWORK \
--keypair $KEY

Creating The Candy Machine

  1. At this stage, you want to create the candy machine which will be used to distribute your NFT’s to the general public
ts-node ./packages/cli/src/candy-machine-cli.ts \
create_candy_machine \
--env $SOLANA_NETWORK \
--keypair $KEY

2. Starting up the candy machine

ts-node ./packages/cli/src/candy-machine-cli.ts \
update_candy_machine \
--env $SOLANA_NETWORK \
--keypair $KEY \
--price 0.35 \
--date “Thu Nov 11 2021 22:48:46 GMT+1100”

NOTES:

  • Price is the price to mint one of the NFT’s in SOL
  • The date is in the standard javascript date format. You can also use the string “now” to start the candy machine instantly

Testing The Candy Machine ( OPTIONAL )

  1. You can test if the candy machine is working by giving yourself an NFT from it using the following command. If you add this wallet to your phantom wallet you should see the NFT in your collections.
ts-node ./packages/cli/src/candy-machine-cli.ts \
mint_one_token \
--env $SOLANA_NETWORK \
--keypair $KEY

Creating Your Frontend

  1. Create a new directory for the frontend and enter it
mkdir frontend
cd frontend

2. Clone the frontend code

git clone https://github.com/exiled-apes/candy-machine-mint.git ./

3. Install the packages and build the rep

yarn install

4. Change the name of the .env.example file to .env

5. Open the file inside of the .cache folder ( located inside of the JS directory). Note this is a hidden folder so you must enable hidden folder viewing. This file is the JSON referred to in the next step

6. Change the following properties in the .env file

REACT_APP_CANDY_MACHINE_CONFIG : config variable in JSONREACT_APP_CANDY_MACHINE_ID : candyMachineAddress variable in JSONREACT_APP_TREASURY_ADDRESS : the wallet address ( can get using: solana address )REACT_APP_CANDY_START_DATE: startDate variable in JSONREACT_APP_SOLANA_NETWORK: devnet OR mainnet-betaREACT_APP_SOLANA_RPC_HOST: https://explorer-api.devnet.solana.com OR https://api.mainnet-beta.solana.com

7. Running your frontend. This can be done by running the following command

yarn start

Deploying Your Frontend

  1. You must build your frontend in order to deploy it. This can be done using the following command:
yarn build

2. At this stage you should have a build folder in your frontend. You now need to host this build folder on a web hosting platform. A simple platform to start with is something like Netlify, but we recommend looking into what's best for you :)

Special Thanks

A special thanks must go out to the original developers of these repos

NOTE: We’ll be launching a guide on the fair launch protocol soon so stay tuned ❤

--

--

NftDownUnder

“Roadtrip, drink beers and make NFT’s … Down Under!”