Skip to content

test_rjumpi_into_callf()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_callf@83970623.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py::test_rjumpi_into_callf --fork Osaka

EOF1I4200_0026 (Invalid) EOF code containing RJUMPI with target CALLF immediate.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpi.py
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
@pytest.mark.parametrize(
    "data_portion_end",
    [True, False],
    ids=["data_portion_end", "data_portion_start"],
)
def test_rjumpi_into_callf(
    eof_test: EOFTestFiller,
    data_portion_end: bool,
):
    """EOF1I4200_0026 (Invalid) EOF code containing RJUMPI with target CALLF immediate."""
    invalid_destination = 2 if data_portion_end else 1
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH1(1) + Op.RJUMPI[invalid_destination] + Op.CALLF[1] + Op.STOP,
                ),
                Section.Code(
                    code=Op.SSTORE(1, 1) + Op.RETF,
                    code_outputs=0,
                ),
            ],
        ),
        expect_exception=EOFException.INVALID_RJUMP_DESTINATION,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Test ID (Abbreviated) data_portion_end
...fork_Osaka-eof_test-data_portion_end True
...fork_Osaka-eof_test-data_portion_start False