Struct ethers::solc::artifacts::Settings[][src]

pub struct Settings {
    pub remappings: Vec<Remapping, Global>,
    pub optimizer: Optimizer,
    pub metadata: Option<SettingsMetadata>,
    pub output_selection: BTreeMap<String, BTreeMap<String, Vec<String, Global>>>,
    pub evm_version: Option<EvmVersion>,
    pub libraries: BTreeMap<String, BTreeMap<String, String>>,
}

Fields

remappings: Vec<Remapping, Global>optimizer: Optimizermetadata: Option<SettingsMetadata>output_selection: BTreeMap<String, BTreeMap<String, Vec<String, Global>>>

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. The first level key is the file name and the second level key is the contract name. An empty contract name is used for outputs that are not tied to a contract but to the whole source file like the AST. A star as contract name refers to all contracts in the file. Similarly, a star as a file name matches all files. To select all outputs the compiler can possibly generate, use “outputSelection: { “”: { “”: [ “” ], “”: [ “” ] } }“ but note that this might slow down the compilation process needlessly.

The available output types are as follows:

File level (needs empty string as contract name): ast - AST of all source files

Contract level (needs the contract name or “”): abi - ABI devdoc - Developer documentation (natspec) userdoc - User documentation (natspec) metadata - Metadata ir - Yul intermediate representation of the code before optimization irOptimized - Intermediate representation after optimization storageLayout - Slots, offsets and types of the contract’s state variables. evm.assembly - New assembly format evm.legacyAssembly - Old-style assembly format in JSON evm.bytecode.functionDebugData - Debugging information at function level evm.bytecode.object - Bytecode object evm.bytecode.opcodes - Opcodes list evm.bytecode.sourceMap - Source mapping (useful for debugging) evm.bytecode.linkReferences - Link references (if unlinked object) evm.bytecode.generatedSources - Sources generated by the compiler evm.deployedBytecode - Deployed bytecode (has all the options that evm.bytecode has) evm.deployedBytecode.immutableReferences - Map from AST ids to bytecode ranges that reference immutables evm.methodIdentifiers - The list of function hashes evm.gasEstimates - Function gas estimates ewasm.wast - Ewasm in WebAssembly S-expressions format ewasm.wasm - Ewasm in WebAssembly binary format

Note that using a using evm, evm.bytecode, ewasm, etc. will select every target part of that output. Additionally, * can be used as a wildcard to request everything.

The default output selection is

  {
   "*": {
     "*": [
       "abi",
       "evm.bytecode",
       "evm.deployedBytecode",
       "evm.methodIdentifiers"
     ],
     "": [
       "ast"
     ]
   }
 }
evm_version: Option<EvmVersion>libraries: BTreeMap<String, BTreeMap<String, String>>

Implementations

Default output selection for compiler output

Adds ast to output

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

Performs the conversion.

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

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

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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