Skip to main content
TLDR:
  • Explains the NFT standard on TON (TEP-62, TEP-64) and key features for ownership and metadata.
  • Demonstrates how to set up, compile, and deploy both NFT item and collection contracts.
  • Shows how to interact with these contracts via Blueprint wrappers and test them using Sandbox.
  • Provides a starting reference to extend NFT functionality on the TON blockchain.

Main article

To be able to use your account on TON, you need to have an initialized wallet. Wallet initialization means deploying a TON wallet contract for your account. While this is a great feature of the TON blockchain, you might find it cumbersome dealing with wallet deployments during your development stage. So here’s a couple of scripts in JavaScript using tonweb that can help you:
  • GenerateAndInitialize.js — a script that generates a key pair for an account and then keeps running until you top it up with TON; once the account has enough TON, the script deploys a wallet contract.
  • CheckAndDepoy.js — a script that checks whether an account is initialized; if it’s not initialized, the script deploys a wallet contract.

Prerequisites

Make sure tonweb is installed.

Get your own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

GenerateAndInitialize

This script does the following:
  • Generates a key pair and saves it to wallet_keys.json
  • Keeps running and checking the balance of the generated account until it’s topped up
  • Once the account is topped up, the script deploys a v4R2 wallet contract
Make sure you put your Chainstack TON node endpoint with a /jsonRPC at the end instead of CHAINSTACK_NODE_WITH_jsonRPC.

CheckAndDepoy

This script does the following:
  • Converts the private key to an account address
  • Checks the account if it’s initialized or not
  • Checks the balance
  • If the account is not initialized and has enough TON coins for wallet contract deployment, proceeds with the deployment
Make sure you put your Chainstack TON node endpoint with a /jsonRPC at the end instead of CHAINSTACK_NODE_WITH_jsonRPC; and put your private key inPRIVATE_KEY.

About the author

Ake

Ake Director of Developer Experience @ Chainstack
Talk to me all things Web3
20 years in technology | 8+ years in Web3 full time years experience
Last modified on June 22, 2026