acton rpc
Reference manual for the acton rpc command
Synopsis
acton rpc [options] command
Description
Query blockchain account state through a configured network endpoint.
acton rpc is intended for fast inspection workflows when you want to:
- fetch the latest masterchain block number for a network
- inspect the latest masterchain block object returned by TonCenter
- call contract get-methods with ABI-parsed or raw TVM stack arguments
- check whether an account is active, frozen, or uninitialized
- inspect balance, last transaction metadata, and state hashes
- render a TonCenter v3 trace as a decoded transaction tree
- match deployed code against a local Acton project by
code_hash - decode account storage and get-method results through local or bundled ABI metadata when a match is found
The command works without a project manifest for raw remote inspection.
When Acton can resolve a local project and finds a contract with the same
compiled code_hash, it also prints the matched contract name and decodes the
account storage using the local compiler ABI. If no local match exists, Acton
falls back to its bundled ABI catalog.
Subcommands
acton rpc info
Show information about a single account.
Synopsis
acton rpc info [options] address
Options
Contract address in friendly or raw format.
Network to query.
testnet.
Supported values include mainnet, testnet, localnet, and
custom:<name>.
Output
acton rpc info prints:
- remote account metadata such as status, balance, last transaction LT and hashes
- code and data hashes when the account has deployed state
- ABI match information when a project contract or bundled catalog entry has
the same
code_hash - decoded storage in a YAML-like view when compiler ABI metadata is available
If no ABI match is found, Acton still prints the raw remote account information and reports that decoded storage is unavailable.
acton rpc call
Call a contract get-method through TonCenter.
Synopsis
acton rpc call [options] address method [args...]
Options
Contract address in friendly or raw format.
Get-method name or numeric TVM method id.
Arguments to pass to the get-method.
May be passed multiple times.
Network to query.
testnet.
Supported values include mainnet, testnet, localnet, and
custom:<name>.
Print machine-readable JSON output.
Print the raw TonCenter stack without ABI decoding.
ABI Arguments
When Acton finds local or bundled ABI metadata for the remote contract, get-method arguments are parsed against that ABI.
The method argument can be either an ABI get-method name or a numeric TVM method id. When the numeric id is present in the ABI, Acton still uses ABI metadata for arguments and result decoding. When the numeric id is not present in the ABI, Acton sends the call as a raw get-method request.
- integers use Tolk integer literal syntax such as
42,-1,0xff, and0b1010 boolacceptstrueandfalse- nullable supported types accept
null cell,slice, andbitsNaccept plain BoC hex withoutC{}orCS{}prefixesany_addressaccepts an internal address or theaddr_noneliteral- arrays accept
[item1, item2]
Unsupported ABI argument types currently include structs, shaped tuples,
maps, dictionaries, builders, continuations, and other complex values.
Without ABI metadata, acton rpc call builds a raw stack from CLI arguments.
Raw arguments support Tolk integer literals, true, false, null, internal
addresses, addr_none, plain BoC hex as cell, and explicit cell:, slice:,
builder:, and string: prefixes.
Output
When ABI metadata is available and the result stack width matches the get-method return type, Acton prints the decoded Tolk value. Otherwise it prints the raw TonCenter stack in a compact field-per-line format.
Raw output uses decimal integers, URL-friendly addresses, addr_none for
two-bit none addresses, and one fieldN: type = value line per stack item.
acton rpc block
Print the latest masterchain block info returned by TonCenter.
Synopsis
acton rpc block [options]
Options
Network to query.
testnet.
Supported values include mainnet, testnet, localnet, and
custom:<name>.
Output
acton rpc block prints the full TonCenter getMasterchainInfo JSON response
for the selected network.
acton rpc block-number
Print the latest masterchain block number for a network.
Synopsis
acton rpc block-number [options]
Options
Network to query.
testnet.
Supported values include mainnet, testnet, localnet, and
custom:<name>.
Output
acton rpc block-number prints only the latest masterchain block seqno as a
decimal number.
acton rpc trace
Fetch a TonCenter v3 trace by root transaction hash and render it in a stable text format.
Synopsis
acton rpc trace [options] hash
Options
Root transaction hash to query through TonCenter v3 /traces.
Network to query.
testnet.
Supported values include mainnet, testnet, localnet, and
custom:<name>.
Print only the trace summary.
--tree, --verbose
Print the trace summary and transaction tree. This is the default mode.
--summary, --verbose
Print the summary, tree, and stable per-transaction fields.
--summary, --tree
Print decoded message bodies in the transaction tree.
Output
acton rpc trace prints a short summary first:
- query hash
- trace id
- root transaction hash
- whether the trace is complete
- total transaction and message counts
Tree and verbose modes then reuse the same transaction tree formatter as Acton
tests. When current account code matches a local contract or bundled catalog
entry, Acton prints the matched contract name. Add --show-bodies to print
decoded inbound message bodies.
Display Options
Control when to use colored output.
auto, always, never
auto
Project Options
Accepted as a global Acton option for CLI consistency.
This command does not require an existing project manifest for its primary
workflow. It remains mutually exclusive with --project-root.
--project-root
Accepted as a global Acton option for CLI consistency.
This command does not require an existing project root for its primary
workflow. It remains mutually exclusive with --manifest-path.
--manifest-path
Network Resolution
mainnetandtestnetuse the built-in TonCenter endpointslocalnetuses the configured localnet or its default URLcustom:<name>resolves through[networks.<name>]inActon.toml
For custom:<name>, Acton needs access to the selected project or manifest so
it can read the custom network configuration.
TonCenter API Keys
Built-in mainnet/testnet requests read TONCENTER_MAINNET_API_KEY or
TONCENTER_TESTNET_API_KEY, depending on the selected network.
For custom:<name>, Acton reads <NORMALIZED_NAME>_API_KEY. Custom network
names are uppercased and non-alphanumeric characters are replaced with _, so
custom:mock becomes MOCK_API_KEY.
Acton loads .env automatically, so the simplest setup during project work is
usually to keep these keys there and use shell environment variables only for
one-off overrides or CI.
ABI Matching
Storage decoding, get-method argument parsing, and get-method result decoding are best-effort and depend on local project context or the bundled ABI catalog.
Acton attempts to:
- fetch the remote account code cell
- compute its
code_hash - compare that hash with locally configured contracts
- fall back to the bundled ABI catalog when there is no local ABI
- decode storage and get-method results with the matched compiler ABI
This means decoding is robust for contracts you control in the current Acton project, and available for known third-party deployments in the bundled catalog.
For acton rpc call, missing ABI metadata does not prevent a get-method call.
Acton sends raw stack arguments instead and prints the raw result stack.
Exit Status
0: The selected RPC query completed successfully.1: The address was invalid, the network could not be resolved, the remote request failed, raw or ABI argument parsing failed, a named get-method was not found in ABI metadata, or the get-method returned a non-zero exit code.
Examples
-
Inspect a testnet account quickly:
acton rpc info EQC... -
Inspect a mainnet account with an API key from the environment:
TONCENTER_MAINNET_API_KEY=your-key acton rpc info EQC... --net mainnet -
Inspect a localnet deployment and decode storage with the current project:
acton rpc info EQC... --net localnet -
Call a get-method with ABI-parsed arguments:
acton rpc call EQC... get_wallet_data --net mainnet -
Call a get-method by numeric TVM method id:
acton rpc call EQC... 85143 --net mainnet -
Call a get-method without ABI metadata by passing raw stack arguments:
acton rpc call EQC... 85143 0xff true cell:B5EE9C... --net mainnet -
Pass
addr_noneto anany_addressget-method argument:acton rpc call EQC... accepts_any_address addr_none --net localnet -
Use a custom network defined in another manifest:
acton --manifest-path ../incident/Acton.toml rpc info EQC... --net custom:staging -
Print the latest mainnet masterchain block JSON:
acton rpc block --net mainnet -
Print the latest mainnet masterchain block number:
acton rpc block-number --net mainnet- Print a transaction trace from localnet:
acton rpc trace <tx-hash> --net localnetSee Also
acton help disasmacton help retraceacton help script- Command reference
Last updated on