pub trait StorageBackend: SystemStateBackend {
// Required methods
fn sload(
&mut self,
account: Address,
slot: U256,
) -> Result<U256, <Self as SystemStateBackend>::Error>;
fn sstore(
&mut self,
account: Address,
slot: U256,
value: U256,
) -> Result<(), <Self as SystemStateBackend>::Error>;
}Expand description
Abstraction over the two backing stores arb-storage accessor types are
driven from: the block executor’s &mut State<D> and the precompile
handler’s &mut EvmInternals<'_>.
The trait sits beneath the typed accessor layer (StorageBackedX) so the
same descriptors serve both call paths without having to fork the
accessor API.
Required Methods§
Sourcefn sload(
&mut self,
account: Address,
slot: U256,
) -> Result<U256, <Self as SystemStateBackend>::Error>
fn sload( &mut self, account: Address, slot: U256, ) -> Result<U256, <Self as SystemStateBackend>::Error>
Reads the value at (account, slot). Reads through StorageBackend
follow the host’s normal storage path (journaled when invoked on
EvmInternals); for non-journaled reads see SystemStateBackend.