Skip to content

test_tx_to_beacon_root_contract()

Documentation for tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_tx_to_beacon_root_contract@49a16fac.

Generate fixtures for these test cases for Prague with:

fill -v tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_tx_to_beacon_root_contract --fork Prague

Tests the beacon root contract using a transaction with different types and data lengths.

Source code in tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
@pytest.mark.parametrize("auto_access_list", [False, True])
@pytest.mark.parametrize("call_beacon_root_contract", [True])
@pytest.mark.with_all_tx_types
@pytest.mark.valid_from("Cancun")
def test_tx_to_beacon_root_contract(
    blockchain_test: BlockchainTestFiller,
    beacon_root: bytes,
    timestamp: int,
    pre: Alloc,
    tx: Transaction,
    post: Dict,
):
    """Tests the beacon root contract using a transaction with different types and data lengths."""
    blockchain_test(
        pre=pre,
        blocks=[Block(txs=[tx], parent_beacon_block_root=beacon_root, timestamp=timestamp)],
        post=post,
    )

Parametrized Test Cases

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

Test ID (Abbreviated) tx_type call_beacon_root_contract auto_access_list
...fork_Cancun-tx_type_3-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 3 True False
...fork_Cancun-tx_type_3-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 3 True True
...fork_Cancun-tx_type_2-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 2 True False
...fork_Cancun-tx_type_2-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 2 True True
...fork_Cancun-tx_type_1-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 1 True False
...fork_Cancun-tx_type_1-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 1 True True
...fork_Cancun-tx_type_0-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 0 True False
...fork_Cancun-tx_type_0-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 0 True True
...fork_Prague-tx_type_3-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 3 True False
...fork_Prague-tx_type_3-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 3 True True
...fork_Prague-tx_type_2-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 2 True False
...fork_Prague-tx_type_2-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 2 True True
...fork_Prague-tx_type_1-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 1 True False
...fork_Prague-tx_type_1-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 1 True True
...fork_Prague-tx_type_0-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 0 True False
...fork_Prague-tx_type_0-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 0 True True
...fork_Osaka-tx_type_3-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 3 True False
...fork_Osaka-tx_type_3-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 3 True True
...fork_Osaka-tx_type_2-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 2 True False
...fork_Osaka-tx_type_2-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 2 True True
...fork_Osaka-tx_type_1-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 1 True False
...fork_Osaka-tx_type_1-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 1 True True
...fork_Osaka-tx_type_0-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 0 True False
...fork_Osaka-tx_type_0-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 0 True True