INNER CODE UNIT · Rust
Some
fuzzland/ityfuzz · src/evm/middlewares/cheatcode/mod.rs:383
if let Some(expected_calls_for_target) = expected_calls.get_mut(&target) {
let op = interp.current_opcode();
let callstack = peek_realcall_input_value(interp, op);
if let Err(err) = callstack {
error!("[cheatcode] failed to peek call input: {:?}", err);
return;
}
let (input, value) = callstack.unwrap();
debug!(
"[cheatcode] handle expected_calls_for_target: {:?}, input: {:?}, value: {:?}",
target, input, value
);
// Match every partial/full calldata
for (calldata, (expected, actual_count)) in expected_calls_for_target {
// Increment actual times seen if the calldata is at most, as big as this call's
// input, and
if calldata.len() <= input.len() &&