From 2710d7bfc947c9d92b01c1ab43acafd307dd0232 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 26 Nov 2018 08:55:30 -0400 Subject: [PATCH] Added function to only retrieve funds --- contracts/SNTGiveaway.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contracts/SNTGiveaway.sol b/contracts/SNTGiveaway.sol index 02e4cdb..f266dac 100644 --- a/contracts/SNTGiveaway.sol +++ b/contracts/SNTGiveaway.sol @@ -1039,6 +1039,13 @@ contract SNTGiveaway is Controlled { require(SNT.transfer(msg.sender, sntBalance), "Transfer did not work"); selfdestruct(msg.sender); } + + /// @notice Extract balance in ETH + SNT from the contract + function retrieveFunds() public onlyController { + uint sntBalance = SNT.balanceOf(address(this)); + require(SNT.transfer(msg.sender, sntBalance), "Transfer did not work"); + selfdestruct(msg.sender); + } function() public payable {