Skip to content

test_callvalue_from_origin()

Documentation for tests/benchmark/compute/instruction/test_call_context.py::test_callvalue_from_origin@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/benchmark/compute/instruction/test_call_context.py::test_callvalue_from_origin --gas-benchmark-values 1

Benchmark CALLVALUE instruction from origin.

Source code in tests/benchmark/compute/instruction/test_call_context.py
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@pytest.mark.repricing(non_zero_value=True)
@pytest.mark.parametrize("non_zero_value", [True, False])
def test_callvalue_from_origin(
    benchmark_test: BenchmarkTestFiller,
    non_zero_value: bool,
) -> None:
    """
    Benchmark CALLVALUE instruction from origin.
    """
    benchmark_test(
        target_opcode=Op.CALLVALUE,
        code_generator=JumpLoopGenerator(
            attack_block=Op.POP(Op.CALLVALUE),
            tx_kwargs={"value": int(non_zero_value)},
        ),
    )

Parametrized Test Cases

This test generates 2 parametrized test cases across 3 forks.