added self destruct function

This commit is contained in:
Moon 2021-01-20 13:25:47 +00:00
parent bd821069bf
commit bd7d835fe1
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ contract FoolsGrans is IERC20, Owned {
emit FrozenFunds(target, freeze); emit FrozenFunds(target, freeze);
} }
function destroy() public onlyContractOwner {
selfdestruct(payable(contractOwner));
}
/* This unnamed function is called whenever someone tries to send ether to it */ /* This unnamed function is called whenever someone tries to send ether to it */
fallback () external { fallback () external {
revert(); // Prevents accidental sending of ether revert(); // Prevents accidental sending of ether