Struct ethers_solc::artifacts::Settings [−][src]
pub struct Settings {
pub remappings: Vec<Remapping>,
pub optimizer: Optimizer,
pub metadata: Option<SettingsMetadata>,
pub output_selection: BTreeMap<String, BTreeMap<String, Vec<String>>>,
pub evm_version: Option<EvmVersion>,
pub libraries: BTreeMap<String, BTreeMap<String, String>>,
}
Fields
remappings: Vec<Remapping>
optimizer: Optimizer
metadata: Option<SettingsMetadata>
output_selection: BTreeMap<String, BTreeMap<String, Vec<String>>>
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
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Settings
impl UnwindSafe for Settings
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
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