diff --git a/src/instruction_handlers/far_call.rs b/src/instruction_handlers/far_call.rs index 485d0822..b8dafac7 100644 --- a/src/instruction_handlers/far_call.rs +++ b/src/instruction_handlers/far_call.rs @@ -110,6 +110,7 @@ fn far_call .checked_add(stipend) .expect("stipend must not cause overflow"); + let new_frame_is_static = IS_STATIC || vm.state.current_frame.is_static; vm.push_frame::( instruction, u256_into_address(destination_address), @@ -117,7 +118,7 @@ fn far_call new_frame_gas, stipend, exception_handler, - (IS_STATIC || vm.state.current_frame.is_static) && !is_evm_interpreter, + new_frame_is_static && !is_evm_interpreter, calldata.memory_page, vm.world_diff.snapshot(), ); @@ -137,7 +138,7 @@ fn far_call vm.state.register_pointer_flags = 2; vm.state.registers[1] = calldata.into_u256(); - let is_static_call_to_evm_interpreter = IS_STATIC && is_evm_interpreter; + let is_static_call_to_evm_interpreter = new_frame_is_static && is_evm_interpreter; let call_type = (u8::from(is_static_call_to_evm_interpreter) << 2) | (u8::from(abi.is_system_call) << 1) | u8::from(abi.is_constructor_call);