This repository contains everything that's needed to start playing with Orbit chains: deployment of contracts, customizing and building your nitro node and starting up your chain.
-
Clone the repository
git clone https://github.com/TucksonDev/orbit-playground.git
-
Install dependencies
yarn install
git submodule update --init --recursive --force
Make a copy of the .env.example
file and call it .env
. Then, make sure you set a private key for the Chain owner, Batch poster and Staker accounts. You can leave the rest of options with their default, or customize any of them.
-
Deploy the contracts
yarn run deployChain
-
Launch your nitro node
docker compose up
-
Initialize your chain
yarn run initialize
-
(Optional) Deploy the Token Bridge
yarn run deployTokenBridge
When starting your nodes with docker compose up
, up to four containers will start:
batch-poster
: the sequencer/batch-poster for your chainstaker
: the validator/staker for your chainrpc
: a regular RPC node for your chaindas-server
: a Data Availability Server if you're running an AnyTrust chain
You can manage each individual container with the following commands:
docker compose stop <container>
: stops the specified containerdocker compose start <container>
: starts the specified containerdocker compose restart <container>
: restarts the specified containerdocker compose create <container>
: creates the specified container (in case it's been removed)
When you modify the State Transition Function (STF) of your node, you have to update the WASM module root on-chain. You can find more information about what this means in the Arbitrum documentation portal.
Follow these steps to complete the process.
-
Obtain the new WASM module root
yarn run buildNitro
-
Update the WASM module root
yarn run updateWASM <WASM module root>