pub struct ContextVM<M, P: Patch> { /* fields omitted */ }
A VM that executes using a context and block information.
Create a new VM using the given context, block header and patch.
Create a new VM with the given account state and blockhash state.
Create a new VM with customized initialization code.
Create a new VM with the result of the previous VM. This is
usually used by transaction for chainning them.
Returns the current state of the VM.
Returns the current runtime machine.
pub fn add_context_history_hook<F: 'static + Fn(&Context)>(&mut self, f: F) | [src] |
Add a new context history hook.
Commit an account information to this VM. This should only be used when receiving RequireError
. Read more
Commit a block hash to this VM. This should only be used when receiving RequireError
. Read more
Returns the current status of the VM.
Read the next instruction to be executed.
Read the next opcode to be executed.
Run one instruction and return. If it succeeds, VM status can still be Running
. If the call stack has more than one items, this will only executes the last items' one single instruction. Read more
Run instructions until it reaches a RequireError
or exits. If this function succeeds, the VM status can only be either ExitedOk
or ExitedErr
. Read more
Returns the changed or committed accounts information up to current execution status. Read more
Returns all fetched or modified addresses.
Returns the out value, if any.
Returns the available gas of this VM.
Returns the refunded gas of this VM.
Returns logs to be appended to the current block if the user decided to accept the running status of this VM. Read more
Returns all removed account addresses as for current VM execution.
Returns the real used gas by the transaction or the VM context. Only available when the status of the VM is exited. Otherwise returns zero. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static