From b50167aa634775c7217271fcaea47103ad8485b2 Mon Sep 17 00:00:00 2001 From: Bilog WEB3 <155262265+Bilogweb3@users.noreply.github.com> Date: Tue, 25 Nov 2025 09:56:05 +0100 Subject: [PATCH] fix: correct bytecode placeholder replacement length --- crates/common/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/common/src/utils.rs b/crates/common/src/utils.rs index c6c14780205ae..7d7dcef398c04 100644 --- a/crates/common/src/utils.rs +++ b/crates/common/src/utils.rs @@ -82,8 +82,8 @@ pub fn strip_bytecode_placeholders(bytecode: &BytecodeObject) -> Option { match &bytecode { BytecodeObject::Bytecode(bytes) => Some(bytes.clone()), BytecodeObject::Unlinked(s) => { - // Replace all __$xxx$__ placeholders with 32 zero bytes - let s = (*BYTECODE_PLACEHOLDER_RE).replace_all(s, "00".repeat(40)); + // Replace all __$xxx$__ placeholders with 20 zero bytes (40 hex chars) + let s = (*BYTECODE_PLACEHOLDER_RE).replace_all(s, "00".repeat(20)); let bytes = hex::decode(s.as_bytes()); Some(bytes.ok()?.into()) }