@ethereumjs/vm / VM
Defined in: vm/src/vm.ts:16
Execution engine which can be used to run a blockchain, individual blocks, individual transactions, or snippets of EVM bytecode.
new VM(
opts
):VM
Defined in: vm/src/vm.ts:65
Instantiates a new VM Object.
VMOpts
= {}
VM
The direct usage of this constructor is discouraged since non-finalized async initialization might lead to side effects. Please use the async createVM constructor instead (same API).
readonly
blockchain:EVMMockBlockchainInterface
Defined in: vm/src/vm.ts:25
The blockchain the VM operates on
readonly
common:Common
Defined in: vm/src/vm.ts:27
readonly
events:EventEmitter
<VMEvent
>
Defined in: vm/src/vm.ts:29
readonly
evm:EVMInterface
Defined in: vm/src/vm.ts:33
The EVM used for bytecode execution
readonly
stateManager:StateManagerInterface
Defined in: vm/src/vm.ts:20
The StateManager used by the VM
errorStr():
string
Defined in: vm/src/vm.ts:134
Return a compact error string representation of the object
string
shallowCopy(
downlevelCaches
):Promise
<VM
>
Defined in: vm/src/vm.ts:109
Returns a copy of the VM instance.
Note that the returned copy will share the same db as the original for the blockchain and the statemanager.
Associated caches will be deleted and caches will be re-initialized for a more short-term focused
usage, being less memory intense (the statemanager caches will switch to using an ORDERED_MAP cache
data structure more suitable for short-term usage, the trie node LRU cache will not be activated at all).
To fine-tune this behavior (if the shallow-copy-returned object has a longer life span e.g.) you can set
the downlevelCaches
option to false
.
boolean
= true
Downlevel (so: adopted for short-term usage) associated state caches (default: true)
Promise
<VM
>