/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 is an Optimistic Rollup. This submodule (of the Arbitrum monorepo) runs a local chain, with an optimistic rollup.
To run the local setup...
{% hint style="info" %} Requires Docker {% endhint %}
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
{% hint style="info" %} The first time may take a while as the services build! {% endhint %}
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!
{% hint style="success" %} Learn more about building on Arbitrum here. {% endhint %}
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:
{% hint style="info" %} Requires Docker {% endhint %}
yarn workspace @scaffold-eth/services run-optimism
{% hint style="info" %} The first time may take a while as the services build! {% endhint %}
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!
{% hint style="success" %} Learn more about building on Optimism here. {% endhint %}
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