Updated third-party provider network URLs (#4542).

This commit is contained in:
Richard Moore 2024-01-15 23:06:21 -05:00
parent 4efef76e8c
commit 84ca14f1ff
3 changed files with 83 additions and 4 deletions

@ -1,8 +1,27 @@
/** /**
* About Alchemy * [[link-alchemy]] provides a third-party service for connecting to
* various blockchains over JSON-RPC.
*
* **Supported Networks**
*
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)
* - Base (``base``)
* - Base Goerlia Testnet (``base-goerli``)
* - Base Sepolia Testnet (``base-sepolia``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Optimism Sepolia Testnet (``optimism-sepolia``)
* - Polygon (``matic``)
* - Polygon Mumbai Testnet (``matic-mumbai``)
* *
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy] * @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
*/ */
import { import {
defineProperties, resolveProperties, assert, assertArgument, defineProperties, resolveProperties, assert, assertArgument,
FetchRequest FetchRequest
@ -32,10 +51,14 @@ function getHost(name: string): string {
return "arb-mainnet.g.alchemy.com"; return "arb-mainnet.g.alchemy.com";
case "arbitrum-goerli": case "arbitrum-goerli":
return "arb-goerli.g.alchemy.com"; return "arb-goerli.g.alchemy.com";
case "arbitrum-sepolia":
return "arb-sepolia.g.alchemy.com";
case "base": case "base":
return "base-mainnet.g.alchemy.com"; return "base-mainnet.g.alchemy.com";
case "base-goerli": case "base-goerli":
return "base-goerli.g.alchemy.com"; return "base-goerli.g.alchemy.com";
case "base-sepolia":
return "base-sepolia.g.alchemy.com";
case "matic": case "matic":
return "polygon-mainnet.g.alchemy.com"; return "polygon-mainnet.g.alchemy.com";
case "matic-mumbai": case "matic-mumbai":
@ -44,6 +67,8 @@ function getHost(name: string): string {
return "opt-mainnet.g.alchemy.com"; return "opt-mainnet.g.alchemy.com";
case "optimism-goerli": case "optimism-goerli":
return "opt-goerli.g.alchemy.com"; return "opt-goerli.g.alchemy.com";
case "optimism-sepolia":
return "opt-sepolia.g.alchemy.com";
} }
assertArgument(false, "unsupported network", "network", name); assertArgument(false, "unsupported network", "network", name);

@ -6,8 +6,18 @@
* *
* - Ethereum Mainnet (``mainnet``) * - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``) * - Goerli Testnet (``goerli``)
* - Polygon (``matic``) * - Sepolia Testnet (``sepolia``)
* - Arbitrum (``arbitrum``) * - Arbitrum (``arbitrum``)
* - Base (``base``)
* - Base Goerlia Testnet (``base-goerli``)
* - Base Sepolia Testnet (``base-sepolia``)
* - BNB (``bnb``)
* - BNB Testnet (``bnbt``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Optimism Sepolia Testnet (``optimism-sepolia``)
* - Polygon (``matic``)
* - Polygon Mumbai Testnet (``matic-mumbai``)
* *
* @_subsection: api/providers/thirdparty:Ankr [providers-ankr] * @_subsection: api/providers/thirdparty:Ankr [providers-ankr]
*/ */
@ -33,10 +43,31 @@ function getHost(name: string): string {
return "rpc.ankr.com/eth"; return "rpc.ankr.com/eth";
case "goerli": case "goerli":
return "rpc.ankr.com/eth_goerli"; return "rpc.ankr.com/eth_goerli";
case "matic": case "sepolia":
return "rpc.ankr.com/polygon"; return "rpc.ankr.com/eth_sepolia";
case "arbitrum": case "arbitrum":
return "rpc.ankr.com/arbitrum"; return "rpc.ankr.com/arbitrum";
case "base":
return "rpc.ankr.com/base";
case "base-goerli":
return "rpc.ankr.com/base_goerli";
case "base-sepolia":
return "rpc.ankr.com/base_sepolia";
case "bnb":
return "rpc.ankr.com/bsc";
case "bnbt":
return "rpc.ankr.com/bsc_testnet_chapel";
case "matic":
return "rpc.ankr.com/polygon";
case "matic-mumbai":
return "rpc.ankr.com/polygon_mumbai";
case "optimism":
return "rpc.ankr.com/optimism";
case "optimism-goerli":
return "rpc.ankr.com/optimism_testnet";
case "optimism-sepolia":
return "rpc.ankr.com/optimism_sepolia";
} }
assertArgument(false, "unsupported network", "network", name); assertArgument(false, "unsupported network", "network", name);

@ -9,8 +9,17 @@
* - Sepolia Testnet (``sepolia``) * - Sepolia Testnet (``sepolia``)
* - Arbitrum (``arbitrum``) * - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``) * - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)
* - Base (``base``)
* - Base Goerlia Testnet (``base-goerli``)
* - Base Sepolia Testnet (``base-sepolia``)
* - BNB (``bnb``)
* - BNB Testnet (``bnbt``)
* - Linea (``linea``)
* - Linea Goerlia Testnet (``linea-goerli``)
* - Optimism (``optimism``) * - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``) * - Optimism Goerli Testnet (``optimism-goerli``)
* - Optimism Sepolia Testnet (``optimism-sepolia``)
* - Polygon (``matic``) * - Polygon (``matic``)
* - Polygon Mumbai Testnet (``matic-mumbai``) * - Polygon Mumbai Testnet (``matic-mumbai``)
* *
@ -45,6 +54,18 @@ function getHost(name: string): string {
return "arbitrum-mainnet.infura.io"; return "arbitrum-mainnet.infura.io";
case "arbitrum-goerli": case "arbitrum-goerli":
return "arbitrum-goerli.infura.io"; return "arbitrum-goerli.infura.io";
case "arbitrum-sepolia":
return "arbitrum-sepolia.infura.io";
case "base":
return "base-mainnet.infura.io";
case "base-goerlia":
return "base-goerli.infura.io";
case "base-sepolia":
return "base-sepolia.infura.io";
case "bnb":
return "bnbsmartchain-mainnet.infura.io";
case "bnbt":
return "bnbsmartchain-testnet.infura.io";
case "linea": case "linea":
return "linea-mainnet.infura.io"; return "linea-mainnet.infura.io";
case "linea-goerli": case "linea-goerli":
@ -57,6 +78,8 @@ function getHost(name: string): string {
return "optimism-mainnet.infura.io"; return "optimism-mainnet.infura.io";
case "optimism-goerli": case "optimism-goerli":
return "optimism-goerli.infura.io"; return "optimism-goerli.infura.io";
case "optimism-sepolia":
return "optimism-sepolia.infura.io";
} }
assertArgument(false, "unsupported network", "network", name); assertArgument(false, "unsupported network", "network", name);