This guide walks through every major Acton feature in a single project. Starting from the built-inDocumentation 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.
counter template, you will compile the contract, format and lint the sources, run the test suite with coverage and mutation analysis, debug a failing test, deploy to testnet using a funded wallet, and verify the deployed bytecode. Each section can be read independently if you have already completed earlier steps.
Finished the quickstart? Skip the project creation step — your
first_counter directory is already set up. Jump straight to Build the contract.Prerequisites
- Acton installed and on your
PATH— see Installation. - Node.js 22 or later LTS — required for the TypeScript app scaffold.
- Optional: the TON VS Code extension or TON JetBrains plugin for IDE integration.
Initialize a new project
If you have not already created a project, do so now:contracts/src/, tests under contracts/tests/, and deployment scripts under contracts/scripts/. Generated TypeScript wrappers live in wrappers-ts/, and the React frontend lives in app/.
Build the contract
Compile all contracts
acton build compiles every contract configured in Acton.toml and writes JSON build artifacts to build/:build/Counter.json
Format Tolk files
acton fmt formats all .tolk files under the project root using the built-in Tolk formatter:
--check prints a unified diff and exits with a non-zero status:
Lint contracts
acton check runs the Tolk linter with 25+ rules across the whole project:
--fix, or look up any rule code with --explain:
Regenerate wrappers
Wrappers are auto-generated from the contract ABI. Regenerate them whenever the contract interface changes and commit them alongside sources.contracts/wrappers/Counter.gen.tolk; the TypeScript wrapper goes to wrappers-ts/Counter.gen.ts.
Test the contract
Run the full test suite
acton test discovers and runs all *.test.tolk files:| Flag | Purpose |
|---|---|
--filter <regex> | Run only tests whose name matches the pattern |
--fail-fast | Stop after the first failure |
--save-test-trace | Write TVM execution traces to build/traces/ |
Collect coverage
Pass Enforce a minimum threshold in CI:
--coverage to measure line and branch coverage and print a summary after the run:Inspect results in the browser UI
Pass The Test UI lets you filter tests, inspect TVM execution traces, view decoded message bodies, and navigate annotated source coverage — all in the browser.
--ui to open the interactive Test UI. Combine with --coverage to browse annotated source files in the Coverage tab:Run mutation testing
Coverage shows which lines executed — not whether tests would catch a bug on those lines. Mutation testing fills that gap by making small deliberate changes to the contract (for example, replacing Each surviving mutation shows the exact line, rule, and diff. Add a test that exercises the corresponding path and rerun — the mutation will be killed on the next run.
+= with -=) and re-running the suite. Tests that still pass against a mutation reveal untested behaviour.Debug the contract
Exception tracing
Pass--backtrace full to get source locations for a failure without stepping through the code:
Source-level DAP debugger
For deeper investigation, Acton ships a source-level debugger using the Debug Adapter Protocol (DAP). It provides stepping (over, into, out), breakpoints, variable inspection, and exception breaks — running the same contract code as production with no separate debug build. The--debug flag is available on three commands:
| Command | What gets debugged |
|---|---|
acton test [path] --debug | A live local test session; combine with --filter to isolate one test |
acton script <path> --debug | A locally executing script |
acton retrace <HASH> --contract <NAME> --debug | A real on-chain transaction |
.vscode/launch.json:
.vscode/launch.json
In JetBrains IDEs, open a
*.test.tolk file and click the Debug button on any run configuration — the plugin starts Acton with --debug and attaches automatically.Set up a wallet
Deploying to testnet requires a funded wallet. Create one and request testnet funds in a single step:| Command | Purpose |
|---|---|
acton wallet list --balance | List configured wallets and on-chain balances |
acton wallet import --name deployer | Import an existing mnemonic |
acton wallet airdrop deployer --net testnet | Request testnet funds for an existing wallet |
acton wallet export-mnemonic deployer | Export the mnemonic interactively |
acton wallet remove deployer -y | Remove a wallet non-interactively |
Deploy to testnet
There is no standaloneacton deploy command — contracts are deployed through Tolk scripts. The counter template includes contracts/scripts/deploy.tolk and registers two script aliases in Acton.toml: deploy-emulation and deploy-testnet.
Local emulation (no wallet needed)
Test the deployment flow locally without a wallet or network connection:Fork from live network state
Use--fork-net to resolve live account state from testnet while keeping execution local — no transactions are broadcast:
--fork-net before broadcasting them to a real network.
Deploy to testnet
Pass--net testnet to broadcast all net.send() calls to the real network:
Verify the contract
acton verify checks that the deployed bytecode matches local sources by compiling them, uploading to the TON Verifier backend, collecting signatures, and submitting the verification transaction.
<CONTRACT_ADDRESS> with the address from the deployment step. A funded wallet is required; if only one wallet is configured it will be selected automatically.
Use --dry-run to compile and upload sources without consuming funds:
--tonconnect to approve the final verification transaction through a TON Connect wallet instead:
Manage on-chain libraries
For larger contracts that share reusable code, Acton supports publishing Tolk contracts as masterchain library accounts and referencing them from multiple deployments.Inspect remote state
Useacton rpc to query live blockchain state from the terminal:
Next steps
Testing guide
Deep dive into writing comprehensive tests: fork mode, gas snapshots, fuzz testing, and the browser Test UI.
Scripting guide
Write standalone Tolk scripts for deployment, automation, and contract interaction.
Linting rules
Browse all 25+ Acton linting rules and learn how to configure them in
Acton.toml.CLI command reference
Full reference for every Acton command, flag, and subcommand.