Skip to content

Commit

Permalink
fix: skip contracts with empty bytecode hash to avoid runtime error (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeinum authored Nov 29, 2023
1 parent c514051 commit 53d2980
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/common/src/zk_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 53d2980

Please sign in to comment.