pub struct MinimalCombinedArtifacts { /* private fields */ }
Expand description
An Artifact
implementation that uses a compact representation
Creates a single json artifact with
{
"abi": [],
"bytecode": {...},
"deployedBytecode": {...}
}
Trait Implementations§
Source§impl ArtifactOutput for MinimalCombinedArtifacts
impl ArtifactOutput for MinimalCombinedArtifacts
Source§type Artifact = CompactContractBytecode
type Artifact = CompactContractBytecode
Represents the artifact that will be stored for a
Contract
Source§fn contract_to_artifact(
&self,
_file: &str,
_name: &str,
contract: Contract,
_source_file: Option<&SourceFile>,
) -> Self::Artifact
fn contract_to_artifact( &self, _file: &str, _name: &str, contract: Contract, _source_file: Option<&SourceFile>, ) -> Self::Artifact
Convert a contract to the artifact type Read more
Source§fn standalone_source_file_to_artifact(
&self,
_path: &str,
_file: &VersionedSourceFile,
) -> Option<Self::Artifact>
fn standalone_source_file_to_artifact( &self, _path: &str, _file: &VersionedSourceFile, ) -> Option<Self::Artifact>
This converts a
SourceFile
that doesn’t contain any contract definitions (interfaces,
contracts, libraries) to an artifact. Read moreSource§fn on_output(
&self,
contracts: &VersionedContracts,
sources: &VersionedSourceFiles,
layout: &ProjectPathsConfig,
ctx: OutputContext<'_>,
) -> Result<Artifacts<Self::Artifact>>
fn on_output( &self, contracts: &VersionedContracts, sources: &VersionedSourceFiles, layout: &ProjectPathsConfig, ctx: OutputContext<'_>, ) -> Result<Artifacts<Self::Artifact>>
Handle the aggregated set of compiled contracts from the solc
crate::CompilerOutput
. Read moreSource§fn write_contract_extras(&self, contract: &Contract, file: &Path) -> Result<()>
fn write_contract_extras(&self, contract: &Contract, file: &Path) -> Result<()>
Write additional files for the contract
Source§fn write_extras(
&self,
contracts: &VersionedContracts,
artifacts: &Artifacts<Self::Artifact>,
) -> Result<()>
fn write_extras( &self, contracts: &VersionedContracts, artifacts: &Artifacts<Self::Artifact>, ) -> Result<()>
Writes additional files for the contracts if the included in the
Contract
, such as ir
,
ewasm
, iropt
. Read moreSource§fn output_file_name(name: impl AsRef<str>) -> PathBuf
fn output_file_name(name: impl AsRef<str>) -> PathBuf
Returns the file name for the contract’s artifact
Greeter.json
Source§fn output_file_name_versioned(
name: impl AsRef<str>,
version: &Version,
) -> PathBuf
fn output_file_name_versioned( name: impl AsRef<str>, version: &Version, ) -> PathBuf
Returns the file name for the contract’s artifact and the given version
Greeter.0.8.11.json
Source§fn conflict_free_output_file(
already_taken: &HashSet<PathBuf>,
conflict: PathBuf,
contract_file: impl AsRef<Path>,
artifacts_folder: impl AsRef<Path>,
) -> PathBuf
fn conflict_free_output_file( already_taken: &HashSet<PathBuf>, conflict: PathBuf, contract_file: impl AsRef<Path>, artifacts_folder: impl AsRef<Path>, ) -> PathBuf
Returns the appropriate file name for the conflicting file. Read more
Source§fn output_file(
contract_file: impl AsRef<Path>,
name: impl AsRef<str>,
) -> PathBuf
fn output_file( contract_file: impl AsRef<Path>, name: impl AsRef<str>, ) -> PathBuf
Returns the path to the contract’s artifact location based on the contract’s file and name Read more
Source§fn output_file_versioned(
contract_file: impl AsRef<Path>,
name: impl AsRef<str>,
version: &Version,
) -> PathBuf
fn output_file_versioned( contract_file: impl AsRef<Path>, name: impl AsRef<str>, version: &Version, ) -> PathBuf
Returns the path to the contract’s artifact location based on the contract’s file, name and
version Read more
Source§fn contract_name(file: impl AsRef<Path>) -> Option<String>
fn contract_name(file: impl AsRef<Path>) -> Option<String>
The inverse of
contract_file_name
Read moreSource§fn output_exists(
contract_file: impl AsRef<Path>,
name: impl AsRef<str>,
root: impl AsRef<Path>,
) -> bool
fn output_exists( contract_file: impl AsRef<Path>, name: impl AsRef<str>, root: impl AsRef<Path>, ) -> bool
Whether the corresponding artifact of the given contract file and name exists
Source§fn read_cached_artifact(path: impl AsRef<Path>) -> Result<Self::Artifact>
fn read_cached_artifact(path: impl AsRef<Path>) -> Result<Self::Artifact>
Read the artifact that’s stored at the given path Read more
Source§fn read_cached_artifacts<T, I>(
files: I,
) -> Result<BTreeMap<PathBuf, Self::Artifact>>
fn read_cached_artifacts<T, I>( files: I, ) -> Result<BTreeMap<PathBuf, Self::Artifact>>
Read the cached artifacts that are located the paths the iterator yields Read more
Source§fn output_to_artifacts(
&self,
contracts: &VersionedContracts,
sources: &VersionedSourceFiles,
ctx: OutputContext<'_>,
layout: &ProjectPathsConfig,
) -> Artifacts<Self::Artifact>
fn output_to_artifacts( &self, contracts: &VersionedContracts, sources: &VersionedSourceFiles, ctx: OutputContext<'_>, layout: &ProjectPathsConfig, ) -> Artifacts<Self::Artifact>
Convert the compiler output into a set of artifacts Read more
Source§impl Clone for MinimalCombinedArtifacts
impl Clone for MinimalCombinedArtifacts
Source§fn clone(&self) -> MinimalCombinedArtifacts
fn clone(&self) -> MinimalCombinedArtifacts
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MinimalCombinedArtifacts
impl Debug for MinimalCombinedArtifacts
Source§impl Default for MinimalCombinedArtifacts
impl Default for MinimalCombinedArtifacts
Source§fn default() -> MinimalCombinedArtifacts
fn default() -> MinimalCombinedArtifacts
Returns the “default value” for a type. Read more
Source§impl PartialEq for MinimalCombinedArtifacts
impl PartialEq for MinimalCombinedArtifacts
impl Copy for MinimalCombinedArtifacts
impl Eq for MinimalCombinedArtifacts
impl StructuralPartialEq for MinimalCombinedArtifacts
Auto Trait Implementations§
impl Freeze for MinimalCombinedArtifacts
impl RefUnwindSafe for MinimalCombinedArtifacts
impl Send for MinimalCombinedArtifacts
impl Sync for MinimalCombinedArtifacts
impl Unpin for MinimalCombinedArtifacts
impl UnwindSafe for MinimalCombinedArtifacts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more