Skip to content

Commit

Permalink
Added default API key for EtherscanProvider.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 16, 2020
1 parent 4e41871 commit a930047
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src.ts/providers/etherscan-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -106,7 +107,7 @@ export class EtherscanProvider extends BaseProvider{
}

defineReadOnly(this, 'baseUrl', baseUrl);
defineReadOnly(this, 'apiKey', apiKey);
defineReadOnly(this, 'apiKey', apiKey || defaultApiKey);
}


Expand Down

0 comments on commit a930047

Please sign in to comment.