Skip to content

test_call_types()

Documentation for tests/prague/eip2537_bls_12_381_precompiles/test_bls12_map_fp_to_g1.py::test_call_types@verkle@v0.0.6.

Generate fixtures for these test cases for Prague with:

Prague only:

fill -v tests/prague/eip2537_bls_12_381_precompiles/test_bls12_map_fp_to_g1.py::test_call_types --fork=Prague --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Prague:

fill -v tests/prague/eip2537_bls_12_381_precompiles/test_bls12_map_fp_to_g1.py::test_call_types --until=Prague

Test the BLS12_MAP_FP_TO_G1 precompile using different call types.

Source code in tests/prague/eip2537_bls_12_381_precompiles/test_bls12_map_fp_to_g1.py
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
@pytest.mark.parametrize(
    "call_opcode",
    [
        Op.STATICCALL,
        Op.DELEGATECALL,
        Op.CALLCODE,
    ],
)
@pytest.mark.parametrize(
    "input,expected_output",
    [
        pytest.param(
            FP(0),
            G1_POINT_ZERO_FP,
            id="fp_0",
        ),
    ],
)
def test_call_types(
    state_test: StateTestFiller,
    pre: Alloc,
    post: dict,
    tx: Transaction,
):
    """
    Test the BLS12_MAP_FP_TO_G1 precompile using different call types.
    """
    state_test(
        env=Environment(),
        pre=pre,
        tx=tx,
        post=post,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Skipped Parameters

For more concise readability, the table below does not list the following parameter values: fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.

Test ID input expected_output call_opcode precompile_address
fp_0-call_opcode_STATICCALL FP(x=0) PointG1(x=2718523093224377422680924513836569955862094615601650617640302534610709548675950121390173489943242206205504662709269, y=1411717398097673129936182529224644864953905593399347218631786464447277645552464825136124091127047943658180991656243) STATICCALL 18
fp_0-call_opcode_DELEGATECALL FP(x=0) PointG1(x=2718523093224377422680924513836569955862094615601650617640302534610709548675950121390173489943242206205504662709269, y=1411717398097673129936182529224644864953905593399347218631786464447277645552464825136124091127047943658180991656243) DELEGATECALL 18
fp_0-call_opcode_CALLCODE FP(x=0) PointG1(x=2718523093224377422680924513836569955862094615601650617640302534610709548675950121390173489943242206205504662709269, y=1411717398097673129936182529224644864953905593399347218631786464447277645552464825136124091127047943658180991656243) CALLCODE 18
fp_0-call_opcode_STATICCALL FP(x=0) PointG1(x=2718523093224377422680924513836569955862094615601650617640302534610709548675950121390173489943242206205504662709269, y=1411717398097673129936182529224644864953905593399347218631786464447277645552464825136124091127047943658180991656243) STATICCALL 18
fp_0-call_opcode_DELEGATECALL FP(x=0) PointG1(x=2718523093224377422680924513836569955862094615601650617640302534610709548675950121390173489943242206205504662709269, y=1411717398097673129936182529224644864953905593399347218631786464447277645552464825136124091127047943658180991656243) DELEGATECALL 18
fp_0-call_opcode_CALLCODE FP(x=0) PointG1(x=2718523093224377422680924513836569955862094615601650617640302534610709548675950121390173489943242206205504662709269, y=1411717398097673129936182529224644864953905593399347218631786464447277645552464825136124091127047943658180991656243) CALLCODE 18