Localnet
Forking from Network
Run local node with testnet/mainnet state, including historical block forks
Fork mode lets the local node resolve account state from a remote network while keeping execution local.
Basic Forking
# Fork from testnet
acton localnet start --fork-net testnet
# Fork from mainnet
acton localnet start --fork-net mainnetHistorical Fork at a Specific Block
acton localnet start --fork-net testnet --fork-block-number 55000000This is useful for deterministic debugging of historical behavior.
API Key
Use the TonCenter env var that matches the forked network:
TONCENTER_TESTNET_API_KEY=YOUR_API_KEY acton localnet start --fork-net testnet
TONCENTER_MAINNET_API_KEY=YOUR_API_KEY acton localnet start --fork-net mainnetActon reads these env vars automatically for the built-in testnet and
mainnet fork backends.
Configure Defaults in Acton.toml
[localnet]
fork-net = "testnet"
fork-block-number = 55000000Now acton localnet start automatically uses these defaults.
Last updated on