diff --git a/crates/interpreter/src/instructions/contract.rs b/crates/interpreter/src/instructions/contract.rs index 206891e962..4c0b13ed1a 100644 --- a/crates/interpreter/src/instructions/contract.rs +++ b/crates/interpreter/src/instructions/contract.rs @@ -140,6 +140,10 @@ pub fn extcall_input(interpreter: &mut Interpreter) -> Option { let return_memory_offset = resize_memory(interpreter, input_offset, input_size)?; + if return_memory_offset.is_empty() { + return Some(Bytes::new()); + } + Some(Bytes::copy_from_slice( interpreter .shared_memory diff --git a/crates/interpreter/src/interpreter.rs b/crates/interpreter/src/interpreter.rs index 219b2e8f9c..ef000be132 100644 --- a/crates/interpreter/src/interpreter.rs +++ b/crates/interpreter/src/interpreter.rs @@ -192,6 +192,7 @@ impl Interpreter { } pub fn insert_eofcreate_outcome(&mut self, create_outcome: EOFCreateOutcome) { + self.instruction_result = InstructionResult::Continue; let instruction_result = create_outcome.instruction_result(); self.return_data_buffer = if *instruction_result == InstructionResult::Revert { diff --git a/crates/revm/src/evm.rs b/crates/revm/src/evm.rs index bebd7bc57b..80d536598d 100644 --- a/crates/revm/src/evm.rs +++ b/crates/revm/src/evm.rs @@ -134,7 +134,6 @@ impl<'a, EXT, DB: Database> Evm<'a, EXT, DB> { } InterpreterAction::None => unreachable!("InterpreterAction::None is not expected"), }; - // handle result match frame_or_result { FrameOrResult::Frame(frame) => { diff --git a/crates/revm/src/frame.rs b/crates/revm/src/frame.rs index 1988705ab1..c36ffe0707 100644 --- a/crates/revm/src/frame.rs +++ b/crates/revm/src/frame.rs @@ -55,6 +55,7 @@ pub enum Frame { } #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[derive(Debug)] pub enum FrameResult { Call(CallOutcome), Create(CreateOutcome), @@ -135,6 +136,7 @@ impl FrameResult { /// Contains either a frame or a result. #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[derive(Debug)] pub enum FrameOrResult { /// Boxed call or create frame. Frame(Frame),