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 installgit 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 deploy-chain -
Launch your nitro node
yarn start-node -
Initialize your chain
yarn initialize-chain -
(Optional) Deploy the Token Bridge
yarn deploy-token-bridge -
(Optional) Transfer ownership of the chain to the UpgradeExecutor
yarn transfer-ownership
When starting your nodes with yarn start-node, 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)
Setting the env variable ENABLE_BLOCKSCOUT to true, will start the blockscout containers when running start-node.
Blockscout will be available at http://localhost/
To clean up all data generated while running the chain, you can run the following command
yarn clean
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>