add fn settings on CompilerInput (#729)
This commit is contained in:
parent
07e13ab9c7
commit
ade8cd9553
|
@ -39,6 +39,13 @@ impl CompilerInput {
|
|||
Self { language: "Solidity".to_string(), sources, settings: Default::default() }
|
||||
}
|
||||
|
||||
/// Sets the settings for compilation
|
||||
#[must_use]
|
||||
pub fn settings(mut self, settings: Settings) -> Self {
|
||||
self.settings = settings;
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the EVM version for compilation
|
||||
#[must_use]
|
||||
pub fn evm_version(mut self, version: EvmVersion) -> Self {
|
||||
|
|
|
@ -335,6 +335,7 @@ impl<Artifacts: ArtifactOutput> Project<Artifacts> {
|
|||
paths.extend(map);
|
||||
|
||||
let input = CompilerInput::with_sources(sources)
|
||||
.settings(self.solc_config.settings.clone())
|
||||
.normalize_evm_version(&solc.version()?)
|
||||
.with_remappings(self.paths.remappings.clone());
|
||||
|
||||
|
@ -397,7 +398,7 @@ impl<Artifacts: ArtifactOutput> Project<Artifacts> {
|
|||
let sources = paths.set_source_names(sources);
|
||||
|
||||
let input = CompilerInput::with_sources(sources)
|
||||
.evm_version(self.solc_config.settings.evm_version.unwrap_or_default())
|
||||
.settings(self.solc_config.settings.clone())
|
||||
.normalize_evm_version(&solc.version()?)
|
||||
.with_remappings(self.paths.remappings.clone());
|
||||
|
||||
|
|
Loading…
Reference in New Issue