Skip to content

Commit 1dee884

Browse files
committed
Changes from comments on PR ethereum#1781:
- Use Prague.precompiles() for precompile addresses in convert_addresses.py
1 parent 0af7ed8 commit 1dee884

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

scripts/convert_addresses.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from typing import Dict, Set, Optional, List
1212
from pathlib import Path
1313
from enum import Enum, auto
14+
from ethereum_test_forks import Prague
1415

1516
class Section(Enum):
1617
"""Represents the current section being parsed."""
@@ -36,26 +37,7 @@ class Context(Enum):
3637
# to generate a dynamic address for it in both the `result` and `currentCoinbase` sections
3738
CONVERT_COINBASE = False
3839

39-
# Ethereum precompile addresses (0x01 through 0x11)
40-
PRECOMPILE_ADDRESSES = {
41-
'0000000000000000000000000000000000000001',
42-
'0000000000000000000000000000000000000002',
43-
'0000000000000000000000000000000000000003',
44-
'0000000000000000000000000000000000000004',
45-
'0000000000000000000000000000000000000005',
46-
'0000000000000000000000000000000000000006',
47-
'0000000000000000000000000000000000000007',
48-
'0000000000000000000000000000000000000008',
49-
'0000000000000000000000000000000000000009',
50-
'000000000000000000000000000000000000000a',
51-
'000000000000000000000000000000000000000b',
52-
'000000000000000000000000000000000000000c',
53-
'000000000000000000000000000000000000000d',
54-
'000000000000000000000000000000000000000e',
55-
'000000000000000000000000000000000000000f',
56-
'0000000000000000000000000000000000000010',
57-
'0000000000000000000000000000000000000011',
58-
}
40+
PRECOMPILE_ADDRESSES = {pre.hex() for pre in Prague.precompiles()}
5941

6042
#TODO: check these manually for false positives
6143
# callToSuicideThenExtcodehashFiller.json -- hard-coded 000...00025

0 commit comments

Comments
 (0)