Skip to content

Commit 1fb675c

Browse files
authored
etherscan api & public rpc url added for amoy,chiado,mode networks (#1640)
* etherscan api & public rpc url added for amoy,chiado,mode networks * version patch bump added
1 parent 7d4208a commit 1fb675c

File tree

3 files changed

+44
-22
lines changed

3 files changed

+44
-22
lines changed

.changeset/friendly-lamps-help.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphprotocol/graph-cli': patch
3+
---
4+
5+
Added Etherscan like API url and Public RPC endpoints for Polygon Amoy,Gnosis Chiado,Mode Mainnet,
6+
Mode Sepolia chains for fetching startBlock and ABI

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ const getEtherscanLikeAPIUrl = (network: string) => {
237237
return `https://api.routescan.io/v2/network/mainnet/evm/81457/etherscan/api`;
238238
case 'etherlink-testnet':
239239
return `https://testnet-explorer.etherlink.com/api`;
240+
case 'polygon-amoy':
241+
return `https://api-amoy.polygonscan.com/api`;
242+
case 'gnosis-chiado':
243+
return `https://gnosis-chiado.blockscout.com/api`;
244+
case 'mode-mainnet':
245+
return `https://explorer.mode.network/api`;
246+
case 'mode-sepolia':
247+
return `https://sepolia.explorer.mode.network/api`;
240248
default:
241249
return `https://api-${network}.etherscan.io/api`;
242250
}
@@ -333,6 +341,14 @@ const getPublicRPCEndpoint = (network: string) => {
333341
return 'https://sepolia.optimism.io';
334342
case 'etherlink-testnet':
335343
return `https://node.ghostnet.etherlink.com`;
344+
case 'polygon-amoy':
345+
return `https://rpc-amoy.polygon.technology`;
346+
case 'gnosis-chiado':
347+
return `https://rpc.chiadochain.net`;
348+
case 'mode-mainnet':
349+
return `https://mainnet.mode.network`;
350+
case 'mode-sepolia':
351+
return `https://sepolia.mode.network`;
336352
default:
337353
throw new Error(`Unknown network: ${network}`);
338354
}

pnpm-lock.yaml

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)