Skip to content

Commit 1f49e81

Browse files
committed
Regenerated the documentation
1 parent 6a63b42 commit 1f49e81

17 files changed

+266
-191
lines changed

docs/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
* [EVMResult](interfaces/evmresult.md)
1919
* [ExecResult](interfaces/execresult.md)
20+
* [NewContractEvent](interfaces/newcontractevent.md)
2021
* [RunBlockOpts](interfaces/runblockopts.md)
2122
* [RunBlockResult](interfaces/runblockresult.md)
2223
* [RunCallOpts](interfaces/runcallopts.md)
@@ -28,5 +29,29 @@
2829
* [TxReceipt](interfaces/txreceipt.md)
2930
* [VMOpts](interfaces/vmopts.md)
3031

32+
### Functions
33+
34+
* [OOGResult](#oogresult)
35+
3136
---
3237

38+
## Functions
39+
40+
<a id="oogresult"></a>
41+
42+
### OOGResult
43+
44+
**OOGResult**(gasLimit: *`BN`*): [ExecResult](interfaces/execresult.md)
45+
46+
*Defined in [evm/evm.ts:80](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/evm/evm.ts#L80)*
47+
48+
**Parameters:**
49+
50+
| Name | Type |
51+
| ------ | ------ |
52+
| gasLimit | `BN` |
53+
54+
**Returns:** [ExecResult](interfaces/execresult.md)
55+
56+
___
57+

docs/classes/statemanager.md

+38-38
Large diffs are not rendered by default.

docs/classes/vm.md

+36-14
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
Execution engine which can be used to run a blockchain, individual blocks, individual transactions, or snippets of EVM bytecode.
66

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+
79
## Hierarchy
810

911
`any`
@@ -19,6 +21,7 @@ Execution engine which can be used to run a blockchain, individual blocks, indiv
1921
### Properties
2022

2123
* [_common](vm.md#_common)
24+
* [_opcodes](vm.md#_opcodes)
2225
* [allowUnlimitedContractSize](vm.md#allowunlimitedcontractsize)
2326
* [blockchain](vm.md#blockchain)
2427
* [opts](vm.md#opts)
@@ -44,7 +47,7 @@ Execution engine which can be used to run a blockchain, individual blocks, indiv
4447

4548
**new VM**(opts?: *[VMOpts](../interfaces/vmopts.md)*): [VM](vm.md)
4649

47-
*Defined in [index.ts:61](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L61)*
50+
*Defined in [index.ts:74](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L74)*
4851

4952
Instantiates a new [VM](vm.md) Object.
5053

@@ -66,7 +69,16 @@ ___
6669

6770
**_common**: *`Common`*
6871

69-
*Defined in [index.ts:58](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L58)*
72+
*Defined in [index.ts:70](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L70)*
73+
74+
___
75+
<a id="_opcodes"></a>
76+
77+
### _opcodes
78+
79+
**_opcodes**: *`OpcodeList`*
80+
81+
*Defined in [index.ts:74](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L74)*
7082

7183
___
7284
<a id="allowunlimitedcontractsize"></a>
@@ -75,16 +87,16 @@ ___
7587

7688
**● allowUnlimitedContractSize**: *`boolean`*
7789

78-
*Defined in [index.ts:61](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L61)*
90+
*Defined in [index.ts:73](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L73)*
7991

8092
___
8193
<a id="blockchain"></a>
8294

8395
### blockchain
8496

85-
**● blockchain**: *`any`*
97+
**● blockchain**: *`Blockchain`*
8698

87-
*Defined in [index.ts:60](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L60)*
99+
*Defined in [index.ts:72](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L72)*
88100

89101
___
90102
<a id="opts"></a>
@@ -93,7 +105,7 @@ ___
93105

94106
**● opts**: *[VMOpts](../interfaces/vmopts.md)*
95107

96-
*Defined in [index.ts:57](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L57)*
108+
*Defined in [index.ts:69](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L69)*
97109

98110
___
99111
<a id="statemanager"></a>
@@ -102,7 +114,7 @@ ___
102114

103115
**● stateManager**: *[StateManager](statemanager.md)*
104116

105-
*Defined in [index.ts:59](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L59)*
117+
*Defined in [index.ts:71](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L71)*
106118

107119
___
108120

@@ -114,7 +126,7 @@ ___
114126

115127
**_emit**(topic: *`string`*, data: *`any`*): `Promise`<`any`>
116128

117-
*Defined in [index.ts:160](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L160)*
129+
*Defined in [index.ts:192](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L192)*
118130

119131
**Parameters:**
120132

@@ -132,7 +144,7 @@ ___
132144

133145
**copy**(): [VM](vm.md)
134146

135-
*Defined in [index.ts:152](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L152)*
147+
*Defined in [index.ts:184](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L184)*
136148

137149
Returns a copy of the [VM](vm.md) instance.
138150

@@ -145,10 +157,12 @@ ___
145157

146158
**runBlock**(opts: *[RunBlockOpts](../interfaces/runblockopts.md)*): `Promise`<[RunBlockResult](../interfaces/runblockresult.md)>
147159

148-
*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)*
149161

150162
Processes the `block` running all of the transactions it contains and updating the miner's account
151163

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.
165+
152166
**Parameters:**
153167

154168
| Name | Type | Description |
@@ -164,10 +178,12 @@ ___
164178

165179
**runBlockchain**(blockchain: *`any`*): `Promise`<`void`>
166180

167-
*Defined in [index.ts:115](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L115)*
181+
*Defined in [index.ts:134](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L134)*
168182

169183
Processes blocks and adds them to the blockchain.
170184

185+
This method modifies the state.
186+
171187
**Parameters:**
172188

173189
| Name | Type | Description |
@@ -183,10 +199,12 @@ ___
183199

184200
**runCall**(opts: *[RunCallOpts](../interfaces/runcallopts.md)*): `Promise`<[EVMResult](../interfaces/evmresult.md)>
185201

186-
*Defined in [index.ts:138](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L138)*
202+
*Defined in [index.ts:168](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L168)*
187203

188204
runs a call (or create) operation.
189205

206+
This method modifies the state.
207+
190208
**Parameters:**
191209

192210
| Name | Type |
@@ -202,10 +220,12 @@ ___
202220

203221
**runCode**(opts: *[RunCodeOpts](../interfaces/runcodeopts.md)*): `Promise`<[ExecResult](../interfaces/execresult.md)>
204222

205-
*Defined in [index.ts:145](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/index.ts#L145)*
223+
*Defined in [index.ts:177](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/index.ts#L177)*
206224

207225
Runs EVM code.
208226

227+
This method modifies the state.
228+
209229
**Parameters:**
210230

211231
| Name | Type |
@@ -221,10 +241,12 @@ ___
221241

222242
**runTx**(opts: *[RunTxOpts](../interfaces/runtxopts.md)*): `Promise`<[RunTxResult](../interfaces/runtxresult.md)>
223243

224-
*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)*
225245

226246
Process a transaction. Run the vm. Transfers eth. Checks balances.
227247

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.
249+
228250
**Parameters:**
229251

230252
| Name | Type |

docs/classes/vmerror.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
**new VmError**(error: *[ERROR](../enums/error.md)*): [VmError](vmerror.md)
2929

30-
*Defined in [exceptions.ts:17](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L17)*
30+
*Defined in [exceptions.ts:18](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L18)*
3131

3232
**Parameters:**
3333

@@ -47,7 +47,7 @@ ___
4747

4848
**● error**: *[ERROR](../enums/error.md)*
4949

50-
*Defined in [exceptions.ts:16](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L16)*
50+
*Defined in [exceptions.ts:17](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L17)*
5151

5252
___
5353
<a id="errortype"></a>
@@ -56,7 +56,7 @@ ___
5656

5757
**● errorType**: *`string`*
5858

59-
*Defined in [exceptions.ts:17](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L17)*
59+
*Defined in [exceptions.ts:18](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L18)*
6060

6161
___
6262

docs/enums/error.md

+21-11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* [INVALID_OPCODE](error.md#invalid_opcode)
1313
* [OUT_OF_GAS](error.md#out_of_gas)
1414
* [OUT_OF_RANGE](error.md#out_of_range)
15+
* [REFUND_EXHAUSTED](error.md#refund_exhausted)
1516
* [REVERT](error.md#revert)
1617
* [STACK_OVERFLOW](error.md#stack_overflow)
1718
* [STACK_UNDERFLOW](error.md#stack_underflow)
@@ -28,7 +29,7 @@
2829

2930
**CREATE_COLLISION**: = "create collision"
3031

31-
*Defined in [exceptions.ts:11](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L11)*
32+
*Defined in [exceptions.ts:11](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L11)*
3233

3334
___
3435
<a id="internal_error"></a>
@@ -37,7 +38,7 @@ ___
3738

3839
**INTERNAL_ERROR**: = "internal error"
3940

40-
*Defined in [exceptions.ts:10](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L10)*
41+
*Defined in [exceptions.ts:10](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L10)*
4142

4243
___
4344
<a id="invalid_jump"></a>
@@ -46,7 +47,7 @@ ___
4647

4748
**INVALID_JUMP**: = "invalid JUMP"
4849

49-
*Defined in [exceptions.ts:5](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L5)*
50+
*Defined in [exceptions.ts:5](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L5)*
5051

5152
___
5253
<a id="invalid_opcode"></a>
@@ -55,7 +56,7 @@ ___
5556

5657
**INVALID_OPCODE**: = "invalid opcode"
5758

58-
*Defined in [exceptions.ts:6](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L6)*
59+
*Defined in [exceptions.ts:6](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L6)*
5960

6061
___
6162
<a id="out_of_gas"></a>
@@ -64,7 +65,7 @@ ___
6465

6566
**OUT_OF_GAS**: = "out of gas"
6667

67-
*Defined in [exceptions.ts:2](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L2)*
68+
*Defined in [exceptions.ts:2](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L2)*
6869

6970
___
7071
<a id="out_of_range"></a>
@@ -73,7 +74,16 @@ ___
7374

7475
**OUT_OF_RANGE**: = "value out of range"
7576

76-
*Defined in [exceptions.ts:7](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L7)*
77+
*Defined in [exceptions.ts:7](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L7)*
78+
79+
___
80+
<a id="refund_exhausted"></a>
81+
82+
### REFUND_EXHAUSTED
83+
84+
**REFUND_EXHAUSTED**: = "refund exhausted"
85+
86+
*Defined in [exceptions.ts:13](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L13)*
7787

7888
___
7989
<a id="revert"></a>
@@ -82,7 +92,7 @@ ___
8292

8393
**REVERT**: = "revert"
8494

85-
*Defined in [exceptions.ts:8](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L8)*
95+
*Defined in [exceptions.ts:8](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L8)*
8696

8797
___
8898
<a id="stack_overflow"></a>
@@ -91,7 +101,7 @@ ___
91101

92102
**STACK_OVERFLOW**: = "stack overflow"
93103

94-
*Defined in [exceptions.ts:4](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L4)*
104+
*Defined in [exceptions.ts:4](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L4)*
95105

96106
___
97107
<a id="stack_underflow"></a>
@@ -100,7 +110,7 @@ ___
100110

101111
**STACK_UNDERFLOW**: = "stack underflow"
102112

103-
*Defined in [exceptions.ts:3](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L3)*
113+
*Defined in [exceptions.ts:3](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L3)*
104114

105115
___
106116
<a id="static_state_change"></a>
@@ -109,7 +119,7 @@ ___
109119

110120
**STATIC_STATE_CHANGE**: = "static state change"
111121

112-
*Defined in [exceptions.ts:9](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L9)*
122+
*Defined in [exceptions.ts:9](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L9)*
113123

114124
___
115125
<a id="stop"></a>
@@ -118,7 +128,7 @@ ___
118128

119129
**STOP**: = "stop"
120130

121-
*Defined in [exceptions.ts:12](https://github.com/ethereumjs/ethereumjs-vm/blob/3e1633c/lib/exceptions.ts#L12)*
131+
*Defined in [exceptions.ts:12](https://github.com/ethereumjs/ethereumjs-vm/blob/439570a/lib/exceptions.ts#L12)*
122132

123133
___
124134

0 commit comments

Comments
 (0)