|
35 | 35 | from tests.istanbul.eip152_blake2.common import Blake2bInput
|
36 | 36 | from tests.istanbul.eip152_blake2.spec import Spec as Blake2bSpec
|
37 | 37 | from tests.osaka.eip7951_p256verify_precompiles import spec as p256verify_spec
|
| 38 | +from tests.osaka.eip7951_p256verify_precompiles.spec import FieldElement |
38 | 39 | from tests.prague.eip2537_bls_12_381_precompiles import spec as bls12381_spec
|
39 | 40 | from tests.prague.eip2537_bls_12_381_precompiles.spec import BytesConcatenation
|
40 | 41 |
|
@@ -710,15 +711,15 @@ def test_worst_precompile_fixed_cost(
|
710 | 711 | parameters_str = cast(list[str], parameters)
|
711 | 712 | concatenated_hex_string = "".join(parameters_str)
|
712 | 713 | concatenated_bytes = bytes.fromhex(concatenated_hex_string)
|
713 |
| - elif all(isinstance(p, (bytes, BytesConcatenation)) for p in parameters): |
| 714 | + elif all(isinstance(p, (bytes, BytesConcatenation, FieldElement)) for p in parameters): |
714 | 715 | parameters_bytes_list = [
|
715 |
| - bytes(p) for p in cast(list[BytesConcatenation | bytes], parameters) |
| 716 | + bytes(p) for p in cast(list[BytesConcatenation | bytes | FieldElement], parameters) |
716 | 717 | ]
|
717 | 718 | concatenated_bytes = b"".join(parameters_bytes_list)
|
718 | 719 | else:
|
719 | 720 | raise TypeError(
|
720 | 721 | "parameters must be a list of strings (hex) "
|
721 |
| - "or a list of byte-like objects (bytes or BytesConcatenation)." |
| 722 | + "or a list of byte-like objects (bytes, BytesConcatenation or FieldElement)." |
722 | 723 | )
|
723 | 724 |
|
724 | 725 | padding_length = (32 - (len(concatenated_bytes) % 32)) % 32
|
|
0 commit comments