Skip to content

Commit

Permalink
fix(sidecar): tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevbirb committed Jul 22, 2024
1 parent 11c31e0 commit 2b78f6e
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions bolt-sidecar/src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,8 @@ mod tests {
use alloy::{
consensus::constants::ETH_TO_WEI,
primitives::{uint, Uint},
rpc::types::EIP1186AccountProofResponse,
};
use reth_primitives::B256;
use dotenvy::dotenv;

use crate::test_util::launch_anvil;

Expand All @@ -255,35 +254,9 @@ mod tests {
assert_eq!(account_state.transaction_count, 0);
}

#[tokio::test]
async fn test_get_proof() -> eyre::Result<()> {
let rpc_url = std::env::var("RPC_URL").expect("RPC_URL must be set");
let rpc_url = Url::parse(&rpc_url)?;
let rpc_client = RpcClient::new(rpc_url);

let proof: EIP1186AccountProofResponse = rpc_client
.0
.request(
"eth_getProof",
(
"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5",
vec![] as Vec<B256>,
"latest",
),
)
.await?;

println!("proof: {:?}", proof);

let block = rpc_client.get_block(None, false).await?;

println!("root {:?}", block.header.state_root);

Ok(())
}

#[tokio::test]
async fn test_smart_contract_code() -> eyre::Result<()> {
dotenv().ok();
let rpc_url = Url::parse(std::env::var("RPC_URL").unwrap().as_str())?;
let rpc_client = RpcClient::new(rpc_url);

Expand Down

0 comments on commit 2b78f6e

Please sign in to comment.