Trait ethers::solc::ArtifactOutput[][src]

pub trait ArtifactOutput {
    type Artifact: Artifact;
    fn on_output(
        output: &CompilerOutput,
        layout: &ProjectPathsConfig
    ) -> Result<(), SolcError>;
fn read_cached_artifact(
        path: impl AsRef<Path>
    ) -> Result<Self::Artifact, SolcError>;
fn contract_to_artifact(contract: Contract) -> Self::Artifact; fn output_file_name(name: impl AsRef<str>) -> PathBuf { ... }
fn output_file(
        contract_file: impl AsRef<Path>,
        name: impl AsRef<str>
    ) -> PathBuf { ... }
fn contract_name(file: impl AsRef<Path>) -> Option<String> { ... }
fn output_exists(
        contract_file: impl AsRef<Path>,
        name: impl AsRef<str>,
        root: impl AsRef<Path>
    ) -> bool { ... }
fn read_cached_artifacts<T, I>(
        files: I
    ) -> Result<BTreeMap<PathBuf, Self::Artifact>, SolcError>
    where
        I: IntoIterator<Item = T>,
        T: Into<PathBuf>
, { ... }
fn output_to_artifacts(
        output: CompilerOutput
    ) -> BTreeMap<String, BTreeMap<String, Self::Artifact>> { ... } }

Associated Types

How Artifacts are stored

Required methods

Handle the compiler output.

Convert a contract to the artifact type

Provided methods

Returns the file name for the contract’s artifact

Returns the path to the contract’s artifact location based on the contract’s file and name

This returns contract.sol/contract.json by default

The inverse of contract_file_name

Expected to return the solidity contract’s name derived from the file path sources/Greeter.sol -> Greeter

Whether the corresponding artifact of the given contract file and name exists

Read the cached artifacts from disk

Convert the compiler output into a set of artifacts

Implementors