Use this file to discover all available pages before exploring further.
acton library manages the lifecycle of TON on-chain libraries — shared code cells stored in a special library account that multiple contracts can reference by hash. Publishing a contract as a library avoids duplicating bytecode across deployments: contracts include a library reference cell instead of the full code, reducing deploy costs and making upgrades easier. Acton tracks published library metadata in libraries.toml (project-local) or global.libraries.toml (shared across projects), so you can inspect and top up libraries long after publication.
Compile a project contract (or supply raw code) and publish it as a TON on-chain library. Acton calculates storage costs from the contract size and requested duration, prompts for confirmation, sends the publication transaction, and optionally saves the library metadata to a tracking file.Synopsis
acton library publish [CONTRACT_NAME] [OPTIONS]
Options
Flag
Type
Default
Description
CONTRACT_NAME
string
prompted
Contract name from Acton.toml to publish
--code
string (BoC)
—
Raw base64 or hex code to publish instead of compiling a contract
--duration
string
prompted
Storage duration, e.g. 100d, 1y, 6m
--wallet
string
prompted
Wallet from wallets.toml to pay the transaction
--net
string
testnet
Network: testnet, mainnet, localnet, or custom:<name>
--amount
string
—
Explicit TON amount (overrides duration-based estimation)
--local
flag
—
Save metadata to project-local libraries.toml
--global
flag
—
Save metadata to global.libraries.toml
-y, --yes
flag
—
Skip confirmation prompts
--tonconnect
flag
—
Use a TON Connect wallet for the transaction
--tonconnect-port
number
52258
Local port for the TON Connect approval page
If neither --local nor --global is passed, Acton prompts for where to save the library metadata after a successful publication.
Display stored metadata for a tracked library, including publication time, last top-up time, current balance, and estimated remaining storage runway.Synopsis
acton library info [NAME]
Options
Flag
Type
Default
Description
NAME
string
prompted
Library name from libraries.toml or global.libraries.toml
Send additional TON to a library’s account to extend its storage lifetime. Acton updates last_topup_timestamp in the saved metadata after a successful top-up.Synopsis
acton library topup [LIBRARY_NAME] [OPTIONS]
Options
Flag
Type
Default
Description
LIBRARY_NAME
string
prompted
Library name from metadata files
--duration
string
prompted
Additional storage duration, e.g. 1y, 100d
--amount
string
—
Explicit TON amount (overrides duration-based calculation)
For publish and topup, Acton estimates the required TON amount from the library’s code size and requested storage duration. Pass --amount to override this estimate completely.
Both publish and topup support --tonconnect for browser wallet approval. TON Connect is available only for mainnet and testnet — use configured Acton wallets for localnet and custom networks.