Skip to content

Commit 76f336f

Browse files
authored
chore(tests): create spec.py for EIP-7778 (#2887)
1 parent 42fb0f6 commit 76f336f

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""Defines EIP-7778 specification constants and functions."""
2+
3+
from dataclasses import dataclass
4+
5+
6+
@dataclass(frozen=True)
7+
class ReferenceSpec:
8+
"""Defines the reference spec version and git path."""
9+
10+
git_path: str
11+
version: str
12+
13+
14+
ref_spec_7778 = ReferenceSpec(
15+
"EIPS/eip-7778.md", "ce17d00b8341032a946301944124c4a6013032d6"
16+
)
17+
18+
19+
@dataclass(frozen=True)
20+
class Spec:
21+
"""
22+
Parameters from the EIP-7778 specifications as defined at
23+
https://eips.ethereum.org/EIPS/eip-7778.
24+
"""

tests/amsterdam/eip7778_block_gas_accounting_without_refunds/test_gas_accounting.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
from execution_testing.base_types import HashInt
2525
from execution_testing.vm import Op
2626

27-
REFERENCE_SPEC_GIT_PATH = "EIPS/eip-7778.md"
28-
REFERENCE_SPEC_VERSION = "ce17d00b8341032a946301944124c4a6013032d6"
27+
from .spec import ref_spec_7778
28+
29+
REFERENCE_SPEC_GIT_PATH = ref_spec_7778.git_path
30+
REFERENCE_SPEC_VERSION = ref_spec_7778.version
2931

3032

3133
def build_refund_tx(

0 commit comments

Comments
 (0)