Test SELFDESTRUCT¶
Documentation for tests/cancun/eip6780_selfdestruct/test_selfdestruct.py@206854b5
.
Generate fixtures for these test cases for Prague with:
fill -v tests/cancun/eip6780_selfdestruct/test_selfdestruct.py --fork Prague
Test Functions Overview¶
Name | Type | Cases (Prague) | Description |
---|---|---|---|
test_create_selfdestruct_same_tx |
state_test | 36 | Use CREATE or CREATE2 to create a self-destructing contract, and call it in the same |
test_self_destructing_initcode |
state_test | 8 | Test that a contract can self-destruct in its initcode. |
test_self_destructing_initcode_create_tx |
state_test | 4 | Use a Create Transaction to execute a self-destructing initcode. |
test_recreate_self_destructed_contract_different_txs |
blockchain_test | 4 | Test that a contract can be recreated after it has self-destructed, over the lapse |
test_selfdestruct_pre_existing |
state_test | 18 | Test calling a previously created account that contains a selfdestruct, and verify its balance |
test_selfdestruct_created_same_block_different_tx |
blockchain_test | 4 | Test that if an account created in the same block that contains a selfdestruct is |
test_calling_from_new_contract_to_pre_existing_contract |
state_test | 4 | Test that if an account created in the current transaction delegate-call a previously created |
test_calling_from_pre_existing_contract_to_new_contract |
state_test | 16 | Test that if an account created in the current transaction contains a self-destruct and is |
test_create_selfdestruct_same_tx_increased_nonce |
state_test | 8 | Verify that a contract can self-destruct if it was created in the same transaction, even when |