Struct ethers_solc::artifacts::contract::CompactContractBytecode
source · pub struct CompactContractBytecode {
pub abi: Option<Contract>,
pub bytecode: Option<CompactBytecode>,
pub deployed_bytecode: Option<CompactDeployedBytecode>,
}
Expand description
Minimal representation of a contract with a present abi and bytecode.
Unlike CompactContractSome
which contains the BytecodeObject
, this holds the whole
Bytecode
object.
Fields§
§abi: Option<Contract>
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>
Implementations§
Trait Implementations§
source§impl Clone for CompactContractBytecode
impl Clone for CompactContractBytecode
source§fn clone(&self) -> CompactContractBytecode
fn clone(&self) -> CompactContractBytecode
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 CompactContractBytecode
impl Debug for CompactContractBytecode
source§impl Default for CompactContractBytecode
impl Default for CompactContractBytecode
source§fn default() -> CompactContractBytecode
fn default() -> CompactContractBytecode
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CompactContractBytecode
impl<'de> Deserialize<'de> for CompactContractBytecode
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 CompactContractBytecode> for CompactContractBytecodeCow<'a>
impl<'a> From<&'a CompactContractBytecode> for CompactContractBytecodeCow<'a>
source§fn from(artifact: &'a CompactContractBytecode) -> Self
fn from(artifact: &'a CompactContractBytecode) -> Self
Converts to this type from the input type.
source§impl From<CompactContractBytecode> for CompactContract
impl From<CompactContractBytecode> for CompactContract
source§fn from(c: CompactContractBytecode) -> Self
fn from(c: CompactContractBytecode) -> Self
Converts to this type from the input type.
source§impl From<CompactContractBytecode> for ContractBytecode
impl From<CompactContractBytecode> for ContractBytecode
source§fn from(c: CompactContractBytecode) -> Self
fn from(c: CompactContractBytecode) -> 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 From<Contract> for CompactContractBytecode
impl From<Contract> for CompactContractBytecode
source§impl From<ContractBytecode> for CompactContractBytecode
impl From<ContractBytecode> for CompactContractBytecode
source§fn from(c: ContractBytecode) -> Self
fn from(c: ContractBytecode) -> Self
Converts to this type from the input type.
source§impl From<HardhatArtifact> for CompactContractBytecode
impl From<HardhatArtifact> for CompactContractBytecode
source§fn from(artifact: HardhatArtifact) -> Self
fn from(artifact: HardhatArtifact) -> Self
Converts to this type from the input type.
source§impl From<Value> for CompactContractBytecode
impl From<Value> for CompactContractBytecode
source§impl PartialEq for CompactContractBytecode
impl PartialEq for CompactContractBytecode
source§fn eq(&self, other: &CompactContractBytecode) -> bool
fn eq(&self, other: &CompactContractBytecode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CompactContractBytecode
impl Serialize for CompactContractBytecode
impl StructuralPartialEq for CompactContractBytecode
Auto Trait Implementations§
impl RefUnwindSafe for CompactContractBytecode
impl Send for CompactContractBytecode
impl Sync for CompactContractBytecode
impl Unpin for CompactContractBytecode
impl UnwindSafe for CompactContractBytecode
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