Skip to content

Commit

Permalink
add 1014 specs
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Jul 8, 2024
1 parent b104173 commit a60010c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/constantinople/eip1014_create2/spec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Defines EIP-1014 specification constants and functions.
"""
from dataclasses import dataclass


@dataclass(frozen=True)
class ReferenceSpec:
"""
Defines the reference spec version and git path.
"""

git_path: str
version: str


ref_spec_1014 = ReferenceSpec("EIPS/eip-1014.md", "0a3c1015a07958523bb3ef48c2f230c9ba9605d9")


@dataclass(frozen=True)
class Spec:
"""
Parameters from the EIP-1014 specifications as defined at
https://eips.ethereum.org/EIPS/eip-1014
"""
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
from ethereum_test_tools.vm.opcode import Bytecode
from ethereum_test_tools.vm.opcode import Opcodes as Op

from .spec import ref_spec_1014

REFERENCE_SPEC_GIT_PATH = ref_spec_1014.git_path
REFERENCE_SPEC_VERSION = ref_spec_1014.version


@pytest.mark.valid_from("Istanbul")
@pytest.mark.parametrize("call_return_size", [35, 32, 0])
Expand Down
5 changes: 5 additions & 0 deletions tests/constantinople/eip1014_create2/test_recreate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
from ethereum_test_tools import Opcodes as Op
from ethereum_test_tools import Transaction, Yul, compute_create2_address

from .spec import ref_spec_1014

REFERENCE_SPEC_GIT_PATH = ref_spec_1014.git_path
REFERENCE_SPEC_VERSION = ref_spec_1014.version


@pytest.mark.parametrize("recreate_on_separate_block", [True, False])
@pytest.mark.valid_from("Constantinople")
Expand Down

0 comments on commit a60010c

Please sign in to comment.