Uh oh!
There was an error while loading. Please reload this page.
feat(network): --explorer override for custom networks (stop inheriting base explorer) - #393
Conversation
…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).
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
MuncleUscles
commented
Jul 10, 2026
/run-e2e |
Uh oh!
There was an error while loading. Please reload this page.
Problem
A custom network profile inherited its base chain's block explorer. So a pre-clarke profile based on
testnet-bradburyshowedexplorer-bradbury.genlayer.comingenlayer 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>ongenlayer network add— validated (http/https), stored on the profile asoverrides.explorer.applyCustomNetworkProfilesetsblockExplorersonly from--explorer; when omitted, it blanks it (sonetwork infoshows no misleading link). Built-in networks are unaffected — they don't go through the custom-profile path.Notes
tscerrors in the touched files (a narrowing cast inparseDeploymentObject; a spy typing in thegetNetworktest).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.