* Update to ganache-cli v6.1.0 and truffle v4.1.0 * Update to stable version of ganache-cli * fix: update event emission warning - Fix event emission warnings for solidity 4.21 after truffle has been updated to use this version * fix pr review comments * update to truffle v4.1.5 * update package-lock * add additional emit keywords * update solidity-coverage to 0.4.15 * update to solium 1.1.6 * fix MerkleProof coverage analysis by testing through wrapper * change version pragma to ^0.4.21 * fix solium linting errors
27 lines
751 B
Solidity
27 lines
751 B
Solidity
pragma solidity ^0.4.21;
|
|
|
|
import "./Ownable.sol";
|
|
import "../token/ERC20/ERC20Basic.sol";
|
|
import "../token/ERC20/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);
|
|
}
|
|
|
|
}
|