From fb08e69399b1b8a4639ce627ce1da0027f1ae4ba Mon Sep 17 00:00:00 2001 From: Aleksey Bykhun Date: Tue, 28 Nov 2023 20:21:24 -0500 Subject: [PATCH] fix: skip contracts with empty bytecode hash to avoid runtime error (#143) --- 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..5988e8cb6 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 hash is empty, skip + if contract.hash.is_none() { + println!("{} -> empty contract.hash", contract_name); + continue + } + println!( "{} -> Bytecode Hash: {} ", contract_name,