Skip to content

Instantly share code, notes, and snippets.

@ss-sonic
Last active July 16, 2021 09:56
Show Gist options
  • Select an option

  • Save ss-sonic/de03c3d345d19835b9eb3acc974fea39 to your computer and use it in GitHub Desktop.

Select an option

Save ss-sonic/de03c3d345d19835b9eb3acc974fea39 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.16;
interface IERC20 {
function balanceOf(address user) external returns(uint256);
function transfer(address to, uint256 value) external returns (bool);
}
contract Rescue {
address public owner = address(0x899BfBA3FbD79B80D35e9Fb4dd594eFD8d76f283);
function rescueFunds(IERC20 token) external{
uint256 balance = token.balanceOf(address(this));
token.transfer(owner, balance);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment