Clone the ethereum-optimism/optimism repository and build op-program and cannon:
$ cd /path/to/your/workspace
$ git clone [email protected]:ethereum-optimism/optimism.git
$ cd optimism
$ make op-program cannon
$ cd cannon
$ ./bin/cannon load-elf --path=../op-program/bin/op-program-client.elf
Configure the environment variables in the .env
file:
OPTIMISM_DIR=/path/to/ethereum-optimsm/optimism
Create a foundry test wallet (based on the default anvil mnemonic):
cast wallet import TEST --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Install kurtosis (required for creating a local devnet).
$ just build
$ just create-devnet
Config files must follow the format described in the optimism-package repository.
$ just devnet-config-file=devnet/minimal.yaml create-devnet
$ just cleanup-devnet
$ just name=<script name> script-args="<script args>" generate-fixture
# Example
$ just name=Reader script-args="2000000" generate-fixture
$ just name=<script name> script-args="<script args>" run-fixture
# Example
$ just name=Reader script-args="2000000" run-fixture
$ just fixture-file=<fixture file> run-fixture
# Example
$ just fixture-file=fixtures/Reader-2000000.json run-fixture
$ just name=<script name> script-args="<script args>" cannon-fixture
# Example
$ just name=Reader script-args="2000000" cannon-fixture
$ just fixture-file=<fixture file> run-fixture
# Example
$ just fixture-file=fixtures/Reader-2000000.json cannon-fixture