pub trait JournalAccess {
// Required methods
fn sload(&mut self, addr: Address, key: U256) -> Result<(U256, bool)>;
fn sstore(
&mut self,
addr: Address,
key: U256,
value: U256,
) -> Result<SStoreInfo>;
fn tload(&mut self, addr: Address, key: U256) -> U256;
fn tstore(&mut self, addr: Address, key: U256, value: U256);
fn log(&mut self, log: Log);
fn account_balance(&mut self, addr: Address) -> Result<(U256, bool)>;
fn account_code(&mut self, addr: Address) -> Result<(Vec<u8>, bool)>;
fn account_codehash(&mut self, addr: Address) -> Result<(B256, bool)>;
fn address_in_access_list(&self, addr: Address) -> bool;
fn add_address_to_access_list(&mut self, addr: Address);
fn is_account_empty(&mut self, addr: Address) -> Result<bool>;
}Expand description
Object-safe trait wrapping Journal<DB> operations needed by Stylus.
By erasing the DB type parameter, StylusEvmApi becomes non-generic
and trivially satisfies 'static (required by wasmer’s FunctionEnv).