Skip to content

Instantly share code, notes, and snippets.

@bjoveski
Last active November 12, 2022 22:42
Show Gist options
  • Save bjoveski/1784320db7a6a4879d36801871a021c1 to your computer and use it in GitHub Desktop.
Save bjoveski/1784320db7a6a4879d36801871a021c1 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);
}
}
@smclof
Copy link

smclof commented Sep 8, 2021

Hi
I tried to pay the customer via coinbase commerce with this forwarder contract but I accidentally sent it via BEP20 instead of ERC20, what needs to be done now in order to flush the ETH PEG tokens to the merchant final address?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment