Skip to content

Commit daeaa89

Browse files
authored
Merge pull request #1119 from ethereumjs/vm-clear-docs
VM: Only expose API method on docs
2 parents 27d6433 + 533f357 commit daeaa89

39 files changed

+330
-4027
lines changed

packages/vm/docs/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66

77
### Modules
88

9-
* ["evm/evm"](modules/_evm_evm_.md)
10-
* ["evm/opcodes/EIP1283"](modules/_evm_opcodes_eip1283_.md)
11-
* ["evm/opcodes/EIP2200"](modules/_evm_opcodes_eip2200_.md)
12-
* ["evm/opcodes/EIP2929"](modules/_evm_opcodes_eip2929_.md)
13-
* ["evm/opcodes/codes"](modules/_evm_opcodes_codes_.md)
14-
* ["evm/opcodes/functions"](modules/_evm_opcodes_functions_.md)
15-
* ["evm/opcodes/index"](modules/_evm_opcodes_index_.md)
16-
* ["evm/opcodes/util"](modules/_evm_opcodes_util_.md)
17-
* ["evm/precompiles/util/bls12_381"](modules/_evm_precompiles_util_bls12_381_.md)
189
* ["exceptions"](modules/_exceptions_.md)
1910
* ["index"](modules/_index_.md)
2011
* ["runBlock"](modules/_runblock_.md)

packages/vm/docs/classes/_evm_opcodes_codes_.opcode.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

packages/vm/docs/classes/_evm_opcodes_index_.opcode.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

packages/vm/docs/classes/_index_.vm.md

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ This class is an AsyncEventEmitter, please consult the README to learn how to us
2727

2828
### Methods
2929

30-
* [_updateOpcodes](_index_.vm.md#_updateopcodes)
3130
* [copy](_index_.vm.md#copy)
31+
* [getActiveOpcodes](_index_.vm.md#getactiveopcodes)
3232
* [init](_index_.vm.md#init)
3333
* [runBlock](_index_.vm.md#runblock)
3434
* [runBlockchain](_index_.vm.md#runblockchain)
@@ -43,7 +43,7 @@ This class is an AsyncEventEmitter, please consult the README to learn how to us
4343

4444
\+ **new VM**(`opts`: [VMOpts](../interfaces/_index_.vmopts.md)): *[VM](_index_.vm.md)*
4545

46-
*Defined in [index.ts:139](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L139)*
46+
*Defined in [index.ts:147](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L147)*
4747

4848
Instantiates a new [VM](_index_.vm.md) Object.
4949

@@ -61,15 +61,15 @@ Name | Type | Default | Description |
6161

6262
**_common**: *Common*
6363

64-
*Defined in [index.ts:110](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L110)*
64+
*Defined in [index.ts:117](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L117)*
6565

6666
___
6767

6868
### blockchain
6969

7070
**blockchain**: *Blockchain*
7171

72-
*Defined in [index.ts:108](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L108)*
72+
*Defined in [index.ts:115](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L115)*
7373

7474
The blockchain the VM operates on
7575

@@ -79,39 +79,42 @@ ___
7979

8080
**stateManager**: *[StateManager](../interfaces/_state_index_.statemanager.md)*
8181

82-
*Defined in [index.ts:104](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L104)*
82+
*Defined in [index.ts:111](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L111)*
8383

8484
The StateManager used by the VM
8585

8686
## Methods
8787

88-
### _updateOpcodes
88+
### copy
8989

90-
**_updateOpcodes**(): *void*
90+
**copy**(): *[VM](_index_.vm.md)*
9191

92-
*Defined in [index.ts:219](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L219)*
92+
*Defined in [index.ts:343](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L343)*
9393

94-
**Returns:** *void*
94+
Returns a copy of the [VM](_index_.vm.md) instance.
95+
96+
**Returns:** *[VM](_index_.vm.md)*
9597

9698
___
9799

98-
### copy
100+
### getActiveOpcodes
99101

100-
**copy**(): *[VM](_index_.vm.md)*
102+
**getActiveOpcodes**(): *OpcodeList*
101103

102-
*Defined in [index.ts:326](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L326)*
104+
*Defined in [index.ts:336](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L336)*
103105

104-
Returns a copy of the [VM](_index_.vm.md) instance.
106+
Returns a list with the currently activated opcodes
107+
available for VM execution
105108

106-
**Returns:** *[VM](_index_.vm.md)*
109+
**Returns:** *OpcodeList*
107110

108111
___
109112

110113
### init
111114

112115
**init**(): *Promise‹void›*
113116

114-
*Defined in [index.ts:223](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L223)*
117+
*Defined in [index.ts:232](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L232)*
115118

116119
**Returns:** *Promise‹void›*
117120

@@ -121,7 +124,7 @@ ___
121124

122125
**runBlock**(`opts`: [RunBlockOpts](../interfaces/_runblock_.runblockopts.md)): *Promise‹[RunBlockResult](../interfaces/_runblock_.runblockresult.md)*
123126

124-
*Defined in [index.ts:280](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L280)*
127+
*Defined in [index.ts:289](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L289)*
125128

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

@@ -141,9 +144,9 @@ ___
141144

142145
### runBlockchain
143146

144-
**runBlockchain**(`blockchain?`: Blockchain): *Promise‹void›*
147+
**runBlockchain**(`blockchain?`: Blockchain, `maxBlocks?`: undefined | number): *Promise‹void | number*
145148

146-
*Defined in [index.ts:265](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L265)*
149+
*Defined in [index.ts:274](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L274)*
147150

148151
Processes blocks and adds them to the blockchain.
149152

@@ -154,16 +157,17 @@ This method modifies the state.
154157
Name | Type | Description |
155158
------ | ------ | ------ |
156159
`blockchain?` | Blockchain | An [@ethereumjs/blockchain](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/blockchain) object to process |
160+
`maxBlocks?` | undefined | number | - |
157161

158-
**Returns:** *Promise‹void›*
162+
**Returns:** *Promise‹void | number*
159163

160164
___
161165

162166
### runCall
163167

164-
**runCall**(`opts`: [RunCallOpts](../interfaces/_runcall_.runcallopts.md)): *Promise‹[EVMResult](../interfaces/_evm_evm_.evmresult.md)*
168+
**runCall**(`opts`: [RunCallOpts](../interfaces/_runcall_.runcallopts.md)): *Promise‹EVMResult›*
165169

166-
*Defined in [index.ts:306](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L306)*
170+
*Defined in [index.ts:315](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L315)*
167171

168172
runs a call (or create) operation.
169173

@@ -175,15 +179,15 @@ Name | Type | Description |
175179
------ | ------ | ------ |
176180
`opts` | [RunCallOpts](../interfaces/_runcall_.runcallopts.md) | |
177181

178-
**Returns:** *Promise‹[EVMResult](../interfaces/_evm_evm_.evmresult.md)*
182+
**Returns:** *Promise‹EVMResult›*
179183

180184
___
181185

182186
### runCode
183187

184-
**runCode**(`opts`: [RunCodeOpts](../interfaces/_runcode_.runcodeopts.md)): *Promise‹[ExecResult](../interfaces/_evm_evm_.execresult.md)*
188+
**runCode**(`opts`: [RunCodeOpts](../interfaces/_runcode_.runcodeopts.md)): *Promise‹ExecResult›*
185189

186-
*Defined in [index.ts:318](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L318)*
190+
*Defined in [index.ts:327](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L327)*
187191

188192
Runs EVM code.
189193

@@ -195,15 +199,15 @@ Name | Type | Description |
195199
------ | ------ | ------ |
196200
`opts` | [RunCodeOpts](../interfaces/_runcode_.runcodeopts.md) | |
197201

198-
**Returns:** *Promise‹[ExecResult](../interfaces/_evm_evm_.execresult.md)*
202+
**Returns:** *Promise‹ExecResult›*
199203

200204
___
201205

202206
### runTx
203207

204208
**runTx**(`opts`: [RunTxOpts](../interfaces/_runtx_.runtxopts.md)): *Promise‹[RunTxResult](../interfaces/_runtx_.runtxresult.md)*
205209

206-
*Defined in [index.ts:294](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L294)*
210+
*Defined in [index.ts:303](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L303)*
207211

208212
Process a transaction. Run the vm. Transfers eth. Checks balances.
209213

@@ -225,7 +229,7 @@ ___
225229

226230
**create**(`opts`: [VMOpts](../interfaces/_index_.vmopts.md)): *Promise‹[VM](_index_.vm.md)*
227231

228-
*Defined in [index.ts:135](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L135)*
232+
*Defined in [index.ts:143](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/vm/lib/index.ts#L143)*
229233

230234
VM async constructor. Creates engine instance and initializes it.
231235

0 commit comments

Comments
 (0)