From e19f54bd66b1f2e3b4a3762122bda70b3e77a99a Mon Sep 17 00:00:00 2001 From: Daniel Lumi <149794418+zk-Lumi@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:05:49 +0100 Subject: [PATCH 1/4] feat: add explorer and portal to guide --- .husky/commit-msg | 2 +- content/tutorials/custom-zk-chain/10.index.md | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 9701dfed..4cc295a7 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,2 +1,2 @@ -bunx --no-install commitlint --edit "$1" +bunx commitlint --edit "$1" diff --git a/content/tutorials/custom-zk-chain/10.index.md b/content/tutorials/custom-zk-chain/10.index.md index c4b82528..8bde9a2f 100644 --- a/content/tutorials/custom-zk-chain/10.index.md +++ b/content/tutorials/custom-zk-chain/10.index.md @@ -206,6 +206,52 @@ 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`. +## Portal + +Once you have at least one chain initialized, you can run the [portal](https://github.com/matter-labs/dapp-portal) - a +web-app to bridge tokens between L1 and L2 and more: + +```bash +zkstack portal +``` + +ecosystem directory. You can edit this file to configure the portal app if needed. By default, portal starts on +`http://localhost:3030`, you can configure the port in `apps.yaml` file. + +## Explorer + +For better understanding of the blockchain data, you can use the +open source [block explorer](https://github.com/matter-labs/block-explorer) - a web-app to view and inspect transactions, blocks, +contracts and more. + +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 +``` + +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. By default, explorer 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, From 0b7c2e957efe3a253a58e2501fdd3fac7ff89bdc Mon Sep 17 00:00:00 2001 From: Daniel Lumi <149794418+zk-Lumi@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:07:10 +0100 Subject: [PATCH 2/4] feat: add explorer and portal to zk chain guide --- content/tutorials/custom-zk-chain/10.index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/tutorials/custom-zk-chain/10.index.md b/content/tutorials/custom-zk-chain/10.index.md index 8bde9a2f..375dbd17 100644 --- a/content/tutorials/custom-zk-chain/10.index.md +++ b/content/tutorials/custom-zk-chain/10.index.md @@ -215,6 +215,7 @@ web-app to bridge tokens between L1 and L2 and more: 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. By default, portal starts on `http://localhost:3030`, you can configure the port in `apps.yaml` file. From 3d3a4a61d1ae3366090a00d19a3c9442be6e97e1 Mon Sep 17 00:00:00 2001 From: Daniel Lumi <149794418+zk-Lumi@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:10:33 +0100 Subject: [PATCH 3/4] fix: husky accidental push --- .husky/commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 4cc295a7..9701dfed 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,2 +1,2 @@ -bunx commitlint --edit "$1" +bunx --no-install commitlint --edit "$1" From 6a4b0ad18f19b995abd7ede4dc3fc9470b325580 Mon Sep 17 00:00:00 2001 From: Daniel Lumi <149794418+zk-Lumi@users.noreply.github.com> Date: Wed, 11 Dec 2024 01:22:45 +0100 Subject: [PATCH 4/4] feat: add explorer and portal to zk chain guide --- content/tutorials/custom-zk-chain/10.index.md | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/content/tutorials/custom-zk-chain/10.index.md b/content/tutorials/custom-zk-chain/10.index.md index 375dbd17..76c99a25 100644 --- a/content/tutorials/custom-zk-chain/10.index.md +++ b/content/tutorials/custom-zk-chain/10.index.md @@ -206,24 +206,30 @@ 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`. -## Portal +## Setting up the portal -Once you have at least one chain initialized, you can run the [portal](https://github.com/matter-labs/dapp-portal) - a -web-app to bridge tokens between L1 and L2 and more: +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. By default, portal starts on +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. -## Explorer +## Setting up a block explorer -For better understanding of the blockchain data, you can use the -open source [block explorer](https://github.com/matter-labs/block-explorer) - a web-app to view and inspect transactions, blocks, -contracts and more. +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: @@ -250,7 +256,9 @@ 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. By default, explorer starts on +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