test_selfdestruct_in_create_tx_initcode()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py::test_selfdestruct_in_create_tx_initcode@622620d8.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py::test_selfdestruct_in_create_tx_initcode --fork Amsterdam
Verify state gas accounting when a creation tx's initcode immediately SELFDESTRUCTs to a new beneficiary.
Under EIP-2780 the created contract's NEW_ACCOUNT is charged at
the top frame from gas_left (not the intrinsic), so gas_limit
must cover it on top of the initcode. The block state gas is the
created contract's NEW_ACCOUNT plus the fresh beneficiary's
NEW_ACCOUNT charged by the SELFDESTRUCT.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py
2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.