Documentation 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.
acton build compiles every contract declared in Acton.toml, resolves
transitive dependencies, and writes build artifacts to the output directory.
Pass a contract name to build a single contract and its dependencies. The
command supports precompiled .boc sources, optional Fift output, ABI
generation, and dependency-graph export.
Synopsis
Arguments & options
Positional
| Argument | Description |
|---|---|
[CONTRACT_NAME] | Build only this contract and its transitive dependencies. Must match a [contracts.<name>] key in Acton.toml. Omit to build all contracts. |
Build flags
| Flag | Type | Default | Description |
|---|---|---|---|
--clear-cache | flag | false | Clear the compilation cache before building. |
--out-dir <DIR> | path | build/ | Output directory for compiled JSON artifacts (<name>.json with code_boc64 and hash). Overrides [build].out-dir. |
--gen-dir <DIR> | path | gen/ | Output directory for generated dependency helper files (e.g. gen/<dep>.code.tolk). Overrides [build].gen-dir. |
--output-abi <DIR> | path | build/abi/ | Output directory for contract ABI JSON files. Overrides [build].output-abi. |
--output-fift <DIR> | path | — | Output directory for compiled Fift files. Not written unless this flag or [build].output-fift is set. |
--graph <PATH> | path | — | Write the dependency graph for the build set as a DOT file. |
--info | flag | false | Print compiled code and hash information after a successful build. |
Global flags
| Flag | Type | Default | Description |
|---|---|---|---|
--color <WHEN> | auto | always | never | auto | Control coloured output. |
--manifest-path <PATH> | path | — | Path to Acton.toml. Conflicts with --project-root. |
--project-root <PATH> | path | — | Path to project root. Conflicts with --manifest-path. |
Acton.toml configuration
[contracts] section
Acton.toml
Contracts with
.boc sources are treated as precompiled inputs. Acton
loads their code, includes them in dependency resolution, and skips
recompilation. Add depends = ["Precompiled"] on a .tolk contract that
imports the precompiled code — do not list it as a dependency on the
.boc entry itself.[build] section
Acton.toml
[build] values for the current invocation.
Build output structure
Dependency kinds
| Kind | Behaviour |
|---|---|
.tolk source | Fully compiled; artifacts emitted to --out-dir. |
.boc source (precompiled) | Code loaded as-is; types file compiled only for ABI. |
depends = [...] | Listed contracts are built first; their helper files are written to --gen-dir. |
Best-effort behaviour
After dependency resolution succeeds,acton build continues building
remaining eligible contracts even when an earlier contract fails — partial
artifacts from successful builds stay on disk. Dependency-graph failures
(missing contracts, cycles) abort the command before any compilation starts.