Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 500fec7

Browse files
edg-ljuanbono
andauthored
Fix missing events (#1034)
* remove unneeded added set_compiled_class_hash * fix missing events when using deprecated business syscall handler --------- Co-authored-by: Juan Bono <juanbono94@gmail.com>
1 parent ca80841 commit 500fec7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/syscalls/deprecated_business_logic_syscall_handler.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ impl<'a, S: StateReader> DeprecatedBLSyscallHandler<'a, S> {
218218
);
219219
self.internal_calls.push(call_info);
220220

221+
// Empty call info doesn't have events, so there is no need to push them here to `self.events`
222+
221223
return Ok(());
222224
}
223225

@@ -232,7 +234,7 @@ impl<'a, S: StateReader> DeprecatedBLSyscallHandler<'a, S> {
232234
INITIAL_GAS_COST,
233235
);
234236

235-
let _call_info = call
237+
let call_info = call
236238
.execute(
237239
self.starknet_storage_state.state,
238240
&self.block_context,
@@ -242,6 +244,11 @@ impl<'a, S: StateReader> DeprecatedBLSyscallHandler<'a, S> {
242244
self.block_context.invoke_tx_max_n_steps,
243245
)
244246
.map_err(|_| StateError::ExecutionEntryPoint())?;
247+
248+
if let Some(call_info) = call_info.call_info {
249+
self.events.extend(call_info.events);
250+
}
251+
245252
Ok(())
246253
}
247254
}

0 commit comments

Comments
 (0)