Test Beacon Root Contract¶
Documentation for tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py@54b46ea9.
Generate fixtures for these test cases for Osaka with:
fill -v tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py --fork Osaka
Tests beacon block root for EIP-4788: Beacon block root in the EVM.
Note: To add a new test, add a function that is named test_<test_name>.
It must take at least the following arguments:
state_testenvpretxpostvalid_call
All other pytest.fixtures can be parametrized to generate new
combinations and test cases.
Test Functions Overview¶
| Name | Type | Cases (Osaka) | Description | 
|---|---|---|---|
test_beacon_root_contract_calls | 
blockchain_test | 10 | Test calling the beacon root contract in various call contexts. | 
test_beacon_root_contract_timestamps | 
blockchain_test | 24 | Tests the beacon root contract call across for various valid and invalid | 
test_calldata_lengths | 
blockchain_test | 5 | Tests the beacon root contract call using multiple invalid input lengths. | 
test_beacon_root_equal_to_timestamp | 
blockchain_test | 8 | Tests the beacon root contract call where the beacon root is equal to the | 
test_tx_to_beacon_root_contract | 
blockchain_test | 10 | Tests the beacon root contract using a transaction with different types and | 
test_invalid_beacon_root_calldata_value | 
blockchain_test | 1 | Tests the beacon root contract call using invalid input values:(📖🐛?) | 
test_beacon_root_selfdestruct | 
blockchain_test | 1 | Tests that self destructing the beacon root address transfers actors | 
test_multi_block_beacon_root_timestamp_calls | 
blockchain_test | 5 | Tests multiple blocks where each block writes a timestamp to storage and | 
test_beacon_root_transition | 
blockchain_test | 0 | Tests the fork transition to cancun and verifies that blocks with timestamp | 
test_no_beacon_root_contract_at_transition | 
blockchain_test | 0 | Tests the fork transition to cancun in the case where the beacon root | 
test_beacon_root_contract_deploy | 
blockchain_test | 0 | Tests the fork transition to cancun deploying the contract during Shanghai |