Перейти к основному содержимому

Operations

On TON, an operation is a high-level process initiated by a user or system, such as transferring jettons, purchasing an NFT, or deploying a smart contract. From a product or business perspective, it represents what is happening on-chain.

Under the hood, each operation consists of smaller technical units — transactions, actions, traces, and events — which capture the exact sequence of state changes and message flows. The sections below break down these building blocks.

Transaction

A transaction in TON is a record of a state change caused by an inbound message. Each delivered message results in a transaction, which records the entire context: the triggering message, state updates, and any generated outbound messages.

A transaction always belongs to one account. If multiple accounts are involved (e.g., TON transfer), each of them has its own transaction.

Action

An action is a subset of one or more transactions that represents a single, human-understandable operation.

For example, transferring jettons from one wallet to another typically involves at least three separate transactions. However, it is represented as a single action.

Trace

A trace is a directed acyclic graph (DAG) where transactions are nodes and messages are edges connecting them, representing the complete sequence of account state changes triggered by a single external message.

A trace identifies actions within this graph, grouping related transactions into human-understandable operations. This provides developers with both the low-level transaction flow and the higher-level actions resulting from a single external input.

Event

An event is a user- and API-friendly view of a single trace's results, which includes both transactions and messages. It classifies the resulting state changes into categories such as a TON transfer, a jetton transfer, or a swap, providing a clear view of what occurred on-chain.