Added goerli to InfuraProvider (#421).
This commit is contained in:
parent
05648177aa
commit
16c9745326
2
package-lock.json
generated
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.");
|
||||
|
Loading…
Reference in New Issue
Block a user