test_call_value_stipend_is_usable()¶
Documentation for tests/amsterdam/eip8038_state_access_gas_cost_increase/test_call_gas.py::test_call_value_stipend_is_usable@2867859a.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8038_state_access_gas_cost_increase/test_call_gas.py::test_call_value_stipend_is_usable --fork Amsterdam
The CALL value-transfer stipend CALL_STIPEND is
forwarded to the callee and usable for execution.
The caller forwards gas=0, so the callee receives only the stipend
when a positive value is sent, and nothing otherwise. The
callee runs a small amount of work (well under the stipend) then
stops:
with the stipend the call succeeds (returns 1); without value (no
stipend, zero forwarded gas) the work runs out of gas and the call
fails (returns 0). This proves the stipend is not merely returned but
is spendable by the callee.
Source code in tests/amsterdam/eip8038_state_access_gas_cost_increase/test_call_gas.py
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.