Skip to content

feat: add fallback RPC endpoint for viem clients#518

Merged
ECWireless merged 3 commits intomainfrom
347-add-fallback-rpc-endpoint-for-improved-reliability
Jan 30, 2026
Merged

feat: add fallback RPC endpoint for viem clients#518
ECWireless merged 3 commits intomainfrom
347-add-fallback-rpc-endpoint-for-improved-reliability

Conversation

@ECWireless
Copy link
Copy Markdown
Collaborator

@ECWireless ECWireless commented Jan 30, 2026

Since the NEXT_PUBLIC_L1_RPC_URL and NEXT_PUBLIC_L2_RPC_URL are not being utilized currently, this PR allows them to be added as fallback RPCs when viem clients are being used. A ticket for removing ethers entirely is at #517 .

This PR also removes all references to goerli.

Copilot AI review requested due to automatic review settings January 30, 2026 05:22
@ECWireless ECWireless linked an issue Jan 30, 2026 that may be closed by this pull request
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Jan 30, 2026 9:34pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for multiple RPC endpoints (including NEXT_PUBLIC_L1_RPC_URL / NEXT_PUBLIC_L2_RPC_URL) and wires them into viem public clients via a fallback transport, while updating ethers providers to use the primary RPC.

Changes:

  • Replace single-string INFURA_NETWORK_URLS with array-based NETWORK_RPC_URLS (env RPC + Infura).
  • Use viem’s fallback() transport for l1PublicClient and l2PublicClient.
  • Update ethers JsonRpcProviders (including the shared provider in lib/utils.tsx) to use the primary RPC URL.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lib/utils.tsx Switches the shared ethers JsonRpcProvider to use the first URL in NETWORK_RPC_URLS.
lib/chains.ts Introduces NETWORK_RPC_URLS arrays and applies viem fallback transport + updates provider RPC selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-project-automation github-project-automation bot moved this from In Review to Todo in Explorer Revamp Jan 30, 2026
@ECWireless ECWireless moved this from Todo to In Review in Explorer Revamp Jan 30, 2026
@ECWireless ECWireless merged commit 86eff66 into main Jan 30, 2026
7 checks passed
@ECWireless ECWireless deleted the 347-add-fallback-rpc-endpoint-for-improved-reliability branch January 30, 2026 21:40
@github-project-automation github-project-automation bot moved this from In Review to Done in Explorer Revamp Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Add Fallback RPC Endpoint for Improved Reliability

3 participants