pub trait Backend {
Show 16 methods
// Required methods
fn gas_price(&self) -> U256;
fn origin(&self) -> H160;
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;
fn exists(&self, address: H160) -> bool;
fn basic(&self, address: H160) -> Basic;
fn code(&self, address: H160) -> Vec<u8>;
fn storage(&self, address: H160, index: H256) -> H256;
fn original_storage(&self, address: H160, index: H256) -> Option<H256>;
}
Expand description
EVM backend.
Required Methods§
sourcefn block_hash(&self, number: U256) -> H256
fn block_hash(&self, number: U256) -> H256
Environmental block hash.
sourcefn block_number(&self) -> U256
fn block_number(&self) -> U256
Environmental block number.
sourcefn block_coinbase(&self) -> H160
fn block_coinbase(&self) -> H160
Environmental coinbase.
sourcefn block_timestamp(&self) -> U256
fn block_timestamp(&self) -> U256
Environmental block timestamp.
sourcefn block_difficulty(&self) -> U256
fn block_difficulty(&self) -> U256
Environmental block difficulty.
sourcefn block_randomness(&self) -> Option<H256>
fn block_randomness(&self) -> Option<H256>
Get environmental block randomness.
sourcefn block_gas_limit(&self) -> U256
fn block_gas_limit(&self) -> U256
Environmental block gas limit.
sourcefn block_base_fee_per_gas(&self) -> U256
fn block_base_fee_per_gas(&self) -> U256
Environmental block base fee.