Add emit keyword to compilation tests.

This commit is contained in:
chriseth
2018-06-27 10:37:46 +02:00
parent b9d035264d
commit 01fd5a8d51
43 changed files with 120 additions and 120 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ contract Bounty is PullPayment, Destructible {
function createTarget() returns(Target) {
Target target = Target(deployContract());
researchers[target] = msg.sender;
TargetCreated(target);
emit TargetCreated(target);
return target;
}
@@ -42,7 +42,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
function() payable {
// just being sent some cash?
if (msg.value > 0)
Deposit(msg.sender, msg.value);
emit Deposit(msg.sender, msg.value);
}
/**
@@ -58,7 +58,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
function execute(address _to, uint256 _value, bytes _data) external onlyOwner returns (bytes32 _r) {
// first, take the opportunity to check that we're under the daily limit.
if (underLimit(_value)) {
SingleTransact(msg.sender, _value, _to, _data);
emit SingleTransact(msg.sender, _value, _to, _data);
// yes - just execute the call.
if (!_to.call.value(_value)(_data)) {
throw;
@@ -71,7 +71,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
txs[_r].to = _to;
txs[_r].value = _value;
txs[_r].data = _data;
ConfirmationNeeded(_r, msg.sender, _value, _to, _data);
emit ConfirmationNeeded(_r, msg.sender, _value, _to, _data);
}
}
@@ -85,7 +85,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
if (!txs[_h].to.call.value(txs[_h].value)(txs[_h].data)) {
throw;
}
MultiTransact(msg.sender, _h, txs[_h].value, txs[_h].to, txs[_h].data);
emit MultiTransact(msg.sender, _h, txs[_h].value, txs[_h].to, txs[_h].data);
delete txs[_h];
return true;
}
@@ -80,7 +80,7 @@ contract Crowdsale {
weiRaised = updatedWeiRaised;
token.mint(beneficiary, tokens);
TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);
emit TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);
forwardFunds();
}
@@ -23,7 +23,7 @@ contract FinalizableCrowdsale is Crowdsale, Ownable {
require(hasEnded());
finalization();
Finalized();
emit Finalized();
isFinalized = true;
}
@@ -36,14 +36,14 @@ contract RefundVault is Ownable {
function close() onlyOwner {
require(state == State.Active);
state = State.Closed;
Closed();
emit Closed();
wallet.transfer(this.balance);
}
function enableRefunds() onlyOwner {
require(state == State.Active);
state = State.Refunding;
RefundsEnabled();
emit RefundsEnabled();
}
function refund(address investor) {
@@ -51,6 +51,6 @@ contract RefundVault is Ownable {
uint256 depositedValue = deposited[investor];
deposited[investor] = 0;
investor.transfer(depositedValue);
Refunded(investor, depositedValue);
emit Refunded(investor, depositedValue);
}
}
@@ -36,7 +36,7 @@ contract Pausable is Ownable {
*/
function pause() onlyOwner whenNotPaused returns (bool) {
paused = true;
Pause();
emit Pause();
return true;
}
@@ -45,7 +45,7 @@ contract Pausable is Ownable {
*/
function unpause() onlyOwner whenPaused returns (bool) {
paused = false;
Unpause();
emit Unpause();
return true;
}
}
@@ -87,7 +87,7 @@ contract Shareable {
if (pending.ownersDone & ownerIndexBit > 0) {
pending.yetNeeded++;
pending.ownersDone -= ownerIndexBit;
Revoke(msg.sender, _operation);
emit Revoke(msg.sender, _operation);
}
}
@@ -156,7 +156,7 @@ contract Shareable {
uint256 ownerIndexBit = 2**index;
// make sure we (the message sender) haven't confirmed this operation previously.
if (pending.ownersDone & ownerIndexBit == 0) {
Confirmation(msg.sender, _operation);
emit Confirmation(msg.sender, _operation);
// ok - check if count is enough to go ahead.
if (pending.yetNeeded <= 1) {
// enough confirmations: reset and run interior.
@@ -22,7 +22,7 @@ contract BasicToken is ERC20Basic {
function transfer(address _to, uint256 _value) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
emit Transfer(msg.sender, _to, _value);
}
/**
@@ -34,7 +34,7 @@ contract MintableToken is StandardToken, Ownable {
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
emit Mint(_to, _amount);
return true;
}
@@ -44,7 +44,7 @@ contract MintableToken is StandardToken, Ownable {
*/
function finishMinting() onlyOwner returns (bool) {
mintingFinished = true;
MintFinished();
emit MintFinished();
return true;
}
}
@@ -32,7 +32,7 @@ contract StandardToken is ERC20, BasicToken {
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
Transfer(_from, _to, _value);
emit Transfer(_from, _to, _value);
}
/**
@@ -49,7 +49,7 @@ contract StandardToken is ERC20, BasicToken {
if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw;
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
emit Approval(msg.sender, _spender, _value);
}
/**
@@ -65,7 +65,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
transfer(_to, _value);
NewTokenGrant(msg.sender, _to, _value, count - 1);
emit NewTokenGrant(msg.sender, _to, _value, count - 1);
}
/**
@@ -96,7 +96,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
balances[receiver] = balances[receiver].add(nonVested);
balances[_holder] = balances[_holder].sub(nonVested);
Transfer(_holder, receiver, nonVested);
emit Transfer(_holder, receiver, nonVested);
}