From bd7d835fe1f5e160b2a718957c4a3cd5a6d0c4b3 Mon Sep 17 00:00:00 2001 From: Moon Date: Wed, 20 Jan 2021 13:25:47 +0000 Subject: [PATCH] added self destruct function --- contracts/FoolsGrans.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/FoolsGrans.sol b/contracts/FoolsGrans.sol index 07a3a9f..b3758db 100644 --- a/contracts/FoolsGrans.sol +++ b/contracts/FoolsGrans.sol @@ -91,6 +91,10 @@ contract FoolsGrans is IERC20, Owned { emit FrozenFunds(target, freeze); } + function destroy() public onlyContractOwner { + selfdestruct(payable(contractOwner)); + } + /* This unnamed function is called whenever someone tries to send ether to it */ fallback () external { revert(); // Prevents accidental sending of ether