Update compilation tests wrt requiring storage locations.

This commit is contained in:
Daniel Kirchner 2018-07-11 13:30:46 +02:00
parent 8b4b8bdbae
commit 899efd5e64
4 changed files with 12 additions and 12 deletions

View File

@ -225,7 +225,7 @@ contract MultiSigWallet {
notExecuted(transactionId) notExecuted(transactionId)
{ {
if (isConfirmed(transactionId)) { if (isConfirmed(transactionId)) {
Transaction tx = transactions[transactionId]; Transaction storage tx = transactions[transactionId];
tx.executed = true; tx.executed = true;
if (tx.destination.call.value(tx.value)(tx.data)) if (tx.destination.call.value(tx.value)(tx.data))
emit Execution(transactionId); emit Execution(transactionId);

View File

@ -42,7 +42,7 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet {
public public
notExecuted(transactionId) notExecuted(transactionId)
{ {
Transaction tx = transactions[transactionId]; Transaction storage tx = transactions[transactionId];
bool confirmed = isConfirmed(transactionId); bool confirmed = isConfirmed(transactionId);
if (confirmed || tx.data.length == 0 && isUnderLimit(tx.value)) { if (confirmed || tx.data.length == 0 && isUnderLimit(tx.value)) {
tx.executed = true; tx.executed = true;

View File

@ -227,7 +227,7 @@ contract MilestoneTracker {
RLP.RLPItem memory itmProposal = itrProposals.next(); RLP.RLPItem memory itmProposal = itrProposals.next();
Milestone milestone = milestones[milestones.length ++]; Milestone storage milestone = milestones[milestones.length ++];
if (!itmProposal.isList()) throw; if (!itmProposal.isList()) throw;
@ -259,7 +259,7 @@ contract MilestoneTracker {
public campaignNotCanceled notChanging public campaignNotCanceled notChanging
{ {
if (_idMilestone >= milestones.length) throw; if (_idMilestone >= milestones.length) throw;
Milestone milestone = milestones[_idMilestone]; Milestone storage milestone = milestones[_idMilestone];
if ( (msg.sender != milestone.milestoneLeadLink) if ( (msg.sender != milestone.milestoneLeadLink)
&&(msg.sender != recipient)) &&(msg.sender != recipient))
throw; throw;
@ -277,7 +277,7 @@ contract MilestoneTracker {
public campaignNotCanceled notChanging public campaignNotCanceled notChanging
{ {
if (_idMilestone >= milestones.length) throw; if (_idMilestone >= milestones.length) throw;
Milestone milestone = milestones[_idMilestone]; Milestone storage milestone = milestones[_idMilestone];
if ((msg.sender != milestone.reviewer) || if ((msg.sender != milestone.reviewer) ||
(milestone.status != MilestoneStatus.Completed)) throw; (milestone.status != MilestoneStatus.Completed)) throw;
@ -292,7 +292,7 @@ contract MilestoneTracker {
public campaignNotCanceled notChanging public campaignNotCanceled notChanging
{ {
if (_idMilestone >= milestones.length) throw; if (_idMilestone >= milestones.length) throw;
Milestone milestone = milestones[_idMilestone]; Milestone storage milestone = milestones[_idMilestone];
if ((msg.sender != milestone.reviewer) || if ((msg.sender != milestone.reviewer) ||
(milestone.status != MilestoneStatus.Completed)) throw; (milestone.status != MilestoneStatus.Completed)) throw;
@ -307,7 +307,7 @@ contract MilestoneTracker {
function requestMilestonePayment(uint _idMilestone function requestMilestonePayment(uint _idMilestone
) public campaignNotCanceled notChanging { ) public campaignNotCanceled notChanging {
if (_idMilestone >= milestones.length) throw; if (_idMilestone >= milestones.length) throw;
Milestone milestone = milestones[_idMilestone]; Milestone storage milestone = milestones[_idMilestone];
if ( (msg.sender != milestone.milestoneLeadLink) if ( (msg.sender != milestone.milestoneLeadLink)
&&(msg.sender != recipient)) &&(msg.sender != recipient))
throw; throw;
@ -324,7 +324,7 @@ contract MilestoneTracker {
public onlyRecipient campaignNotCanceled notChanging public onlyRecipient campaignNotCanceled notChanging
{ {
if (_idMilestone >= milestones.length) throw; if (_idMilestone >= milestones.length) throw;
Milestone milestone = milestones[_idMilestone]; Milestone storage milestone = milestones[_idMilestone];
if ((milestone.status != MilestoneStatus.AcceptedAndInProgress) && if ((milestone.status != MilestoneStatus.AcceptedAndInProgress) &&
(milestone.status != MilestoneStatus.Completed)) (milestone.status != MilestoneStatus.Completed))
throw; throw;
@ -339,7 +339,7 @@ contract MilestoneTracker {
function arbitrateApproveMilestone(uint _idMilestone function arbitrateApproveMilestone(uint _idMilestone
) public onlyArbitrator campaignNotCanceled notChanging { ) public onlyArbitrator campaignNotCanceled notChanging {
if (_idMilestone >= milestones.length) throw; if (_idMilestone >= milestones.length) throw;
Milestone milestone = milestones[_idMilestone]; Milestone storage milestone = milestones[_idMilestone];
if ((milestone.status != MilestoneStatus.AcceptedAndInProgress) && if ((milestone.status != MilestoneStatus.AcceptedAndInProgress) &&
(milestone.status != MilestoneStatus.Completed)) (milestone.status != MilestoneStatus.Completed))
throw; throw;
@ -356,7 +356,7 @@ contract MilestoneTracker {
// @dev This internal function is executed when the milestone is paid out // @dev This internal function is executed when the milestone is paid out
function authorizePayment(uint _idMilestone) internal { function authorizePayment(uint _idMilestone) internal {
if (_idMilestone >= milestones.length) throw; if (_idMilestone >= milestones.length) throw;
Milestone milestone = milestones[_idMilestone]; Milestone storage milestone = milestones[_idMilestone];
// Recheck again to not pay twice // Recheck again to not pay twice
if (milestone.status == MilestoneStatus.AuthorizedForPayment) throw; if (milestone.status == MilestoneStatus.AuthorizedForPayment) throw;
milestone.status = MilestoneStatus.AuthorizedForPayment; milestone.status = MilestoneStatus.AuthorizedForPayment;

View File

@ -74,7 +74,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* @param _grantId The id of the token grant. * @param _grantId The id of the token grant.
*/ */
function revokeTokenGrant(address _holder, uint256 _grantId) public { function revokeTokenGrant(address _holder, uint256 _grantId) public {
TokenGrant grant = grants[_holder][_grantId]; TokenGrant storage grant = grants[_holder][_grantId];
if (!grant.revokable) { // Check if grant was revokable if (!grant.revokable) { // Check if grant was revokable
throw; throw;
@ -193,7 +193,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
* revokability, burnsOnRevoke, and vesting) plus the vested value at the current time. * revokability, burnsOnRevoke, and vesting) plus the vested value at the current time.
*/ */
function tokenGrant(address _holder, uint256 _grantId) public view returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) { function tokenGrant(address _holder, uint256 _grantId) public view returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) {
TokenGrant grant = grants[_holder][_grantId]; TokenGrant storage grant = grants[_holder][_grantId];
granter = grant.granter; granter = grant.granter;
value = grant.value; value = grant.value;