Skip to main content

PrecompileStorageProvider

Trait PrecompileStorageProvider 

Source
pub trait PrecompileStorageProvider {
    // Required methods
    fn sload(&mut self, address: Address, key: U256) -> Result<U256>;
    fn sstore(&mut self, address: Address, key: U256, value: U256) -> Result<()>;
    fn is_static(&self) -> bool;
}
Expand description

Low-level storage provider for interacting with EVM state.

Required Methods§

Source

fn sload(&mut self, address: Address, key: U256) -> Result<U256>

Performs an SLOAD operation.

Source

fn sstore(&mut self, address: Address, key: U256, value: U256) -> Result<()>

Performs an SSTORE operation.

Source

fn is_static(&self) -> bool

Returns whether the current call context is static.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§