//! This crate implements all node interactions. use alloy::rpc::types::trace::geth::{DiffMode, GethDebugTracingOptions, GethTrace}; use alloy::rpc::types::{TransactionReceipt, TransactionRequest}; use anyhow::Result; /// An interface for all interactions with Ethereum compatible nodes. pub trait EthereumNode { /// Execute the [TransactionRequest] and return a [TransactionReceipt]. fn execute_transaction( &self, transaction: TransactionRequest, ) -> impl Future>; /// Trace the transaction in the [TransactionReceipt] and return a [GethTrace]. fn trace_transaction( &self, receipt: &TransactionReceipt, trace_options: GethDebugTracingOptions, ) -> impl Future>; /// Returns the state diff of the transaction hash in the [TransactionReceipt]. fn state_diff(&self, receipt: &TransactionReceipt) -> impl Future>; }