Skip to content

Commit f5d6878

Browse files
committed
CI will fail if a Controlled contract is not Extractable
1 parent 4ba798f commit f5d6878

File tree

6 files changed

+293
-70
lines changed

6 files changed

+293
-70
lines changed

source/contracts/reporting/FeeToken.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import 'reporting/IFeeToken.sol';
44
import 'reporting/IFeeWindow.sol';
55
import 'libraries/DelegationTarget.sol';
66
import 'libraries/token/VariableSupplyToken.sol';
7+
import 'libraries/Extractable.sol';
78

89

9-
contract FeeToken is DelegationTarget, VariableSupplyToken, IFeeToken {
10+
contract FeeToken is DelegationTarget, Extractable, VariableSupplyToken, IFeeToken {
1011
IFeeWindow private feeWindow;
1112

1213
function initialize(IFeeWindow _feeWindow) public beforeInitialized returns (bool) {
@@ -45,4 +46,8 @@ contract FeeToken is DelegationTarget, VariableSupplyToken, IFeeToken {
4546
controller.getAugur().logFeeTokenBurned(feeWindow.getUniverse(), _target, _amount);
4647
return true;
4748
}
49+
50+
function getProtectedTokens() internal returns (address[] memory) {
51+
return new address[](0);
52+
}
4853
}

source/contracts/reporting/Mailbox.sol

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import 'libraries/token/ERC20Basic.sol';
66
import 'libraries/Initializable.sol';
77
import 'reporting/IMailbox.sol';
88
import 'trading/ICash.sol';
9+
import 'libraries/Extractable.sol';
910

1011

11-
contract Mailbox is DelegationTarget, Ownable, Initializable, IMailbox {
12+
contract Mailbox is DelegationTarget, Extractable, Ownable, Initializable, IMailbox {
1213
function initialize(address _owner) public onlyInGoodTimes beforeInitialized returns (bool) {
1314
endInitialization();
1415
owner = _owner;
@@ -39,4 +40,12 @@ contract Mailbox is DelegationTarget, Ownable, Initializable, IMailbox {
3940
require(_token.transfer(owner, _balance));
4041
return true;
4142
}
43+
44+
function getProtectedTokens() internal returns (address[] memory) {
45+
address[] memory _protectedTokens = new address[](2);
46+
// address(1) is the sentinel value for Ether extraction
47+
_protectedTokens[0] = address(1);
48+
_protectedTokens[1] = ICash(controller.lookup("Cash"));
49+
return _protectedTokens;
50+
}
4251
}

0 commit comments

Comments
 (0)