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@87aba1a3.
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
2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.