Skip to content

Book overview

Welcome to The Tact Book section (or just 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 the broader TON concept in the main TON documentation, this Book tries to reference it as well.

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

Book also assumes that you’ve written code in another programming language but doesn’t make any assumptions about which one. We’ve tried to make the material broadly accessible to those from a wide variety of programming backgrounds. We don’t spend a lot of time talking about what programming is or how to think about it. If you’re 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

    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 down to discuss the functions most close to how the TON Virtual Machine (TVM) actually operates — assembly (asm) 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 in action, it’s necessary to have the auxiliary tools and concise descriptions of their use.

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

    Finally, 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.