test_beacon_root_contract_calls()¶
Documentation for tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_beacon_root_contract_calls@verkle@v0.0.6.
Generate fixtures for these test cases for Cancun with:
Cancun only:
fill -v tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_beacon_root_contract_calls --fork=Cancun --evm-bin=/path/to/evm-tool-dev-version
For all forks up to and including Cancun:
fill -v tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_beacon_root_contract_calls --until=Cancun
Tests the beacon root contract call using various call contexts:
- CALL
- DELEGATECALL
- CALLCODE
- STATICCALL
for different call gas amounts:
- exact gas (valid call)
- extra gas (valid call)
- insufficient gas (invalid call)
The expected result is that the contract call will be executed if the gas amount is met
and return the correctparent_beacon_block_root. Otherwise the call will be invalid, and not
be executed. This is highlighted within storage by storing the return value of each call
context.
Source code in tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
Parametrized Test Cases¶
The interactive table below is also available as a standalone page.
Skipped Parameters
For more concise readability, the table below does not list the following parameter values:
fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.
| Test ID | call_type | call_value | valid_input | call_gas | valid_call |
|---|---|---|---|---|---|
| call_type_CALL-call_value_1-valid_input_True-call_gas_100000-valid_call_True | CALL | 1 | True | 100000 | True |
| call_type_CALL-call_value_1-valid_input_True-call_gas_1000-valid_call_False | CALL | 1 | True | 1000 | False |
| call_type_CALL-call_value_0-valid_input_True-call_gas_100000-valid_call_True | CALL | 0 | True | 100000 | True |
| call_type_CALL-call_value_0-valid_input_True-call_gas_1000-valid_call_False | CALL | 0 | True | 1000 | False |
| call_type_CALLCODE-call_value_0-valid_input_False-call_gas_100000-valid_call_True | CALLCODE | 0 | False | 100000 | True |
| call_type_CALLCODE-call_value_0-valid_input_False-call_gas_1000-valid_call_False | CALLCODE | 0 | False | 1000 | False |
| call_type_DELEGATECALL-call_value_0-valid_input_False-call_gas_100000-valid_call_True | DELEGATECALL | 0 | False | 100000 | True |
| call_type_DELEGATECALL-call_value_0-valid_input_False-call_gas_1000-valid_call_False | DELEGATECALL | 0 | False | 1000 | False |
| call_type_STATICCALL-call_value_0-valid_input_True-call_gas_100000-valid_call_True | STATICCALL | 0 | True | 100000 | True |
| call_type_STATICCALL-call_value_0-valid_input_True-call_gas_1000-valid_call_False | STATICCALL | 0 | True | 1000 | False |