pub trait Artifact {
Show 20 methods
// Required methods
fn into_inner(self) -> (Option<JsonAbi>, Option<Bytes>);
fn into_compact_contract(self) -> CompactContract;
fn into_contract_bytecode(self) -> CompactContractBytecode;
fn into_parts(self) -> (Option<JsonAbi>, Option<Bytes>, Option<Bytes>);
fn get_contract_bytecode(&self) -> CompactContractBytecodeCow<'_>;
// Provided methods
fn into_abi(self) -> Option<JsonAbi>
where Self: Sized { ... }
fn into_bytecode_bytes(self) -> Option<Bytes>
where Self: Sized { ... }
fn into_deployed_bytecode_bytes(self) -> Option<Bytes>
where Self: Sized { ... }
fn try_into_parts(self) -> Result<(JsonAbi, Bytes, Bytes)>
where Self: Sized { ... }
fn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>> { ... }
fn get_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>> { ... }
fn get_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>> { ... }
fn get_deployed_bytecode(&self) -> Option<Cow<'_, CompactDeployedBytecode>> { ... }
fn get_deployed_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>> { ... }
fn get_deployed_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>> { ... }
fn get_abi(&self) -> Option<Cow<'_, JsonAbi>> { ... }
fn get_source_map(&self) -> Option<Result<SourceMap, SyntaxError>> { ... }
fn get_source_map_str(&self) -> Option<Cow<'_, str>> { ... }
fn get_source_map_deployed(&self) -> Option<Result<SourceMap, SyntaxError>> { ... }
fn get_source_map_deployed_str(&self) -> Option<Cow<'_, str>> { ... }
}Expand description
A trait representation for a crate::compilers::CompilerContract artifact
Required Methods§
Sourcefn into_inner(self) -> (Option<JsonAbi>, Option<Bytes>)
fn into_inner(self) -> (Option<JsonAbi>, Option<Bytes>)
Returns the artifact’s JsonAbi and bytecode.
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Provided Methods§
Sourcefn into_abi(self) -> Option<JsonAbi>where
Self: Sized,
fn into_abi(self) -> Option<JsonAbi>where
Self: Sized,
Consumes the type and returns the JsonAbi
Sourcefn 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
Sourcefn 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
Sourcefn try_into_parts(self) -> Result<(JsonAbi, Bytes, Bytes)>where
Self: Sized,
fn try_into_parts(self) -> Result<(JsonAbi, Bytes, Bytes)>where
Self: Sized,
Same as Self::into_parts() but returns Err if an element is None
Sourcefn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>>
fn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>>
Returns the reference to the bytecode
Sourcefn get_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
fn get_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
Returns the reference to the bytecode object
Sourcefn get_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
fn get_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
Returns the bytes of the bytecode object
Sourcefn get_deployed_bytecode(&self) -> Option<Cow<'_, CompactDeployedBytecode>>
fn get_deployed_bytecode(&self) -> Option<Cow<'_, CompactDeployedBytecode>>
Returns the reference to the deployedBytecode
Sourcefn get_deployed_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
fn get_deployed_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>
Returns the reference to the bytecode object
Sourcefn get_deployed_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
fn get_deployed_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>
Returns the bytes of the deployed bytecode object
Sourcefn get_abi(&self) -> Option<Cow<'_, JsonAbi>>
fn get_abi(&self) -> Option<Cow<'_, JsonAbi>>
Returns the reference to the JsonAbi if available
Sourcefn get_source_map(&self) -> Option<Result<SourceMap, SyntaxError>>
fn get_source_map(&self) -> Option<Result<SourceMap, SyntaxError>>
Returns the sourceMap of the creation bytecode
Returns None if no sourceMap string was included in the compiler output
Returns Some(Err) if parsing the sourcemap failed
Sourcefn 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 output
Sourcefn 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
Returns None if no sourceMap string was included in the compiler output
Returns Some(Err) if parsing the sourcemap failed
Sourcefn get_source_map_deployed_str(&self) -> Option<Cow<'_, str>>
fn get_source_map_deployed_str(&self) -> Option<Cow<'_, str>>
Returns the runtime bytecode sourceMap as str if it was included in the compiler output
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".