pub trait StorageOps {
// Required methods
fn sstore(
&mut self,
slot: U256,
value: U256,
) -> Result<(), TempoPrecompileError>;
fn sload(&mut self, slot: U256) -> Result<U256, TempoPrecompileError>;
}Expand description
Storage operations for a given (contract) address.
Required Methods§
Sourcefn sstore(
&mut self,
slot: U256,
value: U256,
) -> Result<(), TempoPrecompileError>
fn sstore( &mut self, slot: U256, value: U256, ) -> Result<(), TempoPrecompileError>
Performs an SSTORE operation at the provided slot, with the given value.
Sourcefn sload(&mut self, slot: U256) -> Result<U256, TempoPrecompileError>
fn sload(&mut self, slot: U256) -> Result<U256, TempoPrecompileError>
Performs an SLOAD operation at the provided slot.
Implementors§
impl<T> StorageOps for Twhere
T: ContractStorage,
Blanket implementation of StorageOps for all type that implement ContractStorage.
Allows contracts to use StorageOps while delegating to PrecompileStorageProvider.