Skip to content

Book overview

Welcome to The Tact Book section (or simply The Book) — an introductory book about the Tact language. It is a cohesive and streamlined sequence of educational materials about Tact. Whenever there’s an existing explanation of a broader TON concept in the main TON documentation, this Book tries to reference it as well.

In general, it assumes that you are reading it in sequence from front to back. Later parts build on concepts presented in earlier parts, and earlier parts might not delve into details of a particular topic but will revisit the topic in a later part.

The Book also assumes that you have written code in another programming language but does not make any assumptions about which one. We have tried to make the material broadly accessible to those from a wide variety of programming backgrounds. We do not spend a lot of time talking about what programming is or how to think about it. If you are entirely new to programming, you would be better served by reading a book that specifically provides an introduction to programming.

Here are its main contents:

  1. Fundamentals of Tact

    The subsection Fundamentals of Tact describes the type system: primitive and composite types, then the structure of each Tact contract, and lists all the defined exit codes, i.e., possible error points.

  2. Expressiveness

    The Expressiveness subsection starts with the list of available operators and gradually builds up, eventually reaching the description of functions and their interactions. Finally, it descends to discuss functions closest to how the TON Virtual Machine (TVM) actually operates — assembly functions.

  3. Communication

    TON is a distributed blockchain based on the idea of the actor model. Therefore, the means of communication is one of the most important aspects.

    The Communication subsection covers everything you want and need to know about sending and receiving messages, as well as the general transaction flow.

  4. Going places

    Finally, to put all our Tact and TON knowledge into action, it is necessary to have auxiliary tools and concise descriptions of their use.

    The subsection Going places explains how to compile, debug, and test Tact contracts locally. From there, it moves on to provide descriptions of deploying contracts to the TON Blockchain.

    Lastly, it shows how to further tweak the compiler with its configuration options, interface with existing FunC code, and discusses best practices for securing your smart contracts.