ZonerChapter 02 / 05
Install and commands
Install Zoner and learn the commands.
Install
$ git clone https://github.com/bristinWild/Zoner
cd Zoner
cargo install --path .zoner node runs the solizone_node binary, which you build from the Solizone repository:
$ cd solizone/solizone-evm
cargo build --release --bin solizone_nodeThen do one of these:
- put
solizone_nodenext to thezonerbinary - put it on your
PATH - point to it with
SOLIZONE_NODE=/path/to/solizone_node
Commands
zoner init [DIR]
Creates a Foundry project preconfigured for Solizone (chain id 9001):
foundry.tomlwith asolizoneRPC endpoint- an example
Countercontract - a
.gitignoreand a short README
It never overwrites files. If one of them already exists, Zoner stops and says which.
zoner node [flags]
Runs solizone_node. All flags after node are passed through, and so is the reset subcommand.
- It defaults to
--storage local, so you do not need Basecamp. - Chain data goes in
~/.zoner, not in your project folder. Use--data-dir DIRto change it.
zoner sync [flags]
The same as node, with --sync-from-logos added. It rebuilds the chain from Logos, replays and verifies every block, then keeps running.
A sync needs an empty data directory, so run zoner node reset first. See Syncing from Logos.
zoner deploy CONTRACT
Runs forge create against the node.
zoner deploy CONTRACT [--rpc URL] [--account N | --private-key KEY]
[--constructor-args ARG...]CONTRACTispath/File.sol:Contract, or justContract, which Forge resolves.--account Npicks one of the five development accounts (0 to 4). The default is 0.--private-key KEYoverrides the account.- Everything after
--constructor-argsgoes to the constructor, flags included.
zoner status [--rpc URL]
Shows the chain id, the head block, and how far publication to Logos has got.
chain id: 9001
head block: #12
publishing: next block #13, 0 not yet submitted, 3 waiting for Logos finalization
block #12 submitted
block #11 submitted
block #10 finalizedIf publishing is off, it says so and tells you to start the node with --publish.
zoner accounts
Lists the five pre-funded development accounts and their balance. The keys are public test keys. Never use them for real value.
Configuration
| Variable | Meaning |
|---|---|
SOLIZONE_NODE | Path to the solizone_node binary. Default: next to zoner, then PATH. |
FORGE_FLAGS | Extra flags for forge create, for example --use /path/to/solc or --offline. They go before --constructor-args, which must stay last. |
Defaults: RPC http://127.0.0.1:8545, chain id 9001, chain data in ~/.zoner.