pub struct Metadata {
pub client_version: String,
pub chain_id: ChainId,
pub instance_id: B256,
pub latest_block_number: u64,
pub latest_block_hash: BlockHash,
pub forked_network: Option<ForkedNetwork>,
pub snapshots: BTreeMap<U256, (u64, B256)>,
}
Expand description
Anvil equivalent of hardhat_metadata
.
Metadata about the current Anvil instance.
See https://hardhat.org/hardhat-network/docs/reference#hardhat_metadata
Fields§
§client_version: String
client version
chain_id: ChainId
Chain id of the node.
instance_id: B256
Unique instance id
latest_block_number: u64
Latest block number
latest_block_hash: BlockHash
Latest block hash
forked_network: Option<ForkedNetwork>
Forked network info
snapshots: BTreeMap<U256, (u64, B256)>
Snapshots of the chain
Trait Implementations§
source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
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
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
source§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)