mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Completely decouple rpc-types to standalone crate (#5193)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -13,6 +13,7 @@ reth-provider.workspace = true
|
||||
|
||||
reth-rpc-builder.workspace = true
|
||||
reth-rpc-types.workspace = true
|
||||
reth-rpc-types-compat.workspace = true
|
||||
|
||||
reth-revm.workspace = true
|
||||
reth-blockchain-tree.workspace = true
|
||||
|
||||
@ -5,6 +5,7 @@ use reth_provider::{
|
||||
StateProvider, TransactionsProvider,
|
||||
};
|
||||
use reth_rpc_types::{Filter, FilteredParams};
|
||||
use reth_rpc_types_compat::log::from_primitive_log;
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
@ -197,7 +198,8 @@ fn receipts_provider_example<T: ReceiptProvider + TransactionsProvider + HeaderP
|
||||
{
|
||||
let receipts = provider.receipt(header_num)?.ok_or(eyre::eyre!("receipt not found"))?;
|
||||
for log in &receipts.logs {
|
||||
if filter_params.filter_address(log) && filter_params.filter_topics(log) {
|
||||
let log = from_primitive_log(log.clone());
|
||||
if filter_params.filter_address(&log) && filter_params.filter_topics(&log) {
|
||||
// Do something with the log e.g. decode it.
|
||||
println!("Matching log found! {log:?}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user