Created
April 2, 2019 18:19
-
-
Save SeptiyanAndika/d2f50b246d187482554c0a4268a7fd0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.4.22 <0.6.0; | |
import "./ERC20Interface.sol"; | |
contract SimpleWallet { | |
function flushTokens(address _tokenContractAddress,address _collectorAddress) public { | |
ERC20Interface instance = ERC20Interface(_tokenContractAddress); | |
address forwarderAddress = address(this); | |
uint256 forwarderBalance = instance.balanceOf(forwarderAddress); | |
if (forwarderBalance == 0) { | |
return; | |
} | |
require(instance.transfer(_collectorAddress, forwarderBalance)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment