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

In this tutorial, we will discuss the standard implementation of non-fungible tokens (NFTs) on the TON blockchain and walk through the development steps using the Blueprint environment and Sandbox.

Run nodes on Chainstack

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.

Introduction

To develop NFTs on the TON blockchain, it’s essential to understand the standards that define their structure and behavior. The two key standards are:
  1. TEP-62: NFT standard describes the interface and functionality of NFT smart contracts on TON. It specifies how NFTs are created, transferred, and managed.
  2. TEP-64: Token data standard defines how metadata associated with tokens (both fungible and non-fungible) is stored and retrieved. It ensures a consistent format for token metadata, whether stored on-chain or off-chain.
Each NFT is represented by its own smart contract, known as an NFT item contract. This contract manages ownership, metadata, and interactions specific to that NFT. An NFT collection contract manages a group of NFTs. It can deploy new NFT item contracts, assign unique indices, and associate them with the collection.

Tutorial code

The GitHub repository with all code written in this tutorial is published here.

Development

Setting up project

First, ensure that you have Node.js and npm installed on your system. You can verify the installation by running:
Create a new directory for your project and navigate into it:
Initialize a new Blueprint project by running:
This command sets up a new TON project with the necessary files and dependencies. Follow the prompts to select an empty FunC project. Next, we’ll configure the project to connect to the testnet. Create a file named blueprint.config.ts in the root of your project directory and add the following content:
Replace the endpoint URL with your Chainstack RPC endpoint.

Contracts

We’ll use the reference implementations of the NFT standard provided by the TON core team. To your project’s contracts directory, copy the following files:
  • nft-item.fcis the smart contract for individual NFT items.
  • nft-collection.fcis the smart contract for the NFT collection.
  • op-codes.fc, params.fc are utility files that contain common functions and definitions used by the contracts.
Ensure that your contracts include the required imports. For example, at the top of nft-item.fc and nft-collection.fc, include:
Add new operational codes to op-codes.fc:
Update the collection contract:
Before testing the contracts, we need to compile them. In the wrappers directory, create compile configuration files for each contract. For the NFT item contract, create NFTItem.compile.ts:
For the NFT collection contract, create NFTCollection.compile.ts:
To compile the contracts, run:
If you encounter errors, try replacing stdlib.fc in the imports folder with the one from the reference implementation.

Wrappers

To interact with our smart contracts in tests, we’ll create TypeScript wrappers that implement the contract interfaces. In the wrappers directory, create NFTItem.ts and NFTCollection.ts. NFTConstants.ts
NFTCollection.ts
NFTItem.ts

Tests

The Blueprint framework incorporates Sandbox. The package allows developers to emulate TON smart contracts behaviour as if they were deployed on a real network. Please copy the tests from our repository. NFTCollection.spec.ts
To test the contracts using Sandbox, run the command:

Conclusion

We covered the the non-fungible token standard on the TON blockchain and its main development steps using Blueprint and Sandbox. In future tutorials, we will explore other aspects of NFT. Stay tuned!

About the author

Anton Sauchyk

Anton Sauchyk Developer Advocate @ Chainstack
Multiple years of software development and Web3 expertise
Last modified on March 26, 2026