Every Tolk contract has access to a set of built-in standard library modules that are bundled with the Tolk compiler itself. These modules are distinct from the Acton standard library: the Acton stdlib provides host-side helpers for testing and scripting, while the Tolk stdlib provides the foundational language primitives that execute directly inside the TVM — cell manipulation, dictionary operations, string utilities, gas management, and low-level TVM access. The Tolk stdlib is located in the Acton binary underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ton-blockchain/acton/llms.txt
Use this file to discover all available pages before exploring further.
crates/tolk-compiler/assets/tolk-stdlib/ and is automatically available without any configuration. Most modules are implicitly imported; a few specialised ones (tvm-dicts, strings, gas-payments, etc.) must be explicitly imported with import "@stdlib/<name>".
The Tolk stdlib is on-chain code — it compiles to TVM instructions. Every function you call from it consumes gas. The Acton stdlib (
@acton/) is host-side and does not run inside TVM.Modules
common
Primitive types, cell/slice/builder operations, map and array methods, contract storage, message creation, address utilities, and send-mode constants. This module is auto-imported into every Tolk file.
tvm-dicts
Low-level TVM dictionary operations for signed-integer, unsigned-integer, and slice-key dictionaries — get, set, delete, iteration, and more.
strings
Runtime string utilities — length calculation, content hashing, equality comparison, integer-to-string conversion, and the
StringBuilder type.gas-payments
Gas and fee utilities —
acceptExternalMessage, setGasLimit, gas fee calculation, storage fee calculation, and forward fee calculation.exotic-cells
Helpers for working with Merkle-proof and Merkle-update cells, and other exotic cell types.
lisp-lists
Methods for the
lisp_list<T> type — prepend, get head, and traverse linked-list structures longer than 255 elements.reflection
Compile-time reflection utilities —
reflect.sourceLocationAsString() and related helpers used internally by expect and Assert for automatic location tracking.tvm-lowlevel
Raw TVM instruction wrappers for advanced use cases that are not covered by the high-level stdlib surface.
Distinction from Acton Stdlib
Tolk stdlib (@stdlib/) | Acton stdlib (@acton/) | |
|---|---|---|
| Where it runs | Inside TVM on-chain | Acton host process |
| Available in | contracts/, wrappers | tests/, scripts/ |
| Consumes gas | Yes | No |
| Purpose | Language primitives, TVM operations | Testing, emulation, deployment |
| Auto-imported | common module | Never |