Skip to content

chore: improve etherscan v2 DX (configurable chainid + explicit errors) #411

Description

@sanbir

Summary

Follow-up to the Etherscan V2 migration for Contract Viewer.

Problem

After switching from the deprecated V1 endpoint to V2, there are two developer-experience gaps:

  1. chainid is hardcoded to mainnet (1), making non-mainnet usage harder.
  2. parser errors collapse to a generic etherscan response is not OK, which hides actionable upstream messages (e.g. invalid API key, unverified source, rate limits).

Proposal

  • Make chain id configurable via env (e.g. ETHERSCAN_CHAIN_ID, default 1).
  • Preserve Etherscan result/message in thrown parser errors so users can diagnose quickly.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions