Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions crates/cheatcodes/src/evm/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ impl Cheatcode for mockCall_0Call {
impl Cheatcode for mockCall_1Call {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { callee, msgValue, data, returnData } = self;
ccx.ecx.journaled_state.load_account(*callee)?;
let _ = make_acc_non_empty(callee, ccx)?;

mock_call(ccx.state, callee, data, Some(msgValue), returnData, InstructionResult::Return);
Ok(Default::default())
}
Expand All @@ -85,7 +86,8 @@ impl Cheatcode for mockCall_2Call {
impl Cheatcode for mockCall_3Call {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { callee, msgValue, data, returnData } = self;
ccx.ecx.journaled_state.load_account(*callee)?;
let _ = make_acc_non_empty(callee, ccx)?;

mock_call(
ccx.state,
callee,
Expand All @@ -111,7 +113,8 @@ impl Cheatcode for mockCalls_0Call {
impl Cheatcode for mockCalls_1Call {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { callee, msgValue, data, returnData } = self;
ccx.ecx.journaled_state.load_account(*callee)?;
let _ = make_acc_non_empty(callee, ccx)?;

mock_calls(ccx.state, callee, data, Some(msgValue), returnData, InstructionResult::Return);
Ok(Default::default())
}
Expand Down
Loading