Tact language
Tact is a fresh programming language for TON Blockchain, focused on efficiency and ease of development. It is a good fit for complex smart contracts, quick onboarding and rapid prototyping.
Developed by TON Studio, powered by the community — at the start of 2025, the number of unique code1 contracts deployed on the mainnet reached almost 28 thousand, of which about 33% were written in Tact. You can view some selected projects here: Tact in production.
Tact has undergone a comprehensive security audit by Trail of Bits, a leading Web3 security firm.
Try it online!
Tact Documentation
Awesome Tact
Features
The most prominent and distinctive features of Tact are:
- Familiar and user-friendly TypeScript-like syntax.
- Strong static type system with built-in Structs, Messages, and maps, among others.
- First-class maps support, with many methods and a convenient
foreach
statement for traversing. - Automatic (de)serialization of incoming messages and data structures.
- Automatic routing of internal, external, and bounced messages.
- Automatic handling of message types, including binary, text, and fallback slices.
- No boilerplate functions for sending messages and deploying child contracts.
- Reusable behaviors through traits.
- Support for low-level programming with
asm
functions. - Generation of single-file TypeScript wrappers for convenient interactions with compiled contracts, which include:
- Type definitions for Structs and Messages observable in the compilation report.
- Corresponding
storeStructureName()
andloadStructureName()
functions for (de)serialization. - All global and contract-level constants.
- Bi-directional records of exit codes: from their names to numbers and vice versa.
- Opcodes of all Messages.
- A contract wrapper class with various helper functions for initialization, deployment, and message exchange.
- Rich standard library.
- Extensive documentation.
- Robust tooling.
- ...and there's much more to come!
Security
Tact in production
Some selected software and applications based on contracts written in Tact, deployed in production, and consumed by end users:
Open source or source available
- Proof of Capital - Proof of Capital is a market-making smart contract that protects interests of all holders.
- See the security audit report by Nowarp.
Closed source
- Tradoor - Fast and social DEX on TON.
- See the security audit report by TonBit.
- PixelSwap - First modular and upgradeable DEX on TON.
- See the security audit report by Trail of Bits.
- GasPump - TON memecoin launchpad and trading platform.
See Tact in production on the Awesome Tact list.
Installation
Compiler
The Tact compiler is distributed as an NPM package bundled with the Tact standard library.
The recommended Node.js version is 22 or higher, while the minimum version is 18.
Use your favorite package manager to install it into a Node.js project:
# yarn is recommended, but not required
yarn add @tact-lang/compiler
# you can also use npm
npm i @tact-lang/compiler@latest
# or pnpm
pnpm add @tact-lang/compiler
# or bun
bun add @tact-lang/compiler
Alternatively, you can install it globally as such:
npm i -g @tact-lang/compiler
It will make the tact
compiler available on your PATH, as well as:
- a convenient
unboc
disassembler of a contract's code compiled into a Bag of Cells.boc
format. - a formatter
tact-fmt
, which can format or check the formatting of individual Tact files and directories.