Balance assertions (#133)

* Make metadata serializable

* Refactor tests to use steps

* Add a balance assertion test step

* Test balance deserialization

* Box the test steps

* Permit size difference in step output
This commit is contained in:
Omar
2025-08-11 15:11:16 +03:00
committed by GitHub
parent 90b2dd4cfe
commit f7fbe094ec
9 changed files with 216 additions and 40 deletions
+4
View File
@@ -1,5 +1,6 @@
//! This crate implements all node interactions.
use alloy::primitives::{Address, U256};
use alloy::rpc::types::trace::geth::{DiffMode, GethDebugTracingOptions, GethTrace};
use alloy::rpc::types::{TransactionReceipt, TransactionRequest};
use anyhow::Result;
@@ -21,4 +22,7 @@ pub trait EthereumNode {
/// Returns the state diff of the transaction hash in the [TransactionReceipt].
fn state_diff(&self, receipt: &TransactionReceipt) -> impl Future<Output = Result<DiffMode>>;
/// Returns the balance of the provided [`Address`] back.
fn balance_of(&self, address: Address) -> impl Future<Output = Result<U256>>;
}