Skip to content

test_rjumpi_backwards()

Documentation for tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_backwards@[email protected].

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_backwards --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_rjumpi.py::test_rjumpi_backwards --until=PragueEIP7692

EOF1V4200_0005 (Valid) EOF code containing RJUMPI (Negative)

Source code in tests/prague/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
def test_rjumpi_backwards(
    eof_state_test: EOFStateTestFiller,
):
    """EOF1V4200_0005 (Valid) EOF code containing RJUMPI (Negative)"""
    eof_state_test(
        data=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH1(1)
                    + Op.RJUMPI[7]
                    + Op.SSTORE(slot_code_worked, value_code_worked)
                    + Op.STOP
                    + Op.PUSH1(1)
                    + Op.RJUMPI[-12]
                    + Op.STOP,
                )
            ],
        ),
        container_post=Account(storage={slot_code_worked: value_code_worked}),
    )