Skip to content

Commit 385c314

Browse files
committed
Add integration test for latest state provider
1 parent 8b6c0ca commit 385c314

8 files changed

+626
-28
lines changed

Cargo.lock

+108-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.2.0" }
2929

3030
[dev-dependencies]
3131
ruint = "1.12.4"
32+
serde_json = "1.0.140"
33+
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
34+
wiremock = "0.6.3"

deny.toml

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ expression = "ISC AND MIT AND OpenSSL"
2020
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
2121
name = "ring"
2222

23+
[advisories]
24+
ignore = [
25+
# https://rustsec.org/advisories/RUSTSEC-2024-0436 paste! is unmaintained
26+
"RUSTSEC-2024-0436",
27+
]
28+
29+
2330
[bans]
2431
multiple-versions = "allow"
2532

src/alloy_reth_provider.rs

-21
Original file line numberDiff line numberDiff line change
@@ -445,24 +445,3 @@ where
445445
todo!()
446446
}
447447
}
448-
449-
#[cfg(test)]
450-
mod tests {
451-
use super::*;
452-
use alloy_eips::BlockId;
453-
use alloy_primitives::address;
454-
use alloy_provider::ProviderBuilder;
455-
use reth_provider::AccountReader;
456-
use ruint::__private::ruint_macro::uint;
457-
458-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
459-
async fn test_alloy_reth_state_provider_factory() {
460-
let provider = ProviderBuilder::new().on_http("https://eth.merkle.io".parse().unwrap());
461-
let db_provider = AlloyRethProvider::new(provider);
462-
let state = db_provider.state_by_block_id(BlockId::number(16148323)).unwrap();
463-
let acc_info = state.basic_account(&address!("220866b1a2219f40e72f5c628b65d54268ca3a9d")).unwrap().unwrap();
464-
465-
assert_eq!(acc_info.nonce, 1);
466-
assert_eq!(acc_info.balance, uint!(250001010477701567100010_U256));
467-
}
468-
}

0 commit comments

Comments
 (0)