Skip to content

test_rjump_maxes()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_maxes@[email protected].

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_maxes --fork=PragueEIP7692 --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Pragueeip7692:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_maxes --until=PragueEIP7692

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

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
def test_rjump_maxes(
    eof_state_test: EOFStateTestFiller,
):
    """EOF1V4200_0003 EOF with RJUMP containing the maximum positive and negative offset (32767)"""
    eof_state_test(
        data=Container(
            sections=[
                Section.Code(
                    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}),
    )