Solidity Contract Design – Efficient Self-Destruct Token Contracts

contract-designselfdestructsolidity

If token contract 'Bob' has no delegatecalls/ selfdestruct functionality but I transfer the ownership of the contract to contract 'Mallory' and this contract HAS selfdestruct functionality, then the question is, would I be able to terminate/destroy the newly owned contract 'bob' if it's owner is now 'mallory?

Best Answer

No. selfdestruct doesn't destroy contracts "owned" by the victim. It may leave orphans that obey no one.

As a general rule, selfdestruct may be a worse option than pausing all activity. You can add a stop (and unstop) switch. That is more courteous to users and contracts that continue sending ETH to the (destroyed) contract after the point at which it was stopped. In the case of selfdestruct, a void is created. The zeroed out contract will accept all ETH sent to it unconditionally and there is no way to recover those funds.

Related Topic