From 30885d2f8aa43578ba570bdd9b4050c603b13417 Mon Sep 17 00:00:00 2001 From: thedevbirb Date: Fri, 19 Jul 2024 10:28:21 +0200 Subject: [PATCH] fix(sidecar): tests --- bolt-sidecar/src/client/rpc.rs | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/bolt-sidecar/src/client/rpc.rs b/bolt-sidecar/src/client/rpc.rs index 513c19c7..ebe0b806 100644 --- a/bolt-sidecar/src/client/rpc.rs +++ b/bolt-sidecar/src/client/rpc.rs @@ -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; @@ -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, - "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);