pub struct HardhatArtifact {
    pub format: String,
    pub contract_name: String,
    pub source_name: String,
    pub abi: LosslessAbi,
    pub bytecode: Option<BytecodeObject>,
    pub deployed_bytecode: Option<BytecodeObject>,
    pub link_references: BTreeMap<String, BTreeMap<String, Vec<Offsets>>>,
    pub deployed_link_references: BTreeMap<String, BTreeMap<String, Vec<Offsets>>>,
}
Expand description

A hardhat artifact

Fields§

§format: String§contract_name: String

A string with the contract’s name.

§source_name: String

The source name of this contract in the workspace like contracts/Greeter.sol

§abi: LosslessAbi

The contract’s ABI

§bytecode: Option<BytecodeObject>

A “0x”-prefixed hex string of the unlinked deployment bytecode. If the contract is not deployable, this has the string “0x”

§deployed_bytecode: Option<BytecodeObject>

A “0x”-prefixed hex string of the unlinked runtime/deployed bytecode. If the contract is not deployable, this has the string “0x”

§link_references: BTreeMap<String, BTreeMap<String, Vec<Offsets>>>

The bytecode’s link references object as returned by solc. If the contract doesn’t need to be linked, this value contains an empty object.

§deployed_link_references: BTreeMap<String, BTreeMap<String, Vec<Offsets>>>

The deployed bytecode’s link references object as returned by solc. If the contract doesn’t need to be linked, this value contains an empty object.

Trait Implementations§

source§

impl Clone for HardhatArtifact

source§

fn clone(&self) -> HardhatArtifact

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HardhatArtifact

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for HardhatArtifact

source§

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 HardhatArtifact> for CompactContractBytecodeCow<'a>

source§

fn from(artifact: &'a HardhatArtifact) -> Self

Converts to this type from the input type.
source§

impl From<HardhatArtifact> for CompactContract

source§

fn from(artifact: HardhatArtifact) -> Self

Converts to this type from the input type.
source§

impl From<HardhatArtifact> for CompactContractBytecode

source§

fn from(artifact: HardhatArtifact) -> Self

Converts to this type from the input type.
source§

impl From<HardhatArtifact> for ContractBytecode

source§

fn from(artifact: HardhatArtifact) -> Self

Converts to this type from the input type.
source§

impl PartialEq for HardhatArtifact

source§

fn eq(&self, other: &HardhatArtifact) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for HardhatArtifact

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for HardhatArtifact

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Artifact for T

source§

fn into_inner(self) -> (Option<Contract>, Option<Bytes>)

Returns the artifact’s Abi and bytecode
source§

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

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>)

Returns the contents of this type as a single tuple of abi, bytecode and deployed bytecode
source§

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<Abi>
where Self: Sized,

Consumes the type and returns the Abi
source§

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,

Consumes the type and returns the deployed bytecode
source§

fn try_into_parts(self) -> Result<(Abi, Bytes, Bytes)>
where Self: Sized,

Same as Self::into_parts() but returns Err if an element is None
source§

fn get_bytecode(&self) -> Option<Cow<'_, CompactBytecode>>

Returns the reference to the bytecode
source§

fn get_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>

Returns the reference to the bytecode object
source§

fn get_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>

Returns the bytes of the bytecode object
source§

fn get_deployed_bytecode(&self) -> Option<Cow<'_, CompactDeployedBytecode>>

Returns the reference to the deployedBytecode
source§

fn get_deployed_bytecode_object(&self) -> Option<Cow<'_, BytecodeObject>>

Returns the reference to the bytecode object
source§

fn get_deployed_bytecode_bytes(&self) -> Option<Cow<'_, Bytes>>

Returns the bytes of the deployed bytecode object
source§

fn get_abi(&self) -> Option<Cow<'_, Abi>>

Returns the reference to the Abi if available
source§

fn get_source_map(&self) -> Option<Result<SourceMap, SyntaxError>>

Returns the sourceMap of the creation bytecode Read more
source§

fn get_source_map_str(&self) -> Option<Cow<'_, str>>

Returns the creation bytecode sourceMap as str if it was included in the compiler output
source§

fn get_source_map_deployed(&self) -> Option<Result<SourceMap, SyntaxError>>

Returns the sourceMap of the runtime bytecode Read more
source§

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
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> JsonSchemaMaybe for T