From c86b9037378d12e565fa2b58ab38760f37607ab3 Mon Sep 17 00:00:00 2001 From: Artem Gureev Date: Wed, 19 Aug 2026 12:00:41 +0000 Subject: [PATCH] refactor(lee_core): commit program output as a borsh frame --- lee/state_machine/core/src/program/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lee/state_machine/core/src/program/mod.rs b/lee/state_machine/core/src/program/mod.rs index e2c9f0dd2..44b45bebf 100644 --- a/lee/state_machine/core/src/program/mod.rs +++ b/lee/state_machine/core/src/program/mod.rs @@ -524,7 +524,8 @@ impl ProgramOutput { } pub fn write(self) { - env::commit(&self); + let payload = borsh::to_vec(&self).expect("borsh serialization is infallible"); + env::commit_slice(&crate::to_frame(&payload)); } pub fn with_chained_calls(mut self, chained_calls: Vec) -> Self {