Struct foundry_compilers::artifacts::contract::Contract
source · pub struct Contract {
pub abi: Option<JsonAbi>,
pub metadata: Option<LosslessMetadata>,
pub userdoc: UserDoc,
pub devdoc: DevDoc,
pub ir: Option<String>,
pub storage_layout: StorageLayout,
pub evm: Option<Evm>,
pub ewasm: Option<Ewasm>,
pub ir_optimized: Option<String>,
}Expand description
Represents a compiled solidity contract
Fields§
§abi: Option<JsonAbi>The Ethereum Contract Metadata. See https://docs.soliditylang.org/en/develop/metadata.html
metadata: Option<LosslessMetadata>§userdoc: UserDoc§devdoc: DevDoc§ir: Option<String>§storage_layout: StorageLayout§evm: Option<Evm>EVM-related outputs
ewasm: Option<Ewasm>Ewasm related outputs
ir_optimized: Option<String>Trait Implementations§
source§impl<'de> Deserialize<'de> for Contract
impl<'de> Deserialize<'de> for Contract
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 Contract> for CompactContractBytecodeCow<'a>
impl<'a> From<&'a Contract> for CompactContractBytecodeCow<'a>
source§impl<'a> From<&'a Contract> for CompactContractRef<'a>
impl<'a> From<&'a Contract> for CompactContractRef<'a>
source§impl From<Contract> for CompactContract
impl From<Contract> for CompactContract
source§impl From<Contract> for CompactContractBytecode
impl From<Contract> for CompactContractBytecode
source§impl From<Contract> for ContractBytecode
impl From<Contract> for ContractBytecode
source§impl PartialEq for Contract
impl PartialEq for Contract
impl StructuralPartialEq for Contract
Auto Trait Implementations§
impl !Freeze for Contract
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnwindSafe for Contract
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<JsonAbi>, Option<Bytes>)
fn into_inner(self) -> (Option<JsonAbi>, Option<Bytes>)
Returns the artifact’s
JsonAbi and bytecode.source§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<JsonAbi>, Option<Bytes>, Option<Bytes>)
fn into_parts(self) -> (Option<JsonAbi>, 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_abi(self) -> Option<JsonAbi>where
Self: Sized,
fn into_abi(self) -> Option<JsonAbi>where
Self: Sized,
Consumes the type and returns the JsonAbi
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
bytecodesource§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 bytecodesource§fn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>>
fn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>>
Returns the reference to the
bytecodesource§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
deployedBytecodesource§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_abi(&self) -> Option<Cow<'_, JsonAbi>>
fn get_abi(&self) -> Option<Cow<'_, JsonAbi>>
Returns the reference to the JsonAbi if available
source§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> 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