Test SELFDESTRUCT¶
Documentation for tests/cancun/eip6780_selfdestruct/[email protected]
.
Generate fixtures for these test cases for Osaka with:
fill -v tests/cancun/eip6780_selfdestruct/test_selfdestruct.py --fork Osaka
SELFDESTRUCT only in same transaction tests.
Tests for EIP-6780: SELFDESTRUCT only in same transaction.
Test Functions Overview¶
Name | Type | Cases (Osaka) | Description |
---|---|---|---|
test_create_selfdestruct_same_tx |
state_test | 36 | Use CREATE or CREATE2 to create a self-destructing contract, and call it in |
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 |
test_selfdestruct_pre_existing |
state_test | 18 | Test calling a previously created account that contains a selfdestruct, and |
test_selfdestruct_created_same_block_different_tx |
blockchain_test | 4 | Test that if an account created in the same block that contains a |
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 |
test_calling_from_pre_existing_contract_to_new_contract |
state_test | 16 | Test that if an account created in the current transaction contains a |
test_create_selfdestruct_same_tx_increased_nonce |
state_test | 8 | Verify that a contract can self-destruct if it was created in the same |