pub struct ConfigurableContractArtifact {Show 19 fields
pub abi: Option<LosslessAbi>,
pub bytecode: Option<CompactBytecode>,
pub deployed_bytecode: Option<CompactDeployedBytecode>,
pub assembly: Option<String>,
pub opcodes: Option<String>,
pub method_identifiers: Option<BTreeMap<String, String>>,
pub generated_sources: Vec<GeneratedSource>,
pub function_debug_data: Option<BTreeMap<String, FunctionDebugData>>,
pub gas_estimates: Option<GasEstimates>,
pub raw_metadata: Option<String>,
pub metadata: Option<Metadata>,
pub storage_layout: Option<StorageLayout>,
pub userdoc: Option<UserDoc>,
pub devdoc: Option<DevDoc>,
pub ir: Option<String>,
pub ir_optimized: Option<String>,
pub ewasm: Option<Ewasm>,
pub ast: Option<Ast>,
pub id: Option<u32>,
}
Expand description
Represents the Artifact
that ConfigurableArtifacts
emits.
This is essentially a superset of CompactContractBytecode
.
Fields§
§abi: Option<LosslessAbi>
The Ethereum Contract ABI. If empty, it is represented as an empty array. See https://docs.soliditylang.org/en/develop/abi-spec.html
bytecode: Option<CompactBytecode>
§deployed_bytecode: Option<CompactDeployedBytecode>
§assembly: Option<String>
§opcodes: Option<String>
§method_identifiers: Option<BTreeMap<String, String>>
§generated_sources: Vec<GeneratedSource>
§function_debug_data: Option<BTreeMap<String, FunctionDebugData>>
§gas_estimates: Option<GasEstimates>
§raw_metadata: Option<String>
§metadata: Option<Metadata>
§storage_layout: Option<StorageLayout>
§userdoc: Option<UserDoc>
§devdoc: Option<DevDoc>
§ir: Option<String>
§ir_optimized: Option<String>
§ewasm: Option<Ewasm>
§ast: Option<Ast>
§id: Option<u32>
The identifier of the source file
Implementations§
Source§impl ConfigurableContractArtifact
impl ConfigurableContractArtifact
Sourcepub fn into_contract_bytecode(self) -> CompactContractBytecode
pub fn into_contract_bytecode(self) -> CompactContractBytecode
Returns the inner element that contains the core bytecode related information
Sourcepub fn all_link_references(
&self,
) -> BTreeMap<String, BTreeMap<String, Vec<Offsets>>>
pub fn all_link_references( &self, ) -> BTreeMap<String, BTreeMap<String, Vec<Offsets>>>
Looks for all link references in deployment and runtime bytecodes
Sourcepub fn source_file(&self) -> Option<SourceFile>
pub fn source_file(&self) -> Option<SourceFile>
Returns the source file of this artifact’s contract
Trait Implementations§
Source§impl Clone for ConfigurableContractArtifact
impl Clone for ConfigurableContractArtifact
Source§fn clone(&self) -> ConfigurableContractArtifact
fn clone(&self) -> ConfigurableContractArtifact
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 ConfigurableContractArtifact
impl Debug for ConfigurableContractArtifact
Source§impl Default for ConfigurableContractArtifact
impl Default for ConfigurableContractArtifact
Source§fn default() -> ConfigurableContractArtifact
fn default() -> ConfigurableContractArtifact
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConfigurableContractArtifact
impl<'de> Deserialize<'de> for ConfigurableContractArtifact
Source§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
Source§impl<'a> From<&'a ConfigurableContractArtifact> for CompactContractBytecodeCow<'a>
impl<'a> From<&'a ConfigurableContractArtifact> for CompactContractBytecodeCow<'a>
Source§fn from(artifact: &'a ConfigurableContractArtifact) -> Self
fn from(artifact: &'a ConfigurableContractArtifact) -> Self
Converts to this type from the input type.
Source§impl From<ConfigurableContractArtifact> for CompactContract
impl From<ConfigurableContractArtifact> for CompactContract
Source§fn from(artifact: ConfigurableContractArtifact) -> Self
fn from(artifact: ConfigurableContractArtifact) -> Self
Converts to this type from the input type.
Source§impl From<ConfigurableContractArtifact> for CompactContractBytecode
impl From<ConfigurableContractArtifact> for CompactContractBytecode
Source§fn from(artifact: ConfigurableContractArtifact) -> Self
fn from(artifact: ConfigurableContractArtifact) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ConfigurableContractArtifact
impl PartialEq for ConfigurableContractArtifact
Source§fn eq(&self, other: &ConfigurableContractArtifact) -> bool
fn eq(&self, other: &ConfigurableContractArtifact) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ConfigurableContractArtifact
Auto Trait Implementations§
impl !Freeze for ConfigurableContractArtifact
impl RefUnwindSafe for ConfigurableContractArtifact
impl Send for ConfigurableContractArtifact
impl Sync for ConfigurableContractArtifact
impl Unpin for ConfigurableContractArtifact
impl UnwindSafe for ConfigurableContractArtifact
Blanket Implementations§
Source§impl<T> Artifact for Twhere
T: Into<CompactContractBytecode> + Into<CompactContract>,
&'a T: for<'a> Into<CompactContractBytecodeCow<'a>>,
impl<T> Artifact for Twhere
T: Into<CompactContractBytecode> + Into<CompactContract>,
&'a T: for<'a> Into<CompactContractBytecodeCow<'a>>,
Source§fn into_inner(self) -> (Option<Contract>, Option<Bytes>)
fn into_inner(self) -> (Option<Contract>, Option<Bytes>)
Returns the artifact’s
Abi
and bytecodeSource§fn into_compact_contract(self) -> CompactContract
fn into_compact_contract(self) -> CompactContract
Turns the artifact into a container type for abi, compact bytecode and deployed bytecode
Source§fn into_contract_bytecode(self) -> CompactContractBytecode
fn into_contract_bytecode(self) -> CompactContractBytecode
Turns the artifact into a container type for abi, full bytecode and deployed bytecode
Source§fn into_parts(self) -> (Option<Contract>, Option<Bytes>, Option<Bytes>)
fn into_parts(self) -> (Option<Contract>, Option<Bytes>, Option<Bytes>)
Returns the contents of this type as a single tuple of abi, bytecode and deployed bytecode
Source§fn get_contract_bytecode(&self) -> CompactContractBytecodeCow<'_>
fn get_contract_bytecode(&self) -> CompactContractBytecodeCow<'_>
Returns the reference of container type for abi, compact bytecode and deployed bytecode if
available
Source§fn into_bytecode_bytes(self) -> Option<Bytes>where
Self: Sized,
fn into_bytecode_bytes(self) -> Option<Bytes>where
Self: Sized,
Consumes the type and returns the
bytecode
Source§fn into_deployed_bytecode_bytes(self) -> Option<Bytes>where
Self: Sized,
fn into_deployed_bytecode_bytes(self) -> Option<Bytes>where
Self: Sized,
Consumes the type and returns the
deployed bytecode
Source§fn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>>
fn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>>
Returns the reference to the
bytecode
Source§fn get_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
fn get_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
Returns the reference to the
bytecode
objectSource§fn get_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
fn get_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
Returns the bytes of the
bytecode
objectSource§fn get_deployed_bytecode(&self) -> Option<Cow<'_, CompactDeployedBytecode>>
fn get_deployed_bytecode(&self) -> Option<Cow<'_, CompactDeployedBytecode>>
Returns the reference to the
deployedBytecode
Source§fn get_deployed_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
fn get_deployed_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
Returns the reference to the
bytecode
objectSource§fn get_deployed_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
fn get_deployed_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
Returns the bytes of the
deployed bytecode
objectSource§fn get_source_map(&self) -> Option<Result<SourceMap, SyntaxError>>
fn get_source_map(&self) -> Option<Result<SourceMap, SyntaxError>>
Returns the
sourceMap
of the creation bytecode Read moreSource§fn get_source_map_str(&self) -> Option<Cow<'_, str>>
fn get_source_map_str(&self) -> Option<Cow<'_, str>>
Returns the creation bytecode
sourceMap
as str if it was included in the compiler outputSource§fn get_source_map_deployed(&self) -> Option<Result<SourceMap, SyntaxError>>
fn get_source_map_deployed(&self) -> Option<Result<SourceMap, SyntaxError>>
Returns the
sourceMap
of the runtime bytecode Read moreSource§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<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