Skip to content

Commit 162d22c

Browse files
chase1745chriseth
authored andcommitted
Added data locations for function parameters and function return parameters to comply with Solidity v0.5 making default data locations for parameters an error.
1 parent 3414771 commit 162d22c

File tree

6 files changed

+32
-32
lines changed

6 files changed

+32
-32
lines changed

test/DAO/DAO.sol

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ contract DAOInterface {
202202
function newProposal(
203203
address _recipient,
204204
uint _amount,
205-
string _description,
206-
bytes _transactionData,
205+
string memory _description,
206+
bytes memory _transactionData,
207207
uint _debatingPeriod,
208208
bool _newCurator
209209
) onlyTokenholders returns (uint _proposalID);
@@ -220,7 +220,7 @@ contract DAOInterface {
220220
uint _proposalID,
221221
address _recipient,
222222
uint _amount,
223-
bytes _transactionData
223+
bytes memory _transactionData
224224
) view returns (bool _codeChecksOut);
225225

226226
/// @notice Vote on proposal `_proposalID` with `_supportsProposal`
@@ -240,7 +240,7 @@ contract DAOInterface {
240240
/// @return Whether the proposed transaction has been executed or not
241241
function executeProposal(
242242
uint _proposalID,
243-
bytes _transactionData
243+
bytes memory _transactionData
244244
) returns (bool _success);
245245

246246
/// @notice ATTENTION! I confirm to move my remaining ether to a new DAO
@@ -364,8 +364,8 @@ contract DAO is DAOInterface, Token, TokenCreation {
364364
uint _minTokensToCreate,
365365
uint _closingTime,
366366
address _privateCreation,
367-
string _tokenName,
368-
string _tokenSymbol,
367+
string memory _tokenName,
368+
string memory _tokenSymbol,
369369
uint8 _decimalPlaces
370370
) TokenCreation(
371371
_minTokensToCreate,
@@ -408,8 +408,8 @@ contract DAO is DAOInterface, Token, TokenCreation {
408408
function newProposal(
409409
address _recipient,
410410
uint _amount,
411-
string _description,
412-
bytes _transactionData,
411+
string memory _description,
412+
bytes memory _transactionData,
413413
uint _debatingPeriod,
414414
bool _newCurator
415415
) onlyTokenholders returns (uint _proposalID) {
@@ -481,7 +481,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
481481
uint _proposalID,
482482
address _recipient,
483483
uint _amount,
484-
bytes _transactionData
484+
bytes memory _transactionData
485485
) noEther view returns (bool _codeChecksOut) {
486486
Proposal p = proposals[_proposalID];
487487
return p.proposalHash == keccak256(abi.encodePacked(_recipient, _amount, _transactionData));
@@ -523,7 +523,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
523523

524524
function executeProposal(
525525
uint _proposalID,
526-
bytes _transactionData
526+
bytes memory _transactionData
527527
) noEther returns (bool _success) {
528528

529529
Proposal p = proposals[_proposalID];
@@ -924,8 +924,8 @@ contract DAO_Creator {
924924
uint _proposalDeposit,
925925
uint _minTokensToCreate,
926926
uint _closingTime,
927-
string _tokenName,
928-
string _tokenSymbol,
927+
string memory _tokenName,
928+
string memory _tokenSymbol,
929929
uint8 _decimalPlaces
930930
) returns (DAO _newDAO) {
931931

test/DAO/Token.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ contract TokenInterface {
8888
}
8989

9090
contract tokenRecipient {
91-
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public;
91+
function receiveApproval(address _from, uint256 _value, address _token, bytes memory _extraData) public;
9292
}
9393

9494
contract Token is TokenInterface {
@@ -138,7 +138,7 @@ contract Token is TokenInterface {
138138
}
139139

140140
/// Allow another contract to spend some tokens in your behalf
141-
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
141+
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
142142
public returns (bool success) {
143143
allowed[msg.sender][_spender] = _value;
144144
tokenRecipient spender = tokenRecipient(_spender);

test/DAO/TokenCreation.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ contract TokenCreation is TokenCreationInterface, Token {
8686
uint _minTokensToCreate,
8787
uint _closingTime,
8888
address _privateCreation,
89-
string _tokenName,
90-
string _tokenSymbol,
89+
string memory _tokenName,
90+
string memory _tokenSymbol,
9191
uint8 _decimalPlaces) {
9292

9393
closingTime = _closingTime;

test/DAO040/DAO.sol

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ contract DAOInterface {
202202
function newProposal(
203203
address _recipient,
204204
uint _amount,
205-
string _description,
206-
bytes _transactionData,
205+
string memory _description,
206+
bytes memory _transactionData,
207207
uint _debatingPeriod,
208208
bool _newCurator
209209
) onlyTokenholders returns (uint _proposalID);
@@ -220,7 +220,7 @@ contract DAOInterface {
220220
uint _proposalID,
221221
address _recipient,
222222
uint _amount,
223-
bytes _transactionData
223+
bytes memory _transactionData
224224
) constant returns (bool _codeChecksOut);
225225

226226
/// @notice Vote on proposal `_proposalID` with `_supportsProposal`
@@ -240,7 +240,7 @@ contract DAOInterface {
240240
/// @return Whether the proposed transaction has been executed or not
241241
function executeProposal(
242242
uint _proposalID,
243-
bytes _transactionData
243+
bytes memory _transactionData
244244
) returns (bool _success);
245245

246246
/// @notice ATTENTION! I confirm to move my remaining ether to a new DAO
@@ -364,8 +364,8 @@ contract DAO is DAOInterface, Token, TokenCreation {
364364
uint _minTokensToCreate,
365365
uint _closingTime,
366366
address _privateCreation,
367-
string _tokenName,
368-
string _tokenSymbol,
367+
string memory _tokenName,
368+
string memory _tokenSymbol,
369369
uint8 _decimalPlaces
370370
) TokenCreation(
371371
_minTokensToCreate,
@@ -408,8 +408,8 @@ contract DAO is DAOInterface, Token, TokenCreation {
408408
function newProposal(
409409
address _recipient,
410410
uint _amount,
411-
string _description,
412-
bytes _transactionData,
411+
string memory _description,
412+
bytes memory _transactionData,
413413
uint _debatingPeriod,
414414
bool _newCurator
415415
) onlyTokenholders returns (uint _proposalID) {
@@ -481,7 +481,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
481481
uint _proposalID,
482482
address _recipient,
483483
uint _amount,
484-
bytes _transactionData
484+
bytes memory _transactionData
485485
) noEther constant returns (bool _codeChecksOut) {
486486
Proposal p = proposals[_proposalID];
487487
return p.proposalHash == sha3(_recipient, _amount, _transactionData);
@@ -523,7 +523,7 @@ contract DAO is DAOInterface, Token, TokenCreation {
523523

524524
function executeProposal(
525525
uint _proposalID,
526-
bytes _transactionData
526+
bytes memory _transactionData
527527
) noEther returns (bool _success) {
528528

529529
Proposal p = proposals[_proposalID];
@@ -924,8 +924,8 @@ contract DAO_Creator {
924924
uint _proposalDeposit,
925925
uint _minTokensToCreate,
926926
uint _closingTime,
927-
string _tokenName,
928-
string _tokenSymbol,
927+
string memory _tokenName,
928+
string memory _tokenSymbol,
929929
uint8 _decimalPlaces
930930
) returns (DAO _newDAO) {
931931

test/DAO040/Token.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ contract TokenInterface {
8888
}
8989

9090
contract tokenRecipient {
91-
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public;
91+
function receiveApproval(address _from, uint256 _value, address _token, bytes memory _extraData) public;
9292
}
9393

9494
contract Token is TokenInterface {
@@ -138,7 +138,7 @@ contract Token is TokenInterface {
138138
}
139139

140140
/// Allow another contract to spend some tokens in your behalf
141-
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
141+
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
142142
public returns (bool success) {
143143
allowed[msg.sender][_spender] = _value;
144144
tokenRecipient spender = tokenRecipient(_spender);

test/DAO040/TokenCreation.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ contract TokenCreation is TokenCreationInterface, Token {
8686
uint _minTokensToCreate,
8787
uint _closingTime,
8888
address _privateCreation,
89-
string _tokenName,
90-
string _tokenSymbol,
89+
string memory _tokenName,
90+
string memory _tokenSymbol,
9191
uint8 _decimalPlaces) {
9292

9393
closingTime = _closingTime;

0 commit comments

Comments
 (0)