pub struct FakeExt {
Show 15 fields pub initial_store: HashMap<H256, H256>, pub store: HashMap<H256, H256>, pub suicides: HashSet<Address>, pub calls: HashSet<FakeCall>, pub sstore_clears: i128, 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, pub access_list: AccessList, /* private fields */
}
Expand description

Fake externalities test structure.

Can’t do recursive calls.

Fields

initial_store: HashMap<H256, H256>store: HashMap<H256, H256>suicides: HashSet<Address>calls: HashSet<FakeCall>sstore_clears: i128depth: usizeblockhashes: HashMap<U256, H256>codes: HashMap<Address, Arc<Bytes>>logs: Vec<FakeLogEntry>info: EnvInfoschedule: Schedulebalances: HashMap<Address, U256>tracing: boolis_static: boolaccess_list: AccessList

Implementations

New fake externalities

New fake externalities with byzantium schedule rules

New fake externalities with constantinople schedule rules

New fake externalities with Istanbul schedule rules

New fake externalities with Berlin schedule rules

New fake externalities with London schedule rules

Alter fake externalities to allow wasm

Set chain ID

Fill the storage before the transaction with data, i. e. set both original and current values, beginning from address 0.

Trait Implementations

Returns the “default value” for a type. Read more

Returns the storage value for a given key if reversion happens on the current transaction.

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

Returns the address that will be created in the create call

Message call. Read more

Returns code at given address

Returns code size at given address

Returns code hash 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 the chain ID of the blockchain

Returns current depth of execution. Read more

Check if running in static context.

Increments sstore refunds counter.

Decrements sstore refunds counter.

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

Returns if the list is enabled

Checks if contains an storage key

Inserts an storage key into the list

Checks if contains an address

Inserts an address into the list

Prepare to trace an operation. Passthrough for the VM trace. For each call of trace_prepare_execute either trace_failed or trace_executed MUST be called. Read more

Trace the execution failure of a single instruction.

Trace the finalised execution of a single instruction.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.