@feelyourprotocol/common 8141.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +409 -0
- package/dist/cjs/chains.d.ts +6 -0
- package/dist/cjs/chains.d.ts.map +1 -0
- package/dist/cjs/chains.js +637 -0
- package/dist/cjs/chains.js.map +1 -0
- package/dist/cjs/common.d.ts +318 -0
- package/dist/cjs/common.d.ts.map +1 -0
- package/dist/cjs/common.js +789 -0
- package/dist/cjs/common.js.map +1 -0
- package/dist/cjs/constructors.d.ts +27 -0
- package/dist/cjs/constructors.d.ts.map +1 -0
- package/dist/cjs/constructors.js +53 -0
- package/dist/cjs/constructors.js.map +1 -0
- package/dist/cjs/crc.d.ts +8 -0
- package/dist/cjs/crc.d.ts.map +1 -0
- package/dist/cjs/crc.js +63 -0
- package/dist/cjs/crc.js.map +1 -0
- package/dist/cjs/eips.d.ts +3 -0
- package/dist/cjs/eips.d.ts.map +1 -0
- package/dist/cjs/eips.js +589 -0
- package/dist/cjs/eips.js.map +1 -0
- package/dist/cjs/enums.d.ts +65 -0
- package/dist/cjs/enums.d.ts.map +1 -0
- package/dist/cjs/enums.js +80 -0
- package/dist/cjs/enums.js.map +1 -0
- package/dist/cjs/gethGenesis.d.ts +145 -0
- package/dist/cjs/gethGenesis.d.ts.map +1 -0
- package/dist/cjs/gethGenesis.js +26 -0
- package/dist/cjs/gethGenesis.js.map +1 -0
- package/dist/cjs/hardforks.d.ts +3 -0
- package/dist/cjs/hardforks.d.ts.map +1 -0
- package/dist/cjs/hardforks.js +207 -0
- package/dist/cjs/hardforks.js.map +1 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +25 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces.d.ts +132 -0
- package/dist/cjs/interfaces.d.ts.map +1 -0
- package/dist/cjs/interfaces.js +13 -0
- package/dist/cjs/interfaces.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/types.d.ts +167 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils.d.ts +60 -0
- package/dist/cjs/utils.d.ts.map +1 -0
- package/dist/cjs/utils.js +263 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/chains.d.ts +6 -0
- package/dist/esm/chains.d.ts.map +1 -0
- package/dist/esm/chains.js +634 -0
- package/dist/esm/chains.js.map +1 -0
- package/dist/esm/common.d.ts +318 -0
- package/dist/esm/common.d.ts.map +1 -0
- package/dist/esm/common.js +785 -0
- package/dist/esm/common.js.map +1 -0
- package/dist/esm/constructors.d.ts +27 -0
- package/dist/esm/constructors.d.ts.map +1 -0
- package/dist/esm/constructors.js +49 -0
- package/dist/esm/constructors.js.map +1 -0
- package/dist/esm/crc.d.ts +8 -0
- package/dist/esm/crc.d.ts.map +1 -0
- package/dist/esm/crc.js +59 -0
- package/dist/esm/crc.js.map +1 -0
- package/dist/esm/eips.d.ts +3 -0
- package/dist/esm/eips.d.ts.map +1 -0
- package/dist/esm/eips.js +586 -0
- package/dist/esm/eips.js.map +1 -0
- package/dist/esm/enums.d.ts +65 -0
- package/dist/esm/enums.d.ts.map +1 -0
- package/dist/esm/enums.js +77 -0
- package/dist/esm/enums.js.map +1 -0
- package/dist/esm/gethGenesis.d.ts +145 -0
- package/dist/esm/gethGenesis.d.ts.map +1 -0
- package/dist/esm/gethGenesis.js +23 -0
- package/dist/esm/gethGenesis.js.map +1 -0
- package/dist/esm/hardforks.d.ts +3 -0
- package/dist/esm/hardforks.d.ts.map +1 -0
- package/dist/esm/hardforks.js +204 -0
- package/dist/esm/hardforks.js.map +1 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interfaces.d.ts +132 -0
- package/dist/esm/interfaces.d.ts.map +1 -0
- package/dist/esm/interfaces.js +10 -0
- package/dist/esm/interfaces.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/types.d.ts +167 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.d.ts +60 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +258 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/tsconfig.prod.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.prod.esm.tsbuildinfo +1 -0
- package/package.json +77 -0
- package/src/chains.ts +638 -0
- package/src/common.ts +913 -0
- package/src/constructors.ts +60 -0
- package/src/crc.ts +63 -0
- package/src/eips.ts +588 -0
- package/src/enums.ts +104 -0
- package/src/gethGenesis.ts +175 -0
- package/src/hardforks.ts +205 -0
- package/src/index.ts +8 -0
- package/src/interfaces.ts +191 -0
- package/src/types.ts +193 -0
- package/src/utils.ts +324 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Common, parseGethGenesis } from './index.ts'
|
|
2
|
+
|
|
3
|
+
import type { GethGenesis } from './gethGenesis.ts'
|
|
4
|
+
import type { BaseOpts, ChainConfig, GethConfigOpts } from './index.ts'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates a {@link Common} object for a custom chain, based on a standard one.
|
|
8
|
+
*
|
|
9
|
+
* It uses all the {@link Chain} parameters from the {@link baseChain} option except the ones overridden
|
|
10
|
+
* in a provided {@link chainParamsOrName} dictionary. Some usage example:
|
|
11
|
+
*
|
|
12
|
+
* ```javascript
|
|
13
|
+
* import { createCustomCommon, Mainnet } from '@feelyourprotocol/common'
|
|
14
|
+
*
|
|
15
|
+
* createCustomCommon({chainId: 123}, Mainnet)
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param partialConfig Custom parameter dict
|
|
19
|
+
* @param baseChain `ChainConfig` chain configuration taken as a base chain, e.g. `Mainnet` (exported at root level)
|
|
20
|
+
* @param opts Custom chain options to set various {@link BaseOpts}
|
|
21
|
+
*/
|
|
22
|
+
export function createCustomCommon(
|
|
23
|
+
partialConfig: Partial<ChainConfig>,
|
|
24
|
+
baseChain: ChainConfig,
|
|
25
|
+
opts: BaseOpts = {},
|
|
26
|
+
): Common {
|
|
27
|
+
return new Common({
|
|
28
|
+
chain: {
|
|
29
|
+
...baseChain,
|
|
30
|
+
...partialConfig,
|
|
31
|
+
},
|
|
32
|
+
...opts,
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Static method to load and set common from a geth genesis object
|
|
38
|
+
* @param genesisJSON GethGenesis object
|
|
39
|
+
* @returns a new {@link Common} object
|
|
40
|
+
*/
|
|
41
|
+
export function createCommonFromGethGenesis(
|
|
42
|
+
genesisJSON: GethGenesis,
|
|
43
|
+
{ chain, eips, genesisHash, hardfork, params, customCrypto }: GethConfigOpts,
|
|
44
|
+
): Common {
|
|
45
|
+
const genesisParams = parseGethGenesis(genesisJSON, chain)
|
|
46
|
+
const common = new Common({
|
|
47
|
+
chain: {
|
|
48
|
+
...genesisParams,
|
|
49
|
+
name: genesisParams.name ?? 'Custom chain',
|
|
50
|
+
} as ChainConfig, // Typecasting because of `string` -> `PrefixedHexString` mismatches
|
|
51
|
+
eips,
|
|
52
|
+
params,
|
|
53
|
+
hardfork: hardfork ?? genesisParams.hardfork,
|
|
54
|
+
customCrypto,
|
|
55
|
+
})
|
|
56
|
+
if (genesisHash !== undefined) {
|
|
57
|
+
common.setForkHashes(genesisHash)
|
|
58
|
+
}
|
|
59
|
+
return common
|
|
60
|
+
}
|
package/src/crc.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was duplicated from https://github.com/alexgorbatchev/crc/ under MIT license.
|
|
3
|
+
* The code below is copied largely unmodified from the below file
|
|
4
|
+
* https://github.com/alexgorbatchev/crc/blob/31fc3853e417b5fb5ec83335428805842575f699/src/calculators/crc32.ts
|
|
5
|
+
*/
|
|
6
|
+
let TABLE: Array<number> | Int32Array = [
|
|
7
|
+
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
|
|
8
|
+
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
|
|
9
|
+
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
|
|
10
|
+
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
|
|
11
|
+
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
|
12
|
+
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
|
|
13
|
+
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
|
|
14
|
+
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
|
|
15
|
+
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
|
|
16
|
+
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
|
17
|
+
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
|
|
18
|
+
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
|
|
19
|
+
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
|
|
20
|
+
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
|
|
21
|
+
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
|
22
|
+
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
|
|
23
|
+
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
|
|
24
|
+
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
|
|
25
|
+
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
|
|
26
|
+
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
|
27
|
+
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
|
|
28
|
+
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
|
|
29
|
+
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
|
|
30
|
+
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
|
|
31
|
+
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
|
32
|
+
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
|
|
33
|
+
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
|
|
34
|
+
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
|
|
35
|
+
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
|
|
36
|
+
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
|
37
|
+
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
|
|
38
|
+
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
if (typeof Int32Array !== 'undefined') {
|
|
42
|
+
TABLE = new Int32Array(TABLE)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const crc = (current: Uint8Array, previous?: number) => {
|
|
46
|
+
let crc = previous === 0 ? 0 : ~~previous! ^ -1
|
|
47
|
+
|
|
48
|
+
for (let index = 0; index < current.length; index++) {
|
|
49
|
+
crc = TABLE[(crc ^ current[index]) & 0xff] ^ (crc >>> 8)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return crc ^ -1
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Calculates the CRC32 checksum of `current`.
|
|
57
|
+
* @param current Input data
|
|
58
|
+
* @param previous Optional previous CRC to continue a multi-part calculation
|
|
59
|
+
* @returns Unsigned CRC32 checksum
|
|
60
|
+
*/
|
|
61
|
+
export const crc32 = (current: Uint8Array, previous?: number) => {
|
|
62
|
+
return crc(current, previous) >>> 0
|
|
63
|
+
}
|
package/src/eips.ts
ADDED
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import { Hardfork } from './enums.ts'
|
|
2
|
+
|
|
3
|
+
import type { EIPsDict } from './types.ts'
|
|
4
|
+
|
|
5
|
+
export const eipsDict: EIPsDict = {
|
|
6
|
+
/**
|
|
7
|
+
* Frontier/Chainstart
|
|
8
|
+
* (there is no Meta-EIP currently for Frontier, so 1 was chosen)
|
|
9
|
+
*/
|
|
10
|
+
1: {
|
|
11
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
12
|
+
},
|
|
13
|
+
/**
|
|
14
|
+
* Homestead HF Meta EIP
|
|
15
|
+
*/
|
|
16
|
+
606: {
|
|
17
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* TangerineWhistle HF Meta EIP
|
|
21
|
+
*/
|
|
22
|
+
608: {
|
|
23
|
+
minimumHardfork: Hardfork.Homestead,
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* Spurious Dragon HF Meta EIP
|
|
27
|
+
*/
|
|
28
|
+
607: {
|
|
29
|
+
minimumHardfork: Hardfork.TangerineWhistle,
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Byzantium HF Meta EIP
|
|
33
|
+
*/
|
|
34
|
+
609: {
|
|
35
|
+
minimumHardfork: Hardfork.SpuriousDragon,
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* Constantinople HF Meta EIP
|
|
39
|
+
*/
|
|
40
|
+
1013: {
|
|
41
|
+
minimumHardfork: Hardfork.Constantinople,
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Petersburg HF Meta EIP
|
|
45
|
+
*/
|
|
46
|
+
1716: {
|
|
47
|
+
minimumHardfork: Hardfork.Constantinople,
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* Istanbul HF Meta EIP
|
|
51
|
+
*/
|
|
52
|
+
1679: {
|
|
53
|
+
minimumHardfork: Hardfork.Constantinople,
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* MuirGlacier HF Meta EIP
|
|
57
|
+
*/
|
|
58
|
+
2384: {
|
|
59
|
+
minimumHardfork: Hardfork.Istanbul,
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* Description : DUPN, SWAPN and EXCHANGE instructions
|
|
63
|
+
* URL : https://eips.ethereum.org/EIPS/eip-8024
|
|
64
|
+
* Status : Review
|
|
65
|
+
*/
|
|
66
|
+
8024: {
|
|
67
|
+
minimumHardfork: Hardfork.Amsterdam,
|
|
68
|
+
requiredEIPs: [],
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Description : Transient storage opcodes
|
|
72
|
+
* URL : https://eips.ethereum.org/EIPS/eip-1153
|
|
73
|
+
* Status : Final
|
|
74
|
+
*/
|
|
75
|
+
1153: {
|
|
76
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Description : Fee market change for ETH 1.0 chain
|
|
80
|
+
* URL : https://eips.ethereum.org/EIPS/eip-1559
|
|
81
|
+
* Status : Final
|
|
82
|
+
*/
|
|
83
|
+
1559: {
|
|
84
|
+
minimumHardfork: Hardfork.Berlin,
|
|
85
|
+
requiredEIPs: [2930],
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* Description : ModExp gas cost
|
|
89
|
+
* URL : https://eips.ethereum.org/EIPS/eip-2565
|
|
90
|
+
* Status : Final
|
|
91
|
+
*/
|
|
92
|
+
2565: {
|
|
93
|
+
minimumHardfork: Hardfork.Byzantium,
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* Description : BLS12-381 precompiles
|
|
97
|
+
* URL : https://eips.ethereum.org/EIPS/eip-2537
|
|
98
|
+
* Status : Review
|
|
99
|
+
*/
|
|
100
|
+
2537: {
|
|
101
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Description : Typed Transaction Envelope
|
|
105
|
+
* URL : https://eips.ethereum.org/EIPS/eip-2718
|
|
106
|
+
* Status : Final
|
|
107
|
+
*/
|
|
108
|
+
2718: {
|
|
109
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* Description : Gas cost increases for state access opcodes
|
|
113
|
+
* URL : https://eips.ethereum.org/EIPS/eip-2929
|
|
114
|
+
* Status : Final
|
|
115
|
+
*/
|
|
116
|
+
2929: {
|
|
117
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* Description : Optional access lists
|
|
121
|
+
* URL : https://eips.ethereum.org/EIPS/eip-2930
|
|
122
|
+
* Status : Final
|
|
123
|
+
*/
|
|
124
|
+
2930: {
|
|
125
|
+
minimumHardfork: Hardfork.Istanbul,
|
|
126
|
+
requiredEIPs: [2718, 2929],
|
|
127
|
+
},
|
|
128
|
+
/**
|
|
129
|
+
* Description : Save historical block hashes in state (Verkle related usage, UNSTABLE)
|
|
130
|
+
* URL : https://github.com/gballet/EIPs/pull/3/commits/2e9ac09a142b0d9fb4db0b8d4609f92e5d9990c5
|
|
131
|
+
* Status : Draft
|
|
132
|
+
*/
|
|
133
|
+
2935: {
|
|
134
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
135
|
+
},
|
|
136
|
+
/**
|
|
137
|
+
* Description : BASEFEE opcode
|
|
138
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3198
|
|
139
|
+
* Status : Final
|
|
140
|
+
*/
|
|
141
|
+
3198: {
|
|
142
|
+
minimumHardfork: Hardfork.London,
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Description : Reduction in refunds
|
|
146
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3529
|
|
147
|
+
* Status : Final
|
|
148
|
+
*/
|
|
149
|
+
3529: {
|
|
150
|
+
minimumHardfork: Hardfork.Berlin,
|
|
151
|
+
requiredEIPs: [2929],
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Description : EVM Object Format (EOF) v1
|
|
155
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-3540.md
|
|
156
|
+
* Status : Review
|
|
157
|
+
*/
|
|
158
|
+
3540: {
|
|
159
|
+
minimumHardfork: Hardfork.London,
|
|
160
|
+
requiredEIPs: [3541, 3860],
|
|
161
|
+
},
|
|
162
|
+
/**
|
|
163
|
+
* Description : Reject new contracts starting with the 0xEF byte
|
|
164
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3541
|
|
165
|
+
* Status : Final
|
|
166
|
+
*/
|
|
167
|
+
3541: {
|
|
168
|
+
minimumHardfork: Hardfork.Berlin,
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* Description : Difficulty Bomb Delay to December 1st 2021
|
|
172
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3554
|
|
173
|
+
* Status : Final
|
|
174
|
+
*/
|
|
175
|
+
3554: {
|
|
176
|
+
minimumHardfork: Hardfork.MuirGlacier,
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* Description : Reject transactions from senders with deployed code
|
|
180
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3607
|
|
181
|
+
* Status : Final
|
|
182
|
+
*/
|
|
183
|
+
3607: {
|
|
184
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
185
|
+
},
|
|
186
|
+
/**
|
|
187
|
+
* Description : Warm COINBASE
|
|
188
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3651
|
|
189
|
+
* Status : Final
|
|
190
|
+
*/
|
|
191
|
+
3651: {
|
|
192
|
+
minimumHardfork: Hardfork.London,
|
|
193
|
+
requiredEIPs: [2929],
|
|
194
|
+
},
|
|
195
|
+
/**
|
|
196
|
+
* Description : EOF - Code Validation
|
|
197
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-3670.md
|
|
198
|
+
* Status : Review
|
|
199
|
+
*/
|
|
200
|
+
3670: {
|
|
201
|
+
minimumHardfork: Hardfork.London,
|
|
202
|
+
requiredEIPs: [3540],
|
|
203
|
+
},
|
|
204
|
+
/**
|
|
205
|
+
* Description : Upgrade consensus to Proof-of-Stake
|
|
206
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3675
|
|
207
|
+
* Status : Final
|
|
208
|
+
*/
|
|
209
|
+
3675: {
|
|
210
|
+
minimumHardfork: Hardfork.London,
|
|
211
|
+
},
|
|
212
|
+
/**
|
|
213
|
+
* Description : PUSH0 instruction
|
|
214
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3855
|
|
215
|
+
* Status : Final
|
|
216
|
+
*/
|
|
217
|
+
3855: {
|
|
218
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* Description : Limit and meter initcode
|
|
222
|
+
* URL : https://eips.ethereum.org/EIPS/eip-3860
|
|
223
|
+
* Status : Final
|
|
224
|
+
*/
|
|
225
|
+
3860: {
|
|
226
|
+
minimumHardfork: Hardfork.SpuriousDragon,
|
|
227
|
+
},
|
|
228
|
+
/**
|
|
229
|
+
* Description : EOF - Static relative jumps
|
|
230
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-4200.md
|
|
231
|
+
* Status : Review
|
|
232
|
+
*/
|
|
233
|
+
4200: {
|
|
234
|
+
minimumHardfork: Hardfork.London,
|
|
235
|
+
requiredEIPs: [3540, 3670],
|
|
236
|
+
},
|
|
237
|
+
/**
|
|
238
|
+
* Description : Difficulty Bomb Delay to June 2022
|
|
239
|
+
* URL : https://eips.ethereum.org/EIPS/eip-4345
|
|
240
|
+
* Status : Final
|
|
241
|
+
*/
|
|
242
|
+
4345: {
|
|
243
|
+
minimumHardfork: Hardfork.London,
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
* Description : Supplant DIFFICULTY opcode with PREVRANDAO
|
|
247
|
+
* URL : https://eips.ethereum.org/EIPS/eip-4399
|
|
248
|
+
* Status : Final
|
|
249
|
+
*/
|
|
250
|
+
4399: {
|
|
251
|
+
minimumHardfork: Hardfork.London,
|
|
252
|
+
},
|
|
253
|
+
/**
|
|
254
|
+
* Description : EOF - Functions
|
|
255
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-4750.md
|
|
256
|
+
* Status : Review
|
|
257
|
+
*/
|
|
258
|
+
4750: {
|
|
259
|
+
minimumHardfork: Hardfork.London,
|
|
260
|
+
requiredEIPs: [3540, 3670, 5450],
|
|
261
|
+
},
|
|
262
|
+
/**
|
|
263
|
+
* Description : Beacon block root in the EVM
|
|
264
|
+
* URL : https://eips.ethereum.org/EIPS/eip-4788
|
|
265
|
+
* Status : Final
|
|
266
|
+
*/
|
|
267
|
+
4788: {
|
|
268
|
+
minimumHardfork: Hardfork.Cancun,
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
* Description : Shard Blob Transactions
|
|
272
|
+
* URL : https://eips.ethereum.org/EIPS/eip-4844
|
|
273
|
+
* Status : Final
|
|
274
|
+
*/
|
|
275
|
+
4844: {
|
|
276
|
+
minimumHardfork: Hardfork.Paris,
|
|
277
|
+
requiredEIPs: [1559, 2718, 2930, 4895],
|
|
278
|
+
},
|
|
279
|
+
/**
|
|
280
|
+
* Description : Beacon chain push withdrawals as operations
|
|
281
|
+
* URL : https://eips.ethereum.org/EIPS/eip-4895
|
|
282
|
+
* Status : Final
|
|
283
|
+
*/
|
|
284
|
+
4895: {
|
|
285
|
+
minimumHardfork: Hardfork.Paris,
|
|
286
|
+
},
|
|
287
|
+
/**
|
|
288
|
+
* Description : Delaying Difficulty Bomb to mid-September 2022
|
|
289
|
+
* URL : https://eips.ethereum.org/EIPS/eip-5133
|
|
290
|
+
* Status : Final
|
|
291
|
+
*/
|
|
292
|
+
5133: {
|
|
293
|
+
minimumHardfork: Hardfork.GrayGlacier,
|
|
294
|
+
},
|
|
295
|
+
/**
|
|
296
|
+
* Description : EOF - Stack Validation
|
|
297
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-5450.md
|
|
298
|
+
* Status : Review
|
|
299
|
+
*/
|
|
300
|
+
5450: {
|
|
301
|
+
minimumHardfork: Hardfork.London,
|
|
302
|
+
requiredEIPs: [3540, 3670, 4200, 4750],
|
|
303
|
+
},
|
|
304
|
+
/**
|
|
305
|
+
* Description : MCOPY - Memory copying instruction
|
|
306
|
+
* URL : https://eips.ethereum.org/EIPS/eip-5656
|
|
307
|
+
* Status : Final
|
|
308
|
+
*/
|
|
309
|
+
5656: {
|
|
310
|
+
minimumHardfork: Hardfork.Shanghai,
|
|
311
|
+
},
|
|
312
|
+
/**
|
|
313
|
+
* Description : Supply validator deposits on chain
|
|
314
|
+
* URL : https://eips.ethereum.org/EIPS/eip-6110
|
|
315
|
+
* Status : Review
|
|
316
|
+
*/
|
|
317
|
+
6110: {
|
|
318
|
+
minimumHardfork: Hardfork.Cancun,
|
|
319
|
+
requiredEIPs: [7685],
|
|
320
|
+
},
|
|
321
|
+
/**
|
|
322
|
+
* Description : EOF - JUMPF and non-returning functions
|
|
323
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-6206.md
|
|
324
|
+
* Status : Review
|
|
325
|
+
*/
|
|
326
|
+
6206: {
|
|
327
|
+
minimumHardfork: Hardfork.London,
|
|
328
|
+
requiredEIPs: [4750, 5450],
|
|
329
|
+
},
|
|
330
|
+
/**
|
|
331
|
+
* Description : SELFDESTRUCT only in same transaction
|
|
332
|
+
* URL : https://eips.ethereum.org/EIPS/eip-6780
|
|
333
|
+
* Status : Final
|
|
334
|
+
*/
|
|
335
|
+
6780: {
|
|
336
|
+
minimumHardfork: Hardfork.London,
|
|
337
|
+
},
|
|
338
|
+
/**
|
|
339
|
+
* Description : Execution layer triggerable withdrawals (experimental)
|
|
340
|
+
* URL : https://github.com/ethereum/EIPs/blob/3b5fcad6b35782f8aaeba7d4ac26004e8fbd720f/EIPS/eip-7002.md
|
|
341
|
+
* Status : Review
|
|
342
|
+
*/
|
|
343
|
+
7002: {
|
|
344
|
+
minimumHardfork: Hardfork.Paris,
|
|
345
|
+
requiredEIPs: [7685],
|
|
346
|
+
},
|
|
347
|
+
/**
|
|
348
|
+
* Description : Revamped CALL instructions
|
|
349
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-7069.md
|
|
350
|
+
* Status : Review
|
|
351
|
+
*/
|
|
352
|
+
7069: {
|
|
353
|
+
minimumHardfork: Hardfork.Berlin,
|
|
354
|
+
/* Note: per EIP these are the additionally required EIPs:
|
|
355
|
+
EIP 150 - This is the entire Tangerine Whistle hardfork
|
|
356
|
+
EIP 211 - (RETURNDATASIZE / RETURNDATACOPY) - Included in Byzantium
|
|
357
|
+
EIP 214 - (STATICCALL) - Included in Byzantium
|
|
358
|
+
*/
|
|
359
|
+
requiredEIPs: [2929],
|
|
360
|
+
},
|
|
361
|
+
/**
|
|
362
|
+
* Description : Increase the MAX_EFFECTIVE_BALANCE -> Execution layer triggered consolidations (experimental)
|
|
363
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7251
|
|
364
|
+
* Status : Draft
|
|
365
|
+
*/
|
|
366
|
+
7251: {
|
|
367
|
+
minimumHardfork: Hardfork.Paris,
|
|
368
|
+
requiredEIPs: [7685],
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Description : EOF - Data section access instructions
|
|
372
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-7480.md
|
|
373
|
+
* Status : Review
|
|
374
|
+
*/
|
|
375
|
+
7480: {
|
|
376
|
+
minimumHardfork: Hardfork.London,
|
|
377
|
+
requiredEIPs: [3540, 3670],
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* Description : BLOBBASEFEE opcode
|
|
381
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7516
|
|
382
|
+
* Status : Final
|
|
383
|
+
*/
|
|
384
|
+
7516: {
|
|
385
|
+
minimumHardfork: Hardfork.Paris,
|
|
386
|
+
requiredEIPs: [4844],
|
|
387
|
+
},
|
|
388
|
+
/**
|
|
389
|
+
* Description : Peerdas blob transactions
|
|
390
|
+
* URL : hhttps://eips.ethereum.org/EIPS/eip-7594
|
|
391
|
+
* Status : Review
|
|
392
|
+
*/
|
|
393
|
+
7594: {
|
|
394
|
+
minimumHardfork: Hardfork.Paris,
|
|
395
|
+
requiredEIPs: [4844],
|
|
396
|
+
},
|
|
397
|
+
/**
|
|
398
|
+
* Description : EOF Contract Creation
|
|
399
|
+
* URL : https://github.com/ethereum/EIPs/blob/dd32a34cfe4473bce143641bfffe4fd67e1987ab/EIPS/eip-7620.md
|
|
400
|
+
* Status : Review
|
|
401
|
+
*/
|
|
402
|
+
7620: {
|
|
403
|
+
minimumHardfork: Hardfork.London,
|
|
404
|
+
/* Note: per EIP these are the additionally required EIPs:
|
|
405
|
+
EIP 170 - (Max contract size) - Included in Spurious Dragon
|
|
406
|
+
*/
|
|
407
|
+
requiredEIPs: [3540, 3541, 3670],
|
|
408
|
+
},
|
|
409
|
+
/**
|
|
410
|
+
* Description : Increase calldata cost to reduce maximum block size
|
|
411
|
+
* URL : https://github.com/ethereum/EIPs/blob/da2a86bf15044416e8eb0301c9bdb8d561feeb32/EIPS/eip-7623.md
|
|
412
|
+
* Status : Review
|
|
413
|
+
*/
|
|
414
|
+
7623: {
|
|
415
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
416
|
+
requiredEIPs: [],
|
|
417
|
+
},
|
|
418
|
+
/**
|
|
419
|
+
* Description : General purpose execution layer requests
|
|
420
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7685
|
|
421
|
+
* Status : Review
|
|
422
|
+
*/
|
|
423
|
+
7685: {
|
|
424
|
+
// TODO: Set correct minimum hardfork
|
|
425
|
+
minimumHardfork: Hardfork.Cancun,
|
|
426
|
+
requiredEIPs: [3675],
|
|
427
|
+
},
|
|
428
|
+
/**
|
|
429
|
+
* Description : Blob throughput increase
|
|
430
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7691
|
|
431
|
+
* Status : Review
|
|
432
|
+
*/
|
|
433
|
+
7691: {
|
|
434
|
+
minimumHardfork: Hardfork.Paris,
|
|
435
|
+
requiredEIPs: [4844],
|
|
436
|
+
},
|
|
437
|
+
/**
|
|
438
|
+
* Description : Blob base fee bounded by execution cost
|
|
439
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7918
|
|
440
|
+
* Status : Last Call
|
|
441
|
+
*/
|
|
442
|
+
7918: {
|
|
443
|
+
minimumHardfork: Hardfork.Paris,
|
|
444
|
+
requiredEIPs: [4844],
|
|
445
|
+
},
|
|
446
|
+
/**
|
|
447
|
+
* Description : EVM Object Format (EOFv1) Meta
|
|
448
|
+
* URL : https://github.com/ethereum/EIPs/blob/4153e95befd0264082de3c4c2fe3a85cc74d3152/EIPS/eip-7692.md
|
|
449
|
+
* Status : Draft
|
|
450
|
+
*/
|
|
451
|
+
7692: {
|
|
452
|
+
minimumHardfork: Hardfork.Cancun,
|
|
453
|
+
requiredEIPs: [3540, 3670, 4200, 4750, 5450, 6206, 7069, 7480, 7620, 7698],
|
|
454
|
+
},
|
|
455
|
+
/**
|
|
456
|
+
* Description : EOF - Creation transaction
|
|
457
|
+
* URL : https://github.com/ethereum/EIPs/blob/bd421962b4e241aa2b00a85d9cf4e57770bdb954/EIPS/eip-7698.md
|
|
458
|
+
* Status : Draft
|
|
459
|
+
*/
|
|
460
|
+
7698: {
|
|
461
|
+
minimumHardfork: Hardfork.London,
|
|
462
|
+
requiredEIPs: [3540, 7620],
|
|
463
|
+
},
|
|
464
|
+
/**
|
|
465
|
+
* Description : Set EOA account code for one transaction
|
|
466
|
+
* URL : https://github.com/ethereum/EIPs/blob/62419ca3f45375db00b04a368ea37c0bfb05386a/EIPS/eip-7702.md
|
|
467
|
+
* Status : Review
|
|
468
|
+
*/
|
|
469
|
+
7702: {
|
|
470
|
+
// TODO: Set correct minimum hardfork
|
|
471
|
+
minimumHardfork: Hardfork.Cancun,
|
|
472
|
+
requiredEIPs: [2718, 2929, 2930],
|
|
473
|
+
},
|
|
474
|
+
/**
|
|
475
|
+
* Description : Set upper bounds for MODEXP
|
|
476
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7823
|
|
477
|
+
* Status : Review
|
|
478
|
+
*/
|
|
479
|
+
7823: {
|
|
480
|
+
minimumHardfork: Hardfork.Byzantium,
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
* Description : Use historical block hashes saved in state for BLOCKHASH
|
|
484
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7709
|
|
485
|
+
* Status : Final
|
|
486
|
+
*/
|
|
487
|
+
7709: {
|
|
488
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
489
|
+
requiredEIPs: [2935],
|
|
490
|
+
},
|
|
491
|
+
/**
|
|
492
|
+
* Description : Transaction Gas Limit Cap
|
|
493
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7825
|
|
494
|
+
* Status : Draft
|
|
495
|
+
*/
|
|
496
|
+
7825: {
|
|
497
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
498
|
+
requiredEIPs: [],
|
|
499
|
+
},
|
|
500
|
+
/**
|
|
501
|
+
* Description : Ethereum state using a unified binary tree (experimental)
|
|
502
|
+
* URL : hhttps://eips.ethereum.org/EIPS/eip-7864
|
|
503
|
+
* Status : Draft
|
|
504
|
+
*/
|
|
505
|
+
7864: {
|
|
506
|
+
minimumHardfork: Hardfork.London,
|
|
507
|
+
},
|
|
508
|
+
/**
|
|
509
|
+
* Description : EIP-7883: ModExp Gas Cost Increase
|
|
510
|
+
* URL : hhttps://eips.ethereum.org/EIPS/eip-7883
|
|
511
|
+
* Status : Draft
|
|
512
|
+
*/
|
|
513
|
+
7883: {
|
|
514
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
515
|
+
},
|
|
516
|
+
/**
|
|
517
|
+
* Description : Block-level gas accounting without refunds
|
|
518
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7778
|
|
519
|
+
* Status : Draft
|
|
520
|
+
*/
|
|
521
|
+
7778: {
|
|
522
|
+
minimumHardfork: Hardfork.Amsterdam,
|
|
523
|
+
requiredEIPs: [],
|
|
524
|
+
},
|
|
525
|
+
/**
|
|
526
|
+
* Description : Block Level Access Lists (BAL)
|
|
527
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7928
|
|
528
|
+
* Status : Draft (in development, do not use in production)
|
|
529
|
+
*/
|
|
530
|
+
7928: {
|
|
531
|
+
minimumHardfork: Hardfork.Prague,
|
|
532
|
+
requiredEIPs: [],
|
|
533
|
+
},
|
|
534
|
+
/**
|
|
535
|
+
* Description : Count leading zeros (CLZ) opcode
|
|
536
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7939
|
|
537
|
+
* Status : Draft
|
|
538
|
+
*/
|
|
539
|
+
7939: {
|
|
540
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
541
|
+
requiredEIPs: [],
|
|
542
|
+
},
|
|
543
|
+
/**
|
|
544
|
+
* Description : Precompile for secp256r1 Curve Support
|
|
545
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7951
|
|
546
|
+
* Status : Draft
|
|
547
|
+
*/
|
|
548
|
+
7951: {
|
|
549
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
550
|
+
requiredEIPs: [],
|
|
551
|
+
},
|
|
552
|
+
/**
|
|
553
|
+
* Description : RLP Execution Block Size Limit
|
|
554
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7934
|
|
555
|
+
* Status : Last Call
|
|
556
|
+
*/
|
|
557
|
+
7934: {
|
|
558
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
559
|
+
requiredEIPs: [],
|
|
560
|
+
},
|
|
561
|
+
/**
|
|
562
|
+
* Description : ETH transfers emit a log
|
|
563
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7708
|
|
564
|
+
* Status : Draft
|
|
565
|
+
*/
|
|
566
|
+
7708: {
|
|
567
|
+
minimumHardfork: Hardfork.Chainstart,
|
|
568
|
+
requiredEIPs: [1559, 4788, 6780],
|
|
569
|
+
},
|
|
570
|
+
/**
|
|
571
|
+
* Description : SLOTNUM opcode
|
|
572
|
+
* URL : https://eips.ethereum.org/EIPS/eip-7843
|
|
573
|
+
* Status : Draft
|
|
574
|
+
*/
|
|
575
|
+
7843: {
|
|
576
|
+
minimumHardfork: Hardfork.Cancun,
|
|
577
|
+
requiredEIPs: [],
|
|
578
|
+
},
|
|
579
|
+
/**
|
|
580
|
+
* Description : Frame Transaction
|
|
581
|
+
* URL : https://github.com/ethereum/EIPs/blob/ee66073462f5c0f5db43353b5ce4183a72157327/EIPS/eip-8141.md
|
|
582
|
+
* Status : Draft
|
|
583
|
+
*/
|
|
584
|
+
8141: {
|
|
585
|
+
minimumHardfork: Hardfork.Prague,
|
|
586
|
+
requiredEIPs: [2718, 4844],
|
|
587
|
+
},
|
|
588
|
+
}
|