Skip to content

test_rjump_into_callf()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py::test_rjump_into_callf@14a7429a.

Generate fixtures for these test cases for Osaka with:

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

EOF1I4200_0013 (Invalid) EOF code containing RJUMP with target CALLF immediate.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjump.py
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
@pytest.mark.parametrize(
    "data_portion_end",
    [True, False],
    ids=["data_portion_end", "data_portion_start"],
)
def test_rjump_into_callf(
    eof_test: EOFTestFiller,
    data_portion_end: bool,
):
    """EOF1I4200_0013 (Invalid) EOF code containing RJUMP with target CALLF immediate."""
    invalid_destination = 2 if data_portion_end else 1
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.RJUMP[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
...fork_Osaka-state_test_from_eof_test-data_portion_end True
...fork_Osaka-state_test_from_eof_test-data_portion_start False
...fork_Osaka-blockchain_test_from_eof_test-data_portion_end True
...fork_Osaka-blockchain_test_from_eof_test-data_portion_start False