2๏ธCreating Candy Machine

Once you have your collection prepared, the next step is to upload your assets and create a Candy Machine. This step is completed by a single command via the Candy Machine CLI.

Before you can proceed, you need to check that:

  • Your images and metadata are in the same format as example-asset folders and you already have master-csv file.

  • You have funds in your wallet.

  • You have pinata account and you config .env properly. You can copy .env-example and rename to .env

Environment Variable
Description

PINATA_API_KEY

Pinata api key

PINATA_SECRET_KEY

Pinata secret key

MNEMONIC

Mnemonic for wallet that will use to mint NFT (Minter account)

Uploading the IPFS

npx ts-node src/nft-cli.ts upload -d data -i "example-assets/images" -c "example-assets/master.csv"
Param
Required
Example
Description

-i, --image <string>

true

"example-assets/images"

Image asset folder

-c, --config <string>

true

"example-assets/master.csv"

Master csv file

-d, --data <string>

true

"data"

Data folder (or Working Directory) for store output master csv file

-m, --metadata <string>

false

"example-assets/metadata"

Metadata folder (optional)

 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% | ETA: 0s | 10/10
Updated config file: data/master.csv

You will be greeted with this after its upload successfully.

Creating the NFT Contract

Param
Required
Example
Description

-cn, --name <string>

true

soil-test

NFT collection name

-cs, --symbol <string>

true

SOIL

NFT collection symbol

-n, --network <string>

true

testnet

Terra network. (localterra, testnet and mainnet)

-d, --data <string>

false

data

Data folder that will store created NFT contract information

You will be greeted with this after its created successfully.

Creating Candy Machine

Replace the "testnet" with the terra network name mint currency denom with your desired denom, amount \

Param
Required
Example
Description

-d, --data <string>

true

data

Data folder that will store created NFT contract information

-n, --network <string>

true

testnet

Terra network. (localterra, testnet and mainnet)

-c, --config <string>

true

"example-assets/master.csv"

Master csv file

--denom <string>

true

uluna

Currency denom (LUNA = uluna)

--amount <number>

true

1000000

Currency amount with 6 decimal (1000000 / 1e6 to be real number. Ex. 1000000 is 1 LUNA)

--creator <string>

true

minter

Mint receiving address. You can use 'minter' keyword, which will be same address as minter account

--whitelist

false

Enable whitelist (default value is false)

You will be greeted with this after its created successfully.

Minting NFT to Candy Machine

Param
Required
Example
Description

-d, --data <string>

true

data

Data folder that will store created NFT contract information

-n, --network <string>

true

testnet

Terra network. (localterra, testnet and mainnet)

-c, --config <string>

true

data/master.csv

Master csv file. You need to upload images to IPFS first.

-m, --metadata <string>

false

example-assets/metadata

Metadata folder

You will be greeted with this after its minting process successfully.

Last updated