Local development network
Instructions on how to run a local development network

Setting up a localhost EVM+ Node


The tooling needed in order to successfully run a local EVM+ development network are:
NOTE: If you are using a Mac device with Apple silicon, you might need to install rosetta in order to be able to use the required tools.

Starting the network node

To be able to run the local development network, you need to clone our bodhi.js monorepo. Fortunately the network resides within the evm-subql directory, so the full project doesn't have to be built. As the monorepo contains submodules, we recommend cloning them as well:
git clone --recurse-submodules [email protected]:AcalaNetwork/bodhi.js.git
cd bodhi.js
NOTE: We suggest regularly running git pull and re-running update and build tasks in order to use the latest version of the local development network.
The local development network consists of Mandala node, Postgres database, SubQuery node and GraphQL engine. The docker compose script that runs and connects them resides within the evm-subql directory. To spin them up, use:
cd evm-subql
yarn build
docker compose up
Running a local development network
NOTE: Use Control + c combination of keys to shut down the node.
In order to have a clean start after every shutdown of the node, run the following command after the node was shut down:
docker compose down -v
Cleaning up the local development network

Starting the RPC node

In addition to the local development network, we need to run an Ethereum RPC adapter, so that the tools used to interact with most of the EVMs work (these tools include, Metamask, Remix, development frameworks, block explorers,..). We run it in another window by using:
npx @acala-network/eth-rpc-adapter -l 1 --subql http://localhost:3001
Starting up the RPC node
If you wish to learn more about the RPC adapter, you can find the info in the RPC adapter documentation.

The local development network services

Once the local development network is up and running, the following services are available:
Local development network in Substrate chain explorer
You can now setup Metamask on localhost and interact with your local setup.
Try a few of the EVM tutorials to get familiar with the responses each terminal window provides as feedback.
Copy link
Setting up a localhost EVM+ Node
Starting the network node
Starting the RPC node
The local development network services