Skip to content

Comments

fix: bump etherscan api to v2#398

Open
imqdee wants to merge 2 commits intoduneanalytics:mainfrom
imqdee:fix/bump-etherscan-api-v2
Open

fix: bump etherscan api to v2#398
imqdee wants to merge 2 commits intoduneanalytics:mainfrom
imqdee:fix/bump-etherscan-api-v2

Conversation

@imqdee
Copy link

@imqdee imqdee commented Nov 13, 2025

The use of version 2 of the Etherscan API is now mandatory.
This update is required for the contract viewer page to function.

@vercel
Copy link

vercel bot commented Nov 13, 2025

@imqdee is attempting to deploy a commit to the Duneanalytics Team on Vercel.

A member of the Team first needs to authorize it.

@sanbir
Copy link

sanbir commented Feb 15, 2026

Follow-up implemented in my fork for issue #411:

  • commit: 047ef6c (chore: improve etherscan v2 chainid and error handling)
  • branch: sanbir/fix/bump-etherscan-api-v2

Could you please cherry-pick this commit into this PR branch so #398 also includes configurable chainid and clearer Etherscan error messages?

git cherry-pick 047ef6c

I can’t push directly to imqdee/evm.codes from my account (Permission denied).

@sanbir
Copy link

sanbir commented Feb 15, 2026

Opened helper PR with the follow-up commit here: imqdee#1

If that PR is merged, this PR (#398) will automatically include the changes.

@cursor
Copy link

cursor bot commented Feb 18, 2026

PR Summary

Medium Risk
Changes how external Etherscan requests are formed (endpoint + required chainid), which can break contract-source fetching if env vars or query formatting are wrong; otherwise the change set is small.

Overview
Updates the Etherscan integration to call the mandatory v2 API endpoint (/v2/api) and includes a configurable chainid (via ETHERSCAN_CHAIN_ID, defaulting to 1) in all requests.

Refactors query construction to ensure all parameters are stringified and adds a safer default for missing APIKEY_ETHERSCAN. Improves etherscanParse failures by surfacing the underlying Etherscan error message/result in the thrown error string.

Written by Cursor Bugbot for commit 855cad5. Configure here.

@imqdee
Copy link
Author

imqdee commented Feb 18, 2026

thanks @sanbir , your changes has been included

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