Skip to content

feat(metadata): replace Chainlist with metadata RPC directory#229

Merged
AugustoL merged 5 commits intoopenscan-explorer:release/v1.2.1-afrom
AugustoL:feat/update-metadata-v1.1.0-alpha.0
Feb 22, 2026
Merged

feat(metadata): replace Chainlist with metadata RPC directory#229
AugustoL merged 5 commits intoopenscan-explorer:release/v1.2.1-afrom
AugustoL:feat/update-metadata-v1.1.0-alpha.0

Conversation

@AugustoL
Copy link
Collaborator

Description

Replace bundled networks.json RPCs and Chainlist fetching with curated RPC endpoints from @openscan/metadata@1.1.0-alpha.0. RPCs are now fetched from the metadata CDN on startup, cached in localStorage with 24h TTL, and color-coded in Settings by tracking/open-source status.

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • MetadataService: Added fetchAllRpcs() that fetches RPC manifest + per-network files from metadata CDN, with support for both EVM (eip155:) and Bitcoin (bip122:) networks
  • rpcStorage: Added 24h TTL metadata RPC cache in localStorage; rewrote getDefaultRpcEndpoints() to use cache instead of bundled networks.json
  • AppContext: Added startup effect that checks cache freshness and fetches metadata RPCs if stale
  • networks.json: Removed all rpc.public blocks — RPCs are no longer bundled
  • networks.ts / types: Removed rpc field from NetworkMetadata and NetworkConfig
  • Settings page: Removed Chainlist fetch button; RPC tags now show provider name (with URL on hover, click to copy); tags are color-coded:
    • Green: open source & no tracking
    • Light green: closed source & no tracking
    • Yellow: tracking enabled
  • CSS: Added .rpc-opensource, .rpc-private, .rpc-tracking tag color variants and legend
  • i18n: Removed fetchButton/fetchingButton keys; added legend label keys (en + es)
  • ProfileNetworkDisplay: Removed RPC endpoints section (no longer in profile data)

Screenshots (if applicable)

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

  • User-customized RPCs (localStorage overrides) still take priority over metadata RPCs
  • Infura/Alchemy API key logic in Settings is unchanged
  • On fresh load (no cache), the app fetches metadata RPCs automatically; on subsequent loads, cached RPCs are used instantly

@github-actions
Copy link

github-actions bot commented Feb 21, 2026

🚀 Preview: https://pr-229--openscan.netlify.app
📝 Commit: 83b2f11353414b757ca3fbc6635e059b0a74f51d

@AugustoL AugustoL changed the base branch from main to release/v1.2.1-a February 21, 2026 21:24
Pin metadata package to @1.1.0-alpha.0 and update token data paths
to include /evm/ segment, matching the new multi-chain directory
structure in the metadata repository.
Replace bundled networks.json RPCs and Chainlist fetching with curated
RPC endpoints from @openscan/metadata. RPCs are fetched from the metadata
CDN on startup, cached in localStorage with 24h TTL, and color-coded in
Settings by tracking/open-source status.
@AugustoL AugustoL force-pushed the feat/update-metadata-v1.1.0-alpha.0 branch from dc936cb to 492038e Compare February 21, 2026 21:30
Move metadata RPC fetch into loadNetworkData so RPCs are resolved
before the app finishes initializing (fixes empty RPC state on first
load). Add clearMetadataRpcCache to the Settings clear-cache action.
Personal API key URLs now display as "Infura Personal" / "Alchemy
Personal" with the yellow tracking-enabled tag color.
@AugustoL AugustoL requested a review from MatiasOS February 22, 2026 12:04
Adds Polygon RPC endpoints to the metadata directory.
@AugustoL AugustoL force-pushed the feat/update-metadata-v1.1.0-alpha.0 branch from a9a21e6 to 83b2f11 Compare February 22, 2026 14:53
@AugustoL AugustoL merged commit 6a64b92 into openscan-explorer:release/v1.2.1-a Feb 22, 2026
2 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.

2 participants