From a930047a102d3369c4e847d7ef43bd850704cf00 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Sun, 16 Feb 2020 16:29:29 -0500 Subject: [PATCH] Added default API key for EtherscanProvider. --- src.ts/providers/etherscan-provider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src.ts/providers/etherscan-provider.ts b/src.ts/providers/etherscan-provider.ts index 3aa388f1c..8dd31dd05 100644 --- a/src.ts/providers/etherscan-provider.ts +++ b/src.ts/providers/etherscan-provider.ts @@ -73,6 +73,7 @@ function checkLogTag(blockTag: string): number | "latest" { return parseInt(blockTag.substring(2), 16); } +const defaultApiKey = "8FG3JMZ9USS4NTA6YKEKHINU56SEPPVBJR"; export class EtherscanProvider extends BaseProvider{ readonly baseUrl: string; @@ -106,7 +107,7 @@ export class EtherscanProvider extends BaseProvider{ } defineReadOnly(this, 'baseUrl', baseUrl); - defineReadOnly(this, 'apiKey', apiKey); + defineReadOnly(this, 'apiKey', apiKey || defaultApiKey); }