Key Features of Acton for TON Developers: Full-Stack Smart Contract Toolkit

Acton is a full-stack Rust-based development toolkit that provides TON developers with project scaffolding, declarative configuration via Acton.toml, integrated wallet management, source-level debugging, and syntax crates for TON languages—all accessible through a unified CLI.

Acton (available in the ton-blockchain/acton repository) streamlines the entire lifecycle of TON smart contract projects by combining a command-line interface with a modular architecture of syntax parsers, TVM bindings, and build tools. Designed specifically for Acton for TON developers who prefer working in Rust, the toolkit eliminates friction between writing, compiling, testing, and debugging contracts on The Open Network.

Project Scaffolding with Zero-Configuration Defaults

Acton generates production-ready project structures through the acton new command, implemented in xtask/src/tasks/hello.rs and dispatched from xtask/src/main.rs. This scaffolding creates a complete development environment including the Acton.toml manifest, .env.example for secrets management, .gitignore, and optional Vite-React frontend templates.

To initialize a new project:

acton new my_counter --app

This command produces:


my_counter/
├─ Acton.toml            # project manifest

├─ src/
│  └─ my_counter.tact   # sample contract

├─ .env.example
├─ package.json          # (if --app was used)

└─ .gitignore

Declarative Configuration via Acton.toml

At the heart of Acton lies declarative configuration through Acton.toml, parsed by ActonConfig in src/lib.rs. This central manifest describes contracts, libraries, wallet settings, network endpoints, and custom CLI aliases, enabling reproducible builds across environments.

The configuration structure allows developers to define contract entries explicitly:

[contracts.my_counter]
source = "src/my_counter.tact"

The parser implementation in src/lib.rs loads these definitions via ActonConfig::load(), while helper structs in src/wallets.rs and src/tonconnect.rs handle wallet and connection configurations respectively.

Integrated Build System and Caching

The build system, orchestrated through acton build in xtask/src/tasks/build.rs, compiles contracts defined in Acton.toml to TON-VM bytecode (.boc files) while maintaining an intelligent cache. The src/file_build_cache.rs module tracks artifact validity, ensuring only modified contracts trigger recompilation.

When invoked, the system:

  1. Reads the manifest using ActonConfig::load() from src/lib.rs
  2. Invokes the TVM-FFI compiler (crates/tvm-ffi) for each contract
  3. Writes JSON artifacts to .acton/build/ with dependency resolution

Wallet Management and TON Connect Integration

Acton provides first-class wallet management through src/wallets.rs, which handles local private-key storage, automatic .env loading, and transaction signing. For external signing workflows, src/tonconnect.rs implements the TON Connect protocol, launching a local browser page for hardware wallet interactions.

Key workflows include:

  • Local wallet creation: acton wallet add dev-wallet generates keys and updates .env with DEV_WALLET_KEY
  • External signing: acton --tonconnect send initiates the browser flow defined in src/tonconnect.rs

Transaction Sending and Network Interaction

The src/external_send.rs module manages HTTP RPC communication for broadcasting signed messages to the TON network. When developers execute acton send, the system constructs TVM cells via tvm-ffi, signs them using the wallet logic in src/wallets.rs, and transmits them through the configured RPC endpoint.

Example transaction execution:

acton send --contract my_counter --function inc --value 1 --wallet dev-wallet

This command automatically generates verification links (e.g., https://tonviewer.com/tx/...) upon confirmation.

Source-Level Retracing and Debugging

Acton's standout retracing capability, implemented in crates/ton-retrace/src/trace.rs, reconstructs exact contract execution paths post-transaction. The system fetches raw TVM logs, parses them using crates/tvm-logs, and maps opcodes back to source locations using debug info from .acton/debug/.

To analyze a completed transaction:

acton retrace --tx 0:1234abcd... --debug-port 9229

The retrace engine starts a DAP (Debug Adapter Protocol) server, allowing VS Code to attach and inspect stack frames, opcodes, and variable values at each execution step.

Syntax Crates for TON Languages

Acton includes dedicated parser crates for TON ecosystem languages, located in the crates/ directory:

  • crates/tlb-syntax: Parser for TLB (Type-Length-Binary) data definitions
  • crates/tasm-syntax: AST walker for TASM assembly language
  • crates/fift-syntax: Handler for Fift low-level TVM scripting

These syntax crates power the acton fmt and acton lint commands (using src/formatter.rs) and are reused by the compiler for semantic analysis.

TVM FFI and Runtime Bindings

The crates/tvm-ffi/src/lib.rs module provides direct Rust bindings to the TVM runtime, enabling in-process contract execution without remote nodes. This functionality supports stack manipulation, JSON-stack serialization, and log parsing through crates/tvm-logs.

Integration tests in tests/integration/ leverage these bindings to execute contracts locally, facilitating rapid test-driven development cycles.

Testing Utilities and Integration Support

Acton's testing infrastructure, located in tests/support/ and tests/integration/, provides utilities for spinning up local TON nodes, compiling contracts programmatically, and asserting RPC behavior. The ProjectBuilder pattern in tests/support/ creates temporary directories with configurable Acton.toml manifests for isolated test scenarios.

Summary

  • Acton provides a unified CLI (xtask/src/main.rs) for the complete TON development lifecycle
  • Declarative configuration via Acton.toml centralizes contract definitions, wallets, and network settings
  • Integrated build caching (src/file_build_cache.rs) optimizes compilation to TVM bytecode
  • Wallet management (src/wallets.rs) and TON Connect (src/tonconnect.rs) support both local and external signing
  • Source-level retracing (crates/ton-retrace) enables post-mortem debugging with DAP server support
  • Syntax crates for Tact, TLB, TASM, and Fift provide parsing infrastructure for linting and formatting
  • TVM FFI bindings (crates/tvm-ffi) allow in-process contract execution for testing

Frequently Asked Questions

What is Acton in TON development?

Acton is a full-stack development toolkit for The Open Network (TON) that provides Rust-based tooling for writing, compiling, testing, and debugging smart contracts. According to the ton-blockchain/acton source code, it combines a CLI with syntax parsers, TVM FFI bindings, and a declarative build system centered on Acton.toml.

How does Acton handle contract compilation?

Acton compiles contracts through the acton build command, which reads Acton.toml via ActonConfig::load() in src/lib.rs, invokes the TVM-FFI compiler in crates/tvm-ffi, and caches results in src/file_build_cache.rs. Output artifacts are written to .acton/build/ as JSON files containing bytecode and metadata.

Can I debug TON contracts with Acton?

Yes. Acton provides source-level debugging through the acton retrace command, implemented in crates/ton-retrace/src/trace.rs. This feature reconstructs execution paths from transaction logs, maps them to source code, and starts a DAP server on a configurable port (e.g., --debug-port 9229) for VS Code integration.

What languages does Acton support for TON smart contracts?

Acton supports multiple TON ecosystem languages through dedicated syntax crates: Tact (primary contract language), TLB (type definitions), TASM (assembly), and Fift (low-level scripting). These parsers in crates/tlb-syntax, crates/tasm-syntax, and crates/fift-syntax enable linting, formatting, and semantic analysis.

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 →