pub struct Settings {
    pub stop_after: Option<String>,
    pub remappings: Vec<Remapping>,
    pub optimizer: Optimizer,
    pub model_checker: Option<ModelCheckerSettings>,
    pub metadata: Option<SettingsMetadata>,
    pub output_selection: OutputSelection,
    pub evm_version: Option<EvmVersion>,
    pub via_ir: Option<bool>,
    pub debug: Option<DebuggingSettings>,
    pub libraries: Libraries,
}

Fields§

§stop_after: Option<String>

Stop compilation after the given stage. since 0.8.11: only “parsing” is valid here

§remappings: Vec<Remapping>§optimizer: Optimizer§model_checker: Option<ModelCheckerSettings>

Model Checker options.

§metadata: Option<SettingsMetadata>

Metadata settings

§output_selection: OutputSelection

This field can be used to select desired outputs based on file and contract names. If this field is omitted, then the compiler loads and does type checking, but will not generate any outputs apart from errors.

§evm_version: Option<EvmVersion>§via_ir: Option<bool>

Change compilation pipeline to go through the Yul intermediate representation. This is false by default.

§debug: Option<DebuggingSettings>§libraries: Libraries

Addresses of the libraries. If not all libraries are given here, it can result in unlinked objects whose output data is different.

The top level key is the name of the source file where the library is used. If remappings are used, this source file should match the global path after remappings were applied. If this key is an empty string, that refers to a global level.

Implementations§

Creates a new Settings instance with the given output_selection

Inserts a set of ContractOutputSelection

Inserts a set of ContractOutputSelection

Inserts the value for all files and contracts

use ethers_solc::artifacts::output_selection::ContractOutputSelection;
use ethers_solc::artifacts::Settings;
let mut selection = Settings::default();
selection.push_output_selection(ContractOutputSelection::Metadata);

Inserts the key value pair to the output_selection for all files

If the key already exists, then the value is added to the existing list

Sets the value for all files and contracts

Sets the key to the values pair to the output_selection for all files

This will replace the existing values for key if they’re present

Sets the ``viaIR` valu

Enables viaIR

Adds ast to output

Strips base from all paths

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more