Skip to content

Conversation

@sanketsaagar
Copy link

Description

  • The polygon testnet network details was wrongly configured. It was giving mumbai but the mumbai network was deprecated 2 years ago.
  • Changes made to amoy network which is the current testnet for polygon.

@cb-heimdall
Copy link

cb-heimdall commented Nov 26, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

rpc_urls={
"default": {
"http": ["https://rpc.ankr.com/polygon_mumbai"],
"http": ["https://polygon-amoy-bor-rpc.publicnode.com"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"http": ["https://polygon-amoy-bor-rpc.publicnode.com"],
"http": ["https://rpc-amoy.polygon.technology"],

"url": "https://mumbai.polygonscan.com",
"api_url": "https://api-testnet.polygonscan.com/api",
"url": "https://amoy.polygonscan.com/",
"api_url": "https://api.etherscan.io/v2/api",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"api_url": "https://api.etherscan.io/v2/api",
"api_url": "https://api-amoy.polygonscan.com/api",

"name": "PolygonScan",
"url": "https://polygonscan.com",
"api_url": "https://api.polygonscan.com/api",
"api_url": "https://api.etherscan.io/v2/api",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert

@phdargen
Copy link
Contributor

Hi @sanketsaagar, thanks for the update! Could you please align url/apiUrl with what is used in viem: https://github.com/wevm/viem/blob/main/src/chains/definitions/polygonAmoy.ts?

…itions.py

Co-authored-by: phdargen <pdargent@icloud.com>
@phdargen
Copy link
Contributor

Thanks for the update @sanketsaagar, please also change the api_urls as mentioned above

@sanketsaagar
Copy link
Author

Thanks for the update @sanketsaagar, please also change the api_urls as mentioned above

Hey @phdargen , As of August 15th, 2025, the legacy Etherscan API V1 endpoints have been deprecated in favor of the new Etherscan API V2, which introduces a unified multichain experience across 60+ supported networks.

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

You can read more here. I will be raising PR at viem as well to update the details. Thanks for sharing that with me.

@phdargen
Copy link
Contributor

Thanks for the update @sanketsaagar, please also change the api_urls as mentioned above

Hey @phdargen , As of August 15th, 2025, the legacy Etherscan API V1 endpoints have been deprecated in favor of the new Etherscan API V2, which introduces a unified multichain experience across 60+ supported networks.

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

You can read more here. I will be raising PR at viem as well to update the details. Thanks for sharing that with me.

Oh I see, thanks for the info @sanketsaagar!

@sanketsaagar
Copy link
Author

Hey @phdargen , the apiUrl is fixed here. Just FYI.

@phdargen
Copy link
Contributor

Hi @sanketsaagar, sorry just noticed the unit tests are failing.

Could you please also update polygon-mumbai in this file: python/coinbase-agentkit/coinbase_agentkit/network/init.py
and then make sure all tests pass before commiting?

cd python/coinbase-agentkit
make test

@phdargen
Copy link
Contributor

Please also add a changelog as described here: https://github.com/coinbase/agentkit/blob/main/CONTRIBUTING-PYTHON.md#changelog

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 17, 2025
@phdargen
Copy link
Contributor

Thanks for the update @sanketsaagar, seems something went wrong with the changelog as it was added to the repository root.

Could you please remove .changes/882.fixed.md again

and then run towncrier from python/coinbase-agentkit as described here: https://github.com/coinbase/agentkit/blob/main/CONTRIBUTING-PYTHON.md#changelog

and run changeset from 'typescript' as described here:
https://github.com/coinbase/agentkit/blob/main/CONTRIBUTING-TYPESCRIPT.md#changelog

This should create the changelogs in the correct file locations

@cb-heimdall
Copy link

Review Error for hoppllo94 @ 2025-12-25 06:41:08 UTC
User failed mfa authentication, either user does not exist or public email is not set on your github profile. \ see go/mfa-help

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

Labels

documentation Improvements or additions to documentation python typescript

Development

Successfully merging this pull request may close these issues.

4 participants