mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add emit keyword to compilation tests.
This commit is contained in:
@@ -23,6 +23,6 @@ contract Factory {
|
||||
{
|
||||
isInstantiation[instantiation] = true;
|
||||
instantiations[msg.sender].push(instantiation);
|
||||
ContractInstantiation(msg.sender, instantiation);
|
||||
emit ContractInstantiation(msg.sender, instantiation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user