Added goerli to InfuraProvider (#421).

This commit is contained in:
Richard Moore 2019-03-08 14:28:39 -05:00
parent 05648177aa
commit 16c9745326
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
5 changed files with 6 additions and 14 deletions

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "ethers",
"version": "4.0.26",
"version": "4.0.27",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "ethers",
"version": "4.0.26",
"version": "4.0.27",
"description": "Ethereum wallet library.",
"main": "./index.js",
"types": "./index.d.ts",

@ -32,6 +32,9 @@ export class InfuraProvider extends JsonRpcProvider {
case 'rinkeby':
host = 'rinkeby.infura.io';
break;
case 'goerli':
host = 'goerli.infura.io';
break;
case 'kovan':
host = 'kovan.infura.io';
break;

@ -86,12 +86,7 @@ const networks: { [name: string]: Network } = {
chainId: 5,
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
name: "goerli",
_defaultProvider: (providers: any): any => {
if (providers.EtherscanProvider) {
return new providers.EtherscanProvider("goerli");
}
return null;
}
_defaultProvider: ethDefaultProvider('goerli')
},
kovan: {

@ -414,12 +414,6 @@ function testProvider(providerName, networkName) {
['default', 'homestead', 'ropsten', 'rinkeby', 'kovan', 'goerli'].forEach(function(networkName) {
['getDefaultProvider', 'InfuraProvider', 'EtherscanProvider', 'Web3Provider'].forEach(function(providerName) {
if (networkName === "goerli") {
if (providerName === "InfuraProvider" || providerName === "Web3Provider") {
return;
}
}
// @TODO: Remove this! Temporary because Etherscan is down
//if (providerName === 'EtherscanProvider') {
// console.log("******** Remove this soon! Etherscan is having issues.");