File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
tests/prague/eip7002_el_triggerable_withdrawals Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,7 @@ def test_extra_withdrawals_pseudo_contract(
202202 """Test how clients were to behave when more than 16 withdrawals would be allowed per block."""
203203 modified_code : Bytecode = Bytecode ()
204204 memory_offset : int = 0
205+ amount_of_requests : int = 0
205206
206207 # Goal: Have contract return a bunch of withdrawal requests
207208 # Problem: EVM has no concept of withdrawal request, it just return bytes from memory
@@ -227,9 +228,13 @@ def test_extra_withdrawals_pseudo_contract(
227228 memory_offset += 32
228229
229230 modified_code += Op .MSTORE (memory_offset , withdrawal_request_chunk_3_3_12bytes )
230- memory_offset += 12
231+ # memory_offset += 32 # MSTORE ALWAYS writes 32 bytes, no need to update memory offset tho
231232
232- modified_code += Op .RETURN (0 , 76 )
233+ amount_of_requests += 1
234+
235+ modified_code += Op .RETURN (
236+ 0 , 76 * amount_of_requests
237+ ) # don't care about the zeroes added by MSTORE at [76,96] bytes
233238
234239 pre [Spec_EIP7002 .WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS ] = Account (
235240 code = modified_code ,
You can’t perform that action at this time.
0 commit comments