pub trait StateRef {
    type Error;

    // Required methods
    fn basic(&self, address: B160) -> Result<Option<AccountInfo>, Self::Error>;
    fn code_by_hash(&self, code_hash: B256) -> Result<Bytecode, Self::Error>;
    fn storage(&self, address: B160, index: U256) -> Result<U256, Self::Error>;
}

Required Associated Types§

Required Methods§

source

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

Whether account at address exists. Get basic account information.

source

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

Get account code by its hash

source

fn storage(&self, address: B160, index: U256) -> Result<U256, Self::Error>

Get storage value of address at index.

Implementations on Foreign Types§

source§

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

§

type Error = <T as StateRef>::Error

source§

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

source§

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

source§

fn storage(&self, address: B160, index: U256) -> Result<U256, Self::Error>

source§

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

§

type Error = <T as StateRef>::Error

source§

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

source§

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

source§

fn storage(&self, address: B160, index: U256) -> Result<U256, Self::Error>

source§

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

§

type Error = <T as StateRef>::Error

source§

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

source§

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

source§

fn storage(&self, address: B160, index: U256) -> Result<U256, Self::Error>

Implementors§