foundry_cheatcodes::inspector

Function disallowed_mem_write

Source
fn disallowed_mem_write(
    dest_offset: u64,
    size: u64,
    interpreter: &mut Interpreter,
    ranges: &[Range<u64>],
)
Expand description

Helper that expands memory, stores a revert string pertaining to a disallowed memory write, and sets the return range to the revert string’s location in memory.

This will set the interpreter’s next action to a return with the revert string as the output. And trigger a revert.