Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/will hacky #482

Merged
Prev Previous commit
gas used
  • Loading branch information
0xJepsen committed Sep 7, 2023
commit fa893469095a7ec804dbad16f16b1451fb2d17f3
9 changes: 7 additions & 2 deletions arbiter-core/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl Middleware for RevmMiddleware {
if let Outcome::TransactionCompleted(execution_result, block_number) = outcome {
let Success {
_reason: _,
_gas_used: _,
_gas_used: gas_used,
_gas_refunded: _,
logs,
output,
Expand All @@ -362,6 +362,8 @@ impl Middleware for RevmMiddleware {
block_number: Some(block_number),
contract_address: Some(recast_address(address.unwrap())),
logs,
from: self.provider.default_sender().unwrap(),
gas_used: Some(gas_used.into()),
..Default::default()
};

Expand All @@ -388,6 +390,9 @@ impl Middleware for RevmMiddleware {
block_hash: None,
block_number: Some(block_number),
logs,
from: self.provider.default_sender().unwrap(),
gas_used: Some(gas_used.into()),
// need to add the effective gas price
..Default::default()
};

Expand Down Expand Up @@ -641,7 +646,7 @@ impl JsonRpcClient for Connection {
let logs_deserializeowned: R = serde_json::from_str(&logs_str)?;
return Ok(logs_deserializeowned);
}
var @ _ => {
var => {
unimplemented!("We don't cover this case yet: {}", var);
}
}
Expand Down