Skip to content

Commit

Permalink
StandardTokenExt: Making our token Recoverable
Browse files Browse the repository at this point in the history
We inherit Recoverable in our token now, meaning that we can rescue tokens
accidentally sent to the token address.

Also MintableToken and ReleasableToken inheritance had to be changed to avoid
the diamond problem.
  • Loading branch information
villesundell committed Feb 5, 2018
1 parent 2835f33 commit ff16578
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions contracts/MintableToken.sol
Expand Up @@ -5,7 +5,6 @@
*/

import "zeppelin/contracts/token/ERC20.sol";
import "zeppelin/contracts/ownership/Ownable.sol";
import "./StandardTokenExt.sol";
import "./SafeMathLib.sol";

Expand All @@ -18,7 +17,7 @@ pragma solidity ^0.4.6;
* Only mint agents, contracts whitelisted by owner, can mint new tokens.
*
*/
contract MintableToken is StandardTokenExt, Ownable {
contract MintableToken is StandardTokenExt {

using SafeMathLib for uint;

Expand Down
5 changes: 2 additions & 3 deletions contracts/ReleasableToken.sol
Expand Up @@ -6,14 +6,13 @@

pragma solidity ^0.4.8;

import "zeppelin/contracts/ownership/Ownable.sol";
import "zeppelin/contracts/token/ERC20.sol";
import "./StandardTokenExt.sol";


/**
* Define interface for releasing the token transfer after a successful crowdsale.
*/
contract ReleasableToken is ERC20, Ownable {
contract ReleasableToken is StandardTokenExt {

/* The finalizer contract that allows unlift the transfer limits on this token */
address public releaseAgent;
Expand Down
3 changes: 2 additions & 1 deletion contracts/StandardTokenExt.sol
Expand Up @@ -7,6 +7,7 @@
pragma solidity ^0.4.14;

import "zeppelin/contracts/token/StandardToken.sol";
import "./Recoverable.sol";


/**
Expand All @@ -15,7 +16,7 @@ import "zeppelin/contracts/token/StandardToken.sol";
* @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract.
*
*/
contract StandardTokenExt is StandardToken {
contract StandardTokenExt is Recoverable, StandardToken {

/* Interface declaration */
function isToken() public constant returns (bool weAre) {
Expand Down

0 comments on commit ff16578

Please sign in to comment.