Repository navigation
fix(config): replace dead RPC endpoints, use public RPCs, and add chainId validation to hardhat networks - #383
Merged
Conversation
…inId validation to hardhat networks - replace 5 dead/misconfigured RPC URLs with verified public endpoints: chiliz (rpc.chiliz.com), bobaeth (mainnet.boba.network), tworld (worldchain-sepolia.g.alchemy.com/public), phrs (rpc.pharos.xyz, also resolves TODO WIN-5781), tcelo (forno.celo-sepolia.celo-testnet.org) - switch 8 secret-backed RPC URLs (QuickNode/Bera/Monad/Somnia env vars) to public endpoints and remove the now-orphaned env destructuring - add chainId: CHAIN_IDS.* to every remote network so Hardhat's ChainIdValidatorProvider fails fast on URL/chain mismatch; dogeos left unguarded until mainnet details exist (WIN-8075) - fix swapped BERA/BERA_TESTNET chainId values (80094 mainnet, 80069 Bepolia) and swap the matching customChains usages in lockstep - rename polygonAmoy network to tmatic to match the deploy workflows' network tags, and map its etherscan verification to POLYGONSCAN_API_KEY Ticket: CECHO-2476
rithwik-bitgo
approved these changes
Oct 16, 2026
sreerajs
approved these changes
Oct 16, 2026
This branch was previously deployed
This file contains hidden or 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
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.
Summary
Full RPC liveness audit of all 121 remote networks in
hardhat.config.ts(tracked in CECHO-2476). This PR replaces 5 dead/misconfigured RPC URLs, moves 8 secret-backed RPC URLs to public endpoints, addschainIdvalidation to every remote network, and fixes the swappedBERA/BERA_TESTNETconstants.Problem
chiliz→rpc.ankr.com/chiliz: Ankr removed keyless access (401 from external probes; docs now require a key)bobaeth→boba-ethereum.gateway.tenderly.coandtworld→worldchain-sepolia.gateway.tenderly.co: Tenderly discontinued the free public gateway routes (404 externally)phrs→testnet.dplabs-internal.com: DNS repurposed to ZAN infrastructure (serves a*.zan.topTLS cert — deterministic handshake failure); also a mainnet network pointed at a testnet hostname (TODO WIN-5781)tcelo→sepolia.celoscan.io: never an RPC — it is the Celoscan explorer website (returns HTML)chainIdon network declarations → Hardhat cannot fail fast if a URL points at the wrong chainCHAIN_IDS.BERAheld 80069 (Bepolia testnet) andBERA_TESTNETheld 80094 (mainnet) — values swappedChanges
Dead URL replacements (each verified live via
eth_chainId, matchingconfig/chainIds.ts):tcelohttps://forno.celo-sepolia.celo-testnet.orgtworldhttps://worldchain-sepolia.g.alchemy.com/publicphrshttps://rpc.pharos.xyzchilizhttps://rpc.chiliz.combobaethhttps://mainnet.boba.networkSecret → public RPC URLs:
tarbeth→https://sepolia-rollup.arbitrum.io/rpc(421614),topeth→https://sepolia.optimism.io(11155420),opeth→https://mainnet.optimism.io(10),tzketh→https://sepolia.era.zksync.dev(300),bera→https://rpc.berachain.com(80094),tstt→https://dream-rpc.somnia.network(50312),mon→https://rpc.monad.xyz(143),plasma→https://rpc.plasma.to(9745). The orphaned env-var destructuring entries are removed.chainId guards:
chainId: CHAIN_IDS.*added to all 117 networks that lacked one. Hardhat now wraps each provider inChainIdValidatorProvider, which aborts withNETWORK.INVALID_GLOBAL_CHAIN_IDon the first request if the RPC's chain doesn't match — turning wrong-chain deploys/transfers into immediate hard failures.dogeosis intentionally left unguarded:CHAIN_IDS.DOGEOSis a placeholder (123456, WIN-8075) that would fail validation against the testnet RPC it currently points to.BERA swap fix:
BERA: 80094(mainnet),BERA_TESTNET: 80069(Bepolia) inconfig/chainIds.ts, with the twocustomChainsusages swapped in lockstep so the same numbers keep flowing to the matching Routescan APIs.Also included: rename the
polygonAmoyhardhat network totmatic(aligns with the network tags the deploy workflows already match on) and map its etherscan verification toPOLYGONSCAN_API_KEY.Verification
POST eth_chainId; all values matchconfig/chainIds.tsnpx hardhat compileclean;npm run lint(prettier) cleantcelo→ 11142220,bera→ 80094,tbera→ 80069 (a mismatch aborts before any request executes)Out of scope / follow-ups (CECHO-2476)
transfer_batcher_ownership,update_transfer_gas_limit,deploy_and_release,deploy_batcher_contract,push) — deliberately not done in this PRdogeoschainId once the mainnet RPC exists (WIN-8075)transfer-batcher-ownership(deployed Batcher atBATCHER_ADDRESS, current on-chain owner = deployer key, owner-address secrets present in both GitHub environments); forchiliz/bobaeth/tworld/phrs/tcelo, confirm a Batcher is actually deployed on-chain firstTicket: CECHO-2476