Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add explorer and portal to zk chain getting started code guide #104

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions content/tutorials/custom-zk-chain/10.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,61 @@ zkstack server

With this, your L1 chain should be running at port `8545`, and the `zk_chain_1` node should be running at port `3050`.

## Setting up the portal

The [Portal](https://github.com/matter-labs/dapp-portal) module is a web-app that allows you to:

- Bridge & transfer tokens to your ZK chain.
- View balances.
- Add contacts for quick and easy access.

Once you have at least one chain initialized, you can run the portal app locally:

```bash
zkstack portal
```

This command will start the dockerized portal app using configuration from `apps/portal.config.json` file inside your
ecosystem directory. You can edit this file to configure the portal app if needed.

You can now navigate to the portal web-app. By default, portal frontend starts on
`http://localhost:3030`, you can configure the port in `apps.yaml` file.

## Setting up a block explorer

A block explorer is a web-app that lets you view and inspect transactions, blocks,
contracts and more. A [free open source block explorer](https://github.com/matter-labs/block-explorer) is available for your ZK chain.

First, each chain should be initialized:

```bash
zkstack explorer init
```

This command creates a database to store explorer data and generates a docker compose file with explorer services
(`explorer-docker-compose.yml`).

Next, for each chain you want to have an explorer, you need to start its backend services:

```bash
zkstack explorer backend --chain <chain_name>
```

This command uses previously created docker compose file to start the services (api, data fetcher, worker) required for
the explorer.

Finally, you can run the explorer app:

```bash
zkstack explorer run
```

This command will start the dockerized explorer app using configuration from `apps/explorer.config.json` file inside
your ecosystem directory. You can edit this file to configure the app if needed.

You can now navigate to the explorer web-app. By default, explorer frontend starts on
`http://localhost:3010`, you can configure the port in `apps.yaml` file.

## Funding a wallet on your chain

Because you chose to use a local reth node for your L1 and selected ETH as the base asset,
Expand Down
Loading