Added matic support to INFURA and Alchemy (#1546).
This commit is contained in:
parent
bc5cc2e7e3
commit
576e9b54ab
@ -70,6 +70,12 @@ export class AlchemyProvider extends UrlJsonRpcProvider {
|
||||
case "kovan":
|
||||
host = "eth-kovan.alchemyapi.io/v2/";
|
||||
break;
|
||||
case "matic":
|
||||
host = "polygon-mainnet.g.alchemy.com/v2/";
|
||||
break;
|
||||
case "maticmum":
|
||||
host = "polygon-mumbai.g.alchemy.com/v2/";
|
||||
break;
|
||||
default:
|
||||
logger.throwArgumentError("unsupported network", "network", arguments[0]);
|
||||
}
|
||||
|
@ -99,6 +99,12 @@ export class InfuraProvider extends UrlJsonRpcProvider {
|
||||
case "goerli":
|
||||
host = "goerli.infura.io";
|
||||
break;
|
||||
case "matic":
|
||||
host = "polygon-mainnet.infura.io";
|
||||
break;
|
||||
case "maticmum":
|
||||
host = "polygon-mumbai.infura.io";
|
||||
break;
|
||||
default:
|
||||
logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||
argument: "network",
|
||||
|
Loading…
Reference in New Issue
Block a user