1
1
"""Tests supported precompiled contracts."""
2
2
3
- from typing import Iterator , Tuple
3
+ from typing import Any , Iterator , Tuple
4
4
5
5
import pytest
6
6
14
14
Transaction ,
15
15
)
16
16
from ethereum_test_tools .vm .opcode import Opcodes as Op
17
+ from ethereum_test_types .types import EOA
17
18
from ethereum_test_vm .bytecode import Bytecode
18
19
19
20
REFERENCE_SPEC_GIT_PATH = "EIPS/eip-2929.md"
@@ -40,22 +41,22 @@ def contract_bytecode(**call_kwargs) -> Bytecode:
40
41
)
41
42
42
43
43
- def initial_setup_bytecode (sender : Account ) -> Bytecode :
44
+ def initial_setup_bytecode (address : EOA ) -> Bytecode :
44
45
"""Generate bytecode for the initial setup to be tested."""
45
46
return (
46
- Op .MSTORE (0 , 0 ) + Op .MSTORE (0x100 , 0xDEADBEEF ) + Op .CALL (address = sender , value = 1 ) + Op .POP
47
+ Op .MSTORE (0 , 0 ) + Op .MSTORE (0x100 , 0xDEADBEEF ) + Op .CALL (address = address , value = 1 ) + Op .POP
47
48
)
48
49
49
50
50
- def call_addresses_and_expected_output (fork : Fork ) -> Iterator [Tuple [ str , bool ] ]:
51
+ def call_addresses_and_expected_output (fork : Fork ) -> Iterator [Any ]:
51
52
"""
52
53
Yield the addresses of precompiled contracts and their support status for a given fork.
53
54
54
55
Args:
55
56
fork (Fork): The fork instance containing precompiled contract information.
56
57
57
58
Yields:
58
- Iterator[Tuple[str, bool]] : A tuple containing the address in hexadecimal format and a
59
+ Iterator[Any] : A pytest ParameterSet containing the address in hexadecimal format and a
59
60
boolean indicating whether the address is a supported precompile.
60
61
61
62
"""
0 commit comments