This commit is contained in:
parent
44cbc7fa4e
commit
2a3a2e1fed
@ -58,17 +58,8 @@ export class AlchemyProvider extends UrlJsonRpcProvider {
|
|||||||
case "homestead":
|
case "homestead":
|
||||||
host = "eth-mainnet.alchemyapi.io/v2/";
|
host = "eth-mainnet.alchemyapi.io/v2/";
|
||||||
break;
|
break;
|
||||||
case "ropsten":
|
|
||||||
host = "eth-ropsten.alchemyapi.io/v2/";
|
|
||||||
break;
|
|
||||||
case "rinkeby":
|
|
||||||
host = "eth-rinkeby.alchemyapi.io/v2/";
|
|
||||||
break;
|
|
||||||
case "goerli":
|
case "goerli":
|
||||||
host = "eth-goerli.alchemyapi.io/v2/";
|
host = "eth-goerli.g.alchemyapi.io/v2/";
|
||||||
break;
|
|
||||||
case "kovan":
|
|
||||||
host = "eth-kovan.alchemyapi.io/v2/";
|
|
||||||
break;
|
break;
|
||||||
case "matic":
|
case "matic":
|
||||||
host = "polygon-mainnet.g.alchemy.com/v2/";
|
host = "polygon-mainnet.g.alchemy.com/v2/";
|
||||||
@ -79,18 +70,12 @@ export class AlchemyProvider extends UrlJsonRpcProvider {
|
|||||||
case "arbitrum":
|
case "arbitrum":
|
||||||
host = "arb-mainnet.g.alchemy.com/v2/";
|
host = "arb-mainnet.g.alchemy.com/v2/";
|
||||||
break;
|
break;
|
||||||
case "arbitrum-rinkeby":
|
|
||||||
host = "arb-rinkeby.g.alchemy.com/v2/";
|
|
||||||
break;
|
|
||||||
case "arbitrum-goerli":
|
case "arbitrum-goerli":
|
||||||
host = "arb-goerli.g.alchemy.com/v2/";
|
host = "arb-goerli.g.alchemy.com/v2/";
|
||||||
break;
|
break;
|
||||||
case "optimism":
|
case "optimism":
|
||||||
host = "opt-mainnet.g.alchemy.com/v2/";
|
host = "opt-mainnet.g.alchemy.com/v2/";
|
||||||
break;
|
break;
|
||||||
case "optimism-kovan":
|
|
||||||
host = "opt-kovan.g.alchemy.com/v2/";
|
|
||||||
break;
|
|
||||||
case "optimism-goerli":
|
case "optimism-goerli":
|
||||||
host = "opt-goerli.g.alchemy.com/v2/"
|
host = "opt-goerli.g.alchemy.com/v2/"
|
||||||
break;
|
break;
|
||||||
|
@ -171,20 +171,22 @@ export class EtherscanProvider extends BaseProvider{
|
|||||||
switch(this.network ? this.network.name: "invalid") {
|
switch(this.network ? this.network.name: "invalid") {
|
||||||
case "homestead":
|
case "homestead":
|
||||||
return "https:/\/api.etherscan.io";
|
return "https:/\/api.etherscan.io";
|
||||||
case "ropsten":
|
|
||||||
return "https:/\/api-ropsten.etherscan.io";
|
|
||||||
case "rinkeby":
|
|
||||||
return "https:/\/api-rinkeby.etherscan.io";
|
|
||||||
case "kovan":
|
|
||||||
return "https:/\/api-kovan.etherscan.io";
|
|
||||||
case "goerli":
|
case "goerli":
|
||||||
return "https:/\/api-goerli.etherscan.io";
|
return "https:/\/api-goerli.etherscan.io";
|
||||||
case "sepolia":
|
case "sepolia":
|
||||||
return "https:/\/api-sepolia.etherscan.io";
|
return "https:/\/api-sepolia.etherscan.io";
|
||||||
|
case "matic":
|
||||||
|
return "https:/\/api.polygonscan.com";
|
||||||
|
case "maticmum":
|
||||||
|
return "https:/\/api-testnet.polygonscan.com";
|
||||||
|
case "arbitrum":
|
||||||
|
return "https:/\/api.arbiscan.io";
|
||||||
|
case "arbitrum-goerli":
|
||||||
|
return "https:/\/api-goerli.arbiscan.io";
|
||||||
case "optimism":
|
case "optimism":
|
||||||
return "https:/\/api-optimistic.etherscan.io";
|
return "https:/\/api-optimistic.etherscan.io";
|
||||||
case "optimism-kovan":
|
case "optimism-goerli":
|
||||||
return "https:/\/api-kovan-optimistic.etherscan.io";
|
return "https:/\/api-goerli-optimistic.etherscan.io";
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,15 +87,6 @@ export class InfuraProvider extends UrlJsonRpcProvider {
|
|||||||
case "homestead":
|
case "homestead":
|
||||||
host = "mainnet.infura.io";
|
host = "mainnet.infura.io";
|
||||||
break;
|
break;
|
||||||
case "ropsten":
|
|
||||||
host = "ropsten.infura.io";
|
|
||||||
break;
|
|
||||||
case "rinkeby":
|
|
||||||
host = "rinkeby.infura.io";
|
|
||||||
break;
|
|
||||||
case "kovan":
|
|
||||||
host = "kovan.infura.io";
|
|
||||||
break;
|
|
||||||
case "goerli":
|
case "goerli":
|
||||||
host = "goerli.infura.io";
|
host = "goerli.infura.io";
|
||||||
break;
|
break;
|
||||||
@ -111,14 +102,14 @@ export class InfuraProvider extends UrlJsonRpcProvider {
|
|||||||
case "optimism":
|
case "optimism":
|
||||||
host = "optimism-mainnet.infura.io";
|
host = "optimism-mainnet.infura.io";
|
||||||
break;
|
break;
|
||||||
case "optimism-kovan":
|
case "optimism-goerli":
|
||||||
host = "optimism-kovan.infura.io";
|
host = "optimism-goerli.infura.io";
|
||||||
break;
|
break;
|
||||||
case "arbitrum":
|
case "arbitrum":
|
||||||
host = "arbitrum-mainnet.infura.io";
|
host = "arbitrum-mainnet.infura.io";
|
||||||
break;
|
break;
|
||||||
case "arbitrum-rinkeby":
|
case "arbitrum-goerli":
|
||||||
host = "arbitrum-rinkeby.infura.io";
|
host = "arbitrum-goerli.infura.io";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||||
|
Loading…
Reference in New Issue
Block a user