Skip to content

Commit

Permalink
🐛 fix(zk_compile.rs): skip contracts with empty bytecode hash to avoi…
Browse files Browse the repository at this point in the history
…d runtime error
  • Loading branch information
caffeinum committed Nov 16, 2023
1 parent c514051 commit 761fb6d
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 is empty, skip
if contract.hash.is_none() {
println!("{} -> emtpy file", contract_name);
continue;
}

println!(
"{} -> Bytecode Hash: {} ",
contract_name,
Expand Down

0 comments on commit 761fb6d

Please sign in to comment.