aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests
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
parentb9d035264d924ca63472a6be0af287dec75c4355 (diff)
downloaddexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.gz
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.bz2
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.lz
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.xz
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.tar.zst
dexon-solidity-01fd5a8d51d1a950349fc7467454183cc5d0f145.zip
Add emit keyword to compilation tests.
Diffstat (limited to 'test/compilationTests')
-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
-rw-r--r--test/compilationTests/corion/ico.sol2
-rw-r--r--test/compilationTests/corion/premium.sol14
-rw-r--r--test/compilationTests/corion/provider.sol12
-rw-r--r--test/compilationTests/corion/publisher.sol6
-rw-r--r--test/compilationTests/corion/token.sol20
-rw-r--r--test/compilationTests/gnosis/Events/CategoricalEvent.sol2
-rw-r--r--test/compilationTests/gnosis/Events/Event.sol8
-rw-r--r--test/compilationTests/gnosis/Events/EventFactory.sol4
-rw-r--r--test/compilationTests/gnosis/Events/ScalarEvent.sol2
-rw-r--r--test/compilationTests/gnosis/Markets/Campaign.sol10
-rw-r--r--test/compilationTests/gnosis/Markets/CampaignFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Markets/StandardMarket.sol12
-rw-r--r--test/compilationTests/gnosis/Markets/StandardMarketFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/CentralizedOracle.sol4
-rw-r--r--test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/DifficultyOracle.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/DifficultyOracleFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/FutarchyOracle.sol6
-rw-r--r--test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol4
-rw-r--r--test/compilationTests/gnosis/Oracles/SignedMessageOracleFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Oracles/UltimateOracle.sol8
-rw-r--r--test/compilationTests/gnosis/Oracles/UltimateOracleFactory.sol2
-rw-r--r--test/compilationTests/gnosis/Tokens/EtherToken.sol4
-rw-r--r--test/compilationTests/gnosis/Tokens/OutcomeToken.sol4
-rw-r--r--test/compilationTests/gnosis/Tokens/StandardToken.sol6
-rw-r--r--test/compilationTests/milestonetracker/MilestoneTracker.sol16
-rw-r--r--test/compilationTests/zeppelin/Bounty.sol2
-rw-r--r--test/compilationTests/zeppelin/MultisigWallet.sol8
-rw-r--r--test/compilationTests/zeppelin/crowdsale/Crowdsale.sol2
-rw-r--r--test/compilationTests/zeppelin/crowdsale/FinalizableCrowdsale.sol2
-rw-r--r--test/compilationTests/zeppelin/crowdsale/RefundVault.sol6
-rw-r--r--test/compilationTests/zeppelin/lifecycle/Pausable.sol4
-rw-r--r--test/compilationTests/zeppelin/ownership/Shareable.sol4
-rw-r--r--test/compilationTests/zeppelin/token/BasicToken.sol2
-rw-r--r--test/compilationTests/zeppelin/token/MintableToken.sol4
-rw-r--r--test/compilationTests/zeppelin/token/StandardToken.sol4
-rw-r--r--test/compilationTests/zeppelin/token/VestedToken.sol4
43 files changed, 120 insertions, 120 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;
}
diff --git a/test/compilationTests/corion/ico.sol b/test/compilationTests/corion/ico.sol
index 81a6516e..cb437624 100644
--- a/test/compilationTests/corion/ico.sol
+++ b/test/compilationTests/corion/ico.sol
@@ -337,7 +337,7 @@ contract ico is safeMath {
token(tokenAddr).mint(affilateAddress, extra);
}
checkPremium(beneficiaryAddress);
- EICO(beneficiaryAddress, _reward, affilateAddress, extra);
+ emit EICO(beneficiaryAddress, _reward, affilateAddress, extra);
return true;
}
diff --git a/test/compilationTests/corion/premium.sol b/test/compilationTests/corion/premium.sol
index 9c29e700..5a80ecc6 100644
--- a/test/compilationTests/corion/premium.sol
+++ b/test/compilationTests/corion/premium.sol
@@ -63,7 +63,7 @@ contract premium is module, safeMath {
for ( uint256 a=0 ; a<genesisAddr.length ; a++ ) {
genesis[genesisAddr[a]] = true;
require( db.increase(genesisAddr[a], genesisValue[a]) );
- Mint(genesisAddr[a], genesisValue[a]);
+ emit Mint(genesisAddr[a], genesisValue[a]);
}
}
}
@@ -137,7 +137,7 @@ contract premium is module, safeMath {
require( msg.sender != spender );
require( db.balanceOf(msg.sender) >= amount );
require( db.setAllowance(msg.sender, spender, amount, nonce) );
- Approval(msg.sender, spender, amount);
+ emit Approval(msg.sender, spender, amount);
}
function allowance(address owner, address spender) constant returns (uint256 remaining, uint256 nonce) {
@@ -178,7 +178,7 @@ contract premium is module, safeMath {
} else {
_transfer(msg.sender, to, amount);
}
- Transfer(msg.sender, to, amount, _data);
+ emit Transfer(msg.sender, to, amount, _data);
return true;
}
@@ -207,7 +207,7 @@ contract premium is module, safeMath {
_reamining = safeSub(_reamining, amount);
_nonce = safeAdd(_nonce, 1);
require( db.setAllowance(from, msg.sender, _reamining, _nonce) );
- AllowanceUsed(msg.sender, from, amount);
+ emit AllowanceUsed(msg.sender, from, amount);
}
bytes memory _data;
if ( isContract(to) ) {
@@ -215,7 +215,7 @@ contract premium is module, safeMath {
} else {
_transfer( from, to, amount);
}
- Transfer(from, to, amount, _data);
+ emit Transfer(from, to, amount, _data);
return true;
}
@@ -242,7 +242,7 @@ contract premium is module, safeMath {
} else {
_transfer( msg.sender, to, amount);
}
- Transfer(msg.sender, to, amount, extraData);
+ emit Transfer(msg.sender, to, amount, extraData);
return true;
}
@@ -301,7 +301,7 @@ contract premium is module, safeMath {
@value Amount
*/
require( db.increase(owner, value) );
- Mint(owner, value);
+ emit Mint(owner, value);
}
function isContract(address addr) internal returns (bool success) {
diff --git a/test/compilationTests/corion/provider.sol b/test/compilationTests/corion/provider.sol
index e6886622..0c1f69e5 100644
--- a/test/compilationTests/corion/provider.sol
+++ b/test/compilationTests/corion/provider.sol
@@ -268,7 +268,7 @@ contract provider is module, safeMath, announcementTypes {
} else {
delete providers[msg.sender].data[currHeight].supply[currentSchellingRound];
}
- EProviderOpen(msg.sender, currHeight);
+ emit EProviderOpen(msg.sender, currHeight);
}
function setProviderDetails(address addr, string website, string country, string info, uint8 rate, address admin) isReady external {
/*
@@ -297,7 +297,7 @@ contract provider is module, safeMath, announcementTypes {
providers[addr].data[currHeight].country = country;
providers[addr].data[currHeight].info = info;
providers[addr].data[currHeight].currentRate = rate;
- EProviderDetailsChanged(addr, currHeight, website, country, info, rate, admin);
+ emit EProviderDetailsChanged(addr, currHeight, website, country, info, rate, admin);
}
function getProviderInfo(address addr, uint256 height) public constant returns (string name, string website, string country, string info, uint256 create) {
/*
@@ -367,7 +367,7 @@ contract provider is module, safeMath, announcementTypes {
providers[msg.sender].data[currHeight].valid = false;
providers[msg.sender].data[currHeight].close = currentSchellingRound;
setRightForInterest(getProviderCurrentSupply(msg.sender), 0, providers[msg.sender].data[currHeight].priv);
- EProviderClose(msg.sender, currHeight);
+ emit EProviderClose(msg.sender, currHeight);
}
function allowUsers(address provider, address[] addr) isReady external {
/*
@@ -437,7 +437,7 @@ contract provider is module, safeMath, announcementTypes {
clients[msg.sender].paidUpTo = currentSchellingRound;
clients[msg.sender].lastRate = providers[provider].data[currHeight].currentRate;
clients[msg.sender].providerConnected = now;
- ENewClient(msg.sender, provider, currHeight, bal);
+ emit ENewClient(msg.sender, provider, currHeight, bal);
}
function partProvider() isReady external {
/*
@@ -467,7 +467,7 @@ contract provider is module, safeMath, announcementTypes {
delete clients[msg.sender].paidUpTo;
delete clients[msg.sender].lastRate;
delete clients[msg.sender].providerConnected;
- EClientLost(msg.sender, provider, currHeight, bal);
+ emit EClientLost(msg.sender, provider, currHeight, bal);
}
function checkReward(address addr) public constant returns (uint256 reward) {
/*
@@ -522,7 +522,7 @@ contract provider is module, safeMath, announcementTypes {
if ( providerReward > 0 ) {
require( moduleHandler(moduleHandlerAddress).transfer(address(this), provider, providerReward, false) );
}
- EReward(msg.sender, provider, clientReward, providerReward);
+ emit EReward(msg.sender, provider, clientReward, providerReward);
}
function getClientReward(uint256 limit) internal returns (uint256 reward) {
/*
diff --git a/test/compilationTests/corion/publisher.sol b/test/compilationTests/corion/publisher.sol
index c7baa4df..0e8f825f 100644
--- a/test/compilationTests/corion/publisher.sol
+++ b/test/compilationTests/corion/publisher.sol
@@ -148,7 +148,7 @@ contract publisher is announcementTypes, module, safeMath {
announcements[announcementsLength]._str = _str;
announcements[announcementsLength]._uint = _uint;
announcements[announcementsLength]._addr = _addr;
- ENewAnnouncement(announcementsLength, Type);
+ emit ENewAnnouncement(announcementsLength, Type);
}
function closeAnnouncement(uint256 id) onlyOwner external {
@@ -238,7 +238,7 @@ contract publisher is announcementTypes, module, safeMath {
opponents[msg.sender].push(id);
}
announcements[id].oppositionWeight += _balance;
- EOppositeAnnouncement(id, msg.sender, _balance);
+ emit EOppositeAnnouncement(id, msg.sender, _balance);
}
function invalidateAnnouncement(uint256 id) onlyOwner external {
@@ -250,7 +250,7 @@ contract publisher is announcementTypes, module, safeMath {
require( announcements[id].open );
announcements[id].end = block.number;
announcements[id].open = false;
- EInvalidateAnnouncement(id);
+ emit EInvalidateAnnouncement(id);
}
modifier onlyOwner() {
diff --git a/test/compilationTests/corion/token.sol b/test/compilationTests/corion/token.sol
index bb141b52..0709baca 100644
--- a/test/compilationTests/corion/token.sol
+++ b/test/compilationTests/corion/token.sol
@@ -78,7 +78,7 @@ contract token is safeMath, module, announcementTypes {
genesis[genesisAddr[a]] = true;
require( db.increase(genesisAddr[a], genesisValue[a]) );
if ( ! genesisAddr[a].send(0.2 ether) ) {}
- Mint(genesisAddr[a], genesisValue[a]);
+ emit Mint(genesisAddr[a], genesisValue[a]);
}
}
}
@@ -152,7 +152,7 @@ contract token is safeMath, module, announcementTypes {
require( msg.sender != spender );
require( db.balanceOf(msg.sender) >= amount );
require( db.setAllowance(msg.sender, spender, amount, nonce) );
- Approval(msg.sender, spender, amount);
+ emit Approval(msg.sender, spender, amount);
}
function allowance(address owner, address spender) constant returns (uint256 remaining, uint256 nonce) {
@@ -193,7 +193,7 @@ contract token is safeMath, module, announcementTypes {
} else {
_transfer( msg.sender, to, amount, true);
}
- Transfer(msg.sender, to, amount, _data);
+ emit Transfer(msg.sender, to, amount, _data);
return true;
}
@@ -222,7 +222,7 @@ contract token is safeMath, module, announcementTypes {
_reamining = safeSub(_reamining, amount);
_nonce = safeAdd(_nonce, 1);
require( db.setAllowance(from, msg.sender, _reamining, _nonce) );
- AllowanceUsed(msg.sender, from, amount);
+ emit AllowanceUsed(msg.sender, from, amount);
}
bytes memory _data;
if ( isContract(to) ) {
@@ -230,7 +230,7 @@ contract token is safeMath, module, announcementTypes {
} else {
_transfer( from, to, amount, true);
}
- Transfer(from, to, amount, _data);
+ emit Transfer(from, to, amount, _data);
return true;
}
@@ -256,7 +256,7 @@ contract token is safeMath, module, announcementTypes {
bytes memory _data;
require( super.isModuleHandler(msg.sender) );
_transfer( from, to, amount, fee);
- Transfer(from, to, amount, _data);
+ emit Transfer(from, to, amount, _data);
return true;
}
@@ -284,7 +284,7 @@ contract token is safeMath, module, announcementTypes {
} else {
_transfer( msg.sender, to, amount, true);
}
- Transfer(msg.sender, to, amount, extraData);
+ emit Transfer(msg.sender, to, amount, extraData);
return true;
}
@@ -379,7 +379,7 @@ contract token is safeMath, module, announcementTypes {
require( db.increase(_schellingAddr, _forSchelling) );
_burn(owner, _forBurn);
bytes memory _data;
- Transfer(owner, _schellingAddr, _forSchelling, _data);
+ emit Transfer(owner, _schellingAddr, _forSchelling, _data);
require( moduleHandler(moduleHandlerAddress).broadcastTransfer(owner, _schellingAddr, _forSchelling) );
} else {
_burn(owner, _fee);
@@ -428,7 +428,7 @@ contract token is safeMath, module, announcementTypes {
if ( isICO ) {
require( ico(icoAddr).setInterestDB(owner, db.balanceOf(owner)) );
}
- Mint(owner, value);
+ emit Mint(owner, value);
}
function burn(address owner, uint256 value) isReady external returns (bool success) {
@@ -454,7 +454,7 @@ contract token is safeMath, module, announcementTypes {
*/
require( db.decrease(owner, value) );
require( moduleHandler(moduleHandlerAddress).broadcastTransfer(owner, address(0x00), value) );
- Burn(owner, value);
+ emit Burn(owner, value);
}
function isContract(address addr) internal returns (bool success) {
diff --git a/test/compilationTests/gnosis/Events/CategoricalEvent.sol b/test/compilationTests/gnosis/Events/CategoricalEvent.sol
index 6bcec271..4433bdfd 100644
--- a/test/compilationTests/gnosis/Events/CategoricalEvent.sol
+++ b/test/compilationTests/gnosis/Events/CategoricalEvent.sol
@@ -38,7 +38,7 @@ contract CategoricalEvent is Event {
outcomeTokens[uint(outcome)].revoke(msg.sender, winnings);
// Payout winnings
require(collateralToken.transfer(msg.sender, winnings));
- WinningsRedemption(msg.sender, winnings);
+ emit WinningsRedemption(msg.sender, winnings);
}
/// @dev Calculates and returns event hash
diff --git a/test/compilationTests/gnosis/Events/Event.sol b/test/compilationTests/gnosis/Events/Event.sol
index 4d390d0e..a6edb778 100644
--- a/test/compilationTests/gnosis/Events/Event.sol
+++ b/test/compilationTests/gnosis/Events/Event.sol
@@ -44,7 +44,7 @@ contract Event {
for (uint8 i = 0; i < outcomeCount; i++) {
OutcomeToken outcomeToken = new OutcomeToken();
outcomeTokens.push(outcomeToken);
- OutcomeTokenCreation(outcomeToken, i);
+ emit OutcomeTokenCreation(outcomeToken, i);
}
}
@@ -58,7 +58,7 @@ contract Event {
// Issue new outcome tokens to sender
for (uint8 i = 0; i < outcomeTokens.length; i++)
outcomeTokens[i].issue(msg.sender, collateralTokenCount);
- OutcomeTokenSetIssuance(msg.sender, collateralTokenCount);
+ emit OutcomeTokenSetIssuance(msg.sender, collateralTokenCount);
}
/// @dev Sells equal number of tokens of all outcomes, exchanging collateral tokens and sets of outcome tokens 1:1
@@ -71,7 +71,7 @@ contract Event {
outcomeTokens[i].revoke(msg.sender, outcomeTokenCount);
// Transfer collateral tokens to sender
require(collateralToken.transfer(msg.sender, outcomeTokenCount));
- OutcomeTokenSetRevocation(msg.sender, outcomeTokenCount);
+ emit OutcomeTokenSetRevocation(msg.sender, outcomeTokenCount);
}
/// @dev Sets winning event outcome
@@ -83,7 +83,7 @@ contract Event {
// Set winning outcome
outcome = oracle.getOutcome();
isOutcomeSet = true;
- OutcomeAssignment(outcome);
+ emit OutcomeAssignment(outcome);
}
/// @dev Returns outcome count
diff --git a/test/compilationTests/gnosis/Events/EventFactory.sol b/test/compilationTests/gnosis/Events/EventFactory.sol
index 4779c6e4..acef3330 100644
--- a/test/compilationTests/gnosis/Events/EventFactory.sol
+++ b/test/compilationTests/gnosis/Events/EventFactory.sol
@@ -45,7 +45,7 @@ contract EventFactory {
outcomeCount
);
categoricalEvents[eventHash] = eventContract;
- CategoricalEventCreation(msg.sender, eventContract, collateralToken, oracle, outcomeCount);
+ emit CategoricalEventCreation(msg.sender, eventContract, collateralToken, oracle, outcomeCount);
}
/// @dev Creates a new scalar event and adds it to the event mapping
@@ -74,6 +74,6 @@ contract EventFactory {
upperBound
);
scalarEvents[eventHash] = eventContract;
- ScalarEventCreation(msg.sender, eventContract, collateralToken, oracle, lowerBound, upperBound);
+ emit ScalarEventCreation(msg.sender, eventContract, collateralToken, oracle, lowerBound, upperBound);
}
}
diff --git a/test/compilationTests/gnosis/Events/ScalarEvent.sol b/test/compilationTests/gnosis/Events/ScalarEvent.sol
index 3120090c..4f268a38 100644
--- a/test/compilationTests/gnosis/Events/ScalarEvent.sol
+++ b/test/compilationTests/gnosis/Events/ScalarEvent.sol
@@ -72,7 +72,7 @@ contract ScalarEvent is Event {
outcomeTokens[LONG].revoke(msg.sender, longOutcomeTokenCount);
// Payout winnings to sender
require(collateralToken.transfer(msg.sender, winnings));
- WinningsRedemption(msg.sender, winnings);
+ emit WinningsRedemption(msg.sender, winnings);
}
/// @dev Calculates and returns event hash
diff --git a/test/compilationTests/gnosis/Markets/Campaign.sol b/test/compilationTests/gnosis/Markets/Campaign.sol
index d2e841b1..f99ede53 100644
--- a/test/compilationTests/gnosis/Markets/Campaign.sol
+++ b/test/compilationTests/gnosis/Markets/Campaign.sol
@@ -111,7 +111,7 @@ contract Campaign {
contributions[msg.sender] = contributions[msg.sender].add(amount);
if (amount == maxAmount)
stage = Stages.AuctionSuccessful;
- CampaignFunding(msg.sender, amount);
+ emit CampaignFunding(msg.sender, amount);
}
/// @dev Withdraws refund amount
@@ -126,7 +126,7 @@ contract Campaign {
contributions[msg.sender] = 0;
// Refund collateral tokens
require(eventContract.collateralToken().transfer(msg.sender, refundAmount));
- CampaignRefund(msg.sender, refundAmount);
+ emit CampaignRefund(msg.sender, refundAmount);
}
/// @dev Allows to create market after successful funding
@@ -141,7 +141,7 @@ contract Campaign {
require(eventContract.collateralToken().approve(market, funding));
market.fund(funding);
stage = Stages.MarketCreated;
- MarketCreation(market);
+ emit MarketCreation(market);
return market;
}
@@ -158,7 +158,7 @@ contract Campaign {
eventContract.redeemWinnings();
finalBalance = eventContract.collateralToken().balanceOf(this);
stage = Stages.MarketClosed;
- MarketClosing();
+ emit MarketClosing();
}
/// @dev Allows to withdraw fees from campaign contract to contributor
@@ -172,6 +172,6 @@ contract Campaign {
contributions[msg.sender] = 0;
// Send fee share to contributor
require(eventContract.collateralToken().transfer(msg.sender, fees));
- FeeWithdrawal(msg.sender, fees);
+ emit FeeWithdrawal(msg.sender, fees);
}
}
diff --git a/test/compilationTests/gnosis/Markets/CampaignFactory.sol b/test/compilationTests/gnosis/Markets/CampaignFactory.sol
index 930ec2e2..d80d7d63 100644
--- a/test/compilationTests/gnosis/Markets/CampaignFactory.sol
+++ b/test/compilationTests/gnosis/Markets/CampaignFactory.sol
@@ -34,6 +34,6 @@ contract CampaignFactory {
returns (Campaign campaign)
{
campaign = new Campaign(eventContract, marketFactory, marketMaker, fee, funding, deadline);
- CampaignCreation(msg.sender, campaign, eventContract, marketFactory, marketMaker, fee, funding, deadline);
+ emit CampaignCreation(msg.sender, campaign, eventContract, marketFactory, marketMaker, fee, funding, deadline);
}
}
diff --git a/test/compilationTests/gnosis/Markets/StandardMarket.sol b/test/compilationTests/gnosis/Markets/StandardMarket.sol
index fc384d3a..84f30386 100644
--- a/test/compilationTests/gnosis/Markets/StandardMarket.sol
+++ b/test/compilationTests/gnosis/Markets/StandardMarket.sol
@@ -65,7 +65,7 @@ contract StandardMarket is Market {
eventContract.buyAllOutcomes(_funding);
funding = _funding;
stage = Stages.MarketFunded;
- MarketFunding(funding);
+ emit MarketFunding(funding);
}
/// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator
@@ -78,7 +78,7 @@ contract StandardMarket is Market {
for (uint8 i = 0; i < outcomeCount; i++)
require(eventContract.outcomeTokens(i).transfer(creator, eventContract.outcomeTokens(i).balanceOf(this)));
stage = Stages.MarketClosed;
- MarketClosing();
+ emit MarketClosing();
}
/// @dev Allows market creator to withdraw fees generated by trades
@@ -91,7 +91,7 @@ contract StandardMarket is Market {
fees = eventContract.collateralToken().balanceOf(this);
// Transfer fees
require(eventContract.collateralToken().transfer(creator, fees));
- FeeWithdrawal(fees);
+ emit FeeWithdrawal(fees);
}
/// @dev Allows to buy outcome tokens from market maker
@@ -121,7 +121,7 @@ contract StandardMarket is Market {
// Add outcome token count to market maker net balance
require(int(outcomeTokenCount) >= 0);
netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].add(int(outcomeTokenCount));
- OutcomeTokenPurchase(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);
+ emit OutcomeTokenPurchase(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);
}
/// @dev Allows to sell outcome tokens to market maker
@@ -150,7 +150,7 @@ contract StandardMarket is Market {
// Subtract outcome token count from market maker net balance
require(int(outcomeTokenCount) >= 0);
netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].sub(int(outcomeTokenCount));
- OutcomeTokenSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, profit);
+ emit OutcomeTokenSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, profit);
}
/// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping
@@ -178,7 +178,7 @@ contract StandardMarket is Market {
require(eventContract.outcomeTokens(i).transfer(msg.sender, outcomeTokenCount));
// Send change back to buyer
require(eventContract.collateralToken().transfer(msg.sender, profit));
- OutcomeTokenShortSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);
+ emit OutcomeTokenShortSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);
}
/// @dev Calculates fee to be paid to market maker
diff --git a/test/compilationTests/gnosis/Markets/StandardMarketFactory.sol b/test/compilationTests/gnosis/Markets/StandardMarketFactory.sol
index 101c37a2..88dcbe79 100644
--- a/test/compilationTests/gnosis/Markets/StandardMarketFactory.sol
+++ b/test/compilationTests/gnosis/Markets/StandardMarketFactory.sol
@@ -20,6 +20,6 @@ contract StandardMarketFactory is MarketFactory {
returns (Market market)
{
market = new StandardMarket(msg.sender, eventContract, marketMaker, fee);
- MarketCreation(msg.sender, market, eventContract, marketMaker, fee);
+ emit MarketCreation(msg.sender, market, eventContract, marketMaker, fee);
}
}
diff --git a/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol b/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol
index 08d8e159..362c514c 100644
--- a/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/CentralizedOracle.sol
@@ -52,7 +52,7 @@ contract CentralizedOracle is Oracle {
// Result is not set yet
require(!isSet);
owner = newOwner;
- OwnerReplacement(newOwner);
+ emit OwnerReplacement(newOwner);
}
/// @dev Sets event outcome
@@ -65,7 +65,7 @@ contract CentralizedOracle is Oracle {
require(!isSet);
isSet = true;
outcome = _outcome;
- OutcomeAssignment(_outcome);
+ emit OutcomeAssignment(_outcome);
}
/// @dev Returns if winning outcome is set
diff --git a/test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol b/test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol
index 62a12cf4..ca4e37d2 100644
--- a/test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/CentralizedOracleFactory.sol
@@ -22,6 +22,6 @@ contract CentralizedOracleFactory {
returns (CentralizedOracle centralizedOracle)
{
centralizedOracle = new CentralizedOracle(msg.sender, ipfsHash);
- CentralizedOracleCreation(msg.sender, centralizedOracle, ipfsHash);
+ emit CentralizedOracleCreation(msg.sender, centralizedOracle, ipfsHash);
}
}
diff --git a/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol b/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol
index a9933a8c..94fc70ca 100644
--- a/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/DifficultyOracle.sol
@@ -37,7 +37,7 @@ contract DifficultyOracle is Oracle {
// Block number was reached and outcome was not set yet
require(block.number >= blockNumber && difficulty == 0);
difficulty = block.difficulty;
- OutcomeAssignment(difficulty);
+ emit OutcomeAssignment(difficulty);
}
/// @dev Returns if difficulty is set
diff --git a/test/compilationTests/gnosis/Oracles/DifficultyOracleFactory.sol b/test/compilationTests/gnosis/Oracles/DifficultyOracleFactory.sol
index 2e97362c..fc5dcc3b 100644
--- a/test/compilationTests/gnosis/Oracles/DifficultyOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/DifficultyOracleFactory.sol
@@ -22,6 +22,6 @@ contract DifficultyOracleFactory {
returns (DifficultyOracle difficultyOracle)
{
difficultyOracle = new DifficultyOracle(blockNumber);
- DifficultyOracleCreation(msg.sender, difficultyOracle, blockNumber);
+ emit DifficultyOracleCreation(msg.sender, difficultyOracle, blockNumber);
}
}
diff --git a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
index 196d38c5..7105f247 100644
--- a/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/FutarchyOracle.sol
@@ -105,7 +105,7 @@ contract FutarchyOracle is Oracle {
require(market.eventContract().collateralToken().approve(market, funding));
market.fund(funding);
}
- FutarchyFunding(funding);
+ emit FutarchyFunding(funding);
}
/// @dev Closes market for winning outcome and redeems winnings and sends all collateral tokens to creator
@@ -123,7 +123,7 @@ contract FutarchyOracle is Oracle {
// Redeem collateral token for winning outcome tokens and transfer collateral tokens to creator
categoricalEvent.redeemWinnings();
require(categoricalEvent.collateralToken().transfer(creator, categoricalEvent.collateralToken().balanceOf(this)));
- FutarchyClosing();
+ emit FutarchyClosing();
}
/// @dev Allows to set the oracle outcome based on the market with largest long position
@@ -144,7 +144,7 @@ contract FutarchyOracle is Oracle {
}
winningMarketIndex = highestIndex;
isSet = true;
- OutcomeAssignment(winningMarketIndex);
+ emit OutcomeAssignment(winningMarketIndex);
}
/// @dev Returns if winning outcome is set
diff --git a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
index 1415486c..3c6e5c15 100644
--- a/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/FutarchyOracleFactory.sol
@@ -78,7 +78,7 @@ contract FutarchyOracleFactory {
fee,
deadline
);
- FutarchyOracleCreation(
+ emit FutarchyOracleCreation(
msg.sender,
futarchyOracle,
collateralToken,
diff --git a/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol b/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol
index 0024516a..3c02fef4 100644
--- a/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/MajorityOracleFactory.sol
@@ -22,6 +22,6 @@ contract MajorityOracleFactory {
returns (MajorityOracle majorityOracle)
{
majorityOracle = new MajorityOracle(oracles);
- MajorityOracleCreation(msg.sender, majorityOracle, oracles);
+ emit MajorityOracleCreation(msg.sender, majorityOracle, oracles);
}
}
diff --git a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
index 9a7bba41..83990b9b 100644
--- a/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/SignedMessageOracle.sol
@@ -61,7 +61,7 @@ contract SignedMessageOracle is Oracle {
&& signer == ecrecover(keccak256(descriptionHash, newSigner, _nonce), v, r, s));
nonce = _nonce;
signer = newSigner;
- SignerReplacement(newSigner);
+ emit SignerReplacement(newSigner);
}
/// @dev Sets outcome based on signed message
@@ -77,7 +77,7 @@ contract SignedMessageOracle is Oracle {
&& signer == ecrecover(keccak256(descriptionHash, _outcome), v, r, s));
isSet = true;
outcome = _outcome;
- OutcomeAssignment(_outcome);
+ emit OutcomeAssignment(_outcome);
}
/// @dev Returns if winning outcome
diff --git a/test/compilationTests/gnosis/Oracles/SignedMessageOracleFactory.sol b/test/compilationTests/gnosis/Oracles/SignedMessageOracleFactory.sol
index 0884d8ca..ea70b2aa 100644
--- a/test/compilationTests/gnosis/Oracles/SignedMessageOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/SignedMessageOracleFactory.sol
@@ -26,6 +26,6 @@ contract SignedMessageOracleFactory {
{
signedMessageOracle = new SignedMessageOracle(descriptionHash, v, r, s);
address oracle = ecrecover(descriptionHash, v, r, s);
- SignedMessageOracleCreation(msg.sender, signedMessageOracle, oracle);
+ emit SignedMessageOracleCreation(msg.sender, signedMessageOracle, oracle);
}
}
diff --git a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
index 0127117c..dd66c9ab 100644
--- a/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
+++ b/test/compilationTests/gnosis/Oracles/UltimateOracle.sol
@@ -81,7 +81,7 @@ contract UltimateOracle is Oracle {
&& forwardedOracle.isOutcomeSet());
forwardedOutcome = forwardedOracle.getOutcome();
forwardedOutcomeSetTimestamp = now;
- ForwardedOracleOutcomeAssignment(forwardedOutcome);
+ emit ForwardedOracleOutcomeAssignment(forwardedOutcome);
}
/// @dev Allows to challenge the oracle outcome
@@ -98,7 +98,7 @@ contract UltimateOracle is Oracle {
totalAmount = challengeAmount;
frontRunner = _outcome;
frontRunnerSetTimestamp = now;
- OutcomeChallenge(msg.sender, _outcome);
+ emit OutcomeChallenge(msg.sender, _outcome);
}
/// @dev Allows to challenge the oracle outcome
@@ -122,7 +122,7 @@ contract UltimateOracle is Oracle {
frontRunner = _outcome;
frontRunnerSetTimestamp = now;
}
- OutcomeVote(msg.sender, _outcome, amount);
+ emit OutcomeVote(msg.sender, _outcome, amount);
}
/// @dev Withdraws winnings for user
@@ -137,7 +137,7 @@ contract UltimateOracle is Oracle {
outcomeAmounts[msg.sender][frontRunner] = 0;
// Transfer earnings to contributor
require(collateralToken.transfer(msg.sender, amount));
- Withdrawal(msg.sender, amount);
+ emit Withdrawal(msg.sender, amount);
}
/// @dev Checks if time to challenge the outcome is over
diff --git a/test/compilationTests/gnosis/Oracles/UltimateOracleFactory.sol b/test/compilationTests/gnosis/Oracles/UltimateOracleFactory.sol
index 67f8a96e..51f5610e 100644
--- a/test/compilationTests/gnosis/Oracles/UltimateOracleFactory.sol
+++ b/test/compilationTests/gnosis/Oracles/UltimateOracleFactory.sol
@@ -50,7 +50,7 @@ contract UltimateOracleFactory {
challengeAmount,
frontRunnerPeriod
);
- UltimateOracleCreation(
+ emit UltimateOracleCreation(
msg.sender,
ultimateOracle,
oracle,
diff --git a/test/compilationTests/gnosis/Tokens/EtherToken.sol b/test/compilationTests/gnosis/Tokens/EtherToken.sol
index f6e73e5a..32e64583 100644
--- a/test/compilationTests/gnosis/Tokens/EtherToken.sol
+++ b/test/compilationTests/gnosis/Tokens/EtherToken.sol
@@ -30,7 +30,7 @@ contract EtherToken is StandardToken {
{
balances[msg.sender] = balances[msg.sender].add(msg.value);
totalTokens = totalTokens.add(msg.value);
- Deposit(msg.sender, msg.value);
+ emit Deposit(msg.sender, msg.value);
}
/// @dev Sells tokens in exchange for Ether, exchanging them 1:1
@@ -42,6 +42,6 @@ contract EtherToken is StandardToken {
balances[msg.sender] = balances[msg.sender].sub(value);
totalTokens = totalTokens.sub(value);
msg.sender.transfer(value);
- Withdrawal(msg.sender, value);
+ emit Withdrawal(msg.sender, value);
}
}
diff --git a/test/compilationTests/gnosis/Tokens/OutcomeToken.sol b/test/compilationTests/gnosis/Tokens/OutcomeToken.sol
index 4757c798..0bc7307d 100644
--- a/test/compilationTests/gnosis/Tokens/OutcomeToken.sol
+++ b/test/compilationTests/gnosis/Tokens/OutcomeToken.sol
@@ -46,7 +46,7 @@ contract OutcomeToken is StandardToken {
{
balances[_for] = balances[_for].add(outcomeTokenCount);
totalTokens = totalTokens.add(outcomeTokenCount);
- Issuance(_for, outcomeTokenCount);
+ emit Issuance(_for, outcomeTokenCount);
}
/// @dev Events contract revokes tokens for address. Returns success
@@ -58,6 +58,6 @@ contract OutcomeToken is StandardToken {
{
balances[_for] = balances[_for].sub(outcomeTokenCount);
totalTokens = totalTokens.sub(outcomeTokenCount);
- Revocation(_for, outcomeTokenCount);
+ emit Revocation(_for, outcomeTokenCount);
}
}
diff --git a/test/compilationTests/gnosis/Tokens/StandardToken.sol b/test/compilationTests/gnosis/Tokens/StandardToken.sol
index fc899ca6..b7d0d37a 100644
--- a/test/compilationTests/gnosis/Tokens/StandardToken.sol
+++ b/test/compilationTests/gnosis/Tokens/StandardToken.sol
@@ -30,7 +30,7 @@ contract StandardToken is Token {
return false;
balances[msg.sender] -= value;
balances[to] += value;
- Transfer(msg.sender, to, value);
+ emit Transfer(msg.sender, to, value);
return true;
}
@@ -50,7 +50,7 @@ contract StandardToken is Token {
balances[from] -= value;
allowances[from][msg.sender] -= value;
balances[to] += value;
- Transfer(from, to, value);
+ emit Transfer(from, to, value);
return true;
}
@@ -63,7 +63,7 @@ contract StandardToken is Token {
returns (bool)
{
allowances[msg.sender][spender] = value;
- Approval(msg.sender, spender, value);
+ emit Approval(msg.sender, spender, value);
return true;
}
diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol
index 10b182a3..56422169 100644
--- a/test/compilationTests/milestonetracker/MilestoneTracker.sol
+++ b/test/compilationTests/milestonetracker/MilestoneTracker.sol
@@ -179,7 +179,7 @@ contract MilestoneTracker {
) onlyRecipient campaignNotCanceled {
proposedMilestones = _newMilestones;
changingMilestones = true;
- NewMilestoneListProposed();
+ emit NewMilestoneListProposed();
}
@@ -192,7 +192,7 @@ contract MilestoneTracker {
function unproposeMilestones() onlyRecipient campaignNotCanceled {
delete proposedMilestones;
changingMilestones = false;
- NewMilestoneListUnproposed();
+ emit NewMilestoneListUnproposed();
}
/// @notice `onlyDonor` Approves the proposed milestone list
@@ -249,7 +249,7 @@ contract MilestoneTracker {
delete proposedMilestones;
changingMilestones = false;
- NewMilestoneListAccepted();
+ emit NewMilestoneListAccepted();
}
/// @notice `onlyRecipientOrLeadLink`Marks a milestone as DONE and
@@ -268,7 +268,7 @@ contract MilestoneTracker {
if (now > milestone.maxCompletionDate) throw;
milestone.status = MilestoneStatus.Completed;
milestone.doneTime = now;
- ProposalStatusChanged(_idMilestone, milestone.status);
+ emit ProposalStatusChanged(_idMilestone, milestone.status);
}
/// @notice `onlyReviewer` Approves a specific milestone
@@ -297,7 +297,7 @@ contract MilestoneTracker {
(milestone.status != MilestoneStatus.Completed)) throw;
milestone.status = MilestoneStatus.AcceptedAndInProgress;
- ProposalStatusChanged(_idMilestone, milestone.status);
+ emit ProposalStatusChanged(_idMilestone, milestone.status);
}
/// @notice `onlyRecipientOrLeadLink` Sends the milestone payment as
@@ -330,7 +330,7 @@ contract MilestoneTracker {
throw;
milestone.status = MilestoneStatus.Canceled;
- ProposalStatusChanged(_idMilestone, milestone.status);
+ emit ProposalStatusChanged(_idMilestone, milestone.status);
}
/// @notice `onlyArbitrator` Forces a milestone to be paid out as long as it
@@ -350,7 +350,7 @@ contract MilestoneTracker {
/// milestones.
function arbitrateCancelCampaign() onlyArbitrator campaignNotCanceled {
campaignCanceled = true;
- CampaignCanceled();
+ emit CampaignCanceled();
}
// @dev This internal function is executed when the milestone is paid out
@@ -362,6 +362,6 @@ contract MilestoneTracker {
milestone.status = MilestoneStatus.AuthorizedForPayment;
if (!milestone.paymentSource.call.value(0)(milestone.payData))
throw;
- ProposalStatusChanged(_idMilestone, milestone.status);
+ emit ProposalStatusChanged(_idMilestone, milestone.status);
}
}
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);
}