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:
chainid is hardcoded to mainnet (1), making non-mainnet usage harder.
- 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