Skip to main content

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.toml is the project manifest for every Acton project. It defines package metadata, declares smart contracts, configures the build and test systems, sets lint and formatter defaults, registers deployment networks, and maps import aliases. The file conforms to the TOML 1.1 specification. Every relative path in the manifest is resolved from the project root — the directory that contains Acton.toml.

Project root resolution

Acton resolves the project root for each CLI invocation using the following rules, in order of priority:
  1. --project-root <PATH> — sets the project root explicitly; no upward search is performed.
  2. Auto-detection — Acton walks from the current directory up through parent directories (stopping at the Git boundary) looking for Acton.toml. The directory that contains the found manifest becomes the project root.
  3. Fallback — if no Acton.toml is found, the current working directory becomes the project root.
--manifest-path <PATH> selects which Acton.toml to load for configuration purposes but does not change project root resolution or rebase unrelated CLI path flags.

Path resolution rules

Path sourceResolved relative to
Paths inside Acton.tomlProject root
CLI path flags (--out-dir, --output, …)Current working directory
Examples:
  • [build].out-dir = "artifacts" writes under <project-root>/artifacts.
  • acton build --out-dir artifacts writes under <cwd>/artifacts.
  • [wrappers.tolk].output-dir = "wrappers" resolves from project root, but acton wrapper Counter --output-dir wrappers resolves from the current working directory.

[package]

Defines project metadata displayed in tooling and published registries.
FieldTypeRequiredDescription
namestringYesProject name.
descriptionstringYesShort description of the project.
versionstringYesCurrent version, e.g. 0.1.0.
repositorystringNoURL of the source code repository.
licensestringNoLicense identifier, e.g. MIT.
Acton.toml
[package]
name = "my-awesome-contract"
description = "A project with Tolk smart contracts"
version = "0.1.0"
repository = "https://github.com/user/my-awesome-contract"
license = "MIT"

[toolchain]

Pins project-level tooling versions. Acton checks this section before running any project command and exits with an error when the installed CLI version does not match.
FieldTypeRequiredDescription
actonstringNoRequired Acton CLI version without a leading v, e.g. 0.1.0.
Acton.toml
[toolchain]
acton = "0.1.0"
acton up remains available even when the installed version does not match, so you can install the expected version from within the project directory.

[contracts]

A map where each key is a contract name and the value is a contract configuration object. Contract names are used throughout the CLI (acton build Counter, acton verify Counter) and in [lint.rules.<Name>] overrides.
FieldTypeRequiredDescription
display-namestringNoHuman-readable name. Defaults to the contract key.
srcstringYesPath to the contract .tolk source file or a precompiled .boc.
typesstringNoTolk interface file used to produce ABI for a precompiled .boc.
dependsarrayNoList of contract dependencies (simple names or detailed objects).
outputstringNoCustom path where the compiled .boc should be saved.
Acton.toml
[contracts.Counter]
display-name = "Counter Contract"
src = "contracts/Counter.tolk"

[contracts.Wallet]
src = "contracts/Wallet.tolk"
depends = ["Counter"]

Precompiled .boc contracts

When src points to a .boc file, set types to a Tolk interface file so Acton can produce ABI and generate wrappers. Do not list the .boc contract itself as a dependency of other contracts — list it as a dependency of the .tolk contract that needs it.
Acton.toml
[contracts.Precompiled]
src = "contracts/Precompiled.boc"
types = "contracts/Precompiled.types.tolk"

Contract dependencies

Dependencies can be specified in two formats: Simple — just the name of another contract from [contracts]:
Acton.toml
depends = ["ChildContract"]
Detailed — an object with additional settings:
Acton.toml
[contracts.MainContract]
src = "contracts/MainContract.tolk"
depends = [
    "ChildContract",
    { name = "LibraryContract", kind = "library_ref", function = "get_lib_code" }
]
Detailed fieldDescription
nameName of the contract to depend on.
kindembed_code (default) or library_ref.
functionCustom name for the generated code function.
pathCustom output path for the generated code file (relative to project root).

[build]

Configures default output directories for acton build. CLI flags override these values for a single run and are resolved from the current working directory.
FieldTypeDefaultDescription
out-dirstringbuildDirectory for build JSON artifacts.
gen-dirstringgenDirectory for generated dependency files.
output-abistringbuild/abiDirectory for contract ABI JSON files.
output-fiftstringDirectory for compiled Fift files (one per .tolk contract).
Acton.toml
[build]
out-dir = "build"
gen-dir = "gen"
output-abi = "build/abi"
output-fift = "build/fift"
Precompiled .boc contracts emit ABI only when their entry sets types; they never emit Fift output.

[wrappers]

Configures default output locations for acton wrapper. CLI flags override these values for a single run.

[wrappers.tolk]

FieldTypeDefaultDescription
output-dirstringDefault directory for generated Tolk wrappers.
generate-testbooleanfalseGenerate a Tolk test stub by default.
test-output-dirstringDefault directory for generated test stubs.

[wrappers.typescript]

FieldTypeDefaultDescription
output-dirstringDefault directory for generated TypeScript wrappers.
Acton.toml
[wrappers.tolk]
output-dir = "wrappers"
generate-test = true
test-output-dir = "tests"

[wrappers.typescript]
output-dir = "app/src/wrappers-ts"

[fmt]

Configures defaults for acton fmt. CLI flags override these values for a single run.
FieldTypeDefaultDescription
widthinteger100Maximum formatted line width.
ignorestring[]Glob patterns of files to exclude during recursive traversal.
separate-import-groupsbooleanfalseInsert a blank line between import groups.
Import groups are ordered as: @stdlib, @acton, @<other>, plain imports (import "foo"), ./, ../.
Acton.toml
[fmt]
width = 100
ignore = ["contracts/generated/*.tolk"]
separate-import-groups = true
A file passed explicitly to acton fmt is still formatted even if it matches an ignore pattern. Ignore patterns apply only during directory traversal.

[localnet]

Configures defaults for acton localnet commands. CLI flags override these values for a single run.
FieldTypeDefaultDescription
portinteger5411Port used by acton localnet commands.
fork-netstringNetwork to fork when starting localnet (testnet or mainnet).
fork-block-numberintegerBlock sequence number for historical state fork.
accountsstring[]Wallet names from [wallets] to auto-fund and deploy on localnet start.
rate-limitintegerMaximum API requests per second to simulate provider limits.
Acton.toml
[localnet]
port = 3010
fork-net = "testnet"
fork-block-number = 55000000
accounts = ["deployer", "user"]
rate-limit = 1

[test]

Configures the behaviour of acton test. CLI flags override these values for a single run.
FieldTypeDefaultDescription
filterstringRegex pattern to filter tests by name.
reporterstring[]["console"]Reporters: console, teamcity, junit, dot.
debugbooleanfalseEnable debug mode.
debug-portinteger12345Port for the DAP debug server.
backtracestringSet to full to collect full stack traces on failure.
excludestring[]Glob patterns of files to exclude from testing.
includestring[]Glob patterns of files to include in testing.
junit-pathstringDirectory for JUnit XML reports.
junit-mergebooleanfalseMerge all test results into a single JUnit file.
fork-netstringNetwork to fork for state (mainnet, testnet).
fork-block-numberintegerBlock number to fork from.
fail-fastbooleanfalseStop after the first test failure.
fail-on-diffbooleanfalseExit non-zero when profiling differs from baseline snapshot.
uibooleanfalseEnable the browser Test UI server.
ui-portinteger12344Port for the browser Test UI server.
mutationobjectMutation testing defaults under [test.mutation] (see below).

[test.coverage]

FieldTypeDefaultDescription
enabledbooleanfalseEnable code coverage collection.
formatstringlcovReport format: lcov or text.
output-filestringPath to save the coverage report.
minimum-percentfloatMinimum total line coverage; fails non-UI runs below this score.
include-wrappersbooleanfalseInclude @wrappers files in coverage reports.
include-testsbooleanfalseInclude .test.tolk files in coverage reports.

[test.fuzz]

FieldTypeDefaultDescription
runsinteger256Number of accepted fuzz cases per fuzz test.
max-test-rejectsintegerruns × 256Maximum assume(...) rejections before the fuzz test fails.
seedintegerSeed for reproducible fuzz input generation.

[test.mutation]

FieldTypeDescription
diffstringChanged-line scope: worktree, ref, or branch.
diff-refstringBase ref used by ref mode and optional override for branch.
mutation-levelsstring[]Levels to run: critical, major, minor.
minimum-percentfloatMinimum mutation score required for the run to succeed.
disable-rulesstring[]Rule IDs to disable during mutation testing.
rules-filestringPath to a JSON file with custom query-based mutation rules.
Acton.toml
[test]
reporter = ["console", "junit"]
fail-fast = true

[test.coverage]
enabled = true
format = "lcov"
minimum-percent = 80

[test.fuzz]
runs = 512
seed = 42

[test.mutation]
diff = "branch"
mutation-levels = ["critical", "major"]
minimum-percent = 85

[lint]

Configures acton check. Use [lint] for global settings, [lint.rules] for project-wide rule levels, and [lint.rules.<ContractName>] for per-contract overrides.

General settings

FieldTypeDescription
excludestring[]Glob patterns for files to exclude from lint diagnostics.
max-warningsintegerMaximum warnings before acton check exits non-zero. Default: unlimited.
output-formatstringDefault report format: plain, json, sarif, github, or gitlab.

[lint.rules]

Specify rule severities for the entire project:
Acton.toml
[lint.rules]
unused-variable = "deny"
mutable-variable-can-be-immutable = "warn"
unauthorized-access = "warn"
LevelEffect
allowDisables the rule.
warnReports as a warning.
denyReports as an error; causes non-zero exit.

[lint.rules.<ContractName>]

Override rule levels for a specific contract. The name must match the key used in [contracts.<Name>]:
Acton.toml
[lint]
max-warnings = 0
exclude = ["contracts/generated/*.tolk"]
output-format = "sarif"

[lint.rules]
unused-variable = "deny"

[lint.rules.Counter]
unused-variable = "allow"

[networks]

Defines custom network configurations used by --net and --fork-net. mainnet, testnet, and localnet are built-in. Extra entries are referenced as custom:<name>.
FieldTypeRequiredDescription
api.v2stringYes (custom)TON Center API v2 URL.
api.v3stringNoTON Center API v3 URL.
explorerstringNoBase explorer URL. Acton appends /tx/<hash> automatically.
For localnet, if api.v2 and api.v3 are omitted, Acton derives them from [localnet].port (falling back to port 5411).
Acton.toml
[networks.localnet]
explorer = "http://127.0.0.1:3006"

[networks.my-custom-net]
api = { v2 = "https://my-custom-net.com/api/v2", v3 = "https://my-custom-net.com/api/v3" }
explorer = "https://my-custom-net.com/explorer"
Use custom networks in commands:
acton script --net custom:my-custom-net
acton test --fork-net custom:my-custom-net

[scripts]

Defines custom shell commands or Tolk scripts runnable via acton run <name>.
Acton.toml
[scripts]
deploy = "acton script scripts/deploy.tolk"
check-all = "acton test --filter='.*_check'"
Run a script with:
acton run deploy

[import-mappings]

Defines path aliases for the Tolk compiler. Mappings allow importing files using logical names (@core/math) instead of relative paths (../../libs/core/math).
FormatExampleBehaviour
Without @ prefix (preferred)utils = "./libs/utils"@ is prepended automatically
With @ prefix"@core" = "./libs/core"Used as-is
Acton.toml
[import-mappings]
utils = "./libs/utils"
"@core" = "./libs/core"
In Tolk source files:
import "@core/math"    // Resolves to ./libs/core/math.tolk
import "@utils/logic"  // Resolves to ./libs/utils/logic.tolk

Built-in project mappings

Projects created with acton new include these default mappings:
MappingDefault pathCommon use
@acton.actonStandard library: @acton/testing/expect
@contractscontractsContract-side modules: @contracts/types
@teststestsShared test helpers and fixtures
@wrapperswrappersGenerated wrappers: @wrappers/Counter.gen
@gengenGenerated dependency helper files

Prefix resolution rules

  • Acton matches the first path segment (before the first /) against defined mappings.
  • Keys without a leading @ are normalised by prepending @.
  • Relative values are resolved from the project root.
  • Absolute values are used as-is.

Complete example

Acton.toml
[package]
name = "my-ton-project"
description = "A TON smart contract project"
version = "0.1.0"
repository = "https://github.com/example/my-ton-project"
license = "MIT"

[toolchain]
acton = "0.1.0"

[contracts.Counter]
display-name = "Counter Contract"
src = "contracts/Counter.tolk"

[contracts.Jetton]
display-name = "Jetton Minter"
src = "contracts/Jetton.tolk"
depends = ["Counter"]

[build]
out-dir = "build"
gen-dir = "gen"
output-abi = "build/abi"

[wrappers.tolk]
output-dir = "wrappers"
generate-test = true

[wrappers.typescript]
output-dir = "app/src/wrappers-ts"

[fmt]
width = 100
ignore = ["contracts/generated/*.tolk"]
separate-import-groups = true

[localnet]
port = 3010
accounts = ["deployer"]

[test]
reporter = ["console", "junit"]
fail-fast = false

[test.coverage]
enabled = false
format = "lcov"
minimum-percent = 80

[lint]
max-warnings = 0
exclude = ["contracts/generated/*.tolk"]

[lint.rules]
unused-variable = "deny"
mutable-variable-can-be-immutable = "warn"

[lint.rules.Counter]
unused-variable = "allow"

[networks.localnet]
explorer = "http://127.0.0.1:3010/explorer"

[networks.staging]
api = { v2 = "https://staging.example.com/api/v2" }
explorer = "https://staging.example.com/explorer"

[scripts]
deploy = "acton script scripts/deploy.tolk"

[import-mappings]
contracts = "./contracts"
tests = "./tests"
wrappers = "./wrappers"
gen = "./gen"

Additional properties

Acton allows arbitrary metadata fields in any section of Acton.toml. These fields are ignored by Acton but can be read by third-party tools or used for project-specific annotations.

Build docs developers (and LLMs) love