Setting .env

The .env file is a configuration file.

In the hedera-nft-scripts folder, rename .env.example for .env

Open .env with your favorite code editor.

Fill the required fields inside the .env file and save it.

Not all values are required for each script, that's why inside the .env file itself you will find sections to highlight the use.

We encourage to reset the .env after use of our scripts. Especially private keys/keys values to not leave any sensitive value on your computer. Be sure to have these infos saved safely somewhere though.

Fields example

Associate token

MY_ACCOUNT_ID=0.0.123456 MY_PRIVATE_KEY=302e...............................

Environment set to MAIN or TEST

ENVIRONMENT=TEST

Update Private Key

UPDATE_ACCT=0.0.123456 OLD_KEY=302e...............................

NFTTransferTwoPKs

SENDER_ACCOUNT_ID=0.0.1234564 SENDER_PRIVATE_KEY=302e1.............................................. RECEIVE_ACCOUNT_ID=0.0.7896321 RECEIVE_PRIVATE_KEY=302e2............................................. MEMO='Example Memo'

Burn/Freeze NFT

SUPPLY_KEY=302e............................................ FREEZE_KEY=302e............................................ TOKEN_ID=0.0.145687

Fungible Token Creation

TOKEN_NAME=TOK TOKEN_SYMBOL=TOK TOKEN_DECIMALS=6 TOKEN_INITALSUPPLY=1000

Mint additional Fungible Tokens

FT_TOKEN_ID=0.0.414111 FT_SUPPLY_KEY=302e.........................................

Metadata Conversion

COLLECTION_WEBSITE= COLLECTION_COMPILER= COLLECTION_CREATOR= COLLECTION_LOGO= COLLECTION_CATEGORY= COLLECTION_DESC=

Mint NFT Token

NFT_NAME='Amazing Collection' NFT_SYMBOL=AMAZ NFT_DESC='An amazing collection of Digital Collectibles' NFT_MAX_SUPPLY=100

Pin images & metadata

NFT_STORAGE_KEY=xxxxxxxxxxxxxxxxxxxx

Mint supply on token ID

NFT_TOKEN_ID=0.0.454555 NFT_SUPPLY_KEY=302e..................................... NFT_MINT_BATCH_SIZE=5

Last updated