Skip to content

test_eip_7002()

Documentation for tests/prague/eip7002_el_triggerable_withdrawals/test_eip_mainnet.py::test_eip_7002@e9958ed2.

Generate fixtures for these test cases for Osaka with:

fill -v tests/prague/eip7002_el_triggerable_withdrawals/test_eip_mainnet.py::test_eip_7002 --fork Osaka

Test making a withdrawal request.

Source code in tests/prague/eip7002_el_triggerable_withdrawals/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_withdrawal_requests",
    [
        pytest.param(
            [
                [
                    WithdrawalRequestTransaction(
                        requests=[
                            WithdrawalRequest(
                                validator_pubkey=0x01,
                                amount=0,
                                fee=Spec.get_fee(0),
                            )
                        ],
                    ),
                ],
            ],
            id="single_withdrawal_request",
        ),
    ],
)
def test_eip_7002(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
    blocks: List[Block],
) -> None:
    """Test making a withdrawal request."""
    blockchain_test(
        pre=pre,
        post={},
        blocks=blocks,
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated) blocks_withdrawal_requests
...fork_Prague-blockchain_test-single_withdrawal_request [[WithdrawalRequestTransaction(sender_balance=1000000000000000000, sender_account=None, requests=[WithdrawalRequest(source_address=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', validator_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', amount=0, fee=1, valid=True, gas_limit=1000000, calldata_modifier= at 0x7fa64c3d3560>)])]]