โš–๏ธ L2 / Sidechain Services

About Scaffold-eth Services

/services is a new (!) scaffold-eth package that pulls in backend services that you might need for local development, or even for production deployment.
Scaffold-eth uses submodules to pull in other repositories. These first need to be initiated.
yarn workspace @scaffold-eth/services submodule-init

Arbitrum

โ€‹Arbitrum is an Optimistic Rollup. This submodule (of the Arbitrum monorepo) runs a local chain, with an optimistic rollup.
To run the local setup...
โ€‹Requires Dockerโ€‹
In one terminal:
yarn workspace @scaffold-eth/services arbitrum-init
yarn workspace @scaffold-eth/services arbitrum-build-l1
yarn workspace @scaffold-eth/services arbitrum-run-l1
In a second terminal:
yarn workspace @scaffold-eth/services arbitrum-init-l2
yarn workspace @scaffold-eth/services arbitrum-run-l2
The first time may take a while as the services build!
To stop the processes, you can just run CTRL-C.
The local L1 and the Rollup are configured in both /hardhat and /react-app as localArbitrum and localArbitrumL1, so you can deploy and build out of the box!
Learn more about building on Arbitrum here.

Optimism

โ€‹optimism.io is an Optimistic Rollup. This submodule (of the Optimism monorepo) runs a local chain, with an optimistic rollup.
To run the local setup, do the following:
โ€‹Requires Dockerโ€‹
yarn workspace @scaffold-eth/services run-optimism
The first time may take a while as the services build!
The underlying services are run in the background, so you won't see anything in the terminal, but you can use Docker Desktop to inspect them.
You can stop local optimism at any time by running:
yarn workspace @scaffold-eth/services stop-optimism
The local L1 and the Rollup are configured in both /hardhat and /react-app as localOptimism and localOptimismL1, so you can deploy and build out of the box!
Learn more about building on Optimism here.

Graph Node

graph-node lets you run a node locally.
run-graph-node // runs the graph node
remove-graph-node // stops the graph node
clean-graph-node // clears the local data
Copy link
On this page
About Scaffold-eth Services
Arbitrum
Optimism
Graph Node