Added function to only retrieve funds

This commit is contained in:
Richard Ramos 2018-11-26 08:55:30 -04:00 committed by GitHub
parent e3aa05a6ec
commit 2710d7bfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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 {