-
-
Save ItsShadowl/c37d3f0acf56e93447bdfd2c29ce3b56 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
contract Forwarder { | |
address public destination; | |
constructor(address _destination) public { | |
destination = _destination; | |
} | |
function flushERC20(address tokenContractAddress) public { | |
IERC20 tokenContract = ERC20(tokenContractAddress); | |
uint256 forwarderBalance = tokenContract.balanceOf(address(this)); | |
tokenContract.transfer(destination, forwarderBalance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment