Skip to content

test_rjump_maxes()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_maxes@49a16fac.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_maxes --fork Osaka

EOF1V4200_0003 EOF with RJUMP containing the max positive and negative offset (32767).

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
def test_rjump_maxes(
    eof_state_test: EOFStateTestFiller,
):
    """EOF1V4200_0003 EOF with RJUMP containing the max positive and negative offset (32767)."""
    eof_state_test(
        container=Container.Code(
            Op.PUSH0
            + Op.RJUMPI[RJUMP_LEN]  # The push/jumpi is to allow the NOOPs to be forward referenced
            + Op.RJUMP[0x7FFF]
            + Op.NOOP * (0x7FFF - 7)
            + Op.SSTORE(slot_code_worked, value_code_worked)
            + Op.STOP
            + Op.RJUMP[0x8000],
        ),
        container_post=Account(storage={slot_code_worked: value_code_worked}),
    )

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated)
...fork_Osaka-eof_test
...fork_Osaka-state_test
...fork_Osaka-blockchain_test