Struct vm::tests::FakeExt[][src]

pub struct FakeExt {
    pub store: HashMap<H256, H256>,
    pub suicides: HashSet<Address>,
    pub calls: HashSet<FakeCall>,
    pub sstore_clears: usize,
    pub depth: usize,
    pub blockhashes: HashMap<U256, H256>,
    pub codes: HashMap<Address, Arc<Bytes>>,
    pub logs: Vec<FakeLogEntry>,
    pub info: EnvInfo,
    pub schedule: Schedule,
    pub balances: HashMap<Address, U256>,
    pub tracing: bool,
    pub is_static: bool,
}

Fake externalities test structure.

Can't do recursive calls.

Fields

Methods

impl FakeExt
[src]

New fake externalities

New fake externalities with byzantium schedule rules

New fake externalities with constantinople schedule rules

Alter fake externalities to allow wasm

Trait Implementations

impl Default for FakeExt
[src]

Returns the "default value" for a type. Read more

impl Ext for FakeExt
[src]

Returns a value for given key.

Stores a value for given key.

Determine whether an account exists.

Determine whether an account exists and is not null (zero balance/nonce, no code).

Balance of the origin account.

Returns address balance.

Returns the hash of one of the 256 most recent complete blocks.

Creates new contract. Read more

Message call. Read more

Returns code at given address

Returns code size at given address

Creates log entry with given topics and data

Should be called when transaction calls RETURN opcode. Returns gas_left if cost of returning the data is not too high. Read more

Should be called when contract commits suicide. Address to which funds should be refunded. Read more

Returns schedule.

Returns environment info.

Returns current depth of execution. Read more

Check if running in static context.

Increments sstore refunds count by 1.

Decide if any more operations should be traced. Passthrough for the VM trace.

Prepare to trace an operation. Passthrough for the VM trace.

Trace the finalised execution of a single instruction.

Auto Trait Implementations

impl Send for FakeExt

impl Sync for FakeExt