aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/MultiSigWallet
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-27 16:35:38 +0800
committerchriseth <chris@ethereum.org>2018-06-27 16:37:46 +0800
commit01fd5a8d51d1a950349fc7467454183cc5d0f145 (patch)
treed5eb024dd73e21b54e2c546516aa53f3b53e677d /test/compilationTests/MultiSigWallet
parentb9d035264d924ca63472a6be0af287dec75c4355 (diff)
downloaddexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.gz
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.zst
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.zip
Add emit keyword to compilation tests.
Diffstat (limited to 'test/compilationTests/MultiSigWallet')
-rw-r--r--test/compilationTests/MultiSigWallet/Factory.sol2
-rw-r--r--test/compilationTests/MultiSigWallet/MultiSigWallet.sol22
-rw-r--r--test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol6
-rw-r--r--test/compilationTests/MultiSigWallet/TestToken.sol6
4 files changed, 18 insertions, 18 deletions
diff --git a/test/compilationTests/MultiSigWallet/Factory.sol b/test/compilationTests/MultiSigWallet/Factory.sol
index f1be6884..f7a96cbd 100644
--- a/test/compilationTests/MultiSigWallet/Factory.sol
+++ b/test/compilationTests/MultiSigWallet/Factory.sol
@@ -23,6 +23,6 @@ contract Factory {
{
isInstantiation[instantiation] = true;
instantiations[msg.sender].push(instantiation);
- ContractInstantiation(msg.sender, instantiation);
+ emit ContractInstantiation(msg.sender, instantiation);
}
}
diff --git a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol
index 76b01188..78e18f3c 100644
--- a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol
+++ b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol
@@ -93,7 +93,7 @@ contract MultiSigWallet {
payable
{
if (msg.value > 0)
- Deposit(msg.sender, msg.value);
+ emit Deposit(msg.sender, msg.value);
}
/*
@@ -126,7 +126,7 @@ contract MultiSigWallet {
{
isOwner[owner] = true;
owners.push(owner);
- OwnerAddition(owner);
+ emit OwnerAddition(owner);
}
/// @dev Allows to remove an owner. Transaction has to be sent by wallet.
@@ -145,7 +145,7 @@ contract MultiSigWallet {
owners.length -= 1;
if (required > owners.length)
changeRequirement(owners.length);
- OwnerRemoval(owner);
+ emit OwnerRemoval(owner);
}
/// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.
@@ -164,8 +164,8 @@ contract MultiSigWallet {
}
isOwner[owner] = false;
isOwner[newOwner] = true;
- OwnerRemoval(owner);
- OwnerAddition(newOwner);
+ emit OwnerRemoval(owner);
+ emit OwnerAddition(newOwner);
}
/// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.
@@ -176,7 +176,7 @@ contract MultiSigWallet {
validRequirement(owners.length, _required)
{
required = _required;
- RequirementChange(_required);
+ emit RequirementChange(_required);
}
/// @dev Allows an owner to submit and confirm a transaction.
@@ -201,7 +201,7 @@ contract MultiSigWallet {
notConfirmed(transactionId, msg.sender)
{
confirmations[transactionId][msg.sender] = true;
- Confirmation(msg.sender, transactionId);
+ emit Confirmation(msg.sender, transactionId);
executeTransaction(transactionId);
}
@@ -214,7 +214,7 @@ contract MultiSigWallet {
notExecuted(transactionId)
{
confirmations[transactionId][msg.sender] = false;
- Revocation(msg.sender, transactionId);
+ emit Revocation(msg.sender, transactionId);
}
/// @dev Allows anyone to execute a confirmed transaction.
@@ -227,9 +227,9 @@ contract MultiSigWallet {
Transaction tx = transactions[transactionId];
tx.executed = true;
if (tx.destination.call.value(tx.value)(tx.data))
- Execution(transactionId);
+ emit Execution(transactionId);
else {
- ExecutionFailure(transactionId);
+ emit ExecutionFailure(transactionId);
tx.executed = false;
}
}
@@ -273,7 +273,7 @@ contract MultiSigWallet {
executed: false
});
transactionCount += 1;
- Submission(transactionId);
+ emit Submission(transactionId);
}
/*
diff --git a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol
index d03a82f9..0ca9fa54 100644
--- a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol
+++ b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol
@@ -33,7 +33,7 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet {
onlyWallet
{
dailyLimit = _dailyLimit;
- DailyLimitChange(_dailyLimit);
+ emit DailyLimitChange(_dailyLimit);
}
/// @dev Allows anyone to execute a confirmed transaction or ether withdraws until daily limit is reached.
@@ -49,9 +49,9 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet {
if (!confirmed)
spentToday += tx.value;
if (tx.destination.call.value(tx.value)(tx.data))
- Execution(transactionId);
+ emit Execution(transactionId);
else {
- ExecutionFailure(transactionId);
+ emit ExecutionFailure(transactionId);
tx.executed = false;
if (!confirmed)
spentToday -= tx.value;
diff --git a/test/compilationTests/MultiSigWallet/TestToken.sol b/test/compilationTests/MultiSigWallet/TestToken.sol
index 0f6cd20e..69727cbd 100644
--- a/test/compilationTests/MultiSigWallet/TestToken.sol
+++ b/test/compilationTests/MultiSigWallet/TestToken.sol
@@ -31,7 +31,7 @@ contract TestToken {
}
balances[msg.sender] -= _value;
balances[_to] += _value;
- Transfer(msg.sender, _to, _value);
+ emit Transfer(msg.sender, _to, _value);
return true;
}
@@ -45,7 +45,7 @@ contract TestToken {
balances[_to] += _value;
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
- Transfer(_from, _to, _value);
+ emit Transfer(_from, _to, _value);
return true;
}
@@ -54,7 +54,7 @@ contract TestToken {
returns (bool success)
{
allowed[msg.sender][_spender] = _value;
- Approval(msg.sender, _spender, _value);
+ emit Approval(msg.sender, _spender, _value);
return true;
}