You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
739 B
26 lines
739 B
pragma solidity ^0.4.18;
|
|
|
|
import "./Ownable.sol";
|
|
import "../token/ERC20Basic.sol";
|
|
import "../token/SafeERC20.sol";
|
|
|
|
|
|
/**
|
|
* @title Contracts that should be able to recover tokens
|
|
* @author SylTi
|
|
* @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner.
|
|
* This will prevent any accidental loss of tokens.
|
|
*/
|
|
contract CanReclaimToken is Ownable {
|
|
using SafeERC20 for ERC20Basic;
|
|
|
|
/**
|
|
* @dev Reclaim all ERC20Basic compatible tokens
|
|
* @param token ERC20Basic The address of the token contract
|
|
*/
|
|
function reclaimToken(ERC20Basic token) external onlyOwner {
|
|
uint256 balance = token.balanceOf(this);
|
|
token.safeTransfer(owner, balance);
|
|
}
|
|
|
|
}
|
|
|