Trait RuntimeEnvironment

Source
pub trait RuntimeEnvironment {
    // Required methods
    fn block_hash(&self, number: U256) -> H256;
    fn block_number(&self) -> U256;
    fn block_coinbase(&self) -> H160;
    fn block_timestamp(&self) -> U256;
    fn block_difficulty(&self) -> U256;
    fn block_randomness(&self) -> Option<H256>;
    fn block_gas_limit(&self) -> U256;
    fn block_base_fee_per_gas(&self) -> U256;
    fn chain_id(&self) -> U256;
}

Required Methods§

Source

fn block_hash(&self, number: U256) -> H256

Get environmental block hash.

Source

fn block_number(&self) -> U256

Get environmental block number.

Source

fn block_coinbase(&self) -> H160

Get environmental coinbase.

Source

fn block_timestamp(&self) -> U256

Get environmental block timestamp.

Source

fn block_difficulty(&self) -> U256

Get environmental block difficulty.

Source

fn block_randomness(&self) -> Option<H256>

Get environmental block randomness.

Source

fn block_gas_limit(&self) -> U256

Get environmental gas limit.

Source

fn block_base_fee_per_gas(&self) -> U256

Environmental block base fee.

Source

fn chain_id(&self) -> U256

Get environmental chain ID.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + RuntimeEnvironment + ?Sized> RuntimeEnvironment for &'a T

Source§

impl<T: RuntimeEnvironment + ?Sized> RuntimeEnvironment for Box<T>

Implementors§