Where to Find Examples or Tutorials for Acton: A Complete Guide for TON Developers
Acton ships with a complete learning ecosystem—including a quickstart guide, built-in project templates, and comprehensive CLI documentation—accessible both online and directly within the ton-blockchain/acton repository.
The ton-blockchain/acton framework provides everything you need to learn TON smart contract development without external resources. From copy-paste quickstart commands to production-ready contract templates, you can find authoritative examples or tutorials for Acton embedded in the source code, generated documentation, and repository READMEs.
Start with the Official Quickstart Guide
The definitive starting point for learning Acton is the Quickstart guide, which walks through the full project lifecycle from creation to testnet deployment. According to the source code in ton-blockchain/acton, this documentation mirrors the implementation found in src/commands/new/templates/counter/README.md.
The repository root README.md provides a succinct "From zero to testnet" walkthrough. Lines 78-94 contain the exact CLI commands to create, build, and deploy your first contract, offering a condensed tutorial that requires no external dependencies.
Explore Built-in Project Templates
Acton generates working examples through its template system located in src/commands/new/templates/. When you run acton new, the CLI instantiates one of four reference implementations:
counter: A minimal contract with TypeScript wrappers, tests, and deployment scriptsjetton: Fungible token standard implementationnft: Non-fungible token contract exampleempty: Bare-bones scaffold for custom development
The counter template serves as the primary tutorial resource. Its README at src/commands/new/templates/counter/README.md demonstrates the complete workflow: compiling .tolk contracts, running the test suite, and executing deployment scripts against the testnet.
Browse the Command Documentation
Detailed documentation for every CLI command lives on the Acton docs site, generated from the implementation in src/commands/. These guides provide authoritative references for daily development:
buildandtest: Compilation and testing workflowsscript: Deployment automation and network interactionwrapper: TypeScript binding generationwallet: Testnet wallet creation and management
You can regenerate these docs locally using acton docgen, which processes the source code to recreate the reference documentation offline. This is particularly useful for exploring the module structure defined in src/lib.rs and the command implementations without internet access.
Run the End-to-End Example
Below are the essential commands derived from the official Acton tutorials and template sources.
Create a new project from the built-in counter template:
acton new first_counter --template counter
cd first_counter
Build the contract and verify logic with the test suite:
acton build # compiles the .tolk contracts
acton test # runs the generated tests
Create a local testnet wallet with automatic TON airdrop:
acton wallet new --name deployer --local --airdrop --version v5r1
Deploy the contract to testnet using the provided script:
acton script scripts/deploy.tolk --net testnet
Run the deployment in local emulation mode (no blockchain required):
acton run deploy-emulation
Regenerate TypeScript wrappers after modifying the contract ABI:
acton wrapper Counter
Dive into the Source Code
For developers who prefer reading implementation details, the ton-blockchain/acton repository exposes its architecture in specific files that power the tutorials:
src/lib.rs: Core library exposing modules such ascommands,wallets, andtonconnectsrc/commands/new/templates/counter/README.md: The canonical example project showing contract structure and deployment workflowxtask/src/main.rs: Build-time tooling that drives code generation, documentation generation, and release tasks
These paths provide first-hand authority on how the framework functions, complementing the higher-level tutorials and quickstart guides.
Summary
- The Quickstart guide provides the complete project lifecycle tutorial from the
ton-blockchain/actondocumentation site - Built-in templates (
counter,jetton,nft,empty) insrc/commands/new/templates/offer production-ready examples with tests and deployment scripts - Command-level documentation covers
build,test,script,wrapper, andwalletusage, generated fromsrc/commands/ - Run
acton docgento generate offline documentation from the source code, useful for studying implementation details insrc/lib.rswithout internet access
Frequently Asked Questions
Where can I find the best examples or tutorials for Acton?
Start with the Quickstart guide and the "From zero to testnet" section in the repository README.md (lines 78-94). These resources provide copy-paste CLI commands that take you from project creation to testnet deployment in minutes, requiring no external dependencies.
What project templates are available in Acton?
Acton ships with four built-in templates accessible via acton new --template <name>: counter (minimal contract with TypeScript wrappers and tests), jetton (fungible tokens), nft (non-fungible tokens), and empty (scaffold). The counter template at src/commands/new/templates/counter/README.md is the recommended starting point for learning the framework.
Can I browse Acton documentation and examples offline?
Yes. Run acton docgen to generate the complete documentation site from the source code. This command processes the implementation in src/commands/ and recreates the reference guides locally, allowing you to study the framework and view tutorials without internet access.
How do I deploy an Acton example contract to testnet?
Use the workflow shown in the counter template README. First create a wallet with acton wallet new --name deployer --local --airdrop --version v5r1, then execute acton script scripts/deploy.tolk --net testnet to deploy your compiled contract to the TON testnet.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →