@ethereumjs/common
Advanced tools
Comparing version 2.6.2 to 2.6.3
@@ -89,2 +89,7 @@ { | ||
{ | ||
"name": "preMerge", | ||
"block": null, | ||
"forkHash": null | ||
}, | ||
{ | ||
"name": "merge", | ||
@@ -91,0 +96,0 @@ "block": null, |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1559", | ||
"status": "Review", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [2930], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2565", | ||
"status": "Last call", | ||
"status": "Final", | ||
"minimumHardfork": "byzantium", | ||
@@ -9,0 +9,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2718", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -8,0 +8,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2929", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -8,0 +8,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2930", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "istanbul", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [2718, 2929], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3198", | ||
"status": "Review", | ||
"status": "Final", | ||
"minimumHardfork": "london", | ||
@@ -9,0 +9,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3529", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [2929], |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3541", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [], |
@@ -5,3 +5,3 @@ { | ||
"url": "Difficulty Bomb Delay to December 1st 2021", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "muirGlacier", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3607", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3675", | ||
"status": "Draft", | ||
"status": "Review", | ||
"minimumHardfork": "london", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-4345", | ||
"status": "Review", | ||
"status": "Final", | ||
"minimumHardfork": "london", | ||
@@ -9,0 +9,0 @@ "gasConfig": {}, |
@@ -14,9 +14,13 @@ "use strict"; | ||
3529: require('./3529.json'), | ||
3540: require('./3540.json'), | ||
3541: require('./3541.json'), | ||
3554: require('./3554.json'), | ||
3607: require('./3607.json'), | ||
3670: require('./3670.json'), | ||
3675: require('./3675.json'), | ||
3855: require('./3855.json'), | ||
3860: require('./3860.json'), | ||
4345: require('./4345.json'), | ||
4399: require('./4399.json'), | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -5,4 +5,4 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2070", | ||
"status": "Draft", | ||
"status": "Final", | ||
"eips": [2565, 2929, 2718, 2930] | ||
} |
@@ -19,4 +19,5 @@ "use strict"; | ||
['arrowGlacier', require('./arrowGlacier.json')], | ||
['preMerge', require('./preMerge.json')], | ||
['merge', require('./merge.json')], | ||
]; | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1679", | ||
"status": "Draft", | ||
"status": "Final", | ||
"gasConfig": {}, | ||
@@ -8,0 +8,0 @@ "gasPrices": { |
@@ -5,4 +5,4 @@ { | ||
"url": "https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md", | ||
"status": "Draft", | ||
"status": "Final", | ||
"eips": [1559, 3198, 3529, 3541] | ||
} |
{ | ||
"name": "merge", | ||
"comment": "Hardfork to upgrade the consensus mechanism to Proof-of-Stake", | ||
"url": "https://github.com/ethereum/pm/issues/361", | ||
"status": "pre-Draft", | ||
"url": "https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md", | ||
"status": "Draft", | ||
"consensus": { | ||
@@ -11,3 +11,3 @@ "type": "pos", | ||
}, | ||
"eips": [3675] | ||
"eips": [3675, 4399] | ||
} |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1716", | ||
"status": "Draft", | ||
"status": "Final", | ||
"gasConfig": {}, | ||
@@ -8,0 +8,0 @@ "gasPrices": { |
{ | ||
"name": "shanghai", | ||
"comment": "Next feature hardfork after the London HF", | ||
"comment": "Next feature hardfork after the merge hardfork", | ||
"url": "https://github.com/ethereum/pm/issues/356", | ||
@@ -5,0 +5,0 @@ "status": "Pre-Draft", |
@@ -67,2 +67,3 @@ /// <reference types="bn.js" /> | ||
Shanghai = "shanghai", | ||
PreMerge = "preMerge", | ||
Merge = "merge" | ||
@@ -124,9 +125,27 @@ } | ||
* | ||
* Pattern 2 (with genesis state, see {@link GenesisState} for format): | ||
* Pattern 2 (with genesis state see {@link GenesisState} for format): | ||
* | ||
* ```javascript | ||
* const simpleState = { | ||
* '0x0...01': '0x100', // For EoA | ||
* } | ||
* import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json' | ||
* import chain1GenesisState from '[PATH_TO_GENESIS_STATES]/chain1GenesisState.json' | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, chain1GenesisState ] ]}) | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, simpleState ] ]}) | ||
* ``` | ||
* | ||
* Pattern 3 (with complex genesis state, containing contract accounts and storage). | ||
* Note that in {@link AccountState} there are two | ||
* accepted types. This allows to easily insert accounts in the genesis state: | ||
* | ||
* A complex genesis state with Contract and EoA states would have the following format: | ||
* | ||
* ```javascript | ||
* const complexState = { | ||
* '0x0...01': '0x100', // For EoA | ||
* '0x0...02': ['0x1', '0xRUNTIME_BYTECODE', [[ keyOne, valueOne ], [ keyTwo, valueTwo ]]] // For contracts | ||
* } | ||
* import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json' | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, complexState ] ]}) | ||
* ``` | ||
*/ | ||
@@ -133,0 +152,0 @@ customChains?: IChain[] | [IChain, GenesisState][]; |
@@ -111,2 +111,3 @@ "use strict"; | ||
Hardfork["Shanghai"] = "shanghai"; | ||
Hardfork["PreMerge"] = "preMerge"; | ||
Hardfork["Merge"] = "merge"; | ||
@@ -142,4 +143,5 @@ })(Hardfork = exports.Hardfork || (exports.Hardfork = {})); | ||
var e_1, _a; | ||
var _this = this; | ||
var _b, _c; | ||
var _this = _super.call(this) || this; | ||
_this = _super.call(this) || this; | ||
_this._supportedHardforks = []; | ||
@@ -1284,3 +1286,5 @@ _this._eips = []; | ||
Common.prototype.copy = function () { | ||
return Object.assign(Object.create(Object.getPrototypeOf(this)), this); | ||
var copy = Object.assign(Object.create(Object.getPrototypeOf(this)), this); | ||
copy.removeAllListeners(); | ||
return copy; | ||
}; | ||
@@ -1287,0 +1291,0 @@ return Common; |
/// <reference types="bn.js" /> | ||
import { BN } from 'ethereumjs-util'; | ||
import { BN, PrefixedHexString } from 'ethereumjs-util'; | ||
import { ConsensusAlgorithm, ConsensusType, Hardfork as HardforkName } from '.'; | ||
@@ -38,4 +38,10 @@ export interface genesisStatesType { | ||
} | ||
declare type StoragePair = [key: PrefixedHexString, value: PrefixedHexString]; | ||
export declare type AccountState = [ | ||
balance: PrefixedHexString, | ||
code: PrefixedHexString, | ||
storage: Array<StoragePair> | ||
]; | ||
export interface GenesisState { | ||
[key: string]: string | [string, [[string, string]]]; | ||
[key: PrefixedHexString]: PrefixedHexString | AccountState; | ||
} | ||
@@ -70,1 +76,2 @@ export interface eipsType { | ||
} | ||
export {}; |
@@ -89,2 +89,7 @@ { | ||
{ | ||
"name": "preMerge", | ||
"block": null, | ||
"forkHash": null | ||
}, | ||
{ | ||
"name": "merge", | ||
@@ -91,0 +96,0 @@ "block": null, |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1559", | ||
"status": "Review", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [2930], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2565", | ||
"status": "Last call", | ||
"status": "Final", | ||
"minimumHardfork": "byzantium", | ||
@@ -9,0 +9,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2718", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -8,0 +8,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2929", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -8,0 +8,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2930", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "istanbul", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [2718, 2929], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3198", | ||
"status": "Review", | ||
"status": "Final", | ||
"minimumHardfork": "london", | ||
@@ -9,0 +9,0 @@ "gasConfig": {}, |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3529", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [2929], |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3541", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [], |
@@ -5,3 +5,3 @@ { | ||
"url": "Difficulty Bomb Delay to December 1st 2021", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "muirGlacier", | ||
@@ -8,0 +8,0 @@ "requiredEIPs": [], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3607", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3675", | ||
"status": "Draft", | ||
"status": "Review", | ||
"minimumHardfork": "london", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-4345", | ||
"status": "Review", | ||
"status": "Final", | ||
"minimumHardfork": "london", | ||
@@ -9,0 +9,0 @@ "gasConfig": {}, |
@@ -14,9 +14,13 @@ "use strict"; | ||
3529: require('./3529.json'), | ||
3540: require('./3540.json'), | ||
3541: require('./3541.json'), | ||
3554: require('./3554.json'), | ||
3607: require('./3607.json'), | ||
3670: require('./3670.json'), | ||
3675: require('./3675.json'), | ||
3855: require('./3855.json'), | ||
3860: require('./3860.json'), | ||
4345: require('./4345.json'), | ||
4399: require('./4399.json'), | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -5,4 +5,4 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2070", | ||
"status": "Draft", | ||
"status": "Final", | ||
"eips": [2565, 2929, 2718, 2930] | ||
} |
@@ -19,4 +19,5 @@ "use strict"; | ||
['arrowGlacier', require('./arrowGlacier.json')], | ||
['preMerge', require('./preMerge.json')], | ||
['merge', require('./merge.json')], | ||
]; | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1679", | ||
"status": "Draft", | ||
"status": "Final", | ||
"gasConfig": {}, | ||
@@ -8,0 +8,0 @@ "gasPrices": { |
@@ -5,4 +5,4 @@ { | ||
"url": "https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md", | ||
"status": "Draft", | ||
"status": "Final", | ||
"eips": [1559, 3198, 3529, 3541] | ||
} |
{ | ||
"name": "merge", | ||
"comment": "Hardfork to upgrade the consensus mechanism to Proof-of-Stake", | ||
"url": "https://github.com/ethereum/pm/issues/361", | ||
"status": "pre-Draft", | ||
"url": "https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md", | ||
"status": "Draft", | ||
"consensus": { | ||
@@ -11,3 +11,3 @@ "type": "pos", | ||
}, | ||
"eips": [3675] | ||
"eips": [3675, 4399] | ||
} |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1716", | ||
"status": "Draft", | ||
"status": "Final", | ||
"gasConfig": {}, | ||
@@ -8,0 +8,0 @@ "gasPrices": { |
{ | ||
"name": "shanghai", | ||
"comment": "Next feature hardfork after the London HF", | ||
"comment": "Next feature hardfork after the merge hardfork", | ||
"url": "https://github.com/ethereum/pm/issues/356", | ||
@@ -5,0 +5,0 @@ "status": "Pre-Draft", |
@@ -67,2 +67,3 @@ /// <reference types="bn.js" /> | ||
Shanghai = "shanghai", | ||
PreMerge = "preMerge", | ||
Merge = "merge" | ||
@@ -124,9 +125,27 @@ } | ||
* | ||
* Pattern 2 (with genesis state, see {@link GenesisState} for format): | ||
* Pattern 2 (with genesis state see {@link GenesisState} for format): | ||
* | ||
* ```javascript | ||
* const simpleState = { | ||
* '0x0...01': '0x100', // For EoA | ||
* } | ||
* import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json' | ||
* import chain1GenesisState from '[PATH_TO_GENESIS_STATES]/chain1GenesisState.json' | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, chain1GenesisState ] ]}) | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, simpleState ] ]}) | ||
* ``` | ||
* | ||
* Pattern 3 (with complex genesis state, containing contract accounts and storage). | ||
* Note that in {@link AccountState} there are two | ||
* accepted types. This allows to easily insert accounts in the genesis state: | ||
* | ||
* A complex genesis state with Contract and EoA states would have the following format: | ||
* | ||
* ```javascript | ||
* const complexState = { | ||
* '0x0...01': '0x100', // For EoA | ||
* '0x0...02': ['0x1', '0xRUNTIME_BYTECODE', [[ keyOne, valueOne ], [ keyTwo, valueTwo ]]] // For contracts | ||
* } | ||
* import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json' | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, complexState ] ]}) | ||
* ``` | ||
*/ | ||
@@ -133,0 +152,0 @@ customChains?: IChain[] | [IChain, GenesisState][]; |
@@ -74,2 +74,3 @@ "use strict"; | ||
Hardfork["Shanghai"] = "shanghai"; | ||
Hardfork["PreMerge"] = "preMerge"; | ||
Hardfork["Merge"] = "merge"; | ||
@@ -1023,3 +1024,5 @@ })(Hardfork = exports.Hardfork || (exports.Hardfork = {})); | ||
copy() { | ||
return Object.assign(Object.create(Object.getPrototypeOf(this)), this); | ||
const copy = Object.assign(Object.create(Object.getPrototypeOf(this)), this); | ||
copy.removeAllListeners(); | ||
return copy; | ||
} | ||
@@ -1026,0 +1029,0 @@ } |
/// <reference types="bn.js" /> | ||
import { BN } from 'ethereumjs-util'; | ||
import { BN, PrefixedHexString } from 'ethereumjs-util'; | ||
import { ConsensusAlgorithm, ConsensusType, Hardfork as HardforkName } from '.'; | ||
@@ -38,4 +38,10 @@ export interface genesisStatesType { | ||
} | ||
declare type StoragePair = [key: PrefixedHexString, value: PrefixedHexString]; | ||
export declare type AccountState = [ | ||
balance: PrefixedHexString, | ||
code: PrefixedHexString, | ||
storage: Array<StoragePair> | ||
]; | ||
export interface GenesisState { | ||
[key: string]: string | [string, [[string, string]]]; | ||
[key: PrefixedHexString]: PrefixedHexString | AccountState; | ||
} | ||
@@ -70,1 +76,2 @@ export interface eipsType { | ||
} | ||
export {}; |
{ | ||
"name": "@ethereumjs/common", | ||
"version": "2.6.2", | ||
"version": "2.6.3", | ||
"description": "Resources common to all Ethereum implementations", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -206,2 +206,13 @@ # @ethereumjs/common | ||
A more complex example with genesis state with Contract and EoA states would have the following format: | ||
```typescript | ||
const complexState = { | ||
'0x0...01': '0x100', // For EoA | ||
'0x0...02': ['0x1', '0xRUNTIME_BYTECODE', [[ keyOne, valueOne ], [ keyTwo, valueTwo ]]] // For contracts | ||
} | ||
import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json' | ||
const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, complexState ] ]}) | ||
``` | ||
Accessing the genesis state can be done as follows: | ||
@@ -286,3 +297,3 @@ | ||
- [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559): Fee market change for ETH 1.0 chain | ||
- [EIP-2315](https://eips.ethereum.org/EIPS/eip-2315): Simple subroutines for the EVM | ||
- [EIP-2315](https://eips.ethereum.org/EIPS/eip-2315): Simple subroutines for the EVM (`experimental`) | ||
- [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537): BLS precompiles | ||
@@ -295,6 +306,12 @@ - [EIP-2565](https://eips.ethereum.org/EIPS/eip-2565): ModExp gas cost | ||
- [EIP-3529](https://eips.ethereum.org/EIPS/eip-3529): Reduction in refunds | ||
- [EIP-3540](https://eips.ethereum.org/EIPS/eip-3541) - EVM Object Format (EOF) v1 (`experimental`) | ||
- [EIP-3541](https://eips.ethereum.org/EIPS/eip-3541): Reject new contracts starting with the 0xEF byte | ||
- [EIP-3554](https://eips.ethereum.org/EIPS/eip-3554): Difficulty Bomb Delay to December 2021 (only PoW networks) | ||
- [EIP-3607](https://eips.ethereum.org/EIPS/eip-3607): Reject transactions from senders with deployed code | ||
- [EIP-3670](https://eips.ethereum.org/EIPS/eip-3670): EOF - Code Validation (`experimental`) | ||
- [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675): Upgrade consensus to Proof-of-Stake (`experimental`) | ||
- [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855): Push0 opcode (`v2.6.1`+) | ||
- [EIP-3860](https://eips.ethereum.org/EIPS/eip-3855): Limit and meter initcode (`experimental`) | ||
- [EIP-4345](https://eips.ethereum.org/EIPS/eip-4345): Difficulty Bomb Delay to June 2022 | ||
- [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399): Supplant DIFFICULTY opcode with PREVRANDAO (Merge) (`experimental`) | ||
@@ -301,0 +318,0 @@ ## Bootstrap Nodes |
@@ -89,2 +89,7 @@ { | ||
{ | ||
"name": "preMerge", | ||
"block": null, | ||
"forkHash": null | ||
}, | ||
{ | ||
"name": "merge", | ||
@@ -91,0 +96,0 @@ "block": null, |
{ | ||
"name": "EIP-1559", | ||
"number": 1559, | ||
"comment": "Fee market change for ETH 1.0 chain", | ||
"url": "https://eips.ethereum.org/EIPS/eip-1559", | ||
"status": "Review", | ||
"minimumHardfork": "berlin", | ||
"requiredEIPs": [2930], | ||
"gasConfig": { | ||
"baseFeeMaxChangeDenominator": { | ||
"v": 8, | ||
"d": "Maximum base fee change denominator" | ||
}, | ||
"elasticityMultiplier": { | ||
"v": 2, | ||
"d": "Maximum block gas target elasticity" | ||
}, | ||
"initialBaseFee": { | ||
"v": 1000000000, | ||
"d": "Initial base fee on first EIP1559 block" | ||
} | ||
"name": "EIP-1559", | ||
"number": 1559, | ||
"comment": "Fee market change for ETH 1.0 chain", | ||
"url": "https://eips.ethereum.org/EIPS/eip-1559", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
"requiredEIPs": [2930], | ||
"gasConfig": { | ||
"baseFeeMaxChangeDenominator": { | ||
"v": 8, | ||
"d": "Maximum base fee change denominator" | ||
}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": {} | ||
} | ||
"elasticityMultiplier": { | ||
"v": 2, | ||
"d": "Maximum block gas target elasticity" | ||
}, | ||
"initialBaseFee": { | ||
"v": 1000000000, | ||
"d": "Initial base fee on first EIP1559 block" | ||
} | ||
}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
@@ -25,2 +25,2 @@ { | ||
"pow": {} | ||
} | ||
} |
{ | ||
"name": "EIP-2565", | ||
"number": 2565, | ||
"comment": "ModExp gas cost", | ||
"url": "https://eips.ethereum.org/EIPS/eip-2565", | ||
"status": "Last call", | ||
"minimumHardfork": "byzantium", | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"modexpGquaddivisor": { | ||
"v": 3, | ||
"d": "Gquaddivisor from modexp precompile for gas calculation" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
"name": "EIP-2565", | ||
"number": 2565, | ||
"comment": "ModExp gas cost", | ||
"url": "https://eips.ethereum.org/EIPS/eip-2565", | ||
"status": "Final", | ||
"minimumHardfork": "byzantium", | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"modexpGquaddivisor": { | ||
"v": 3, | ||
"d": "Gquaddivisor from modexp precompile for gas calculation" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
{ | ||
"name": "EIP-2718", | ||
"comment": "Typed Transaction Envelope", | ||
"url": "https://eips.ethereum.org/EIPS/eip-2718", | ||
"status": "Draft", | ||
"minimumHardfork": "chainstart", | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": {} | ||
} | ||
"name": "EIP-2718", | ||
"comment": "Typed Transaction Envelope", | ||
"url": "https://eips.ethereum.org/EIPS/eip-2718", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2929", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -8,0 +8,0 @@ "gasConfig": {}, |
{ | ||
"name": "EIP-2930", | ||
"comment": "Optional access lists", | ||
"url": "https://eips.ethereum.org/EIPS/eip-2930", | ||
"status": "Draft", | ||
"minimumHardfork": "istanbul", | ||
"requiredEIPs": [2718, 2929], | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"accessListStorageKeyCost": { | ||
"v": 1900, | ||
"d": "Gas cost per storage key in an Access List transaction" | ||
}, | ||
"accessListAddressCost": { | ||
"v": 2400, | ||
"d": "Gas cost per storage key in an Access List transaction" | ||
} | ||
"name": "EIP-2930", | ||
"comment": "Optional access lists", | ||
"url": "https://eips.ethereum.org/EIPS/eip-2930", | ||
"status": "Final", | ||
"minimumHardfork": "istanbul", | ||
"requiredEIPs": [2718, 2929], | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"accessListStorageKeyCost": { | ||
"v": 1900, | ||
"d": "Gas cost per storage key in an Access List transaction" | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} | ||
"accessListAddressCost": { | ||
"v": 2400, | ||
"d": "Gas cost per storage key in an Access List transaction" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
{ | ||
"name": "EIP-3198", | ||
"number": 3198, | ||
"comment": "BASEFEE opcode", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3198", | ||
"status": "Review", | ||
"minimumHardfork": "london", | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"basefee": { | ||
"v": 2, | ||
"d": "Gas cost of the BASEFEE opcode" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} | ||
"name": "EIP-3198", | ||
"number": 3198, | ||
"comment": "BASEFEE opcode", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3198", | ||
"status": "Final", | ||
"minimumHardfork": "london", | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"basefee": { | ||
"v": 2, | ||
"d": "Gas cost of the BASEFEE opcode" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
{ | ||
"name": "EIP-3529", | ||
"comment": "Reduction in refunds", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3529", | ||
"status": "Draft", | ||
"minimumHardfork": "berlin", | ||
"requiredEIPs": [2929], | ||
"gasConfig": { | ||
"maxRefundQuotient": { | ||
"v": 5, | ||
"d": "Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)" | ||
} | ||
"name": "EIP-3529", | ||
"comment": "Reduction in refunds", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3529", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
"requiredEIPs": [2929], | ||
"gasConfig": { | ||
"maxRefundQuotient": { | ||
"v": 5, | ||
"d": "Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)" | ||
} | ||
}, | ||
"gasPrices": { | ||
"selfdestructRefund": { | ||
"v": 0, | ||
"d": "Refunded following a selfdestruct operation" | ||
}, | ||
"gasPrices": { | ||
"selfdestructRefund": { | ||
"v": 0, | ||
"d": "Refunded following a selfdestruct operation" | ||
}, | ||
"sstoreClearRefundEIP2200": { | ||
"v": 4800, | ||
"d": "Once per SSTORE operation for clearing an originally existing storage slot" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} | ||
"sstoreClearRefundEIP2200": { | ||
"v": 4800, | ||
"d": "Once per SSTORE operation for clearing an originally existing storage slot" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
{ | ||
"name": "EIP-3541", | ||
"comment": "Reject new contracts starting with the 0xEF byte", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3541", | ||
"status": "Draft", | ||
"minimumHardfork": "berlin", | ||
"requiredEIPs": [], | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": {} | ||
} | ||
"name": "EIP-3541", | ||
"comment": "Reject new contracts starting with the 0xEF byte", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3541", | ||
"status": "Final", | ||
"minimumHardfork": "berlin", | ||
"requiredEIPs": [], | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
{ | ||
"name": "EIP-3554", | ||
"comment": "Reduction in refunds", | ||
"url": "Difficulty Bomb Delay to December 1st 2021", | ||
"status": "Draft", | ||
"minimumHardfork": "muirGlacier", | ||
"requiredEIPs": [], | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": { | ||
"difficultyBombDelay": { | ||
"v": 9500000, | ||
"d": "the amount of blocks to delay the difficulty bomb with" | ||
} | ||
} | ||
"name": "EIP-3554", | ||
"comment": "Reduction in refunds", | ||
"url": "Difficulty Bomb Delay to December 1st 2021", | ||
"status": "Final", | ||
"minimumHardfork": "muirGlacier", | ||
"requiredEIPs": [], | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": { | ||
"difficultyBombDelay": { | ||
"v": 9500000, | ||
"d": "the amount of blocks to delay the difficulty bomb with" | ||
} | ||
} | ||
} |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3607", | ||
"status": "Draft", | ||
"status": "Final", | ||
"minimumHardfork": "chainstart", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [], |
@@ -6,3 +6,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-3675", | ||
"status": "Draft", | ||
"status": "Review", | ||
"minimumHardfork": "london", | ||
@@ -9,0 +9,0 @@ "requiredEIPs": [], |
{ | ||
"name": "EIP-3855", | ||
"number": 3855, | ||
"comment": "PUSH0 instruction", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3855", | ||
"status": "Review", | ||
"minimumHardfork": "chainstart", | ||
"requiredEIPs": [], | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"push0": { | ||
"v": 2, | ||
"d": "Base fee of the PUSH0 opcode" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} | ||
"name": "EIP-3855", | ||
"number": 3855, | ||
"comment": "PUSH0 instruction", | ||
"url": "https://eips.ethereum.org/EIPS/eip-3855", | ||
"status": "Review", | ||
"minimumHardfork": "chainstart", | ||
"requiredEIPs": [], | ||
"gasConfig": {}, | ||
"gasPrices": { | ||
"push0": { | ||
"v": 2, | ||
"d": "Base fee of the PUSH0 opcode" | ||
} | ||
}, | ||
"vm": {}, | ||
"pow": {} | ||
} |
{ | ||
"name": "EIP-4345", | ||
"number": 4345, | ||
"comment": "Difficulty Bomb Delay to June 2022", | ||
"url": "https://eips.ethereum.org/EIPS/eip-4345", | ||
"status": "Review", | ||
"minimumHardfork": "london", | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": { | ||
"difficultyBombDelay": { | ||
"v": 10700000, | ||
"d": "the amount of blocks to delay the difficulty bomb with" | ||
} | ||
"name": "EIP-4345", | ||
"number": 4345, | ||
"comment": "Difficulty Bomb Delay to June 2022", | ||
"url": "https://eips.ethereum.org/EIPS/eip-4345", | ||
"status": "Final", | ||
"minimumHardfork": "london", | ||
"gasConfig": {}, | ||
"gasPrices": {}, | ||
"vm": {}, | ||
"pow": { | ||
"difficultyBombDelay": { | ||
"v": 10700000, | ||
"d": "the amount of blocks to delay the difficulty bomb with" | ||
} | ||
} | ||
} |
@@ -13,8 +13,12 @@ import { eipsType } from './../types' | ||
3529: require('./3529.json'), | ||
3540: require('./3540.json'), | ||
3541: require('./3541.json'), | ||
3554: require('./3554.json'), | ||
3607: require('./3607.json'), | ||
3670: require('./3670.json'), | ||
3675: require('./3675.json'), | ||
3855: require('./3855.json'), | ||
3860: require('./3860.json'), | ||
4345: require('./4345.json'), | ||
4399: require('./4399.json'), | ||
} |
@@ -5,4 +5,4 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-2070", | ||
"status": "Draft", | ||
"eips": [ 2565, 2929, 2718, 2930 ] | ||
"status": "Final", | ||
"eips": [2565, 2929, 2718, 2930] | ||
} |
@@ -16,3 +16,4 @@ export const hardforks = [ | ||
['arrowGlacier', require('./arrowGlacier.json')], | ||
['preMerge', require('./preMerge.json')], | ||
['merge', require('./merge.json')], | ||
] |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1679", | ||
"status": "Draft", | ||
"status": "Final", | ||
"gasConfig": {}, | ||
@@ -8,0 +8,0 @@ "gasPrices": { |
@@ -5,4 +5,4 @@ { | ||
"url": "https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md", | ||
"status": "Draft", | ||
"eips": [ 1559, 3198, 3529, 3541 ] | ||
"status": "Final", | ||
"eips": [1559, 3198, 3529, 3541] | ||
} |
{ | ||
"name": "merge", | ||
"comment": "Hardfork to upgrade the consensus mechanism to Proof-of-Stake", | ||
"url": "https://github.com/ethereum/pm/issues/361", | ||
"status": "pre-Draft", | ||
"url": "https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md", | ||
"status": "Draft", | ||
"consensus": { | ||
@@ -11,3 +11,3 @@ "type": "pos", | ||
}, | ||
"eips": [ 3675 ] | ||
"eips": [3675, 4399] | ||
} |
@@ -5,3 +5,3 @@ { | ||
"url": "https://eips.ethereum.org/EIPS/eip-1716", | ||
"status": "Draft", | ||
"status": "Final", | ||
"gasConfig": {}, | ||
@@ -8,0 +8,0 @@ "gasPrices": { |
{ | ||
"name": "shanghai", | ||
"comment": "Next feature hardfork after the London HF", | ||
"comment": "Next feature hardfork after the merge hardfork", | ||
"url": "https://github.com/ethereum/pm/issues/356", | ||
"status": "Pre-Draft", | ||
"eips": [] | ||
} | ||
} |
@@ -83,2 +83,3 @@ import { EventEmitter } from 'events' | ||
Shanghai = 'shanghai', | ||
PreMerge = 'preMerge', | ||
Merge = 'merge', | ||
@@ -144,9 +145,27 @@ } | ||
* | ||
* Pattern 2 (with genesis state, see {@link GenesisState} for format): | ||
* Pattern 2 (with genesis state see {@link GenesisState} for format): | ||
* | ||
* ```javascript | ||
* const simpleState = { | ||
* '0x0...01': '0x100', // For EoA | ||
* } | ||
* import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json' | ||
* import chain1GenesisState from '[PATH_TO_GENESIS_STATES]/chain1GenesisState.json' | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, chain1GenesisState ] ]}) | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, simpleState ] ]}) | ||
* ``` | ||
* | ||
* Pattern 3 (with complex genesis state, containing contract accounts and storage). | ||
* Note that in {@link AccountState} there are two | ||
* accepted types. This allows to easily insert accounts in the genesis state: | ||
* | ||
* A complex genesis state with Contract and EoA states would have the following format: | ||
* | ||
* ```javascript | ||
* const complexState = { | ||
* '0x0...01': '0x100', // For EoA | ||
* '0x0...02': ['0x1', '0xRUNTIME_BYTECODE', [[ keyOne, valueOne ], [ keyTwo, valueTwo ]]] // For contracts | ||
* } | ||
* import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json' | ||
* const common = new Common({ chain: 'myCustomChain1', customChains: [ [ myCustomChain1, complexState ] ]}) | ||
* ``` | ||
*/ | ||
@@ -1204,4 +1223,6 @@ customChains?: IChain[] | [IChain, GenesisState][] | ||
copy(): Common { | ||
return Object.assign(Object.create(Object.getPrototypeOf(this)), this) | ||
const copy = Object.assign(Object.create(Object.getPrototypeOf(this)), this) | ||
copy.removeAllListeners() | ||
return copy | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import { BN } from 'ethereumjs-util' | ||
import { BN, PrefixedHexString } from 'ethereumjs-util' | ||
import { ConsensusAlgorithm, ConsensusType, Hardfork as HardforkName } from '.' | ||
@@ -43,4 +43,12 @@ | ||
type StoragePair = [key: PrefixedHexString, value: PrefixedHexString] | ||
export type AccountState = [ | ||
balance: PrefixedHexString, | ||
code: PrefixedHexString, | ||
storage: Array<StoragePair> | ||
] | ||
export interface GenesisState { | ||
[key: string]: string | [string, [[string, string]]] // balance | [balance, code, [[storageKey, storageValue]]] | ||
[key: PrefixedHexString]: PrefixedHexString | AccountState | ||
} | ||
@@ -47,0 +55,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2527765
186
40514
339
0