aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compilationTests/MultiSigWallet/MultiSigWallet.sol8
-rw-r--r--test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol5
-rw-r--r--test/compilationTests/milestonetracker/MilestoneTracker.sol4
-rw-r--r--test/compilationTests/zeppelin/MultisigWallet.sol10
4 files changed, 11 insertions, 16 deletions
diff --git a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol
index 35f6208b..dc6e98e4 100644
--- a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol
+++ b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol
@@ -226,13 +226,11 @@ contract MultiSigWallet {
{
if (isConfirmed(transactionId)) {
Transaction storage tx = transactions[transactionId];
- tx.executed = true;
- if (tx.destination.call.value(tx.value)(tx.data))
+ (tx.executed,) = tx.destination.call.value(tx.value)(tx.data);
+ if (tx.executed)
emit Execution(transactionId);
- else {
+ else
emit ExecutionFailure(transactionId);
- tx.executed = false;
- }
}
}
diff --git a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol
index 69e94fd5..df2a1400 100644
--- a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol
+++ b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol
@@ -45,14 +45,13 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet {
Transaction storage tx = transactions[transactionId];
bool confirmed = isConfirmed(transactionId);
if (confirmed || tx.data.length == 0 && isUnderLimit(tx.value)) {
- tx.executed = true;
if (!confirmed)
spentToday += tx.value;
- if (tx.destination.call.value(tx.value)(tx.data))
+ (tx.executed,) = tx.destination.call.value(tx.value)(tx.data);
+ if (tx.executed)
emit Execution(transactionId);
else {
emit ExecutionFailure(transactionId);
- tx.executed = false;
if (!confirmed)
spentToday -= tx.value;
}
diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol
index 856fb1a5..41fa7404 100644
--- a/test/compilationTests/milestonetracker/MilestoneTracker.sol
+++ b/test/compilationTests/milestonetracker/MilestoneTracker.sol
@@ -360,8 +360,8 @@ contract MilestoneTracker {
// Recheck again to not pay twice
if (milestone.status == MilestoneStatus.AuthorizedForPayment) revert();
milestone.status = MilestoneStatus.AuthorizedForPayment;
- if (!milestone.paymentSource.call.value(0)(milestone.payData))
- revert();
+ (bool success,) = milestone.paymentSource.call.value(0)(milestone.payData);
+ require(success);
emit ProposalStatusChanged(_idMilestone, milestone.status);
}
}
diff --git a/test/compilationTests/zeppelin/MultisigWallet.sol b/test/compilationTests/zeppelin/MultisigWallet.sol
index 9aac5c53..abad0a01 100644
--- a/test/compilationTests/zeppelin/MultisigWallet.sol
+++ b/test/compilationTests/zeppelin/MultisigWallet.sol
@@ -60,9 +60,8 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
if (underLimit(_value)) {
emit SingleTransact(msg.sender, _value, _to, _data);
// yes - just execute the call.
- if (!_to.call.value(_value)(_data)) {
- revert();
- }
+ (bool success,) = _to.call.value(_value)(_data);
+ require(success);
return 0;
}
// determine our operation hash.
@@ -82,9 +81,8 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
*/
function confirm(bytes32 _h) onlymanyowners(_h) public returns (bool) {
if (txs[_h].to != address(0)) {
- if (!txs[_h].to.call.value(txs[_h].value)(txs[_h].data)) {
- revert();
- }
+ (bool success,) = txs[_h].to.call.value(txs[_h].value)(txs[_h].data);
+ require(success);
emit MultiTransact(msg.sender, _h, txs[_h].value, txs[_h].to, txs[_h].data);
delete txs[_h];
return true;