Skip to content

feat(network): --explorer override for custom networks (stop inheriting base explorer)#393

Merged
MuncleUscles merged 1 commit into
v0.40-devfrom
feat/network-explorer-override
Jul 10, 2026
Merged

feat(network): --explorer override for custom networks (stop inheriting base explorer)#393
MuncleUscles merged 1 commit into
v0.40-devfrom
feat/network-explorer-override

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Problem

A custom network profile inherited its base chain's block explorer. So a pre-clarke profile based on testnet-bradbury showed explorer-bradbury.genlayer.com in genlayer network info — misleading, because that explorer never indexed the custom deployment's transactions. An operator clicking through would look for their pre-clarke txs in the wrong place.

Fix

  • --explorer <url> on genlayer network add — validated (http/https), stored on the profile as overrides.explorer.
  • Custom profiles no longer inherit the base explorer. applyCustomNetworkProfile sets blockExplorers only from --explorer; when omitted, it blanks it (so network info shows no misleading link). Built-in networks are unaffected — they don't go through the custom-profile path.

Notes

  • Also cleans up two pre-existing tsc errors in the touched files (a narrowing cast in parseDeploymentObject; a spy typing in the getNetwork test).

Test

778 passed (+3 explorer cases: stores + applies the override via resolveNetwork; verifies a custom network does not inherit the base explorer; rejects an invalid URL). tsc clean on the changed files; build inlines fine.

…ng the base explorer

A custom network profile inherited its base chain's block explorer (e.g. a
pre-clarke profile based on bradbury showed explorer-bradbury.genlayer.com in
`network info`) — misleading, since that explorer never indexed the custom
deployment's transactions.

- Add `--explorer <url>` to `network add` (validated http(s); stored on the
  profile as overrides.explorer).
- applyCustomNetworkProfile no longer inherits the base explorer for custom
  profiles: it sets blockExplorers ONLY from --explorer, otherwise blanks it.
  Built-in networks are unaffected (they don't go through this path).

Also fixes two pre-existing tsc errors in the touched files (a narrowing cast
in parseDeploymentObject; a spy typing in the getNetwork test).

Tests: 778 passed (+3 explorer cases: stores+applies override, no-inherit
default, invalid-URL rejection).
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4374faf3-3593-4f6d-b8e1-bc2e2ba6f14d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/network-explorer-override

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e

@MuncleUscles MuncleUscles merged commit 015e6d4 into v0.40-dev Jul 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant