Skip to content

Commit

Permalink
fix(contract-verifier): Use optimizer mode in solidity-single-file ve…
Browse files Browse the repository at this point in the history
…rification (matter-labs#1079)

## What ❔

Fixes matter-labs#1072

## Why ❔

Bug fix

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.
- [ ] Linkcheck has been run via `zk linkcheck`.
  • Loading branch information
perekopskiy authored Feb 15, 2024
1 parent 5087121 commit fdab638
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/bin/contract-verifier/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ impl ContractVerifier {
};
let sources: HashMap<String, Source> =
vec![(file_name, source)].into_iter().collect();
let optimizer = Optimizer::new(request.req.optimization_used);
let optimizer = Optimizer {
enabled: request.req.optimization_used,
mode: request.req.optimizer_mode.and_then(|s| s.chars().next()),
};

let settings = Settings {
libraries: None,
Expand Down

0 comments on commit fdab638

Please sign in to comment.