Skip to content

Commit

Permalink
Update crates/cheatcodes/src/evm.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
  • Loading branch information
grandizzy and mattsse committed Sep 6, 2024
1 parent 6f1b231 commit af0aa16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl Cheatcode for loadCall {
ccx.ecx.load_account(target)?;
let mut val = ccx.ecx.sload(target, slot.into())?;
// Generate random value if target should have fresh storage and storage slot untouched.
if ccx.state.fresh_storage.contains(&target) && val.is_cold && val.data == U256::ZERO {
if ccx.state.fresh_storage.contains(&target) && val.is_cold && val.data.is_zero() {
val.data = ccx.state.rng().gen();
let mut account = ccx.ecx.load_account(target)?;
account.storage.insert(slot.into(), EvmStorageSlot::new(val.data));
Expand Down

0 comments on commit af0aa16

Please sign in to comment.