test_beacon_root_contract_calls()¶
Documentation for tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_beacon_root_contract_calls@20373115.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_beacon_root_contract_calls --fork Amsterdam
Test calling the beacon root contract in various call contexts.
These call contexts are tested:
- 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
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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
Parametrized Test Cases¶
This test generates 10 parametrized test cases across 4 forks.