Soil Protocol
  • 🌱Introduction
    • Getting Started
  • Be your own Launchpad
    • 🐇Introduction
    • 1️Preparing Your Asset
    • 2️Creating Candy Machine
    • 3️Configure Candy Machine
    • 4️Update Whitelist
    • 5️Integrate With Minting Website
  • NFT Tooling
    • 🐇Introduction
    • ✍️NFT Holder Snapshot
    • 🪂Airdrop New NFT
    • 🏅NFT Information and Rarity
  • Appendix
    • 🔮Contact Us
Powered by GitBook
On this page
  • Uploading the IPFS
  • Creating the NFT Contract
  • Creating Candy Machine
  • Minting NFT to Candy Machine
  1. Be your own Launchpad

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

npx ts-node src/nft-cli.ts create -cn soil-test -cs SOIL -n testnet -d data
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

collection create: terra1q9ur0llh76xantxp2r765ssuelwgs8nnvhafh373z9lvjg0hug7qkvxdfl
Updated config file: data/data.json

You will be greeted with this after its created successfully.

Creating Candy Machine

npx ts-node src/candy-machine-cli.ts create -d data -c example-assets/master.csv -n testnet --denom uluna --amount 100000 --creator minter

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)

candy machine create: terra18tehsjdcx8jk6k6ukzl7k0089wt6rvcrpjl9mmvt0ym9w4q2zanqvhqgpz
update seed complete at txhash: 3FD4027720ABCA3BA77BB1E4C97B3E0599B32A6D0394BE399E89041BEB3ADECF
Updated config file: data/data.json

You will be greeted with this after its created successfully.

Minting NFT to Candy Machine

npx ts-node src/nft-cli.ts mint -d data -c data/master.csv -n testnet -m example-assets/metadata
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

 ████████████████████████████████████████ 100% | ETA: 0s | 10/10
Mint success 10 nft
Updated minted nfts file: data/nft_tx.csv

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

PreviousPreparing Your AssetNextConfigure Candy Machine

Last updated 2 years ago

2️