Skip to content

test_eip_6110()

Documentation for tests/prague/eip6110_deposits/test_eip_mainnet.py::test_eip_6110@e9958ed2.

Generate fixtures for these test cases for Osaka with:

fill -v tests/prague/eip6110_deposits/test_eip_mainnet.py::test_eip_6110 --fork Osaka

Test making a deposit to the beacon chain deposit contract.

Source code in tests/prague/eip6110_deposits/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
56
57
@pytest.mark.parametrize(
    "requests",
    [
        pytest.param(
            [
                DepositTransaction(
                    # TODO: Use a real public key to allow recovery of
                    #  the funds.
                    requests=[
                        DepositRequest(
                            pubkey=0x01,
                            withdrawal_credentials=0x02,
                            amount=1_000_000_000,
                            signature=0x03,
                            index=0x0,
                        )
                    ],
                ),
            ],
            id="single_deposit_from_eoa_minimum",
        ),
    ],
)
def test_eip_6110(
    blockchain_test: BlockchainTestFiller,
    pre: Alloc,
    blocks: List[Block],
) -> None:
    """Test making a deposit to the beacon chain deposit contract."""
    blockchain_test(
        pre=pre,
        post={},
        blocks=blocks,
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated) requests
...fork_Prague-blockchain_test-single_deposit_from_eoa_minimum [DepositTransaction(sender_balance=3200000000000000000000, sender_account=None, requests=[DepositRequest(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', withdrawal_credentials=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\x02', amount=1000000000, signature=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\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\x00\x03', index=0, valid=True, gas_limit=1000000, calldata_modifier= at 0x7fa64c32e700>, extra_wei=0)])]