Struct tetsy_vm::tests::FakeExt [−][src]
Fake externalities test structure.
Can’t do recursive calls.
Fields
store: HashMap<H256, H256>
suicides: HashSet<Address>
calls: HashSet<FakeCall>
sstore_clears: i128
depth: usize
blockhashes: HashMap<U256, H256>
codes: HashMap<Address, Arc<Bytes>>
logs: Vec<FakeLogEntry>
info: EnvInfo
schedule: Schedule
balances: HashMap<Address, U256>
tracing: bool
is_static: bool
Implementations
impl FakeExt
[src]
pub fn new() -> Self
[src]
New fake externalities
pub fn new_byzantium() -> Self
[src]
New fake externalities with byzantium schedule rules
pub fn new_constantinople() -> Self
[src]
New fake externalities with constantinople schedule rules
pub fn new_istanbul() -> Self
[src]
New fake externalities with Istanbul schedule rules
pub fn with_wasm(self) -> Self
[src]
Alter fake externalities to allow wasm
pub fn with_chain_id(self, chain_id: u64) -> Self
[src]
Set chain ID
Trait Implementations
impl Default for FakeExt
[src]
impl Ext for FakeExt
[src]
fn initial_storage_at(&self, _key: &H256) -> Result<H256>
[src]
fn storage_at(&self, key: &H256) -> Result<H256>
[src]
fn set_storage(&mut self, key: H256, value: H256) -> Result<()>
[src]
fn exists(&self, address: &Address) -> Result<bool>
[src]
fn exists_and_not_null(&self, address: &Address) -> Result<bool>
[src]
fn origin_balance(&self) -> Result<U256>
[src]
fn balance(&self, address: &Address) -> Result<U256>
[src]
fn blockhash(&mut self, number: &U256) -> H256
[src]
fn create(
&mut self,
gas: &U256,
value: &U256,
code: &[u8],
_parent_version: &U256,
address: CreateContractAddress,
_trap: bool
) -> Result<ContractCreateResult, TrapKind>
[src]
&mut self,
gas: &U256,
value: &U256,
code: &[u8],
_parent_version: &U256,
address: CreateContractAddress,
_trap: bool
) -> Result<ContractCreateResult, TrapKind>
fn call(
&mut self,
gas: &U256,
sender_address: &Address,
receive_address: &Address,
value: Option<U256>,
data: &[u8],
code_address: &Address,
_call_type: ActionType,
_trap: bool
) -> Result<MessageCallResult, TrapKind>
[src]
&mut self,
gas: &U256,
sender_address: &Address,
receive_address: &Address,
value: Option<U256>,
data: &[u8],
code_address: &Address,
_call_type: ActionType,
_trap: bool
) -> Result<MessageCallResult, TrapKind>
fn extcode(&self, address: &Address) -> Result<Option<Arc<Bytes>>>
[src]
fn extcodesize(&self, address: &Address) -> Result<Option<usize>>
[src]
fn extcodehash(&self, address: &Address) -> Result<Option<H256>>
[src]
fn log(&mut self, topics: Vec<H256>, data: &[u8]) -> Result<()>
[src]
fn ret(
self,
_gas: &U256,
_data: &ReturnData,
_apply_state: bool
) -> Result<U256>
[src]
self,
_gas: &U256,
_data: &ReturnData,
_apply_state: bool
) -> Result<U256>
fn suicide(&mut self, refund_address: &Address) -> Result<()>
[src]
fn schedule(&self) -> &Schedule
[src]
fn env_info(&self) -> &EnvInfo
[src]
fn chain_id(&self) -> u64
[src]
fn depth(&self) -> usize
[src]
fn is_static(&self) -> bool
[src]
fn add_sstore_refund(&mut self, value: usize)
[src]
fn sub_sstore_refund(&mut self, value: usize)
[src]
fn trace_next_instruction(
&mut self,
_pc: usize,
_instruction: u8,
_gas: U256
) -> bool
[src]
&mut self,
_pc: usize,
_instruction: u8,
_gas: U256
) -> bool
fn trace_prepare_execute(
&mut self,
_pc: usize,
_instruction: u8,
_gas_cost: U256,
_mem_written: Option<(usize, usize)>,
_store_written: Option<(U256, U256)>
)
[src]
&mut self,
_pc: usize,
_instruction: u8,
_gas_cost: U256,
_mem_written: Option<(usize, usize)>,
_store_written: Option<(U256, U256)>
)
fn trace_failed(&mut self)
[src]
fn trace_executed(&mut self, _gas_used: U256, _stack_push: &[U256], _mem: &[u8])
[src]
Auto Trait Implementations
impl RefUnwindSafe for FakeExt
impl Send for FakeExt
impl Sync for FakeExt
impl Unpin for FakeExt
impl UnwindSafe for FakeExt
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,