Skip to main content
T TON Adoption
← Glossary
NODE/03 · Term

Tact

High-level statically typed programming language for TON smart contracts. Designed for readability and safety; compiles to TVM bytecode through FunC and Fift.

Aliases: tact language, tact lang

Tact is a programming language for writing TON smart contracts that aims to feel like Solidity or TypeScript rather than like FunC. It is statically typed, supports message-based contracts as first-class entities, and removes most of the manual cell handling that FunC requires.

Why it exists

FunC is powerful but stark. A simple contract — accept jettons, increment a counter, send a notification — runs to dozens of lines and demands cell parsing by hand. Tact was created to:

  • give developers a familiar object-like syntax (contract, message, receive),
  • enforce safety (no implicit casts between cell, slice, builder),
  • catch a class of common bugs at compile time,
  • generate efficient TVM code without manual gas tuning.

It was open-sourced by the TON Studio team in 2023 and is now one of two recommended languages on docs.ton.org (alongside Tolk).

A minimal contract

import "@stdlib/deploy";

message Counter {
    by: Int;
}

contract MyCounter with Deployable {
    value: Int as int64 = 0;

    receive(msg: Counter) {
        self.value = self.value + msg.by;
    }

    get fun current(): Int {
        return self.value;
    }
}

Anyone who has read Solidity can guess what this does. The compiler turns it into FunC, then Fift, then TVM bytecode — the same final artefact a hand-written FunC contract would produce.

How it differs from FunC

  • First-class messages. You declare message Counter { by: Int; } and the compiler emits a TLB schema, opcodes, and serialiser/parser for free.
  • Persistent storage by declaration. State variables on the contract are saved automatically; you don’t write a save_data() helper.
  • Standard library. Deployable, Ownable, jetton/NFT helpers ship out of the box.
  • Trade-off: Tact’s generated code can be slightly heavier in gas than hand-tuned FunC. For most applications this is invisible; for hot paths (DEX routers) developers may still hand-write FunC.

Compatibility

Tact contracts can call FunC contracts and vice versa — they all speak TVM and TL-B at the wire level. Many production teams in 2026 write business logic in Tact and drop down to FunC only for performance-critical primitives.

Tooling

The Tact ecosystem includes:

  • The tact compiler (npm: @tact-lang/compiler).
  • Blueprint integration — npm create ton@latest lets you scaffold a Tact project.
  • VS Code extension with type-aware autocomplete.
  • A formal-verification toolkit (Misti) that catches common contract anti-patterns.

Related terms