diff --git a/crates/evm/src/call_helpers.cairo b/crates/evm/src/call_helpers.cairo index b12885c51..033711767 100644 --- a/crates/evm/src/call_helpers.cairo +++ b/crates/evm/src/call_helpers.cairo @@ -99,7 +99,6 @@ impl CallHelpersImpl of CallHelpers { let result = EVMTrait::process_message(message, ref self.env); self.merge_child(@result); - self.return_data = result.return_data; if result.success { self.stack.push(1)?; } else { diff --git a/crates/evm/src/model/vm.cairo b/crates/evm/src/model/vm.cairo index bd584c317..f6f00a216 100644 --- a/crates/evm/src/model/vm.cairo +++ b/crates/evm/src/model/vm.cairo @@ -150,6 +150,7 @@ impl VMImpl of VMTrait { self.accessed_addresses.extend(*child.accessed_addresses); self.accessed_storage_keys.extend(*child.accessed_storage_keys); self.gas_refund += *child.gas_refund; + self.return_data = *child.return_data; } //TODO(gas) handle error case