Skip to content

Test EIP-150 SELFDESTRUCT

Documentation for tests/tangerine_whistle/eip150_operation_gas_costs/test_eip150_selfdestruct.py@7b8124a7.

Generate fixtures for these test cases for Osaka with:

fill -v tests/tangerine_whistle/eip150_operation_gas_costs/test_eip150_selfdestruct.py --fork Osaka

Tests for EIP-150 SELFDESTRUCT operation gas costs.

EIP-150 introduced G_SELF_DESTRUCT for SELFDESTRUCT and precise gas boundaries for state access during the operation.

Test Functions Overview

Name Type Cases (Osaka) Description
test_selfdestruct_to_account blockchain_test 64 Test SELFDESTRUCT success boundary for account beneficiaries.
test_selfdestruct_state_access_boundary blockchain_test 64 Test state access boundary for account beneficiaries.
test_selfdestruct_to_precompile blockchain_test 288 Test SELFDESTRUCT success boundary for precompile beneficiaries.
test_selfdestruct_to_precompile_state_access_boundary blockchain_test 288 Test state access boundary for precompile beneficiaries.
test_selfdestruct_to_system_contract blockchain_test 40 Test SELFDESTRUCT success boundary for system contract beneficiaries.
test_selfdestruct_to_self blockchain_test 8 Test SELFDESTRUCT where beneficiary is the executing contract itself.
test_initcode_selfdestruct_to_self blockchain_test 2 Test SELFDESTRUCT during initcode execution where beneficiary is self.