Acton does not have a dedicatedDocumentation 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 deploy command. Instead, deployments are Tolk scripts executed with acton script. This design gives you the full power of the Tolk language to compose initialization state, compute addresses, run post-deploy validation, and print the transaction trace — all in the same file you can test locally before touching a live network.
Looking for a quick command? The canonical invocation is:Read on for the full pattern, flags, and mainnet considerations.
How deployment works
A deployment script is an ordinary Tolk file with amain() entry point. When you run it without --net, it executes inside Acton’s local emulator — transactions are instantaneous, state is ephemeral, and emulated wallets replace real configured wallets. Once the local run succeeds, add --net testnet or --net mainnet to broadcast the same logic against the real network.
The acton script command handles the full broadcast lifecycle: it compiles the script and its imported wrappers, resolves the named wallet from wallets.toml, sends the external deployment message, and waits for confirmation.
The canonical deploy pattern
Every deployment script follows the same four-step structure:- Load the deployer wallet
- Build the contract initial state
- Send the deployment transaction
- Wait for confirmation and print the result
scripts/deploy.tolk
waitForFirstTransaction vs waitForTrace
| Method | Use when |
|---|---|
.waitForFirstTransaction() | You only need to confirm the deploy message landed |
.waitForTrace() | You want the full multi-hop transaction chain (recommended) |
null if Acton cannot fetch the result within the retry budget — always check for null and call Assert.fail() or handle the error explicitly.
acton script flags for deployment
| Flag | Type | Default | Description |
|---|---|---|---|
--net | string | — | Network to broadcast to: testnet, mainnet, localnet, or custom:<name>. Omit for local emulation. |
--tonconnect | flag | — | Use a TON Connect wallet instead of a configured wallets.toml wallet |
--tonconnect-port | number | 52258 | Local port for the TON Connect approval page |
--explorer | enum | — | Explorer for transaction links in output: tonscan, tonviewer, etc. |
--fork-net | string | — | Fork remote account state for emulated execution |
--fork-block-number | number | — | Historical block seqno to fork from |
--debug | flag | — | Start a DAP debug server (see debug) |
--debug-port | number | 12345 | Debug server port |
--backtrace | enum | — | Enable backtraces (full) for failure attribution |
--verbose | flag | — | Increase executor log verbosity |
--clear-cache | flag | — | Clear the compilation cache before running |
--show-bodies | flag | — | Print decoded message bodies in transaction trees |
Step-by-step deployment workflow
1. Run locally (emulation)
Always validate the script in the local emulator first. No real funds move, and the full transaction trace is printed immediately:2. Deploy to testnet
Add--net testnet to broadcast against the TON testnet. Acton resolves the wallet you select from wallets.toml and sends a real external message:
3. Deploy to mainnet
Only broadcast to mainnet after the same script succeeds both locally and on testnet:More complex deploy scripts
For contracts with rich initialization state (jetton minters, NFT collections, DEX pools), build all the cells and dictionaries inside the script before calling the deploy helper:scripts/deploy-jetton.tolk
Prerequisites
Before running a broadcast deployment, you need:- A compiled contract — run
acton buildto produce build artifacts and generated wrappers - A funded wallet — use
acton wallet new+acton wallet airdropfor testnet; fund a mainnet wallet directly - A wrapper — generate with
acton wrapper <CONTRACT_NAME>or check that@wrappers/*.gen.tolkfiles exist - TonCenter API key — set
TONCENTER_TESTNET_API_KEYorTONCENTER_MAINNET_API_KEYin.envfor public network runs
See Also
- Deployment guide — full deployment walkthrough
acton script— complete script command referenceacton wallet— wallet setup for deploymentacton verify— verify deployed source on TON Verifier