Skip to content

Commit

Permalink
fix: adapt to compiler optimize being an Option
Browse files Browse the repository at this point in the history
  • Loading branch information
elfedy committed Oct 31, 2024
1 parent fc610bc commit 02641a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/forge/bin/cmd/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,11 @@ impl CreateArgs {

println!("Starting contract verification...");

let num_of_optimizations =
if self.opts.compiler.optimize { self.opts.compiler.optimizer_runs } else { None };
let num_of_optimizations = if self.opts.compiler.optimize.unwrap_or_default() {
self.opts.compiler.optimizer_runs
} else {
None
};
let verify = forge_verify::VerifyArgs {
address,
contract: Some(self.contract),
Expand Down

0 comments on commit 02641a9

Please sign in to comment.