Skip to content

Commit 10f41b0

Browse files
committed
added pytest marker for prague, and some minor fixes
1 parent 0ceffe2 commit 10f41b0

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

tests/prague/eip7002_el_triggerable_withdrawals/test_modified_withdrawal_contract.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
REFERENCE_SPEC_GIT_PATH: str = ref_spec_7002.git_path
3333
REFERENCE_SPEC_VERSION: str = ref_spec_7002.version
3434

35+
pytestmark: pytest.MarkDecorator = pytest.mark.valid_from("Prague")
36+
3537

3638
def withdrawal_list_with_custom_fee(n: int) -> List[WithdrawalRequest]: # noqa: D103
3739
return [
@@ -165,7 +167,6 @@ def test_extra_withdrawals_pseudo_contract(
165167
memory_offset: int = 0
166168
amount_of_requests: int = 0
167169

168-
169170
for withdrawal_request in requests_list:
170171
# update memory_offset with the correct value
171172
withdrawal_request_bytes_amount: int = len(bytes(withdrawal_request))
@@ -175,17 +176,11 @@ def test_extra_withdrawals_pseudo_contract(
175176
)
176177
memory_offset += withdrawal_request_bytes_amount
177178

178-
# TODO: in opcodes.py the argument order and names of arguments are different from those
179-
# on evm.codes website. this is dangerous, especially since with the macro I am not allowed
180-
# to provide the parameters as named parameters like
181-
# Om.MSTORE(data=bytes(withdrawal_request), offset=memory_offset)
182-
# due to 'unexpected keyword argument.. for __call__ of'
183179
modified_code += Om.MSTORE(bytes(withdrawal_request), memory_offset)
184180
amount_of_requests += 1
185181

186-
modified_code += Op.RETURN(
187-
0, 76 * amount_of_requests
188-
)
182+
# modified_code += Op.RETURN(0, 76 * amount_of_requests)
183+
modified_code += Op.RETURN(0, Op.MSIZE())
189184

190185
pre[Spec_EIP7002.WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS] = Account(
191186
code=modified_code,

tests/prague/eip7685_general_purpose_el_requests/test_multi_type_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def get_permutations(n: int = 3) -> Generator[ParameterSet, None, None]:
119119
),
120120
]
121121
for perm in permutations(requests, n):
122-
yield pytest.param([p[1] for p in perm], id="+".join([p[0] for p in perm])) # type: ignore
122+
yield pytest.param([p[1] for p in perm], id="+".join([p[0] for p in perm]))
123123

124124

125125
def get_eoa_permutations(n: int = 3) -> Generator[ParameterSet, None, None]:

0 commit comments

Comments
 (0)