diff --git a/docs/zk-stack/running-a-hyperchain/locally.md b/docs/zk-stack/running-a-hyperchain/locally.md index d3969fd931..4a250b08fc 100644 --- a/docs/zk-stack/running-a-hyperchain/locally.md +++ b/docs/zk-stack/running-a-hyperchain/locally.md @@ -114,19 +114,51 @@ You can now navigate to the displayed Portal URL (typically in your browser. `API` should be available at , `Worker` at and `Data Fetcher` at . +A free open source block explorer is available for your hyperchain. Block explorer contains three components [Worker](https://github.com/matter-labs/block-explorer/tree/main/packages/worker), [API](https://github.com/matter-labs/block-explorer/tree/main/packages/api), and [App](https://github.com/matter-labs/block-explorer/tree/main/packages/app), which you can run all together locally and connect to your hyperchain. -#### Editing environment & configuration files for block-explorer +Make sure you have your [zksync-era](https://github.com/matter-labs/zksync-era) repo set up locally and the `zk server` is running. The wizard in this guide allows you to run the server in the end. If you chose not to, you’re still able to run it by executing: -Block explorer contains three components [Worker](https://github.com/matter-labs/block-explorer/tree/main/packages/worker), [API](https://github.com/matter-labs/block-explorer/tree/main/packages/api), and [App](https://github.com/matter-labs/block-explorer/tree/main/packages/app), which you can run all together locally and connect to your hyperchain. For that, you need to set up all the necessary environment and configuration files with your hyperchain settings. You can use a script to build them. See [setting up env variables](https://github.com/matter-labs/block-explorer#%EF%B8%8F-setting-up-env-variables). +```bash +zk server --components "http_api,eth,state_keeper,housekeeper" +``` + +### Running block explorer locally + +#### Install block explorer -Once you have your [zksync-era](https://github.com/matter-labs/zksync-era) repo set up locally, you can run the following command to build environment and configuration files for block explorer based on your [zksync-era](https://github.com/matter-labs/zksync-era) repo configuration: +Clone & install the block explorer repository: ```bash -zk server --components "http_api,eth,state_keeper,housekeeper" +cd /path/to/where/you/clone/repos +git clone https://github.com/matter-labs/block-explorer.git +cd block-explorer +npm install +``` + +#### Setting up env variables + +Next you need to set up all the necessary environment and configuration files with your hyperchain settings. You can use a script to set them up: + +```bash +npm run hyperchain:configure +``` + +#### Run block explorer + +Afterwards you can run the block explorer: + +```bash +# if you are running block explorer for the first time +npm run db:create ``` -The script generates all the necessary configuration files for block-explorer, which you can edit if you need any changes. +```bash +npm run dev +``` + +#### Verify block explorer is up and running + +By default, you can access front-end `App` at in your browser. `API` should be available at , `Worker` at and `Data Fetcher` at . ## Enabling Boojum prover