Skip to content

Commit 0e7b6cc

Browse files
shiyasmohdsaihaj
andauthored
fix: update etherscan api url and rpc (#1668)
* fix: update etherscan api url and rpc * Create stale-badgers-cover.md --------- Co-authored-by: Saihajpreet Singh <[email protected]>
1 parent ee3e79b commit 0e7b6cc

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.changeset/stale-badgers-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@graphprotocol/graph-cli": patch
3+
---
4+
5+
update etherscan api urls and rpc urls

packages/cli/src/command-helpers/abi.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const getEtherscanLikeAPIUrl = (network: string) => {
245245
case 'celo':
246246
return `https://api.celoscan.io/api`;
247247
case 'celo-alfajores':
248-
return `https://alfajores.celoscan.io/api`;
248+
return `https://api-alfajores.celoscan.io/api`;
249249
case 'gnosis':
250250
return `https://api.gnosisscan.io/api`;
251251
case 'fantom':
@@ -261,25 +261,25 @@ const getEtherscanLikeAPIUrl = (network: string) => {
261261
case 'polygon-zkevm-testnet':
262262
return `https://testnet-zkevm.polygonscan.com/api`;
263263
case 'polygon-zkevm':
264-
return `https://zkevm.polygonscan.com/api`;
264+
return `https://api-zkevm.polygonscan.com/api`;
265265
case 'sepolia':
266266
return `https://api-sepolia.etherscan.io/api`;
267267
case 'scroll-sepolia':
268268
return `https://api-sepolia.scrollscan.dev/api`;
269269
case 'optimism-sepolia':
270270
return `https://api-sepolia-optimistic.etherscan.io/api`;
271271
case 'scroll':
272-
return `https://blockscout.scroll.io/api`;
272+
return `https://api.scrollscan.com/api`;
273273
case 'linea':
274274
return `https://api.lineascan.build/api`;
275275
case 'linea-sepolia':
276276
return 'https://api-sepolia.lineascan.build/api';
277277
case 'linea-goerli':
278278
return `https://api.linea-goerli.build/api`;
279279
case 'blast-testnet':
280-
return `https://api.routescan.io/v2/network/testnet/evm/168587773/etherscan/api`;
280+
return `https://api-sepolia.blastscan.io/api`;
281281
case 'blast-mainnet':
282-
return `https://api.routescan.io/v2/network/mainnet/evm/81457/etherscan/api`;
282+
return `https://api.blastscan.io/api`;
283283
case 'etherlink-testnet':
284284
return `https://testnet-explorer.etherlink.com/api`;
285285
case 'polygon-amoy':
@@ -292,6 +292,10 @@ const getEtherscanLikeAPIUrl = (network: string) => {
292292
return `https://sepolia.explorer.mode.network/api`;
293293
case 'fuse':
294294
return 'https://explorer.fuse.io/api';
295+
case 'astar-zkevm-mainnet':
296+
return `https://astar-zkevm.explorer.startale.com/api`;
297+
case 'polygon-zkevm-cardona':
298+
return `https://api-cardona-zkevm.polygonscan.com/api`;
295299
default:
296300
return `https://api-${network}.etherscan.io/api`;
297301
}
@@ -315,7 +319,7 @@ const getPublicRPCEndpoint = (network: string) => {
315319
case 'base-sepolia':
316320
return 'https://sepolia.base.org';
317321
case 'base':
318-
return 'https://rpc.base.org';
322+
return 'https://mainnet.base.org';
319323
case 'bsc':
320324
return 'https://bsc-dataseed.binance.org';
321325
case 'celo':
@@ -398,6 +402,10 @@ const getPublicRPCEndpoint = (network: string) => {
398402
return `https://mainnet.mode.network`;
399403
case 'mode-sepolia':
400404
return `https://sepolia.mode.network`;
405+
case 'astar-zkevm-mainnet':
406+
return `https://1rpc.io/astr`;
407+
case 'polygon-zkevm-cardona':
408+
return `https://rpc.cardona.zkevm-rpc.com`;
401409
default:
402410
throw new Error(`Unknown network: ${network}`);
403411
}

0 commit comments

Comments
 (0)