What is Acton in the TON Blockchain Ecosystem? Complete Developer Toolkit Guide

Acton is a Rust-written, all-in-one command-line interface that bundles the entire TON smart contract lifecycle—from project scaffolding and compilation to testing, deployment, and TypeScript wrapper generation—into a single acton binary.

Acton serves as the unified development platform for the TON Blockchain ecosystem, replacing fragmented toolchains with a cohesive workflow. Hosted in the ton-blockchain/acton repository and maintained by the TON core team, this toolkit provides everything needed to build, debug, and ship production-ready contracts. According to the project source, Acton functions as the single entry point for developers working on anything from simple counters to complex jetton implementations.

Core Features of the Acton TON Blockchain Toolkit

Project Scaffolding with Built-in Templates

Acton eliminates setup friction through the acton new command, which generates ready-made project structures from templates stored in the source tree. Developers can scaffold counters, NFT collections, jettons, and more without manual configuration. This functionality is implemented in src/commands/new, where the CLI parses template parameters and writes the initial contract boilerplate, dependencies, and test stubs to disk.

Fast Rust-Based Compilation and Testing

The toolkit replaces legacy build pipelines with a native Rust compilation system defined in build.rs and Cargo.toml. Acton offers:

  • Fork-mode test runner for testing against live network states without gas costs
  • Gas-snapshotting to detect unexpected fee changes across code updates
  • Coverage, mutation, and fuzz testing for security validation
  • Browser UI for failed tests providing visual debugging of VM execution traces

The test execution engine resides in crates/ton-ls, a lightweight TON-LS (Logic Service) VM optimized for rapid unit testing and local debugging.

Tolk Scripting and Wallet Management

Acton provides first-class support for Tolk, the next-generation contract language for TON. The crates/tolk-ty directory houses the type system, parser, and inference engine that power intelligent code completion and validation. For deployment workflows, the src/commands/wallet implementation handles:

  • Wallet creation with version specification (e.g., --version v5r1)
  • Local network faucet integration via --airdrop flags
  • Secure key management for testnet and mainnet deployments

The acton script sub-command executes .tolk files directly, enabling deployment automation and on-chain interaction scripts without external tooling.

Verification, Debugging, and TypeScript Integration

Beyond compilation, Acton includes native utilities for static analysis, source-level debugging, and low-level VM tooling. The src/commands directory contains implementations for linting and formatting that enforce TON-specific security patterns. For frontend integration, the toolkit automatically generates TypeScript bindings from contract ABIs, depositing them at target/.../typescript/ after successful acton build execution.

Architectural Overview and Source Structure

Acton employs a modular architecture where sub-crates function independently while the top-level CLI orchestrates the workflow. Understanding this structure aids in debugging and extending the toolkit:

Component Source Path Responsibility
Core CLI src/lib.rs Entry point, argument parsing, and command dispatch to sub-modules
Command Implementations src/commands/ Individual logic for new, build, test, wallet, script, run, and other sub-commands
Tolk Language Front-end crates/tolk-ty/ Type inference, syntax validation, and language server capabilities
Assembly Support crates/tasm-syntax/ Low-level TON assembly syntax support
VM and Test Runner crates/ton-ls/ Lightweight virtual machine for fast unit testing and execution tracing
Local Network Node crates/ton-localnet/ Sandbox environment for integration testing before testnet deployment
Documentation Generator src/doc/man/ Markdown man-page sources and online documentation site generation

This separation allows advanced users to import specific crates—such as ton-ls for custom testing frameworks—without pulling in the entire CLI.

Complete Development Workflow Example

The following commands demonstrate a typical end-to-end workflow using Acton TON Blockchain tooling, mapping directly to the implementation files referenced above:


# 1. Scaffold a new project from the built-in "counter" template

acton new first_counter --template counter
cd first_counter

# 2. Compile the contract (invokes build.rs compilation pipeline)

acton build

# 3. Run the test suite (utilizes crates/ton-ls VM)

acton test

# 4. Create a local testnet wallet and fund it

acton wallet new --name deployer --local --airdrop --version v5r1

# 5. Deploy the contract to the public testnet using Tolk scripting

acton script scripts/deploy.tolk --net testnet

Each command delegates to its respective handler in src/commands/ (e.g., src/commands/build for compilation, src/commands/wallet for key management), ensuring consistent error handling and logging across operations.

Summary

  • Acton is the official Rust-written, all-in-one CLI for TON smart contract development, covering the complete lifecycle from scaffolding to deployment.
  • The architecture centers on src/lib.rs for command coordination, with specialized logic residing in src/commands/ and modular crates like crates/tolk-ty and crates/ton-ls.
  • Key capabilities include template-based project generation, gas-snapshot testing, Tolk language support, local network simulation via ton-localnet, and automatic TypeScript wrapper generation.
  • All functionality is exposed through the unified acton binary, eliminating the need for external compilers, test runners, or deployment scripts.

Frequently Asked Questions

What programming languages does Acton support?

Acton primarily supports Tolk, the modern contract language for TON, along with low-level TON assembly through the tasm-syntax crate. While the toolkit itself is written in Rust and can compile Rust-based contracts to TVM bytecode, its automated testing and debugging features are optimized for the Tolk ecosystem.

How does Acton testing compare to traditional TON testing frameworks?

Acton provides a Rust-based test runner that executes significantly faster than traditional JavaScript or Python alternatives by leveraging the ton-ls VM crate. It supports advanced features like fork-mode testing (cloning live network state), mutation testing, and gas-snapshot comparisons that are not available in standard TON testing environments.

Can I use Acton components independently without the full CLI?

Yes. The architecture deliberately separates concerns into distinct crates. Developers can import crates/ton-ls for standalone VM inspection, use crates/tolk-ty for custom Tolk language tooling, or leverage crates/ton-localnet for sandboxed network simulations without installing the complete acton CLI binary.

Where are the TypeScript wrapper files generated in an Acton project?

After running acton build, TypeScript bindings are automatically generated and deposited in the target/.../typescript/ directory within your project root. These files provide type-safe interfaces for dApp front-end development, automatically updated whenever the contract ABI changes during compilation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →