Skip to content

Conversation

@sanketsaagar
Copy link

@sanketsaagar sanketsaagar commented Dec 13, 2025

  • This PR fixes the apiUrl for polygon networks. After the migration of Ethereum api to v2, now we have to use a fixed apiUrl link for all the chains proceeding to which, only the chainID need to changed.

That means we now have to use https://api.etherscan.io/v2/api as your base path, and include a chainid for your target network (e.g., 1 for Ethereum).

So just to give you an example for polygon it should look like
https://api.etherscan.io/v2/api?chainid=137&action=balance&apikey=YourEtherscanApiKey

And for Amoy it should look like
https://api.etherscan.io/v2/api?chainid=80002&action=balance&apikey=YourEtherscanApiKey

@changeset-bot
Copy link

changeset-bot bot commented Dec 13, 2025

🦋 Changeset detected

Latest commit: 63dbd93

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant