Skip to content

Commit

Permalink
fix(solc): add missing ir option (#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Jan 17, 2023
1 parent 10b18e0 commit 5330a68
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ethers-solc/src/artifact_output/configurable.rs
Expand Up @@ -503,6 +503,7 @@ impl ExtraOutputValues {
pub struct ExtraOutputFiles {
pub abi: bool,
pub metadata: bool,
pub ir: bool,
pub ir_optimized: bool,
pub ewasm: bool,
pub assembly: bool,
Expand Down Expand Up @@ -530,6 +531,7 @@ impl ExtraOutputFiles {
Self {
abi: true,
metadata: true,
ir: true,
ir_optimized: true,
ewasm: true,
assembly: true,
Expand All @@ -552,6 +554,9 @@ impl ExtraOutputFiles {
ContractOutputSelection::Metadata => {
config.metadata = true;
}
ContractOutputSelection::Ir => {
config.ir = true;
}
ContractOutputSelection::IrOptimized => {
config.ir_optimized = true;
}
Expand Down Expand Up @@ -606,7 +611,7 @@ impl ExtraOutputFiles {
}
}

if self.ewasm {
if self.ir {
if let Some(ref ir) = contract.ir {
let file = file.with_extension("ir");
fs::write(&file, ir).map_err(|err| SolcError::io(err, file))?
Expand Down

0 comments on commit 5330a68

Please sign in to comment.