diff --git a/packages/ethereum-viewer/src/explorer/networks.ts b/packages/ethereum-viewer/src/explorer/networks.ts index 466bb68..2dac5cc 100644 --- a/packages/ethereum-viewer/src/explorer/networks.ts +++ b/packages/ethereum-viewer/src/explorer/networks.ts @@ -2,33 +2,33 @@ * mapping from DethCode subdomain to Etherscan-like API URL */ export const explorerApiUrls = { - etherscan: "https://api.etherscan.io/api", + etherscan: "https://api.etherscan.io/v2/api?chainid=1", "sepolia.etherscan": "https://api-sepolia.etherscan.io/api", "holesky.etherscan": "https://api-holesky.etherscan.io/api", - bscscan: "https://api.bscscan.com/api", + bscscan: "https://api.etherscan.io/v2/api?chainid=56", "testnet.bscscan": "https://api-testnet.bscscan.com/api", hecoinfo: "https://api.hecoinfo.com/api", "testnet.hecoinfo": "https://api-testnet.hecoinfo.com/api", ftmscan: "https://api.ftmscan.com/api", "testnet.ftmscan": "https://api-testnet.ftmscan.com/api", - "optimistic.etherscan": "https://api-optimistic.etherscan.io/api", + "optimistic.etherscan": "https://api.etherscan.io/v2/api?chainid=10", "sepolia-optimistic.etherscan": "https://api-sepolia-optimistic.etherscan.io/api", - polygonscan: "https://api.polygonscan.com/api", + polygonscan: "https://api.etherscan.io/v2/api?chainid=137", "testnet.polygonscan": "https://api-testnet.polygonscan.com/api", - arbiscan: "https://api.arbiscan.io/api", + arbiscan: "https://api.etherscan.io/v2/api?chainid=42161", "sepolia.arbiscan": "https://api-sepolia.arbiscan.io/api", snowtrace: "https://api.snowtrace.io/api", "testnet.snowtrace": "https://api-testnet.snowtrace.io/api", cronoscan: "https://api.cronoscan.com/api", - basescan: "https://api.basescan.org/api", + basescan: "https://api.etherscan.io/v2/api?chainid=8453", "sepolia.basescan": "https://api-sepolia.basescan.org/api", - gnosisscan: "https://api.gnosisscan.io/api", - fraxscan: "https://api.fraxscan.com/api", + gnosisscan: "https://api.etherscan.io/v2/api?chainid=100", + fraxscan: "https://api.etherscan.io/v2/api?chainid=252", "holesky.fraxscan": "https://api-holesky.fraxscan.com/api", - blastscan: "https://api.blastscan.io/api", + blastscan: "https://api.etherscan.io/v2/api?chainid=81457", "sepolia.blastscan": "https://api-sepolia.blastscan.io/api", - sonicscan: "https://api.sonicscan.org/api", + sonicscan: "https://api.etherscan.io/v2/api?chainid=146", "testnet.sonicscan": "https://api-testnet.sonicscan.org/api", }; @@ -80,7 +80,6 @@ const ARBISCAN_KEY = "X3ZWJBXC14HTIR3B9DNYGEUICEIKKZ9ENZ"; const POLYGONSCAN_KEY = "RV4YXDXEMIHXMC7ZXB8T82G4F56FRZ1SZQ"; const CRONOSCAN_KEY = "BGAN1CWT8E1A2XRS3FU61UP7XXFMHBWNSY"; const BASESCAN_KEY = "ICQQDUA1C8R2EZY6M4QIIV7WUEZM8INNA7"; -const GNOSISSCAN_KEY = "7PWN1FIPXW6WDSGH3PIHRW1EEU4A882QSQ"; const FRAXSCAN_KEY = "TEUJWRCAKIXQCUR7XZRKCFRH3QHH344PAM"; const BLASTSCAN_KEY = "G6DR1ZFYP54GG49SJ9GID37SFQPV96H77E"; const SONICSCAN_KEY = "QTH3YA3WFHJH76EV6KWN2PQTDJKA85PN4D"; @@ -91,13 +90,13 @@ export const explorerApiKeys: Record = { "sepolia.etherscan": ETHERSCAN_KEY, "holesky.etherscan": ETHERSCAN_KEY, - "optimistic.etherscan": OPTIMISM_KEY, + "optimistic.etherscan": ETHERSCAN_KEY, "sepolia-optimistic.etherscan": OPTIMISM_KEY, - arbiscan: ARBISCAN_KEY, + arbiscan: ETHERSCAN_KEY, "sepolia.arbiscan": ARBISCAN_KEY, - bscscan: BSCSCAN_KEY, + bscscan: ETHERSCAN_KEY, "testnet.bscscan": BSCSCAN_KEY, ftmscan: FTMSCAN_KEY, @@ -106,7 +105,7 @@ export const explorerApiKeys: Record = { hecoinfo: HECOINFO_KEY, "testnet.hecoinfo": HECOINFO_KEY, - polygonscan: POLYGONSCAN_KEY, + polygonscan: ETHERSCAN_KEY, "testnet.polygonscan": POLYGONSCAN_KEY, snowtrace: SNOWTRACE_KEY, @@ -114,17 +113,17 @@ export const explorerApiKeys: Record = { cronoscan: CRONOSCAN_KEY, - basescan: BASESCAN_KEY, + basescan: ETHERSCAN_KEY, "sepolia.basescan": BASESCAN_KEY, - gnosisscan: GNOSISSCAN_KEY, + gnosisscan: ETHERSCAN_KEY, - fraxscan: FRAXSCAN_KEY, + fraxscan: ETHERSCAN_KEY, "holesky.fraxscan": FRAXSCAN_KEY, - blastscan: BLASTSCAN_KEY, + blastscan: ETHERSCAN_KEY, "sepolia.blastscan": BLASTSCAN_KEY, - sonicscan: SONICSCAN_KEY, + sonicscan: ETHERSCAN_KEY, "testnet.sonicscan": SONICSCAN_KEY, };