Skip to content

test_jumpf_backward()

Documentation for tests/prague/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py::test_jumpf_backward@f6ab9733.

Generate fixtures for these test cases for Pragueeip7692 with:

Pragueeip7692 only:

fill -v tests/prague/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py::test_jumpf_backward --fork=PragueEIP7692 --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Pragueeip7692:

fill -v tests/prague/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py::test_jumpf_backward --until=PragueEIP7692

Tests JUMPF jumping backward

Source code in tests/prague/eip7692_eof_v1/eip6206_jumpf/test_jumpf_execution.py
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
def test_jumpf_backward(
    eof_state_test: EOFStateTestFiller,
):
    """Tests JUMPF jumping backward"""
    eof_state_test(
        data=Container(
            sections=[
                Section.Code(
                    code=Op.CALLF[2] + Op.SSTORE(slot_code_worked, value_code_worked) + Op.STOP,
                ),
                Section.Code(
                    code=Op.RETF,
                    code_outputs=0,
                ),
                Section.Code(
                    code=Op.JUMPF[1],
                    code_outputs=0,
                ),
            ],
        ),
        container_post=Account(storage={slot_code_worked: value_code_worked}),
        tx_data=b"\1",
    )