From a467a6ce1acfad8f8a6bb1b3dfd3df4bb42b5cd4 Mon Sep 17 00:00:00 2001 From: Ayelet Zilber <138376632+ayeletstarkware@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:16:32 +0300 Subject: [PATCH] fix(blockifier): fix input of EntryPointExecutionError,ExecutionFailed error (#1488) --- .../blockifier/src/execution/native/entry_point_execution.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs index 38e64fffbb..8079ec275d 100644 --- a/crates/blockifier/src/execution/native/entry_point_execution.rs +++ b/crates/blockifier/src/execution/native/entry_point_execution.rs @@ -1,6 +1,7 @@ use cairo_native::execution_result::ContractExecutionResult; use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use num_traits::ToPrimitive; +use starknet_api::execution_utils::format_panic_data; use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; use crate::execution::contract_class::{NativeContractClassV1, TrackedResource}; @@ -44,7 +45,9 @@ pub fn execute_entry_point_call( if res.failure_flag && !syscall_handler.context.versioned_constants().enable_reverts => { - Err(EntryPointExecutionError::ExecutionFailed { error_data: res.return_values }) + Err(EntryPointExecutionError::ExecutionFailed { + error_trace: format_panic_data(&res.return_values), + }) } Ok(res) => Ok(res), }?;