Consolidated ERC20 Interface and Implementation Files (#1125)

* Consolidted ERC20 Interface and Implementation Files

* Fixed CanReclaimToken's tests to use StandardTokenMock instead of BasicTokenMock

* Changed token's variable type in TokenTimelock to ERC20

* Merged the StandardBurnableToken with BurnableToken since it now inherits from StandardToken; Fixed TokenTimelock so it uses SafeERC20 for ERC20

* Fixed variable type for _token in TokenTimelock constructor

* Fixed linting warning in BurnableToken

* Added back burnFrom tests.
This commit is contained in:
Doug Crescenzi
2018-08-02 22:12:31 -04:00
committed by Francisco Giordano
parent 3d86c58d2c
commit ef347ffccc
22 changed files with 183 additions and 344 deletions

View File

@ -1,7 +1,7 @@
pragma solidity ^0.4.24;
import "../ownership/Ownable.sol";
import "../token/ERC20/ERC20Basic.sol";
import "../token/ERC20/ERC20.sol";
/**
@ -16,7 +16,7 @@ contract TokenDestructible is Ownable {
/**
* @notice Terminate contract and refund to owner
* @param _tokens List of addresses of ERC20 or ERC20Basic token contracts to
* @param _tokens List of addresses of ERC20 token contracts to
refund.
* @notice The called token contracts could try to re-enter this contract. Only
supply token contracts you trust.
@ -25,7 +25,7 @@ contract TokenDestructible is Ownable {
// Transfer tokens to owner
for (uint256 i = 0; i < _tokens.length; i++) {
ERC20Basic token = ERC20Basic(_tokens[i]);
ERC20 token = ERC20(_tokens[i]);
uint256 balance = token.balanceOf(this);
token.transfer(owner, balance);
}