Skip to content

Commit b6d75d9

Browse files
authored
Removed wrong or deprecated networks, added new testnets (#94)
1 parent 8451b3e commit b6d75d9

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

packages/ethereum-viewer/src/explorer/networks.ts

+10-21
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,25 @@
33
*/
44
export const explorerApiUrls = {
55
etherscan: "https://api.etherscan.io/api",
6-
"ropsten.etherscan": "https://api-ropsten.etherscan.io/api",
7-
"rinkeby.etherscan": "https://api-rinkeby.etherscan.io/api",
8-
"goerli.etherscan": "https://api-goerli.etherscan.io/api",
9-
"kovan.etherscan": "https://api-kovan.etherscan.io/api",
106
"sepolia.etherscan": "https://api-sepolia.etherscan.io/api",
7+
"holesky.etherscan": "https://api-holesky.etherscan.io/api",
118
bscscan: "https://api.bscscan.com/api",
129
"testnet.bscscan": "https://api-testnet.bscscan.com/api",
1310
hecoinfo: "https://api.hecoinfo.com/api",
1411
"testnet.hecoinfo": "https://api-testnet.hecoinfo.com/api",
1512
ftmscan: "https://api.ftmscan.com/api",
1613
"testnet.ftmscan": "https://api-testnet.ftmscan.com/api",
1714
"optimistic.etherscan": "https://api-optimistic.etherscan.io/api",
18-
"kovan-optimistic.etherscan": "https://api-kovan-optimistic.etherscan.io/api",
15+
"sepolia-optimistic.etherscan":
16+
"https://api-sepolia-optimistic.etherscan.io/api",
1917
polygonscan: "https://api.polygonscan.com/api",
2018
"testnet.polygonscan": "https://api-testnet.polygonscan.com/api",
2119
arbiscan: "https://api.arbiscan.io/api",
22-
"testnet.arbiscan": "https://api-testnet.arbiscan.io/api",
20+
"sepolia.arbiscan": "https://api-sepolia.arbiscan.io/api",
2321
snowtrace: "https://api.snowtrace.io/api",
2422
"testnet.snowtrace": "https://api-testnet.snowtrace.io/api",
2523
cronoscan: "https://api.cronoscan.com/api",
2624
basescan: "https://api.basescan.org/api",
27-
"goerli.basescan": "https://api-goerli.basescan.org/",
2825
"sepolia.basescan": "https://api-sepolia.basescan.org/api",
2926
gnosisscan: "https://api.gnosisscan.io/api",
3027
fraxscan: "https://api.fraxscan.com/api",
@@ -41,28 +38,24 @@ export type ApiName = keyof typeof explorerApiUrls;
4138
*/
4239
export const networkNames: Record<ApiName, string> = {
4340
etherscan: "mainnet",
44-
"ropsten.etherscan": "ropsten",
45-
"rinkeby.etherscan": "rinkeby",
46-
"goerli.etherscan": "goerli",
47-
"kovan.etherscan": "kovan",
4841
"sepolia.etherscan": "sepolia",
42+
"holesky.etherscan": "holesky",
4943
bscscan: "bsc",
5044
"testnet.bscscan": "bscTestnet",
5145
hecoinfo: "heco",
5246
"testnet.hecoinfo": "hecoTestnet",
5347
ftmscan: "fantom",
5448
"testnet.ftmscan": "ftmTestnet",
5549
"optimistic.etherscan": "optimism",
56-
"kovan-optimistic.etherscan": "optimismKovan",
50+
"sepolia-optimistic.etherscan": "optimismSepolia",
5751
polygonscan: "polygon",
5852
"testnet.polygonscan": "polygonMumbai",
5953
arbiscan: "arbitrumOne",
60-
"testnet.arbiscan": "arbitrumTestnet",
54+
"sepolia.arbiscan": "arbitrumSepolia",
6155
snowtrace: "avalanche",
6256
"testnet.snowtrace": "avalancheTestnet",
6357
cronoscan: "cronos",
6458
basescan: "basescan",
65-
"goerli.basescan": "basescanGoerli",
6659
"sepolia.basescan": "basescanSepolia",
6760
gnosisscan: "gnosisscan",
6861
fraxscan: "frax",
@@ -85,17 +78,14 @@ const FRAXSCAN_KEY = "TEUJWRCAKIXQCUR7XZRKCFRH3QHH344PAM";
8578
// @todo this should be possible to override using VSCode settings
8679
export const explorerApiKeys: Record<ApiName, string> = {
8780
etherscan: ETHERSCAN_KEY,
88-
"ropsten.etherscan": ETHERSCAN_KEY,
89-
"rinkeby.etherscan": ETHERSCAN_KEY,
90-
"goerli.etherscan": ETHERSCAN_KEY,
91-
"kovan.etherscan": ETHERSCAN_KEY,
9281
"sepolia.etherscan": ETHERSCAN_KEY,
82+
"holesky.etherscan": ETHERSCAN_KEY,
9383

9484
"optimistic.etherscan": OPTIMISM_KEY,
95-
"kovan-optimistic.etherscan": OPTIMISM_KEY,
85+
"sepolia-optimistic.etherscan": OPTIMISM_KEY,
9686

9787
arbiscan: ARBISCAN_KEY,
98-
"testnet.arbiscan": ARBISCAN_KEY,
88+
"sepolia.arbiscan": ARBISCAN_KEY,
9989

10090
bscscan: BSCSCAN_KEY,
10191
"testnet.bscscan": BSCSCAN_KEY,
@@ -115,7 +105,6 @@ export const explorerApiKeys: Record<ApiName, string> = {
115105
cronoscan: CRONOSCAN_KEY,
116106

117107
basescan: BASESCAN_KEY,
118-
"goerli.basescan": BASESCAN_KEY,
119108
"sepolia.basescan": BASESCAN_KEY,
120109

121110
gnosisscan: GNOSISSCAN_KEY,

0 commit comments

Comments
 (0)