Skip to content

TRC-006 SelfDestruction

Description

When the self-destruct function is triggered, the contract is destroyed, making all its functions unavailable and erasing all related assets. This method can also be used to update the contract by replacing it with a new one.

Risk Pattern

function close(address payable to) external onlyOwner { 
  selfdestruct(to); 
}

Risk Samples