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@fed1f655.

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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
@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_4-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 4 True False
...fork_Prague-tx_type_4-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 4 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_4-blockchain_test-call_beacon_root_contract_True-auto_access_list_False 4 True False
...fork_Osaka-tx_type_4-blockchain_test-call_beacon_root_contract_True-auto_access_list_True 4 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