From 761fb6d365a5ea248be75cd7a0862a2b81f6dd8f Mon Sep 17 00:00:00 2001 From: Aleksey Bykhun Date: Thu, 16 Nov 2023 11:39:43 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(zk=5Fcompile.rs):=20skip=20c?= =?UTF-8?q?ontracts=20with=20empty=20bytecode=20hash=20to=20avoid=20runtim?= =?UTF-8?q?e=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/common/src/zk_compile.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/common/src/zk_compile.rs b/crates/common/src/zk_compile.rs index 0d1004457..22b604527 100644 --- a/crates/common/src/zk_compile.rs +++ b/crates/common/src/zk_compile.rs @@ -466,6 +466,12 @@ impl ZkSolc { if key.contains(source) { let contracts_in_file = compiler_output.contracts.get(key).unwrap(); for (contract_name, contract) in contracts_in_file { + // if contract is empty, skip + if contract.hash.is_none() { + println!("{} -> emtpy file", contract_name); + continue; + } + println!( "{} -> Bytecode Hash: {} ", contract_name,