Trait DB

Source
pub trait DB: Database<Error = DatabaseError> + DatabaseCommit {
    // Required methods
    fn insert_account_info(
        &mut self,
        address: Address,
        account_info: AccountInfo,
    );
    fn accounts(&self) -> &HashMap<Address, DbAccount>;
    fn contracts(&self) -> &HashMap<B256, Bytecode>;
    fn logs(&self) -> &Vec<Log>;
    fn block_hashes(&self) -> &HashMap<U256, B256>;
}
Expand description

Combined Revm database trait with data export methods

Extends the Database and DatabaseCommit traits with methods to export the state of the DB. These methods allow the Db state to be exported from the Python API.

Required Methods§

Source

fn insert_account_info(&mut self, address: Address, account_info: AccountInfo)

Source

fn accounts(&self) -> &HashMap<Address, DbAccount>

Source

fn contracts(&self) -> &HashMap<B256, Bytecode>

Source

fn logs(&self) -> &Vec<Log>

Source

fn block_hashes(&self) -> &HashMap<U256, B256>

Implementors§