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 localnet runs a full TON-compatible development node on your machine, giving you a zero-cost sandbox where transactions confirm instantly, wallets can be funded on demand, and the entire network state can be snapshotted and restored. The local node exposes a TonCenter-compatible API at http://127.0.0.1:<port> and includes a built-in single-page explorer UI at the root path. When fork mode is enabled, Acton pulls remote account state from testnet or mainnet on demand, so you can develop against real deployed contracts without waiting for a remote network.
Synopsis
Subcommands
| Subcommand | Description |
|---|---|
start | Start the local TON network node |
airdrop | Send TON from the local faucet to an address |
status | Inspect the status of a running localnet |
acton localnet start
Start the local TON network. The node runs in the foreground on127.0.0.1:<port> until you stop it with Ctrl+C or kill the process.
Synopsis
| Flag | Type | Default | Description |
|---|---|---|---|
--port | number | 5411 | Port for the localnet API server |
--fork-net | string | — | Remote network to fork account state from: testnet or mainnet |
--fork-block-number | number | — | Historical block seqno to fork from (pins to a specific state) |
--accounts | strings | — | Comma-separated wallet names to auto-fund and deploy on startup |
--db-path | path | — | SQLite database path for persistent node state across restarts |
--load-state | path | — | Load node state from a JSON snapshot before starting |
--dump-state | path | — | Write a JSON snapshot on graceful shutdown |
--rate-limit | number | — | Max /api/* requests per second (simulates provider rate limits) |
--load-state and --db-path are mutually exclusive — you cannot use both in the same run.acton localnet airdrop
Send TON from the local faucet to any address. The localnet must already be running. Synopsis| Flag | Type | Default | Description |
|---|---|---|---|
ADDRESS | string | required | Recipient address (friendly or raw format) |
-a, --amount | number | 100 | Amount of TON to send |
-p, --port | number | 5411 | Localnet server port |
acton localnet status
Inspect whether a localnet is running on the given port and print basic node information. Synopsis| Flag | Type | Default | Description |
|---|---|---|---|
-p, --port | number | 5411 | Localnet server port to check |
--json | flag | — | Print machine-readable JSON (includes running field for automation) |
Acton.toml configuration
Store localnet defaults inActon.toml to avoid repeating flags on every start. CLI flags override config values for the current invocation.
Acton.toml
API endpoints
The localnet server exposes:| Endpoint | Description |
|---|---|
GET / | Built-in single-page explorer UI |
GET /api/v2/* | TonCenter v2 compatible API |
GET /api/v3/* | TonCenter v3 compatible API |
POST /api/v2/sendBoc | Send external-in messages |
POST /api/v3/message | Send external-in messages |
GET /acton_nodeInfo | Uptime, latest block seqno, active state source |
POST /acton_dumpState | Write a JSON snapshot without stopping the server |
POST /acton_loadState | Replace current state from a JSON snapshot |
POST /acton_setShardAccount | Replace an account’s ShardAccount with a base64 BoC |
POST /acton_sendInternalMessage | Inject a raw internal message BoC |
TonCenter-compatible message endpoints (
/api/v2/sendBoc, /api/v3/message) accept external-in messages only. Use /acton_sendInternalMessage when you need to inject a raw internal message directly.Fork mode
Fork mode lets you develop against real deployed contract state without querying a live public RPC for every transaction. When a fork is enabled, Acton pulls unknown account state from the remote network on first access and caches it locally for the session.TONCENTER_TESTNET_API_KEY or TONCENTER_MAINNET_API_KEY in your environment or .env file to avoid rate-limit errors during fork resolution.
Persistence
- SQLite (persistent across restarts)
- JSON snapshots (portable state)
- Ephemeral (default)
Auto-funded startup accounts
The--accounts flag (or [localnet].accounts in Acton.toml) automatically deploys and funds the named wallets from wallets.toml when the node starts. This eliminates the manual airdrop step for common development wallets:
Acton.toml
Examples
Exit status
0— the selected subcommand completed successfully; forstatus, this includes the port not running (check therunningfield in--jsonoutput for automation)1— startup failed because of port binding, state loading, fork initialization, faucet handling, or a control query failure
See Also
- Local development node guide
acton wallet— create wallets to use with--accountsacton script— run scripts against localnet with--net localnet