Skip to content

Commit 98330ee

Browse files
committed
feat: hexify eth_config types and compute fork_id(#1)
1 parent f805383 commit 98330ee

3 files changed

Lines changed: 75 additions & 87 deletions

File tree

examples/blob_parameter_only.json

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
{
22
"current": {
3-
"config": {
4-
"name": "bpo",
5-
"block": 25000000,
6-
"blobSchedule": {
7-
"maxBlobGasPerBlock": 800000,
8-
"targetBlobGasPerBlock": 400000,
9-
"blobGaspriceUpdateFraction": 3338477
10-
},
11-
"precompiles": [
12-
"0x0000000000000000000000000000000000000001",
13-
"0x0000000000000000000000000000000000000002",
14-
"0x0000000000000000000000000000000000000003"
15-
],
16-
"systemContracts": []
17-
}
3+
"name": "bpo",
4+
"block": "0x17d7840",
5+
"blobSchedule": {
6+
"maxBlobGasPerBlock": "0xc3500",
7+
"targetBlobGasPerBlock": "0x61a80",
8+
"blobGaspriceUpdateFraction": "0x32f29d"
9+
},
10+
"precompiles": {
11+
"ecrecover": "0x0000000000000000000000000000000000000001",
12+
"sha256": "0x0000000000000000000000000000000000000002",
13+
"ripemd": "0x0000000000000000000000000000000000000003"
14+
},
15+
"systemContracts": {}
1816
},
1917
"next": null,
2018
"last": {
21-
"config": {
22-
"name": "cancun",
23-
"block": 19426545,
24-
"blobSchedule": {
25-
"maxBlobGasPerBlock": 786432,
26-
"targetBlobGasPerBlock": 393216,
27-
"blobGaspriceUpdateFraction": 3338477
28-
},
29-
"precompiles": [
30-
"0x0000000000000000000000000000000000000001",
31-
"0x0000000000000000000000000000000000000002",
32-
"0x0000000000000000000000000000000000000003"
33-
],
34-
"systemContracts": []
35-
}
19+
"name": "cancun",
20+
"block": "0x128b7f1",
21+
"blobSchedule": {
22+
"maxBlobGasPerBlock": "0xc0000",
23+
"targetBlobGasPerBlock": "0x60000",
24+
"blobGaspriceUpdateFraction": "0x32f29d"
25+
},
26+
"precompiles": {
27+
"ecrecover": "0x0000000000000000000000000000000000000001",
28+
"sha256": "0x0000000000000000000000000000000000000002",
29+
"ripemd": "0x0000000000000000000000000000000000000003"
30+
},
31+
"systemContracts": {}
3632
},
3733
"forkId": {
3834
"hash": "0x9abc0011",

examples/cancun_sample.json

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
{
22
"current": {
3-
"config": {
4-
"name": "cancun",
5-
"block": 19426545,
6-
"blobSchedule": {
7-
"maxBlobGasPerBlock": 786432,
8-
"targetBlobGasPerBlock": 393216,
9-
"blobGaspriceUpdateFraction": 3338477
10-
},
11-
"precompiles": [
12-
"0x0000000000000000000000000000000000000001",
13-
"0x0000000000000000000000000000000000000002",
14-
"0x0000000000000000000000000000000000000003"
15-
],
16-
"systemContracts": []
17-
}
3+
"name": "cancun",
4+
"block": "0x128b7f1",
5+
"blobSchedule": {
6+
"maxBlobGasPerBlock": "0xc0000",
7+
"targetBlobGasPerBlock": "0x60000",
8+
"blobGaspriceUpdateFraction": "0x32f29d"
9+
},
10+
"precompiles": {
11+
"ecrecover": "0x0000000000000000000000000000000000000001",
12+
"sha256": "0x0000000000000000000000000000000000000002",
13+
"ripemd": "0x0000000000000000000000000000000000000003"
14+
},
15+
"systemContracts": {}
1816
},
1917
"next": null,
2018
"last": {
21-
"config": {
22-
"name": "shanghai",
23-
"block": 17034870,
24-
"precompiles": [
25-
"0x0000000000000000000000000000000000000001",
26-
"0x0000000000000000000000000000000000000002",
27-
"0x0000000000000000000000000000000000000003"
28-
],
29-
"systemContracts": []
30-
}
19+
"name": "shanghai",
20+
"block": "0x104c533",
21+
"precompiles": {
22+
"ecrecover": "0x0000000000000000000000000000000000000001",
23+
"sha256": "0x0000000000000000000000000000000000000002",
24+
"ripemd": "0x0000000000000000000000000000000000000003"
25+
},
26+
"systemContracts": {}
3127
},
3228
"forkId": {
3329
"hash": "0xf0afd0c7",

examples/prague_sample.json

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
11
{
22
"current": {
3-
"config": {
4-
"name": "prague",
5-
"block": null,
6-
"precompiles": [
7-
"0x0000000000000000000000000000000000000001",
8-
"0x0000000000000000000000000000000000000002",
9-
"0x0000000000000000000000000000000000000003"
10-
],
11-
"systemContracts": [
12-
{
13-
"address": "0x0000000000000000000000000000000000000004",
14-
"codeHash": "0xdeadbeef",
15-
"size": 4096,
16-
"version": "v1"
17-
}
18-
]
3+
"name": "prague",
4+
"block": null,
5+
"precompiles": {
6+
"ecrecover": "0x0000000000000000000000000000000000000001",
7+
"sha256": "0x0000000000000000000000000000000000000002",
8+
"ripemd": "0x0000000000000000000000000000000000000003"
9+
},
10+
"systemContracts": {
11+
"blob_gas_oracle": {
12+
"address": "0x0000000000000000000000000000000000000004",
13+
"codeHash": "0xdeadbeef",
14+
"size": 4096,
15+
"version": "v1"
16+
}
1917
}
2018
},
2119
"next": null,
2220
"last": {
23-
"config": {
24-
"name": "cancun",
25-
"block": 19426545,
26-
"blobSchedule": {
27-
"maxBlobGasPerBlock": 786432,
28-
"targetBlobGasPerBlock": 393216,
29-
"blobGaspriceUpdateFraction": 3338477
30-
},
31-
"precompiles": [
32-
"0x0000000000000000000000000000000000000001",
33-
"0x0000000000000000000000000000000000000002",
34-
"0x0000000000000000000000000000000000000003"
35-
],
36-
"systemContracts": []
37-
}
21+
"name": "cancun",
22+
"block": "0x128b7f1",
23+
"blobSchedule": {
24+
"maxBlobGasPerBlock": "0xc0000",
25+
"targetBlobGasPerBlock": "0x60000",
26+
"blobGaspriceUpdateFraction": "0x32f29d"
27+
},
28+
"precompiles": {
29+
"ecrecover": "0x0000000000000000000000000000000000000001",
30+
"sha256": "0x0000000000000000000000000000000000000002",
31+
"ripemd": "0x0000000000000000000000000000000000000003"
32+
},
33+
"systemContracts": {}
3834
},
3935
"forkId": {
4036
"hash": "0x1a2b3c4d",
41-
"next": 99999999
37+
"next": "0x5f5e0ff"
4238
}
4339
}

0 commit comments

Comments
 (0)