Skip to content

Commit

Permalink
feat(providers): adding Polygon zkEvm and Bitcoin to the Quicknode pr…
Browse files Browse the repository at this point in the history
…ovider (#834)
  • Loading branch information
geekbrother authored Nov 14, 2024
1 parent adfdf35 commit 7168045
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 8 deletions.
12 changes: 12 additions & 0 deletions src/env/quicknode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ fn extract_supported_chains_and_subdomains(
"eip155:1301",
("blissful-side-log.unichain-sepolia", Priority::Normal),
),
(
"eip155:1101",
("clean-few-meme.zkevm-mainnet", Priority::Normal),
),
(
"eip155:80084",
("frequent-capable-putty.bera-bartio", Priority::Normal),
Expand All @@ -77,6 +81,14 @@ fn extract_supported_chains_and_subdomains(
"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",
("winter-flashy-glade.solana-testnet", Priority::Normal),
),
(
"bip122:000000000019d6689c085ae165831e93",
("warmhearted-multi-mound.btc", Priority::Normal),
),
(
"bip122:000000000933ea01ad0ee984209779ba",
("newest-lively-research.btc-testnet", Priority::Normal),
),
]);

let access_tokens_with_weights: HashMap<String, (String, Weight)> = supported_chain_ids
Expand Down
44 changes: 36 additions & 8 deletions tests/functional/http/quicknode.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use {
super::{
check_if_rpc_is_responding_correctly_for_bitcoin,
check_if_rpc_is_responding_correctly_for_solana,
check_if_rpc_is_responding_correctly_for_supported_chain,
},
Expand All @@ -12,26 +13,30 @@ use {
#[tokio::test]
#[ignore]
async fn quicknode_provider(ctx: &mut ServerContext) {
let provider = ProviderKind::Quicknode;
// zkSync Mainnet
check_if_rpc_is_responding_correctly_for_supported_chain(ctx, &provider, "eip155:324", "0x144")
.await;
// Polygon zksync
check_if_rpc_is_responding_correctly_for_supported_chain(
ctx,
&ProviderKind::Quicknode,
"eip155:324",
"0x144",
&provider,
"eip155:1101",
"0x44d",
)
.await;
// Unichain Sepolia
check_if_rpc_is_responding_correctly_for_supported_chain(
ctx,
&ProviderKind::Quicknode,
&provider,
"eip155:1301",
"0x515",
)
.await;
// Berachain Bartio
check_if_rpc_is_responding_correctly_for_supported_chain(
ctx,
&ProviderKind::Quicknode,
&provider,
"eip155:80084",
"0x138d4",
)
Expand All @@ -42,27 +47,50 @@ async fn quicknode_provider(ctx: &mut ServerContext) {
#[tokio::test]
#[ignore]
async fn quicknode_provider_solana(ctx: &mut ServerContext) {
let provider = ProviderKind::Quicknode;
// Solana mainnet
check_if_rpc_is_responding_correctly_for_solana(
ctx,
"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
&ProviderKind::Quicknode,
&provider,
)
.await;

// Solana devnet
check_if_rpc_is_responding_correctly_for_solana(
ctx,
"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
&ProviderKind::Quicknode,
&provider,
)
.await;

// Solana testnet
check_if_rpc_is_responding_correctly_for_solana(
ctx,
"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",
&ProviderKind::Quicknode,
&provider,
)
.await;
}

#[test_context(ServerContext)]
#[tokio::test]
#[ignore]
async fn quicknode_provider_bitcoin(ctx: &mut ServerContext) {
let provider = ProviderKind::Quicknode;
// Bitcoin mainnet
check_if_rpc_is_responding_correctly_for_bitcoin(
ctx,
"000000000019d6689c085ae165831e93",
&provider,
)
.await;

// Bitcoin testnet
check_if_rpc_is_responding_correctly_for_bitcoin(
ctx,
"000000000933ea01ad0ee984209779ba",
&provider,
)
.await;
}

0 comments on commit 7168045

Please sign in to comment.