Function update_config_by_metadata

Source
fn update_config_by_metadata(
    config: &Config,
    doc: &mut DocumentMut,
    meta: &Metadata,
    chain: Chain,
) -> Result<()>
Expand description

Update the configuration file with the metadata. This function will update the configuration file with the metadata from the contract. It will update the following fields:

  • auto_detect_solc to false
  • solc_version to the value from the metadata
  • evm_version to the value from the metadata, if the metadata’s evm_version is “Default”, then this is derived from the solc version this contract was compiled with.
  • via_ir to the value from the metadata
  • libraries to the value from the metadata
  • metadata to the value from the metadata
    • cbor_metadata, use_literal_content, and bytecode_hash
  • optimizer to the value from the metadata
  • optimizer_runs to the value from the metadata
  • optimizer_details to the value from the metadata
    • yul_details, yul, etc.
    • simpleCounterForLoopUncheckedIncrement is ignored for now
  • remappings and stop_after are pre-validated to be empty and None, respectively
  • model_checker, debug, and output_selection are ignored for now

Detailed information can be found from the following link: