Skip to content

test_rjumpv_at_the_end()

Documentation for tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_at_the_end@21fb11c8.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py::test_rjumpv_at_the_end --fork Osaka

https://github.com/ipsilon/eof/blob/main/spec/eof.md#stack-validation 4.i: This implies that the last instruction may be a terminating instruction or RJUMPV.

Source code in tests/osaka/eip7692_eof_v1/eip4200_relative_jumps/test_rjumpv.py
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
def test_rjumpv_at_the_end(
    eof_test: EOFTestFiller,
):
    """
    https://github.com/ipsilon/eof/blob/main/spec/eof.md#stack-validation 4.i:
    This implies that the last instruction may be a terminating instruction or RJUMPV.
    """
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.PUSH1(0) + Op.PUSH1(0) + Op.RJUMPI[1] + Op.STOP + Op.RJUMPV[-7](1),
                )
            ],
        ),
        expect_exception=EOFException.MISSING_STOP_OPCODE,
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated)
...fork_Osaka-eof_test