pub(crate) trait AcceptedState {
// Required methods
fn basic(&self, address: Address) -> DbResult<Option<AccountInfo>>;
fn storage(&self, address: Address, slot: U256) -> DbResult<U256>;
fn storage_slots(&self, address: Address) -> Vec<(U256, U256)>;
fn block_hash(&self, number: U256) -> DbResult<B256>;
}Expand description
Reads of a backend’s accepted state, independent of its network.
Required Methods§
Sourcefn basic(&self, address: Address) -> DbResult<Option<AccountInfo>>
fn basic(&self, address: Address) -> DbResult<Option<AccountInfo>>
Returns an account, with its code.
Sourcefn storage_slots(&self, address: Address) -> Vec<(U256, U256)>
fn storage_slots(&self, address: Address) -> Vec<(U256, U256)>
Returns the cached storage slots of an account, with their values, in slot order.
Sourcefn block_hash(&self, number: U256) -> DbResult<B256>
fn block_hash(&self, number: U256) -> DbResult<B256>
Returns a block hash.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".