pub trait RuntimeBaseBackend {
// Required methods
fn balance(&self, address: H160) -> U256;
fn code(&self, address: H160) -> Vec<u8> ⓘ;
fn storage(&self, address: H160, index: H256) -> H256;
fn transient_storage(&self, address: H160, index: H256) -> H256;
fn exists(&self, address: H160) -> bool;
fn nonce(&self, address: H160) -> U256;
// Provided methods
fn code_size(&self, address: H160) -> U256 { ... }
fn code_hash(&self, address: H160) -> H256 { ... }
fn can_create(&self, address: H160) -> bool { ... }
}
Expand description
Runtime base backend. The immutable and limited part of RuntimeBackend.
Required Methods§
Sourcefn transient_storage(&self, address: H160, index: H256) -> H256
fn transient_storage(&self, address: H160, index: H256) -> H256
Get transient storage value of address at index.
Provided Methods§
Sourcefn code_hash(&self, address: H160) -> H256
fn code_hash(&self, address: H160) -> H256
Get code hash of address.
The caller is responsible for checking whether the account is empty.
Sourcefn can_create(&self, address: H160) -> bool
fn can_create(&self, address: H160) -> bool
Detect for create collision. Note EIP-7610.