Skip to content

Commit

Permalink
Updated thrid-part provider URLs for QuickNode.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jan 17, 2024
1 parent fed28e4 commit 2b4891d
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src.ts/_tests/test-providers-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,23 @@ describe("Test Provider Transaction operations", function() {

describe("Test Networks", function() {
const networks = [
"mainnet", "goerli", "sepolia",
"arbitrum", "arbitrum-goerli", "arbitrum-sepolia",
"base", "base-goerli", "base-sepolia",
"bnb", "bnbt",
"linea", "linea-goerli",
"matic", "matic-mumbai",
"optimism", "optimism-goerli", "optimism-sepolia",
"xdai",
];

const providerNames = [
"AlchemyProvider", "InfuraProvider", "AnkrProvider"
"AlchemyProvider", "InfuraProvider", "AnkrProvider",
"QuickNodeProvider",
];

for (const networkName of networks) {
for (const providerName of providerNames) {
for (const providerName of providerNames) {
for (const networkName of networks) {
const network = Network.from(networkName);
const provider = getProvider(providerName, networkName);
if (provider == null || !(provider instanceof JsonRpcProvider)) { continue; }
Expand Down
4 changes: 2 additions & 2 deletions src.ts/providers/provider-infura.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* - Base (``base``)
* - Base Goerlia Testnet (``base-goerli``)
* - Base Sepolia Testnet (``base-sepolia``)
* - BNB (``bnb``)
* - BNB Testnet (``bnbt``)
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
* - Linea (``linea``)
* - Linea Goerlia Testnet (``linea-goerli``)
* - Optimism (``optimism``)
Expand Down
59 changes: 57 additions & 2 deletions src.ts/providers/provider-quicknode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@
*
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)
* - Base Mainnet (``base``);
* - Base Goerli Testnet (``base-goerli``);
* - Base Sepolia Testnet (``base-sepolia``);
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Optimism Sepolia Testnet (``optimism-sepolia``)
* - Polygon (``matic``)
* - Polygon Mumbai Testnet (``matic-mumbai``)
*
Expand Down Expand Up @@ -37,13 +45,26 @@ function getHost(name: string): string {
return "ethers.quiknode.pro";
case "goerli":
return "ethers.ethereum-goerli.quiknode.pro";
//case "sepolia":
// return "sepolia.infura.io";
case "sepolia":
return "ethers.ethereum-sepolia.quiknode.pro";


case "arbitrum":
return "ethers.arbitrum-mainnet.quiknode.pro";
case "arbitrum-goerli":
return "ethers.arbitrum-goerli.quiknode.pro";
case "arbitrum-sepolia":
return "ethers.arbitrum-sepolia.quiknode.pro";
case "base":
return "ethers.base-mainnet.quiknode.pro";
case "base-goerli":
return "ethers.base-goerli.quiknode.pro";
case "base-spolia":
return "ethers.base-sepolia.quiknode.pro";
case "bnb":
return "ethers.bsc.quiknode.pro";
case "bnbt":
return "ethers.bsc-testnet.quiknode.pro";
case "matic":
return "ethers.matic.quiknode.pro";
case "matic-mumbai":
Expand All @@ -52,11 +73,45 @@ function getHost(name: string): string {
return "ethers.optimism.quiknode.pro";
case "optimism-goerli":
return "ethers.optimism-goerli.quiknode.pro";
case "optimism-sepolia":
return "ethers.optimism-sepolia.quiknode.pro";
case "xdai":
return "ethers.xdai.quiknode.pro";
}

assertArgument(false, "unsupported network", "network", name);
}

/*
@TODO:
These networks are not currently present in the Network
default included networks. Research them and ensure they
are EVM compatible and work with ethers
http://ethers.matic-amoy.quiknode.pro
http://ethers.ethereum-holesky.quiknode.pro
http://ethers.avalanche-mainnet.quiknode.pro
http://ethers.avalanche-testnet.quiknode.pro
http://ethers.blast-sepolia.quiknode.pro
http://ethers.celo-mainnet.quiknode.pro
http://ethers.fantom.quiknode.pro
http://ethers.imx-demo.quiknode.pro
http://ethers.imx-mainnet.quiknode.pro
http://ethers.imx-testnet.quiknode.pro
http://ethers.near-mainnet.quiknode.pro
http://ethers.near-testnet.quiknode.pro
http://ethers.nova-mainnet.quiknode.pro
http://ethers.scroll-mainnet.quiknode.pro
http://ethers.scroll-testnet.quiknode.pro
http://ethers.tron-mainnet.quiknode.pro
http://ethers.zkevm-mainnet.quiknode.pro
http://ethers.zkevm-testnet.quiknode.pro
http://ethers.zksync-mainnet.quiknode.pro
http://ethers.zksync-testnet.quiknode.pro
*/



/**
* The **QuickNodeProvider** connects to the [[link-quicknode]]
Expand Down

0 comments on commit 2b4891d

Please sign in to comment.