Block

Struct Block 

Source
pub struct Block {
Show 21 fields pub base_fee_per_gas: Option<Nat256>, pub number: Nat256, pub difficulty: Option<Nat256>, pub extra_data: Hex, pub gas_limit: Nat256, pub gas_used: Nat256, pub hash: Hex32, pub logs_bloom: Hex256, pub miner: Hex20, pub mix_hash: Hex32, pub nonce: Nat256, pub parent_hash: Hex32, pub receipts_root: Hex32, pub sha3_uncles: Hex32, pub size: Nat256, pub state_root: Hex32, pub timestamp: Nat256, pub total_difficulty: Option<Nat256>, pub transactions: Vec<Hex32>, pub transactions_root: Option<Hex32>, pub uncles: Vec<Hex32>,
}

Fields§

§base_fee_per_gas: Option<Nat256>

Base fee per gas Only included for blocks after the London Upgrade / EIP-1559.

§number: Nat256

Block number

§difficulty: Option<Nat256>

Difficulty

§extra_data: Hex

Extra data

§gas_limit: Nat256

Maximum gas allowed in this block

§gas_used: Nat256

Gas used by all transactions in this block

§hash: Hex32

Block hash

§logs_bloom: Hex256

Bloom filter for the logs.

§miner: Hex20

Miner

§mix_hash: Hex32

Mix hash

§nonce: Nat256

Nonce

§parent_hash: Hex32

Parent block hash

§receipts_root: Hex32

Receipts root

§sha3_uncles: Hex32

Ommers hash

§size: Nat256

Block size

§state_root: Hex32

State root

§timestamp: Nat256

Timestamp

§total_difficulty: Option<Nat256>

Total difficulty is the sum of all difficulty values up to and including this block.

Note: this field was removed from the official JSON-RPC specification in https://github.com/ethereum/execution-apis/pull/570 and may no longer be served by providers.

§transactions: Vec<Hex32>

Transaction hashes

§transactions_root: Option<Hex32>

Transactions root

§uncles: Vec<Hex32>

Uncles

Trait Implementations§

Source§

impl CandidType for Block

Source§

fn _ty() -> Type

Source§

fn id() -> TypeId

Source§

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

Source§

fn ty() -> Type

Source§

impl Clone for Block

Source§

fn clone(&self) -> Block

Returns a duplicate 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 Block

Source§

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

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

impl<'de> Deserialize<'de> for Block

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 PartialEq for Block

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Block

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 Block

Auto Trait Implementations§

§

impl Freeze for Block

§

impl RefUnwindSafe for Block

§

impl Send for Block

§

impl Sync for Block

§

impl Unpin for Block

§

impl UnwindSafe for Block

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

Source§

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

Source§

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,