mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-24 01:57:56 +00:00
56c2fe8c0c
* Parallelize over cases * Rename the state and driver * Parallelize execution * Update the default config of the tool * Make codebase async * Fix machete * Fix tests & clear node directories before startup * Cleanup the cleanup logic * Rename geth node
25 lines
981 B
Rust
25 lines
981 B
Rust
//! 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<Output = Result<TransactionReceipt>>;
|
|
|
|
/// Trace the transaction in the [TransactionReceipt] and return a [GethTrace].
|
|
fn trace_transaction(
|
|
&self,
|
|
receipt: &TransactionReceipt,
|
|
trace_options: GethDebugTracingOptions,
|
|
) -> impl Future<Output = Result<GethTrace>>;
|
|
|
|
/// Returns the state diff of the transaction hash in the [TransactionReceipt].
|
|
fn state_diff(&self, receipt: &TransactionReceipt) -> impl Future<Output = Result<DiffMode>>;
|
|
}
|