You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/classes/vm.md
+36-14
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
Execution engine which can be used to run a blockchain, individual blocks, individual transactions, or snippets of EVM bytecode.
6
6
7
+
This class is an AsyncEventEmitter, which means that event handlers are run to completion before continuing. If an error is thrown in an event handler, it will bubble up to the VM and thrown from the method call that triggered the event.
8
+
7
9
## Hierarchy
8
10
9
11
`any`
@@ -19,6 +21,7 @@ Execution engine which can be used to run a blockchain, individual blocks, indiv
*Defined in [index.ts:124](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L124)*
160
+
*Defined in [index.ts:148](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L148)*
149
161
150
162
Processes the `block` running all of the transactions it contains and updating the miner's account
151
163
164
+
This method modifies the state. If `generate` is `true`, the state modifications will be reverted if an exception is raised. If it's `false`, it won't revert if the block's header is invalid. If an error is thrown from an event handler, the state may or may not be reverted.
*Defined in [index.ts:131](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L131)*
244
+
*Defined in [index.ts:159](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L159)*
225
245
226
246
Process a transaction. Run the vm. Transfers eth. Checks balances.
227
247
248
+
This method modifies the state. If an error is thrown, the modifications are reverted, except when the error is thrown from an event handler. In the latter case the state may or may not be reverted.
0 commit comments