In this track: Execution traces and low-level calls
SELFDESTRUCT after protocol changes
Historical deletion assumptions do not describe every modern case.
A command with an old name can retain only part of its earlier behavior.
This example begins with count zero and a request to call increment(). No real contract is deployed.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Specify the active rules
Under EIP-6780 behavior, the usual case outside the creation transaction does not delete code, storage or the account. Historical explanations must identify their fork assumptions.
Separate balance movement
The opcode can still transfer the account balance to its designated target and halt the frame. Balance effects and account deletion are different questions.
Recognize the narrow exception
Creation and self-destruction within the same transaction retain special behavior under that EIP. Do not generalize this exception into an unrestricted later deletion mechanism.
Avoid using old lifecycle patterns
A design relying on deleting and recreating arbitrary deployed code needs fresh analysis under the intended chain rules. Check current specifications and test the exact deployment context.
Follow the execution
Earlier transaction: contract created
Later transaction: SELFDESTRUCT
Under EIP-6780 usual case:
balance transfer behavior remains
code and storage are not deletedA local conceptual trace with explicit assumptions; this is not a trace of a live transaction.
Under EIP-6780, does a later-transaction SELFDESTRUCT normally erase existing code?
The usual later-transaction case retains code and storage.
Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.