Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Cosman committed Apr 17, 2018
1 parent d916896 commit 980881f
Show file tree
Hide file tree
Showing 7 changed files with 1,418 additions and 1,453 deletions.
2 changes: 1 addition & 1 deletion .babelrc
@@ -1,3 +1,3 @@
{
"presets": ["es2015", "stage-2", "stage-3"]
"presets": ["env", "stage-2", "stage-3"]
}
4 changes: 2 additions & 2 deletions contracts/TimeLockedController.sol
Expand Up @@ -89,11 +89,11 @@ contract TimeLockedController is HasNoEther, HasNoTokens, Claimable {
}

function requestReclaimEther() public onlyOwner {
trueUSD.reclaimEther();
trueUSD.reclaimEther(owner);
}

function requestReclaimToken(ERC20Basic _token) public onlyOwner {
trueUSD.reclaimToken(_token);
trueUSD.reclaimToken(_token, owner);
}

// Change the minimum and maximum amounts that TrueUSD users can
Expand Down
11 changes: 11 additions & 0 deletions contracts/TrueUSD.sol
Expand Up @@ -77,4 +77,15 @@ contract TrueUSD is ModularPausableToken, NoOwner, BurnableTokenWithBounds, Comp
_burnFeeFlat
);
}

// this contract is initially owned by a contract that itself extends parts
// of NoOwner, so we use these instead of the normal NoOwner functions
function reclaimEther(address _to) external onlyOwner {
assert(_to.send(address(this).balance));
}

function reclaimToken(ERC20Basic token, address _to) external onlyOwner {
uint256 balance = token.balanceOf(this);
token.safeTransfer(_to, balance);
}
}
2 changes: 2 additions & 0 deletions contracts/mocks/OtherMocks.sol
@@ -1,6 +1,8 @@
pragma solidity ^0.4.18;

import "../DelegateBurnable.sol";
// import this so it will be availble for tests:
import "zeppelin-solidity/contracts/mocks/ForceEther.sol";

contract FailingDelegate is DelegateBurnable {
function delegateTotalSupply() public view returns (uint256) {
Expand Down

0 comments on commit 980881f

Please sign in to comment.