Add a balance assertion test step

This commit is contained in:
Omar Abdulla
2025-08-11 14:31:06 +03:00
parent 22e46e0762
commit 71a05c3f47
6 changed files with 122 additions and 1 deletions
+9
View File
@@ -371,6 +371,15 @@ impl EthereumNode for GethNode {
_ => anyhow::bail!("expected a diff mode trace"),
}
}
#[tracing::instrument(skip_all, fields(geth_node_id = self.id))]
async fn balance_of(&self, address: Address) -> anyhow::Result<U256> {
self.provider()
.await?
.get_balance(address)
.await
.map_err(Into::into)
}
}
impl ResolverApi for GethNode {
+9
View File
@@ -428,6 +428,15 @@ impl EthereumNode for KitchensinkNode {
_ => anyhow::bail!("expected a diff mode trace"),
}
}
#[tracing::instrument(skip_all, fields(kitchensink_node_id = self.id))]
async fn balance_of(&self, address: Address) -> anyhow::Result<U256> {
self.provider()
.await?
.get_balance(address)
.await
.map_err(Into::into)
}
}
impl ResolverApi for KitchensinkNode {