Skip to content

Commit 45442df

Browse files
committed
Added Constantinople support to constructor API documentation (opts.hardfork)
1 parent 852bde7 commit 45442df

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ VM Class, `new VM(opts)` creates a new VM object
4949
- `opts.state` **Trie** a merkle-patricia-tree instance for the state tree (ignored if stateManager is passed)
5050
- `opts.blockchain` **Blockchain** a blockchain object for storing/retrieving blocks (ignored if stateManager is passed)
5151
- `opts.chain` **([String][31] \| [Number][32])** the chain the VM operates on [default: 'mainnet']
52-
- `opts.hardfork` **[String][31]** hardfork rules to be used [default: 'byzantium', supported: 'byzantium' (will throw on unsupported)]
52+
- `opts.hardfork` **[String][31]** hardfork rules to be used [default: 'byzantium', supported: 'byzantium', 'constantinople' (will throw on unsupported)]
5353
- `opts.activatePrecompiles` **[Boolean][33]** create entries in the state tree for the precompiled contracts
5454
- `opts.allowUnlimitedContractSize` **[Boolean][33]** allows unlimited contract sizes while debugging. By setting this to `true`, the check for contract size limit of 24KB (see [EIP-170][34]) is bypassed. (default: `false`; ONLY set to `true` during debugging)
5555
- `opts.emitFreeLogs` **[Boolean][33]** Changes the behavior of the LOG opcode, the gas cost of the opcode becomes zero and calling it using STATICCALL won't throw. (default: `false`; ONLY set to `true` during debugging)

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ VM.deps = {
3636
* @param {Trie} opts.state a merkle-patricia-tree instance for the state tree (ignored if stateManager is passed)
3737
* @param {Blockchain} opts.blockchain a blockchain object for storing/retrieving blocks (ignored if stateManager is passed)
3838
* @param {String|Number} opts.chain the chain the VM operates on [default: 'mainnet']
39-
* @param {String} opts.hardfork hardfork rules to be used [default: 'byzantium', supported: 'byzantium' (will throw on unsupported)]
39+
* @param {String} opts.hardfork hardfork rules to be used [default: 'byzantium', supported: 'byzantium', 'constantinople' (will throw on unsupported)]
4040
* @param {Boolean} opts.activatePrecompiles create entries in the state tree for the precompiled contracts
4141
* @param {Boolean} opts.allowUnlimitedContractSize allows unlimited contract sizes while debugging. By setting this to `true`, the check for contract size limit of 24KB (see [EIP-170](https://git.io/vxZkK)) is bypassed. (default: `false`; ONLY set to `true` during debugging)
4242
* @param {Boolean} opts.emitFreeLogs Changes the behavior of the LOG opcode, the gas cost of the opcode becomes zero and calling it using STATICCALL won't throw. (default: `false`; ONLY set to `true` during debugging)
@@ -47,8 +47,8 @@ function VM (opts = {}) {
4747
let chain = opts.chain ? opts.chain : 'mainnet'
4848
let hardfork = opts.hardfork ? opts.hardfork : 'byzantium'
4949
let supportedHardforks = [
50-
'byzantium', // Officially supported
51-
'constantinople' // No official support yet, only for testing reasons
50+
'byzantium',
51+
'constantinople'
5252
]
5353
this._common = new Common(chain, hardfork, supportedHardforks)
5454

0 commit comments

Comments
 (0)