Questions tagged [selfdestruct]

opcode for deleting a contract, original opcode called SUICIDE

Filter by
Sorted by
Tagged with
3
votes
1answer
253 views

Should governance and token smart contracts be “unstoppable” or upgradeable? [closed]

Selfdestruct (aka suicide) functions stop contracts from functioning and clean up data on the blockchain. They can be used in upgrading contracts. Selfdestructing and upgradable contracts using a ...
7
votes
1answer
209 views

When does a SUICIDE opcode becomes effective?

The documentation (https://github.com/ethereum/wiki/wiki/Subtleties) states that SUICIDE becomes effective at the end of the transaction, but in block 116525, the same contract was able to SUICIDE ...
7
votes
3answers
1k views

What is actually removed during a contract suicide, and why doesn't this cause the blockchain to change?

I'm trying to get my head around how contract suicides work, and what actually happens during them. I understand why we use them. This post states that when the SUICIDE opcode is executed, the data ...
42
votes
3answers
19k views

Why are selfdestructs used in contract programming?

I'm reading bits and pieces that selfdestructs within contracts are a good thing. Can someone explain what the benefits are of doing a contract selfdestruct when it comes to Ethereum programming? Is ...