Skip to content

Commit ea6805f

Browse files
sanketsaagarjxom
andauthored
fix: apiUrl for polygon networks (#4155)
* Fixed apiUrl for polygon networks * Added the changeset * Update nice-clowns-eat.md --------- Co-authored-by: jxom <[email protected]>
1 parent 3b91dc2 commit ea6805f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/nice-clowns-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": patch
3+
---
4+
5+
Fixed Polygon Amoy and Mainnet explorer API URLs.

src/chains/definitions/polygon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const polygon = /*#__PURE__*/ defineChain({
1414
default: {
1515
name: 'PolygonScan',
1616
url: 'https://polygonscan.com',
17-
apiUrl: 'https://api.polygonscan.com/api',
17+
apiUrl: 'https://api.etherscan.io/v2/api',
1818
},
1919
},
2020
contracts: {

src/chains/definitions/polygonAmoy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const polygonAmoy = /*#__PURE__*/ defineChain({
1313
default: {
1414
name: 'PolygonScan',
1515
url: 'https://amoy.polygonscan.com',
16-
apiUrl: 'https://api-amoy.polygonscan.com/api',
16+
apiUrl: 'https://api.etherscan.io/v2/api',
1717
},
1818
},
1919
contracts: {

0 commit comments

Comments
 (0)