ZonerChapter 03 / 05
A typical workflow
From a fresh project to a published contract.
From zero to a deployed contract
$ zoner init hello-logos
cd hello-logosStart a local chain in a second terminal:
$ zoner nodeDeploy the example contract:
$ zoner deploy src/Counter.sol:CounterUse it with the tools you know:
$ cast send <deployed address> "increment()" \
--rpc-url http://127.0.0.1:8545 --private-key <dev key from `zoner accounts`>
cast call <deployed address> "count()(uint256)" --rpc-url http://127.0.0.1:8545See what is happening:
$ zoner statusPublish to Logos
$ zoner node --publish
zoner statusEvery block is sent to a Logos zone channel in height order. A block shows as finalized once Logos finalizes it, which takes about 12 hours on the current network.
Publishing needs a running Logos node and a funded wallet key. See Publishing to Logos.
Rebuild a chain from Logos
$ zoner node reset # a sync needs an empty data directory
zoner syncZoner reads the published blocks back, replays each one through the EVM and checks every commitment. A node can recover from the network alone, with no trust in a server.
What the project template contains
hello-logos/
├── foundry.toml solc 0.8.20, plus a `solizone` RPC endpoint on 127.0.0.1:8545
├── src/Counter.sol an example contract with an Incremented event
├── .gitignore out/, cache/, .env
└── README.md the commands above