Skip to content

Commit

Permalink
feat(providers): updating Infura provider endpoints (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
geekbrother authored Dec 10, 2024
1 parent 40c1fee commit 2adf225
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/env/infura.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ fn default_supported_chains() -> HashMap<String, (String, Weight)> {
Weight::new(Priority::High).unwrap(),
),
),
// Polygon Amoy
(
"eip155:80002".into(),
(
"polygon-amoy".into(),
Weight::new(Priority::Normal).unwrap(),
),
),
// Celo
(
"eip155:42220".into(),
Expand Down Expand Up @@ -128,6 +136,32 @@ fn default_supported_chains() -> HashMap<String, (String, Weight)> {
Weight::new(Priority::Normal).unwrap(),
),
),
// BSC Mainnet
(
"eip155:56".into(),
("bsc-mainnet".into(), Weight::new(Priority::Normal).unwrap()),
),
// BSC Testnet
(
"eip155:97".into(),
("bsc-testnet".into(), Weight::new(Priority::Normal).unwrap()),
),
// ZkSync Mainnet
(
"eip155:324".into(),
(
"zksync-mainnet".into(),
Weight::new(Priority::Normal).unwrap(),
),
),
// Unichain Sepolia
(
"eip155:1301".into(),
(
"unichain-sepolia".into(),
Weight::new(Priority::Normal).unwrap(),
),
),
])
}

Expand Down
30 changes: 30 additions & 0 deletions tests/functional/http/infura.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ async fn infura_provider(ctx: &mut ServerContext) {
check_if_rpc_is_responding_correctly_for_supported_chain(ctx, &provider, "eip155:137", "0x89")
.await;

// Polygin Amoy
check_if_rpc_is_responding_correctly_for_supported_chain(
ctx,
&provider,
"eip155:80002",
"0x13882",
)
.await;

// Optimism mainnet
check_if_rpc_is_responding_correctly_for_supported_chain(ctx, &provider, "eip155:10", "0xa")
.await;
Expand Down Expand Up @@ -100,4 +109,25 @@ async fn infura_provider(ctx: &mut ServerContext) {
"0x14a34",
)
.await;

// BSC Mainnet
check_if_rpc_is_responding_correctly_for_supported_chain(ctx, &provider, "eip155:56", "0x38")
.await;

// BSC Testnet
check_if_rpc_is_responding_correctly_for_supported_chain(ctx, &provider, "eip155:97", "0x61")
.await;

// ZkSync Mainnet
check_if_rpc_is_responding_correctly_for_supported_chain(ctx, &provider, "eip155:324", "0x144")
.await;

// Unichain Sepolia
check_if_rpc_is_responding_correctly_for_supported_chain(
ctx,
&provider,
"eip155:1301",
"0x515",
)
.await;
}

0 comments on commit 2adf225

Please sign in to comment.