Skip to content

test_eip_7251()

Documentation for tests/prague/eip7251_consolidations/test_eip_mainnet.py::test_eip_7251@e9958ed2.

Generate fixtures for these test cases for Osaka with:

fill -v tests/prague/eip7251_consolidations/test_eip_mainnet.py::test_eip_7251 --fork Osaka

Test making a consolidation request.

Source code in tests/prague/eip7251_consolidations/test_eip_mainnet.py
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@pytest.mark.parametrize(
    "blocks_consolidation_requests",
    [
        pytest.param(
            [
                [
                    ConsolidationRequestTransaction(
                        requests=[
                            ConsolidationRequest(
                                source_pubkey=0x01,
                                target_pubkey=0x02,
                                fee=Spec.get_fee(0),
                            )
                        ],
                    ),
                ],
            ],
            id="single_consolidation_request",
        ),
    ],
)
def test_eip_7251(
    blockchain_test: BlockchainTestFiller,
    blocks: List[Block],
    pre: Alloc,
) -> None:
    """Test making a consolidation request."""
    blockchain_test(
        pre=pre,
        post={},
        blocks=blocks,
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated) blocks_consolidation_requests
...fork_Prague-blockchain_test-single_consolidation_request [[ConsolidationRequestTransaction(sender_balance=1000000000000000000, sender_account=None, requests=[ConsolidationRequest(source_address=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', source_pubkey=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01', target_pubkey=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02', fee=1, valid=True, gas_limit=1000000, calldata_modifier= at 0x7fa64be05bc0>)])]]