diff --git a/packages/source-fetcher/lib/etherscan.ts b/packages/source-fetcher/lib/etherscan.ts index 984735ed0ef..115338e3240 100644 --- a/packages/source-fetcher/lib/etherscan.ts +++ b/packages/source-fetcher/lib/etherscan.ts @@ -51,38 +51,38 @@ const EtherscanFetcher: FetcherConstructor = class EtherscanFetcher private static readonly apiDomainsByNetworkName: { [name: string]: string } = { - "mainnet": "api.etherscan.io", - "ropsten": "api-ropsten.etherscan.io", - "kovan": "api-kovan.etherscan.io", - "rinkeby": "api-rinkeby.etherscan.io", - "goerli": "api-goerli.etherscan.io", - "optimistic": "api-optimistic.etherscan.io", + mainnet: "api.etherscan.io", + ropsten: "api-ropsten.etherscan.io", + kovan: "api-kovan.etherscan.io", + rinkeby: "api-rinkeby.etherscan.io", + goerli: "api-goerli.etherscan.io", + optimistic: "api-optimistic.etherscan.io", "kovan-optimistic": "api-kovan-optimistic.etherscan.io", - "arbitrum": "api.arbiscan.io", + arbitrum: "api.arbiscan.io", "rinkeby-arbitrum": "api-testnet.arbiscan.io", - "polygon": "api.polygonscan.com", + polygon: "api.polygonscan.com", "mumbai-polygon": "api-mumbai.polygonscan.com", - "binance": "api.bscscan.com", + binance: "api.bscscan.com", "testnet-binance": "api-testnet.bscscan.com", - "fantom": "api.ftmscan.com", + fantom: "api.ftmscan.com", "testnet-fantom": "api-testnet.ftmscan.com", - "avalanche": "api.snowtrace.io", + avalanche: "api.snowtrace.io", "fuji-avalanche": "api-testnet.snowtrace.io", - "heco": "api.hecoinfo.com", + heco: "api.hecoinfo.com", "testnet-heco": "api-testnet.hecoinfo.com", - "moonbeam": "api-moonbeam.moonscan.io", - "moonriver": "api-moonriver.moonscan.io", + moonbeam: "api-moonbeam.moonscan.io", + moonriver: "api-moonriver.moonscan.io", "moonbase-alpha": "api-moonbase.moonscan.io", - "hoo": "api.hooscan.com", - "cronos": "api.cronoscan.com", + hoo: "api.hooscan.com", + cronos: "api.cronoscan.com", "testnet-cronos": "api-testnet.cronoscan.com", - "bttc": "api.bttcscan.com", + bttc: "api.bttcscan.com", "donau-bttc": "api-testnet.bttcscan.com", - "aurora": "api.aurorascan.dev", + aurora: "api.aurorascan.dev", "testnet-aurora": "api-testnet.aurorascan.dev", - "celo": "api.celoscan.xyz", + celo: "api.celoscan.xyz", "alfajores-celo": "api-alfajores.celoscan.xyz", - "clover": "api.clvscan.com" + clover: "api.clvscan.com" }; constructor(networkId: number, apiKey: string = "") { @@ -114,6 +114,9 @@ const EtherscanFetcher: FetcherConstructor = class EtherscanFetcher address: string ): Promise { const response = await this.getSuccessfulResponse(address); + if (!response.result) { + console.log("response:\n\t%o", response); + } return EtherscanFetcher.processResult(response.result[0]); }