@@ -221,7 +221,7 @@ contract DAOInterface {
221
221
address _recipient ,
222
222
uint _amount ,
223
223
bytes _transactionData
224
- ) constant returns (bool _codeChecksOut );
224
+ ) view returns (bool _codeChecksOut );
225
225
226
226
/// @notice Vote on proposal `_proposalID` with `_supportsProposal`
227
227
/// @param _proposalID The proposal ID
@@ -320,11 +320,11 @@ contract DAOInterface {
320
320
function halveMinQuorum () returns (bool _success );
321
321
322
322
/// @return total number of proposals ever created
323
- function numberOfProposals () constant returns (uint _numberOfProposals );
323
+ function numberOfProposals () view returns (uint _numberOfProposals );
324
324
325
325
/// @param _proposalID Id of the new curator proposal
326
326
/// @return Address of the new DAO
327
- function getNewDAOAddress (uint _proposalID ) constant returns (address _newDAO );
327
+ function getNewDAOAddress (uint _proposalID ) view returns (address _newDAO );
328
328
329
329
/// @param _account The address of the account which is checked.
330
330
/// @return Whether the account is blocked (not allowed to transfer tokens) or not.
@@ -455,7 +455,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
455
455
p.recipient = _recipient;
456
456
p.amount = _amount;
457
457
p.description = _description;
458
- p.proposalHash = sha3 (_recipient, _amount, _transactionData);
458
+ p.proposalHash = keccak256 (_recipient, _amount, _transactionData);
459
459
p.votingDeadline = now + _debatingPeriod;
460
460
p.open = true ;
461
461
//p.proposalPassed = False; // that's default
@@ -482,9 +482,9 @@ contract DAO is DAOInterface, Token, TokenCreation {
482
482
address _recipient ,
483
483
uint _amount ,
484
484
bytes _transactionData
485
- ) noEther constant returns (bool _codeChecksOut ) {
485
+ ) noEther view returns (bool _codeChecksOut ) {
486
486
Proposal p = proposals[_proposalID];
487
- return p.proposalHash == sha3 (_recipient, _amount, _transactionData);
487
+ return p.proposalHash == keccak256 (_recipient, _amount, _transactionData);
488
488
}
489
489
490
490
@@ -543,7 +543,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
543
543
|| ! p.open
544
544
|| p.proposalPassed // anyone trying to call us recursively?
545
545
// Does the transaction code match the proposal?
546
- || p.proposalHash != sha3 (p.recipient, p.amount, _transactionData)) {
546
+ || p.proposalHash != keccak256 (p.recipient, p.amount, _transactionData)) {
547
547
548
548
revert ();
549
549
}
@@ -851,12 +851,12 @@ contract DAO is DAOInterface, Token, TokenCreation {
851
851
return false ;
852
852
}
853
853
854
- function actualBalance () constant returns (uint _actualBalance ) {
854
+ function actualBalance () view returns (uint _actualBalance ) {
855
855
return this .balance - sumOfProposalDeposits;
856
856
}
857
857
858
858
859
- function minQuorum (uint _value ) internal constant returns (uint _minQuorum ) {
859
+ function minQuorum (uint _value ) internal view returns (uint _minQuorum ) {
860
860
// minimum of 20% and maximum of 53.33%
861
861
return totalSupply / minQuorumDivisor +
862
862
(_value * totalSupply) / (3 * (actualBalance () + rewardToken[address (this )]));
@@ -892,12 +892,12 @@ contract DAO is DAOInterface, Token, TokenCreation {
892
892
);
893
893
}
894
894
895
- function numberOfProposals () constant returns (uint _numberOfProposals ) {
895
+ function numberOfProposals () view returns (uint _numberOfProposals ) {
896
896
// Don't count index 0. It's used by isBlocked() and exists from start
897
897
return proposals.length - 1 ;
898
898
}
899
899
900
- function getNewDAOAddress (uint _proposalID ) constant returns (address _newDAO ) {
900
+ function getNewDAOAddress (uint _proposalID ) view returns (address _newDAO ) {
901
901
return proposals[_proposalID].splitData[0 ].newDAO;
902
902
}
903
903
0 commit comments