Skip to content

Instantly share code, notes, and snippets.

@ItsShadowl
Forked from bjoveski/forwarder.sol
Created November 12, 2022 22:42
Show Gist options
  • Save ItsShadowl/c37d3f0acf56e93447bdfd2c29ce3b56 to your computer and use it in GitHub Desktop.
Save ItsShadowl/c37d3f0acf56e93447bdfd2c29ce3b56 to your computer and use it in GitHub Desktop.
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