Skip to content

Commit

Permalink
fix fetching callee onchain balance
Browse files Browse the repository at this point in the history
  • Loading branch information
Raz0r committed Sep 17, 2024
1 parent 6b1c2d8 commit f9052c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/evm/onchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,14 @@ where
let address = match *interp.instruction_pointer {
0xf1 | 0xf2 => {
// CALL | CALLCODE
let calee = interp.stack.peek(1).unwrap();
#[cfg(feature = "real_balance")]
{
// Get balance of the callee
host.next_slot = self.endpoint.get_balance(caller);
host.next_slot = self.endpoint.get_balance(convert_u256_to_h160(calee));
}

interp.stack.peek(1).unwrap()
calee
}
0xf4 | 0xfa => interp.stack.peek(1).unwrap(),
0x3b | 0x3c | 0x3f => interp.stack.peek(0).unwrap(),
Expand Down

0 comments on commit f9052c6

Please sign in to comment.