INNER CODE UNIT · Rust
record_accesses
fuzzland/ityfuzz · src/evm/middlewares/cheatcode/mod.rs:415
pub fn record_accesses(&mut self, interp: &mut Interpreter) {
if let Some(storage_accesses) = &mut self.accesses {
debug!("[cheatcode] record_accesses");
match interp.current_opcode() {
opcode::SLOAD => {
let key = try_or_continue!(interp.stack().peek(0));
storage_accesses
.reads
.entry(interp.contract().address)
.or_default()
.push(key);
}
opcode::SSTORE => {
let key = try_or_continue!(interp.stack().peek(0));
// An SSTORE does an SLOAD internally
storage_accesses
.reads