-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(zk_toolbox): Add block explorer support to zk_toolbox #2768
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sanekmelnikov
changed the title
feat(zk_toolbox) [WIP] Add block explorer support to zk_toolbox
feat(zk_toolbox): [WIP] Add block explorer support to zk_toolbox
Aug 29, 2024
matias-gonz
reviewed
Aug 30, 2024
matias-gonz
reviewed
Aug 30, 2024
sanekmelnikov
commented
Aug 31, 2024
Deniallugo
reviewed
Sep 2, 2024
Deniallugo
reviewed
Sep 3, 2024
zk_toolbox/crates/zk_inception/src/commands/explorer/backend.rs
Outdated
Show resolved
Hide resolved
Deniallugo
reviewed
Sep 3, 2024
sanekmelnikov
changed the title
feat(zk_toolbox): [WIP] Add block explorer support to zk_toolbox
feat(zk_toolbox): Add block explorer support to zk_toolbox
Sep 3, 2024
sanekmelnikov
requested review from
manuelmauro
and removed request for
manuelmauro
September 4, 2024 05:45
sanekmelnikov
commented
Sep 4, 2024
Deniallugo
approved these changes
Sep 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What ❔
New
zk_inception explorer
command for easy block explorer setup.Usage:
zk_inception explorer init
- initializes explorer database and creates config files (executed for all chains, unless--chain
is passed)zk_inception explorer backend
- runs backend services (api, data_fetcher, worker) required for block explorer app for a single chain (uses default chain, unless--chain
is passed)zk_inception explorer run
- runs block-explorer-app (displays all chains, unless--chain
is passed)Config structure:
Ecosystem level apps configs:
ecosystem/configs/apps.yaml
- ecosystem-level configuration for apps, edit that if you want to customize the port for portal and explorer apps.ecosystem/configs/apps/portal.config.json
- ecosystem-level configuration for portal app, edit that if you want to customize display names, tokens list, URLs, etc. for any chain for portal. Refer to the format and documentation from the dapp-portal repository.ecosystem/configs/apps/explorer.config.json
- ecosystem-level configuration for explorer app, edit that if you want to customize display names, URLs, etc. for any chain for explorer. Refer to the format from block-explorer repository.ecosystem/configs/.generated/explorer.config.js
- this file is auto-generated on everyexplorer run
and injected as a runtime config to block-explorer-app docker image for run.ecosystem/configs/.generated/portal.config.js
- this file is auto-generated on everyportal
run and injected as a runtime config to dapp-portal docker image for run.Chain level apps configs:
chain/configs/explorer-docker-compose.yml
- configures required explorer backend services as a docker compose file, edit that if you want to customize ports, parameters like batches polling interval. It's user responsibility to adjust corresponding JSON app configs if ports are changed in this file.Why ❔
Currently, running the block-explorer requires users to manually pull the repository, install all dependencies, prepare database, modify configurations, build the project, and then run it. This PR simplifies the process, allowing users to run the explorer effortlessly with a few commands.
Checklist
zk fmt
andzk lint
.