diff options
author | chriseth <chris@ethereum.org> | 2018-06-27 16:35:38 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-06-27 16:37:46 +0800 |
commit | 01fd5a8d51d1a950349fc7467454183cc5d0f145 (patch) | |
tree | d5eb024dd73e21b54e2c546516aa53f3b53e677d /test/compilationTests/zeppelin | |
parent | b9d035264d924ca63472a6be0af287dec75c4355 (diff) | |
download | dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.gz dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.zst dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.zip |
Add emit keyword to compilation tests.
Diffstat (limited to 'test/compilationTests/zeppelin')
11 files changed, 21 insertions, 21 deletions
diff --git a/test/compilationTests/zeppelin/Bounty.sol b/test/compilationTests/zeppelin/Bounty.sol index 4c62a0b4..91730900 100644 --- a/test/compilationTests/zeppelin/Bounty.sol +++ b/test/compilationTests/zeppelin/Bounty.sol @@ -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; } diff --git a/test/compilationTests/zeppelin/MultisigWallet.sol b/test/compilationTests/zeppelin/MultisigWallet.sol index 00019f6b..83df125c 100644 --- a/test/compilationTests/zeppelin/MultisigWallet.sol +++ b/test/compilationTests/zeppelin/MultisigWallet.sol @@ -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; } diff --git a/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol index 7c0cb360..a60a28f8 100644 --- a/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol +++ b/test/compilationTests/zeppelin/crowdsale/Crowdsale.sol @@ -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(); } diff --git a/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol b/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol index 1a736083..7965a66d 100644 --- a/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol +++ b/test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol @@ -23,7 +23,7 @@ contract FinalizableCrowdsale is Crowdsale, Ownable { require(hasEnded()); finalization(); - Finalized(); + emit Finalized(); isFinalized = true; } diff --git a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol index 6a22ebde..0be45ec4 100644 --- a/test/compilationTests/zeppelin/crowdsale/RefundVault.sol +++ b/test/compilationTests/zeppelin/crowdsale/RefundVault.sol @@ -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); } } diff --git a/test/compilationTests/zeppelin/lifecycle/Pausable.sol b/test/compilationTests/zeppelin/lifecycle/Pausable.sol index b14f8767..10b0fcd8 100644 --- a/test/compilationTests/zeppelin/lifecycle/Pausable.sol +++ b/test/compilationTests/zeppelin/lifecycle/Pausable.sol @@ -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; } } diff --git a/test/compilationTests/zeppelin/ownership/Shareable.sol b/test/compilationTests/zeppelin/ownership/Shareable.sol index a9c2fd5f..f8059650 100644 --- a/test/compilationTests/zeppelin/ownership/Shareable.sol +++ b/test/compilationTests/zeppelin/ownership/Shareable.sol @@ -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. diff --git a/test/compilationTests/zeppelin/token/BasicToken.sol b/test/compilationTests/zeppelin/token/BasicToken.sol index 5618227a..831f706e 100644 --- a/test/compilationTests/zeppelin/token/BasicToken.sol +++ b/test/compilationTests/zeppelin/token/BasicToken.sol @@ -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); } /** diff --git a/test/compilationTests/zeppelin/token/MintableToken.sol b/test/compilationTests/zeppelin/token/MintableToken.sol index 505d13c3..45926afb 100644 --- a/test/compilationTests/zeppelin/token/MintableToken.sol +++ b/test/compilationTests/zeppelin/token/MintableToken.sol @@ -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; } } diff --git a/test/compilationTests/zeppelin/token/StandardToken.sol b/test/compilationTests/zeppelin/token/StandardToken.sol index d86aae4c..ab9f582e 100644 --- a/test/compilationTests/zeppelin/token/StandardToken.sol +++ b/test/compilationTests/zeppelin/token/StandardToken.sol @@ -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); } /** diff --git a/test/compilationTests/zeppelin/token/VestedToken.sol b/test/compilationTests/zeppelin/token/VestedToken.sol index b7748b09..e9929018 100644 --- a/test/compilationTests/zeppelin/token/VestedToken.sol +++ b/test/compilationTests/zeppelin/token/VestedToken.sol @@ -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); } |