[−][src]Struct cita_vm::DataProvider
An implemention for evm::DataProvider
Methods
impl<B: DB> DataProvider<B>
[src]
pub fn new(
b: Arc<dyn BlockDataProvider>,
s: Arc<RefCell<State<B>>>,
store: Arc<RefCell<Store>>
) -> Self
[src]
b: Arc<dyn BlockDataProvider>,
s: Arc<RefCell<State<B>>>,
store: Arc<RefCell<Store>>
) -> Self
Create a new instance. It's obvious.
Trait Implementations
impl<B: DB + 'static> DataProvider for DataProvider<B>
[src]
fn get_balance(&self, address: &Address) -> U256
[src]
fn add_refund(&mut self, address: &Address, n: u64)
[src]
fn sub_refund(&mut self, address: &Address, n: u64)
[src]
fn get_refund(&self, address: &Address) -> u64
[src]
fn get_code_size(&self, address: &Address) -> u64
[src]
fn get_code(&self, address: &Address) -> Vec<u8>
[src]
fn get_code_hash(&self, address: &Address) -> H256
[src]
fn get_block_hash(&self, number: &U256) -> H256
[src]
fn get_storage(&self, address: &Address, key: &H256) -> H256
[src]
fn set_storage(&mut self, address: &Address, key: H256, value: H256)
[src]
fn get_storage_origin(&self, address: &Address, key: &H256) -> H256
[src]
fn set_storage_origin(&mut self, _address: &Address, _key: H256, _value: H256)
[src]
fn selfdestruct(&mut self, address: &Address, refund_to: &Address) -> bool
[src]
fn sha3(&self, data: &[u8]) -> H256
[src]
fn is_empty(&self, address: &Address) -> bool
[src]
fn call(
&self,
opcode: OpCode,
params: InterpreterParams
) -> Result<InterpreterResult, Error>
[src]
&self,
opcode: OpCode,
params: InterpreterParams
) -> Result<InterpreterResult, Error>
Auto Trait Implementations
impl<B> !Send for DataProvider<B>
impl<B> !Sync for DataProvider<B>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self