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.

This guide gets you from zero to a running TON smart contract project as fast as possible. You will scaffold a counter contract from Acton’s built-in template, compile it, run the test suite, install the frontend dependencies, and open the dApp in your browser ready to deploy and interact on testnet.

Prerequisites

Before you begin, make sure the following are available on your machine:

Acton CLI

Install Acton with the one-line installer. Run acton --version to confirm.

Node.js 22+ LTS

Required for the TypeScript app scaffold generated by --app. Download the current LTS release.

New project path

The steps below create a full project from scratch using the counter built-in template.
1

Create the project

acton new scaffolds a new project directory from a built-in template. The counter template ships with a ready-made contract, tests, and a deployment script. Adding --app generates a Vite-based React frontend and TypeScript wrappers alongside the Tolk sources.
acton new first_counter --template counter --app
cd first_counter
You will see output similar to:
Installing standard library
> Initialized empty Git repository in /home/you/first_counter/.git/
✓ Created new Acton project
  Project name: first_counter
  Template: counter
  TypeScript app: included
2

Build the contract

Compile every contract configured in Acton.toml and write build artifacts to build/:
acton build
Expected output:
Compiling contracts
Compiling Counter
 Finished in 4.8ms
3

Run the tests

Discover and run all *.test.tolk files in the project:
acton test
The counter template ships with eight tests covering deployment, increment, decrement, reset, overflow guards, and access control. You should see all eight pass:
TEST  first_counter

> contracts/tests/counter.test.tolk (8 tests)
 ✓ deploy exposes initial owner 4ms
 ✓ increase counter 4ms
 ✓ reset counter 3ms
 ✓ decrease counter 4ms
 ✓ decrease counter fails on underflow 3ms
 ✓ decrease counter fails on overflow 3ms
 ✓ non-owner cannot change counter 3ms
 ✓ unknown message 2ms

✓ 8 passed in 1 file
4

Install frontend dependencies

Install the NPM workspace dependencies for the React dApp scaffold:
npm ci
5

Start the development server

Start the Vite development server:
npm run dev
Open the URL printed in the terminal. Connect a TON wallet using TON Connect, then use the UI to deploy the counter contract and interact with it by sending increment and decrement transactions on testnet or mainnet.
The Vite frontend uses the generated TypeScript wrappers in wrappers-ts/ to communicate with the contract. Run acton wrapper Counter --ts any time you change the contract ABI to regenerate those wrappers.

Existing project path

Already have a TON repository and want to add Acton support? Run acton init in the project root instead of creating a new scaffold:
cd your-repo
acton init
acton build
acton test
acton init writes an Acton.toml manifest, installs the bundled standard library, and detects existing contract entrypoints where possible.

Deploying to testnet

Once tests pass locally, you can deploy to the TON testnet with a funded wallet and a deployment script. The counter template includes one at contracts/scripts/deploy.tolk.
# Create a testnet wallet and request airdrop funds
acton wallet new --name deployer --local --airdrop --version v5r1

# Deploy using the built-in script alias from Acton.toml
acton run deploy-testnet
See the Walkthrough for a complete step-by-step tour through these and all other Acton features.

Next steps

Walkthrough

Continue from this point: build, lint, coverage, mutation testing, wallets, deploying to testnet, and verifying on-chain.

acton build

Learn about build options, artifact layout, and dependency handling.

acton test

Explore coverage, mutation testing, fuzz testing, and the browser Test UI.

acton check

Run the Tolk linter with 25+ rules across your contract sources.

Build docs developers (and LLMs) love