Trait reth::core::primitives::revm_primitives::db::components::state::StateRef

pub trait StateRef {
    type Error;

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

Required Associated Types§

type Error

Required Methods§

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

Get basic account information.

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

Get account code by its hash

fn storage( &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> StateRef for &'a T
where T: 'a + StateRef + ?Sized,

§

type Error = <T as StateRef>::Error

§

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

§

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

§

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

§

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

§

type Error = <T as StateRef>::Error

§

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

§

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

§

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

§

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

§

type Error = <T as StateRef>::Error

§

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

§

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

§

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

§

impl<T> StateRef for Rc<T>
where T: StateRef + ?Sized,

§

type Error = <T as StateRef>::Error

§

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

§

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

§

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

§

impl<T> StateRef for Arc<T>
where T: StateRef + ?Sized,

§

type Error = <T as StateRef>::Error

§

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

§

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

§

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

Implementors§