Skip to content

test_rjump_into_callf()

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

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
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
@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