@@ -53,7 +53,7 @@ contract DAOInterface {
53
53
uint public lastTimeMinQuorumMet;
54
54
55
55
// Address of the curator
56
- address public curator;
56
+ address payable public curator;
57
57
// The whitelist: List of addresses the DAO is allowed to send ether to
58
58
mapping (address => bool ) public allowedRecipients;
59
59
@@ -100,7 +100,7 @@ contract DAOInterface {
100
100
// The address where the `amount` will go to if the proposal is accepted
101
101
// or if `newCurator` is true, the proposed Curator of
102
102
// the new DAO).
103
- address recipient;
103
+ address payable recipient;
104
104
// The amount to transfer to `recipient` if the proposal is accepted.
105
105
uint amount;
106
106
// A plain text description of the proposal
@@ -130,7 +130,7 @@ contract DAOInterface {
130
130
// Simple mapping to check if a shareholder has voted against it
131
131
mapping (address => bool ) votedNo;
132
132
// Address of the shareholder who created the proposal
133
- address creator;
133
+ address payable creator;
134
134
}
135
135
136
136
// Used only in the case of a newCurator proposal.
@@ -162,7 +162,7 @@ contract DAOInterface {
162
162
/// counted from.
163
163
// This is the constructor: it can not be overloaded so it is commented out
164
164
// function DAO(
165
- // address _curator,
165
+ // address payable _curator,
166
166
// DAO_Creator _daoCreator,
167
167
// uint _proposalDeposit,
168
168
// uint _minTokensToCreate,
@@ -174,7 +174,7 @@ contract DAOInterface {
174
174
// );
175
175
176
176
/// @notice Create Token with `msg.sender` as the beneficiary
177
- function () external ;
177
+ function () external payable ;
178
178
179
179
180
180
/// @dev This function is used to send ether back
@@ -197,7 +197,7 @@ contract DAOInterface {
197
197
/// a new Curator or not
198
198
/// @return The proposal ID. Needed for voting on the proposal
199
199
function newProposal (
200
- address _recipient ,
200
+ address payable _recipient ,
201
201
uint _amount ,
202
202
string memory _description ,
203
203
bytes memory _transactionData ,
@@ -215,7 +215,7 @@ contract DAOInterface {
215
215
/// @return Whether the proposal ID matches the transaction data or not
216
216
function checkProposalCode (
217
217
uint _proposalID ,
218
- address _recipient ,
218
+ address payable _recipient ,
219
219
uint _amount ,
220
220
bytes memory _transactionData
221
221
) public view returns (bool _codeChecksOut );
@@ -253,14 +253,14 @@ contract DAOInterface {
253
253
/// of the sender.
254
254
function splitDAO (
255
255
uint _proposalID ,
256
- address _newCurator
256
+ address payable _newCurator
257
257
) public returns (bool _success );
258
258
259
259
/// @dev can only be called by the DAO itself through a proposal
260
260
/// updates the contract of the DAO by sending all ether and rewardTokens
261
261
/// to the new DAO. The new DAO needs to be approved by the Curator
262
262
/// @param _newContract the address of the new contract
263
- function newContract (address _newContract ) public ;
263
+ function newContract (address payable _newContract ) public ;
264
264
265
265
266
266
/// @notice Add a new possible recipient `_recipient` to the whitelist so
@@ -290,7 +290,7 @@ contract DAOInterface {
290
290
/// @notice Withdraw `_account`'s portion of the reward from `rewardAccount`
291
291
/// to `_account`'s balance
292
292
/// @return Whether the call was successful
293
- function withdrawRewardFor (address _account ) internal returns (bool _success );
293
+ function withdrawRewardFor (address payable _account ) internal returns (bool _success );
294
294
295
295
/// @notice Send `_amount` tokens to `_to` from `msg.sender`. Prior to this
296
296
/// getMyReward() is called.
@@ -306,7 +306,7 @@ contract DAOInterface {
306
306
/// @param _amount The amount of tokens to be transfered
307
307
/// @return Whether the transfer was successful or not
308
308
function transferFromWithoutReward (
309
- address _from ,
309
+ address payable _from ,
310
310
address _to ,
311
311
uint256 _amount
312
312
) public returns (bool success );
@@ -355,7 +355,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
355
355
}
356
356
357
357
constructor (
358
- address _curator ,
358
+ address payable _curator ,
359
359
DAO_Creator _daoCreator ,
360
360
uint _proposalDeposit ,
361
361
uint _minTokensToCreate ,
@@ -389,7 +389,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
389
389
allowedRecipients[curator] = true ;
390
390
}
391
391
392
- function () external {
392
+ function () external payable {
393
393
if (now < closingTime + creationGracePeriod && msg .sender != address (extraBalance))
394
394
createTokenProxy (msg .sender );
395
395
else
@@ -403,7 +403,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
403
403
404
404
405
405
function newProposal (
406
- address _recipient ,
406
+ address payable _recipient ,
407
407
uint _amount ,
408
408
string memory _description ,
409
409
bytes memory _transactionData ,
@@ -476,7 +476,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
476
476
477
477
function checkProposalCode (
478
478
uint _proposalID ,
479
- address _recipient ,
479
+ address payable _recipient ,
480
480
uint _amount ,
481
481
bytes memory _transactionData
482
482
) public view returns (bool _codeChecksOut ) {
@@ -621,7 +621,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
621
621
622
622
function splitDAO (
623
623
uint _proposalID ,
624
- address _newCurator
624
+ address payable _newCurator
625
625
) onlyTokenholders public returns (bool _success ) {
626
626
627
627
Proposal storage p = proposals[_proposalID];
@@ -694,7 +694,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
694
694
return true ;
695
695
}
696
696
697
- function newContract (address _newContract ) public {
697
+ function newContract (address payable _newContract ) public {
698
698
if (msg .sender != address (this ) || ! allowedRecipients[_newContract]) return ;
699
699
// move all ether
700
700
(bool success ,) = _newContract.call.value (address (this ).balance)("" );
@@ -740,7 +740,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
740
740
}
741
741
742
742
743
- function withdrawRewardFor (address _account ) noEther internal returns (bool _success ) {
743
+ function withdrawRewardFor (address payable _account ) noEther internal returns (bool _success ) {
744
744
if ((balanceOf (_account) * rewardAccount.accumulatedInput ()) / totalSupply < paidOut[_account])
745
745
revert ();
746
746
@@ -794,7 +794,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
794
794
795
795
796
796
function transferFromWithoutReward (
797
- address _from ,
797
+ address payable _from ,
798
798
address _to ,
799
799
uint256 _value
800
800
) public returns (bool success ) {
@@ -878,7 +878,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
878
878
}
879
879
}
880
880
881
- function createNewDAO (address _newCurator ) internal returns (DAO _newDAO ) {
881
+ function createNewDAO (address payable _newCurator ) internal returns (DAO _newDAO ) {
882
882
emit NewCurator (_newCurator);
883
883
return daoCreator.createDAO (
884
884
_newCurator,
@@ -919,7 +919,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
919
919
920
920
contract DAO_Creator {
921
921
function createDAO (
922
- address _curator ,
922
+ address payable _curator ,
923
923
uint _proposalDeposit ,
924
924
uint _minTokensToCreate ,
925
925
uint _closingTime ,
0 commit comments