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...............................
Put your Account id and the related private key in these fields. Be sure to use a consistent account id/private key pair according to your Environment set to MAIN or TEST
Environment set to MAIN or TEST
ENVIRONMENT=TEST
In this example, we aim to use the Hedera testnet
Update Private Key
UPDATE_ACCT=0.0.123456
OLD_KEY=302e...............................
In this case, the use is to change a private key. So, OLD_KEY is actually the current key.
NFTTransferTwoPKs
SENDER_ACCOUNT_ID=0.0.1234564
SENDER_PRIVATE_KEY=302e1..............................................
RECEIVE_ACCOUNT_ID=0.0.7896321
RECEIVE_PRIVATE_KEY=302e2.............................................
MEMO='Example Memo'
These settings are asked to use "NFTTransferTwoPKs" script. Useful to transfer NFTs between two owned accounts, easily and in bulk, for example: NFTs with royalties. Requires to know the private key of both sender and receiver accounts.
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
Don't forget to put the quotation mark around Name and description
Pin images & metadata
NFT_STORAGE_KEY=xxxxxxxxxxxxxxxxxxxx
API Key from nft.storage
Mint supply on token ID
NFT_TOKEN_ID=0.0.454555
NFT_SUPPLY_KEY=302e.....................................
NFT_MINT_BATCH_SIZE=5
NFT mint batch size is set to 10 by default if not changed.
Last updated