reth_node_core::primitives::revm_primitives::db

Trait State

pub trait State {
    type Error;

    // Required methods
    fn basic(
        &mut self,
        address: Address,
    ) -> Result<Option<AccountInfo>, Self::Error>;
    fn code_by_hash(
        &mut self,
        code_hash: FixedBytes<32>,
    ) -> Result<Bytecode, Self::Error>;
    fn storage(
        &mut self,
        address: Address,
        index: Uint<256, 4>,
    ) -> Result<Uint<256, 4>, Self::Error>;
}

Required Associated Types§

type Error

Required Methods§

fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, Self::Error>

Get basic account information.

fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, Self::Error>

Get account code by its hash

fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, Self::Error>

Get storage value of address at index.

Implementations on Foreign Types§

§

impl<'a, T> State for &'a mut T
where T: 'a + State + ?Sized,

§

type Error = <T as State>::Error

§

fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, <&'a mut T as State>::Error>

§

fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <&'a mut T as State>::Error>

§

fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <&'a mut T as State>::Error>

§

impl<T> State for &T
where T: StateRef,

§

type Error = <T as StateRef>::Error

§

fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, <&T as State>::Error>

§

fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <&T as State>::Error>

§

fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <&T as State>::Error>

§

impl<T> State for Box<T>
where T: State + ?Sized,

§

type Error = <T as State>::Error

§

fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, <Box<T> as State>::Error>

§

fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <Box<T> as State>::Error>

§

fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <Box<T> as State>::Error>

§

impl<T> State for Arc<T>
where T: StateRef,

§

type Error = <T as StateRef>::Error

§

fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, <Arc<T> as State>::Error>

§

fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <Arc<T> as State>::Error>

§

fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <Arc<T> as State>::Error>

Implementors§