Skip to content

test_returning_section_aborts()

Documentation for tests/osaka/eip7692_eof_v1/eip4750_functions/test_code_validation.py::test_returning_section_aborts@14a7429a.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip4750_functions/test_code_validation.py::test_returning_section_aborts --fork Osaka

Test EOF container validation where in the same code section we have returning and nonreturning terminating instructions.

Source code in tests/osaka/eip7692_eof_v1/eip4750_functions/test_code_validation.py
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
def test_returning_section_aborts(
    eof_test: EOFTestFiller,
):
    """
    Test EOF container validation where in the same code section we have returning
    and nonreturning terminating instructions.
    """
    container = Container(
        name="returning_section_aborts",
        sections=[
            Section.Code(code=Op.PUSH0 + Op.CALLF[1] + Op.POP + Op.POP + Op.STOP),
            Section.Code(
                code=Op.PUSH0 * 2 + Op.RJUMPI[1] + Op.RETF + Op.INVALID,
                code_outputs=1,
            ),
        ],
    )
    eof_test(container=container)

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated)
...fork_Osaka-eof_test
...fork_Osaka-state_test_from_eof_test
...fork_Osaka-blockchain_test_from_eof_test