Skip to content

Commit

Permalink
feat(forge): output solc metadata by default (#2798)
Browse files Browse the repository at this point in the history
* add metadata by default

* add comment

* typo
  • Loading branch information
rkrasiuk committed Aug 16, 2022
1 parent f817db3 commit ad91a4a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion config/src/lib.rs
Expand Up @@ -824,7 +824,15 @@ impl Config {
/// returns the [`ethers_solc::ConfigurableArtifacts`] for this config, that includes the
/// `extra_output` fields
pub fn configured_artifacts_handler(&self) -> ConfigurableArtifacts {
ConfigurableArtifacts::new(self.extra_output.clone(), self.extra_output_files.clone())
let mut extra_output_files = self.extra_output_files.clone();
// Sourcify verification requires solc metadata output. Since, it doesn't
// affect the UX & performance of the compiler, output the metadata files
// by default.
// For more info see: https://github.com/foundry-rs/foundry/issues/2795
if !extra_output_files.contains(&ContractOutputSelection::Metadata) {
extra_output_files.push(ContractOutputSelection::Metadata);
}
ConfigurableArtifacts::new(self.extra_output.clone(), extra_output_files)
}

/// Parses all libraries in the form of
Expand Down

0 comments on commit ad91a4a

Please sign in to comment.