Deejay's Scripts Documentation
  • Getting started
    • Introduction
    • Environment Set-up
    • Import and install our Scripts
    • Scripts overview
    • Setting .env
  • Scripts
    • â„šī¸Get Token Info
    • ✅Check Ownership
    • 🔗Associate / Dissociate Tokens
    • đŸĒ™Create Fungible Token
    • âš’ī¸Mint Additional Fungible Tokens
    • 🎆Burn Fungible Tokens
    • 🔨Create Non-Fungible Token
    • đŸ”ĨBurn Non-Fungible Tokens
    • â„ī¸Freeze Non-Fungible Tokens
    • 🤝NFT Transfer between two owned accounts
    • 🔑Update Private Key
    • 🔍Track Hedera NFTs
    • â˜ ī¸Token Graveyard
Powered by GitBook
On this page
  • Usage
  • Arguments
  1. Scripts

Freeze Non-Fungible Tokens

Simple script to freeze a token for an account. Requires FREEZE Key to be set at time of mint. This allows the creator to make tokens 'soulbound' as soon as sent then run freezeNFT to soulbound.

Usage

Edit your .env file (rename .env.example to .env) with the following items:

MY_ACCOUNT_ID=0.0.123456
MY_PRIVATE_KEY=302e.........
ENVIRONMENT=TEST
FREEZE_KEY=302e.........
TOKEN_ID=0.0.7897879

We recommend to remove the private key from the .env file after use. Extra precaution.

Then, in your Node.js command prompt terminal, you can use

node freezeNFT.js -acc [-unfreeze]

Arguments

-acc for the account where the NFT to freeze is

-unfreeze to free/unfreeze a token (default is a freeze operation)

PreviousBurn Non-Fungible TokensNextNFT Transfer between two owned accounts

Last updated 2 years ago

â„ī¸