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:
parent
b9d035264d
commit
01fd5a8d51
@ -23,6 +23,6 @@ contract Factory {
|
|||||||
{
|
{
|
||||||
isInstantiation[instantiation] = true;
|
isInstantiation[instantiation] = true;
|
||||||
instantiations[msg.sender].push(instantiation);
|
instantiations[msg.sender].push(instantiation);
|
||||||
ContractInstantiation(msg.sender, instantiation);
|
emit ContractInstantiation(msg.sender, instantiation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ contract MultiSigWallet {
|
|||||||
payable
|
payable
|
||||||
{
|
{
|
||||||
if (msg.value > 0)
|
if (msg.value > 0)
|
||||||
Deposit(msg.sender, msg.value);
|
emit Deposit(msg.sender, msg.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -126,7 +126,7 @@ contract MultiSigWallet {
|
|||||||
{
|
{
|
||||||
isOwner[owner] = true;
|
isOwner[owner] = true;
|
||||||
owners.push(owner);
|
owners.push(owner);
|
||||||
OwnerAddition(owner);
|
emit OwnerAddition(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows to remove an owner. Transaction has to be sent by wallet.
|
/// @dev Allows to remove an owner. Transaction has to be sent by wallet.
|
||||||
@ -145,7 +145,7 @@ contract MultiSigWallet {
|
|||||||
owners.length -= 1;
|
owners.length -= 1;
|
||||||
if (required > owners.length)
|
if (required > owners.length)
|
||||||
changeRequirement(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.
|
/// @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[owner] = false;
|
||||||
isOwner[newOwner] = true;
|
isOwner[newOwner] = true;
|
||||||
OwnerRemoval(owner);
|
emit OwnerRemoval(owner);
|
||||||
OwnerAddition(newOwner);
|
emit OwnerAddition(newOwner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.
|
/// @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)
|
validRequirement(owners.length, _required)
|
||||||
{
|
{
|
||||||
required = _required;
|
required = _required;
|
||||||
RequirementChange(_required);
|
emit RequirementChange(_required);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows an owner to submit and confirm a transaction.
|
/// @dev Allows an owner to submit and confirm a transaction.
|
||||||
@ -201,7 +201,7 @@ contract MultiSigWallet {
|
|||||||
notConfirmed(transactionId, msg.sender)
|
notConfirmed(transactionId, msg.sender)
|
||||||
{
|
{
|
||||||
confirmations[transactionId][msg.sender] = true;
|
confirmations[transactionId][msg.sender] = true;
|
||||||
Confirmation(msg.sender, transactionId);
|
emit Confirmation(msg.sender, transactionId);
|
||||||
executeTransaction(transactionId);
|
executeTransaction(transactionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ contract MultiSigWallet {
|
|||||||
notExecuted(transactionId)
|
notExecuted(transactionId)
|
||||||
{
|
{
|
||||||
confirmations[transactionId][msg.sender] = false;
|
confirmations[transactionId][msg.sender] = false;
|
||||||
Revocation(msg.sender, transactionId);
|
emit Revocation(msg.sender, transactionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows anyone to execute a confirmed transaction.
|
/// @dev Allows anyone to execute a confirmed transaction.
|
||||||
@ -227,9 +227,9 @@ contract MultiSigWallet {
|
|||||||
Transaction tx = transactions[transactionId];
|
Transaction tx = transactions[transactionId];
|
||||||
tx.executed = true;
|
tx.executed = true;
|
||||||
if (tx.destination.call.value(tx.value)(tx.data))
|
if (tx.destination.call.value(tx.value)(tx.data))
|
||||||
Execution(transactionId);
|
emit Execution(transactionId);
|
||||||
else {
|
else {
|
||||||
ExecutionFailure(transactionId);
|
emit ExecutionFailure(transactionId);
|
||||||
tx.executed = false;
|
tx.executed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@ contract MultiSigWallet {
|
|||||||
executed: false
|
executed: false
|
||||||
});
|
});
|
||||||
transactionCount += 1;
|
transactionCount += 1;
|
||||||
Submission(transactionId);
|
emit Submission(transactionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -33,7 +33,7 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet {
|
|||||||
onlyWallet
|
onlyWallet
|
||||||
{
|
{
|
||||||
dailyLimit = _dailyLimit;
|
dailyLimit = _dailyLimit;
|
||||||
DailyLimitChange(_dailyLimit);
|
emit DailyLimitChange(_dailyLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows anyone to execute a confirmed transaction or ether withdraws until daily limit is reached.
|
/// @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)
|
if (!confirmed)
|
||||||
spentToday += tx.value;
|
spentToday += tx.value;
|
||||||
if (tx.destination.call.value(tx.value)(tx.data))
|
if (tx.destination.call.value(tx.value)(tx.data))
|
||||||
Execution(transactionId);
|
emit Execution(transactionId);
|
||||||
else {
|
else {
|
||||||
ExecutionFailure(transactionId);
|
emit ExecutionFailure(transactionId);
|
||||||
tx.executed = false;
|
tx.executed = false;
|
||||||
if (!confirmed)
|
if (!confirmed)
|
||||||
spentToday -= tx.value;
|
spentToday -= tx.value;
|
||||||
|
@ -31,7 +31,7 @@ contract TestToken {
|
|||||||
}
|
}
|
||||||
balances[msg.sender] -= _value;
|
balances[msg.sender] -= _value;
|
||||||
balances[_to] += _value;
|
balances[_to] += _value;
|
||||||
Transfer(msg.sender, _to, _value);
|
emit Transfer(msg.sender, _to, _value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ contract TestToken {
|
|||||||
balances[_to] += _value;
|
balances[_to] += _value;
|
||||||
balances[_from] -= _value;
|
balances[_from] -= _value;
|
||||||
allowed[_from][msg.sender] -= _value;
|
allowed[_from][msg.sender] -= _value;
|
||||||
Transfer(_from, _to, _value);
|
emit Transfer(_from, _to, _value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ contract TestToken {
|
|||||||
returns (bool success)
|
returns (bool success)
|
||||||
{
|
{
|
||||||
allowed[msg.sender][_spender] = _value;
|
allowed[msg.sender][_spender] = _value;
|
||||||
Approval(msg.sender, _spender, _value);
|
emit Approval(msg.sender, _spender, _value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ contract ico is safeMath {
|
|||||||
token(tokenAddr).mint(affilateAddress, extra);
|
token(tokenAddr).mint(affilateAddress, extra);
|
||||||
}
|
}
|
||||||
checkPremium(beneficiaryAddress);
|
checkPremium(beneficiaryAddress);
|
||||||
EICO(beneficiaryAddress, _reward, affilateAddress, extra);
|
emit EICO(beneficiaryAddress, _reward, affilateAddress, extra);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ contract premium is module, safeMath {
|
|||||||
for ( uint256 a=0 ; a<genesisAddr.length ; a++ ) {
|
for ( uint256 a=0 ; a<genesisAddr.length ; a++ ) {
|
||||||
genesis[genesisAddr[a]] = true;
|
genesis[genesisAddr[a]] = true;
|
||||||
require( db.increase(genesisAddr[a], genesisValue[a]) );
|
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( msg.sender != spender );
|
||||||
require( db.balanceOf(msg.sender) >= amount );
|
require( db.balanceOf(msg.sender) >= amount );
|
||||||
require( db.setAllowance(msg.sender, spender, amount, nonce) );
|
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) {
|
function allowance(address owner, address spender) constant returns (uint256 remaining, uint256 nonce) {
|
||||||
@ -178,7 +178,7 @@ contract premium is module, safeMath {
|
|||||||
} else {
|
} else {
|
||||||
_transfer(msg.sender, to, amount);
|
_transfer(msg.sender, to, amount);
|
||||||
}
|
}
|
||||||
Transfer(msg.sender, to, amount, _data);
|
emit Transfer(msg.sender, to, amount, _data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ contract premium is module, safeMath {
|
|||||||
_reamining = safeSub(_reamining, amount);
|
_reamining = safeSub(_reamining, amount);
|
||||||
_nonce = safeAdd(_nonce, 1);
|
_nonce = safeAdd(_nonce, 1);
|
||||||
require( db.setAllowance(from, msg.sender, _reamining, _nonce) );
|
require( db.setAllowance(from, msg.sender, _reamining, _nonce) );
|
||||||
AllowanceUsed(msg.sender, from, amount);
|
emit AllowanceUsed(msg.sender, from, amount);
|
||||||
}
|
}
|
||||||
bytes memory _data;
|
bytes memory _data;
|
||||||
if ( isContract(to) ) {
|
if ( isContract(to) ) {
|
||||||
@ -215,7 +215,7 @@ contract premium is module, safeMath {
|
|||||||
} else {
|
} else {
|
||||||
_transfer( from, to, amount);
|
_transfer( from, to, amount);
|
||||||
}
|
}
|
||||||
Transfer(from, to, amount, _data);
|
emit Transfer(from, to, amount, _data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ contract premium is module, safeMath {
|
|||||||
} else {
|
} else {
|
||||||
_transfer( msg.sender, to, amount);
|
_transfer( msg.sender, to, amount);
|
||||||
}
|
}
|
||||||
Transfer(msg.sender, to, amount, extraData);
|
emit Transfer(msg.sender, to, amount, extraData);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ contract premium is module, safeMath {
|
|||||||
@value Amount
|
@value Amount
|
||||||
*/
|
*/
|
||||||
require( db.increase(owner, value) );
|
require( db.increase(owner, value) );
|
||||||
Mint(owner, value);
|
emit Mint(owner, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isContract(address addr) internal returns (bool success) {
|
function isContract(address addr) internal returns (bool success) {
|
||||||
|
@ -268,7 +268,7 @@ contract provider is module, safeMath, announcementTypes {
|
|||||||
} else {
|
} else {
|
||||||
delete providers[msg.sender].data[currHeight].supply[currentSchellingRound];
|
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 {
|
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].country = country;
|
||||||
providers[addr].data[currHeight].info = info;
|
providers[addr].data[currHeight].info = info;
|
||||||
providers[addr].data[currHeight].currentRate = rate;
|
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) {
|
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].valid = false;
|
||||||
providers[msg.sender].data[currHeight].close = currentSchellingRound;
|
providers[msg.sender].data[currHeight].close = currentSchellingRound;
|
||||||
setRightForInterest(getProviderCurrentSupply(msg.sender), 0, providers[msg.sender].data[currHeight].priv);
|
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 {
|
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].paidUpTo = currentSchellingRound;
|
||||||
clients[msg.sender].lastRate = providers[provider].data[currHeight].currentRate;
|
clients[msg.sender].lastRate = providers[provider].data[currHeight].currentRate;
|
||||||
clients[msg.sender].providerConnected = now;
|
clients[msg.sender].providerConnected = now;
|
||||||
ENewClient(msg.sender, provider, currHeight, bal);
|
emit ENewClient(msg.sender, provider, currHeight, bal);
|
||||||
}
|
}
|
||||||
function partProvider() isReady external {
|
function partProvider() isReady external {
|
||||||
/*
|
/*
|
||||||
@ -467,7 +467,7 @@ contract provider is module, safeMath, announcementTypes {
|
|||||||
delete clients[msg.sender].paidUpTo;
|
delete clients[msg.sender].paidUpTo;
|
||||||
delete clients[msg.sender].lastRate;
|
delete clients[msg.sender].lastRate;
|
||||||
delete clients[msg.sender].providerConnected;
|
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) {
|
function checkReward(address addr) public constant returns (uint256 reward) {
|
||||||
/*
|
/*
|
||||||
@ -522,7 +522,7 @@ contract provider is module, safeMath, announcementTypes {
|
|||||||
if ( providerReward > 0 ) {
|
if ( providerReward > 0 ) {
|
||||||
require( moduleHandler(moduleHandlerAddress).transfer(address(this), provider, providerReward, false) );
|
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) {
|
function getClientReward(uint256 limit) internal returns (uint256 reward) {
|
||||||
/*
|
/*
|
||||||
|
@ -148,7 +148,7 @@ contract publisher is announcementTypes, module, safeMath {
|
|||||||
announcements[announcementsLength]._str = _str;
|
announcements[announcementsLength]._str = _str;
|
||||||
announcements[announcementsLength]._uint = _uint;
|
announcements[announcementsLength]._uint = _uint;
|
||||||
announcements[announcementsLength]._addr = _addr;
|
announcements[announcementsLength]._addr = _addr;
|
||||||
ENewAnnouncement(announcementsLength, Type);
|
emit ENewAnnouncement(announcementsLength, Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeAnnouncement(uint256 id) onlyOwner external {
|
function closeAnnouncement(uint256 id) onlyOwner external {
|
||||||
@ -238,7 +238,7 @@ contract publisher is announcementTypes, module, safeMath {
|
|||||||
opponents[msg.sender].push(id);
|
opponents[msg.sender].push(id);
|
||||||
}
|
}
|
||||||
announcements[id].oppositionWeight += _balance;
|
announcements[id].oppositionWeight += _balance;
|
||||||
EOppositeAnnouncement(id, msg.sender, _balance);
|
emit EOppositeAnnouncement(id, msg.sender, _balance);
|
||||||
}
|
}
|
||||||
|
|
||||||
function invalidateAnnouncement(uint256 id) onlyOwner external {
|
function invalidateAnnouncement(uint256 id) onlyOwner external {
|
||||||
@ -250,7 +250,7 @@ contract publisher is announcementTypes, module, safeMath {
|
|||||||
require( announcements[id].open );
|
require( announcements[id].open );
|
||||||
announcements[id].end = block.number;
|
announcements[id].end = block.number;
|
||||||
announcements[id].open = false;
|
announcements[id].open = false;
|
||||||
EInvalidateAnnouncement(id);
|
emit EInvalidateAnnouncement(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
modifier onlyOwner() {
|
modifier onlyOwner() {
|
||||||
|
@ -78,7 +78,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
genesis[genesisAddr[a]] = true;
|
genesis[genesisAddr[a]] = true;
|
||||||
require( db.increase(genesisAddr[a], genesisValue[a]) );
|
require( db.increase(genesisAddr[a], genesisValue[a]) );
|
||||||
if ( ! genesisAddr[a].send(0.2 ether) ) {}
|
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( msg.sender != spender );
|
||||||
require( db.balanceOf(msg.sender) >= amount );
|
require( db.balanceOf(msg.sender) >= amount );
|
||||||
require( db.setAllowance(msg.sender, spender, amount, nonce) );
|
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) {
|
function allowance(address owner, address spender) constant returns (uint256 remaining, uint256 nonce) {
|
||||||
@ -193,7 +193,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
} else {
|
} else {
|
||||||
_transfer( msg.sender, to, amount, true);
|
_transfer( msg.sender, to, amount, true);
|
||||||
}
|
}
|
||||||
Transfer(msg.sender, to, amount, _data);
|
emit Transfer(msg.sender, to, amount, _data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
_reamining = safeSub(_reamining, amount);
|
_reamining = safeSub(_reamining, amount);
|
||||||
_nonce = safeAdd(_nonce, 1);
|
_nonce = safeAdd(_nonce, 1);
|
||||||
require( db.setAllowance(from, msg.sender, _reamining, _nonce) );
|
require( db.setAllowance(from, msg.sender, _reamining, _nonce) );
|
||||||
AllowanceUsed(msg.sender, from, amount);
|
emit AllowanceUsed(msg.sender, from, amount);
|
||||||
}
|
}
|
||||||
bytes memory _data;
|
bytes memory _data;
|
||||||
if ( isContract(to) ) {
|
if ( isContract(to) ) {
|
||||||
@ -230,7 +230,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
} else {
|
} else {
|
||||||
_transfer( from, to, amount, true);
|
_transfer( from, to, amount, true);
|
||||||
}
|
}
|
||||||
Transfer(from, to, amount, _data);
|
emit Transfer(from, to, amount, _data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
bytes memory _data;
|
bytes memory _data;
|
||||||
require( super.isModuleHandler(msg.sender) );
|
require( super.isModuleHandler(msg.sender) );
|
||||||
_transfer( from, to, amount, fee);
|
_transfer( from, to, amount, fee);
|
||||||
Transfer(from, to, amount, _data);
|
emit Transfer(from, to, amount, _data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
} else {
|
} else {
|
||||||
_transfer( msg.sender, to, amount, true);
|
_transfer( msg.sender, to, amount, true);
|
||||||
}
|
}
|
||||||
Transfer(msg.sender, to, amount, extraData);
|
emit Transfer(msg.sender, to, amount, extraData);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
require( db.increase(_schellingAddr, _forSchelling) );
|
require( db.increase(_schellingAddr, _forSchelling) );
|
||||||
_burn(owner, _forBurn);
|
_burn(owner, _forBurn);
|
||||||
bytes memory _data;
|
bytes memory _data;
|
||||||
Transfer(owner, _schellingAddr, _forSchelling, _data);
|
emit Transfer(owner, _schellingAddr, _forSchelling, _data);
|
||||||
require( moduleHandler(moduleHandlerAddress).broadcastTransfer(owner, _schellingAddr, _forSchelling) );
|
require( moduleHandler(moduleHandlerAddress).broadcastTransfer(owner, _schellingAddr, _forSchelling) );
|
||||||
} else {
|
} else {
|
||||||
_burn(owner, _fee);
|
_burn(owner, _fee);
|
||||||
@ -428,7 +428,7 @@ contract token is safeMath, module, announcementTypes {
|
|||||||
if ( isICO ) {
|
if ( isICO ) {
|
||||||
require( ico(icoAddr).setInterestDB(owner, db.balanceOf(owner)) );
|
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) {
|
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( db.decrease(owner, value) );
|
||||||
require( moduleHandler(moduleHandlerAddress).broadcastTransfer(owner, address(0x00), value) );
|
require( moduleHandler(moduleHandlerAddress).broadcastTransfer(owner, address(0x00), value) );
|
||||||
Burn(owner, value);
|
emit Burn(owner, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isContract(address addr) internal returns (bool success) {
|
function isContract(address addr) internal returns (bool success) {
|
||||||
|
@ -38,7 +38,7 @@ contract CategoricalEvent is Event {
|
|||||||
outcomeTokens[uint(outcome)].revoke(msg.sender, winnings);
|
outcomeTokens[uint(outcome)].revoke(msg.sender, winnings);
|
||||||
// Payout winnings
|
// Payout winnings
|
||||||
require(collateralToken.transfer(msg.sender, winnings));
|
require(collateralToken.transfer(msg.sender, winnings));
|
||||||
WinningsRedemption(msg.sender, winnings);
|
emit WinningsRedemption(msg.sender, winnings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Calculates and returns event hash
|
/// @dev Calculates and returns event hash
|
||||||
|
@ -44,7 +44,7 @@ contract Event {
|
|||||||
for (uint8 i = 0; i < outcomeCount; i++) {
|
for (uint8 i = 0; i < outcomeCount; i++) {
|
||||||
OutcomeToken outcomeToken = new OutcomeToken();
|
OutcomeToken outcomeToken = new OutcomeToken();
|
||||||
outcomeTokens.push(outcomeToken);
|
outcomeTokens.push(outcomeToken);
|
||||||
OutcomeTokenCreation(outcomeToken, i);
|
emit OutcomeTokenCreation(outcomeToken, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ contract Event {
|
|||||||
// Issue new outcome tokens to sender
|
// Issue new outcome tokens to sender
|
||||||
for (uint8 i = 0; i < outcomeTokens.length; i++)
|
for (uint8 i = 0; i < outcomeTokens.length; i++)
|
||||||
outcomeTokens[i].issue(msg.sender, collateralTokenCount);
|
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
|
/// @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);
|
outcomeTokens[i].revoke(msg.sender, outcomeTokenCount);
|
||||||
// Transfer collateral tokens to sender
|
// Transfer collateral tokens to sender
|
||||||
require(collateralToken.transfer(msg.sender, outcomeTokenCount));
|
require(collateralToken.transfer(msg.sender, outcomeTokenCount));
|
||||||
OutcomeTokenSetRevocation(msg.sender, outcomeTokenCount);
|
emit OutcomeTokenSetRevocation(msg.sender, outcomeTokenCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Sets winning event outcome
|
/// @dev Sets winning event outcome
|
||||||
@ -83,7 +83,7 @@ contract Event {
|
|||||||
// Set winning outcome
|
// Set winning outcome
|
||||||
outcome = oracle.getOutcome();
|
outcome = oracle.getOutcome();
|
||||||
isOutcomeSet = true;
|
isOutcomeSet = true;
|
||||||
OutcomeAssignment(outcome);
|
emit OutcomeAssignment(outcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Returns outcome count
|
/// @dev Returns outcome count
|
||||||
|
@ -45,7 +45,7 @@ contract EventFactory {
|
|||||||
outcomeCount
|
outcomeCount
|
||||||
);
|
);
|
||||||
categoricalEvents[eventHash] = eventContract;
|
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
|
/// @dev Creates a new scalar event and adds it to the event mapping
|
||||||
@ -74,6 +74,6 @@ contract EventFactory {
|
|||||||
upperBound
|
upperBound
|
||||||
);
|
);
|
||||||
scalarEvents[eventHash] = eventContract;
|
scalarEvents[eventHash] = eventContract;
|
||||||
ScalarEventCreation(msg.sender, eventContract, collateralToken, oracle, lowerBound, upperBound);
|
emit ScalarEventCreation(msg.sender, eventContract, collateralToken, oracle, lowerBound, upperBound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ contract ScalarEvent is Event {
|
|||||||
outcomeTokens[LONG].revoke(msg.sender, longOutcomeTokenCount);
|
outcomeTokens[LONG].revoke(msg.sender, longOutcomeTokenCount);
|
||||||
// Payout winnings to sender
|
// Payout winnings to sender
|
||||||
require(collateralToken.transfer(msg.sender, winnings));
|
require(collateralToken.transfer(msg.sender, winnings));
|
||||||
WinningsRedemption(msg.sender, winnings);
|
emit WinningsRedemption(msg.sender, winnings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Calculates and returns event hash
|
/// @dev Calculates and returns event hash
|
||||||
|
@ -111,7 +111,7 @@ contract Campaign {
|
|||||||
contributions[msg.sender] = contributions[msg.sender].add(amount);
|
contributions[msg.sender] = contributions[msg.sender].add(amount);
|
||||||
if (amount == maxAmount)
|
if (amount == maxAmount)
|
||||||
stage = Stages.AuctionSuccessful;
|
stage = Stages.AuctionSuccessful;
|
||||||
CampaignFunding(msg.sender, amount);
|
emit CampaignFunding(msg.sender, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Withdraws refund amount
|
/// @dev Withdraws refund amount
|
||||||
@ -126,7 +126,7 @@ contract Campaign {
|
|||||||
contributions[msg.sender] = 0;
|
contributions[msg.sender] = 0;
|
||||||
// Refund collateral tokens
|
// Refund collateral tokens
|
||||||
require(eventContract.collateralToken().transfer(msg.sender, refundAmount));
|
require(eventContract.collateralToken().transfer(msg.sender, refundAmount));
|
||||||
CampaignRefund(msg.sender, refundAmount);
|
emit CampaignRefund(msg.sender, refundAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows to create market after successful funding
|
/// @dev Allows to create market after successful funding
|
||||||
@ -141,7 +141,7 @@ contract Campaign {
|
|||||||
require(eventContract.collateralToken().approve(market, funding));
|
require(eventContract.collateralToken().approve(market, funding));
|
||||||
market.fund(funding);
|
market.fund(funding);
|
||||||
stage = Stages.MarketCreated;
|
stage = Stages.MarketCreated;
|
||||||
MarketCreation(market);
|
emit MarketCreation(market);
|
||||||
return market;
|
return market;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ contract Campaign {
|
|||||||
eventContract.redeemWinnings();
|
eventContract.redeemWinnings();
|
||||||
finalBalance = eventContract.collateralToken().balanceOf(this);
|
finalBalance = eventContract.collateralToken().balanceOf(this);
|
||||||
stage = Stages.MarketClosed;
|
stage = Stages.MarketClosed;
|
||||||
MarketClosing();
|
emit MarketClosing();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows to withdraw fees from campaign contract to contributor
|
/// @dev Allows to withdraw fees from campaign contract to contributor
|
||||||
@ -172,6 +172,6 @@ contract Campaign {
|
|||||||
contributions[msg.sender] = 0;
|
contributions[msg.sender] = 0;
|
||||||
// Send fee share to contributor
|
// Send fee share to contributor
|
||||||
require(eventContract.collateralToken().transfer(msg.sender, fees));
|
require(eventContract.collateralToken().transfer(msg.sender, fees));
|
||||||
FeeWithdrawal(msg.sender, fees);
|
emit FeeWithdrawal(msg.sender, fees);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,6 @@ contract CampaignFactory {
|
|||||||
returns (Campaign campaign)
|
returns (Campaign campaign)
|
||||||
{
|
{
|
||||||
campaign = new Campaign(eventContract, marketFactory, marketMaker, fee, funding, deadline);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ contract StandardMarket is Market {
|
|||||||
eventContract.buyAllOutcomes(_funding);
|
eventContract.buyAllOutcomes(_funding);
|
||||||
funding = _funding;
|
funding = _funding;
|
||||||
stage = Stages.MarketFunded;
|
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
|
/// @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++)
|
for (uint8 i = 0; i < outcomeCount; i++)
|
||||||
require(eventContract.outcomeTokens(i).transfer(creator, eventContract.outcomeTokens(i).balanceOf(this)));
|
require(eventContract.outcomeTokens(i).transfer(creator, eventContract.outcomeTokens(i).balanceOf(this)));
|
||||||
stage = Stages.MarketClosed;
|
stage = Stages.MarketClosed;
|
||||||
MarketClosing();
|
emit MarketClosing();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows market creator to withdraw fees generated by trades
|
/// @dev Allows market creator to withdraw fees generated by trades
|
||||||
@ -91,7 +91,7 @@ contract StandardMarket is Market {
|
|||||||
fees = eventContract.collateralToken().balanceOf(this);
|
fees = eventContract.collateralToken().balanceOf(this);
|
||||||
// Transfer fees
|
// Transfer fees
|
||||||
require(eventContract.collateralToken().transfer(creator, fees));
|
require(eventContract.collateralToken().transfer(creator, fees));
|
||||||
FeeWithdrawal(fees);
|
emit FeeWithdrawal(fees);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows to buy outcome tokens from market maker
|
/// @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
|
// Add outcome token count to market maker net balance
|
||||||
require(int(outcomeTokenCount) >= 0);
|
require(int(outcomeTokenCount) >= 0);
|
||||||
netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].add(int(outcomeTokenCount));
|
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
|
/// @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
|
// Subtract outcome token count from market maker net balance
|
||||||
require(int(outcomeTokenCount) >= 0);
|
require(int(outcomeTokenCount) >= 0);
|
||||||
netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].sub(int(outcomeTokenCount));
|
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
|
/// @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));
|
require(eventContract.outcomeTokens(i).transfer(msg.sender, outcomeTokenCount));
|
||||||
// Send change back to buyer
|
// Send change back to buyer
|
||||||
require(eventContract.collateralToken().transfer(msg.sender, profit));
|
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
|
/// @dev Calculates fee to be paid to market maker
|
||||||
|
@ -20,6 +20,6 @@ contract StandardMarketFactory is MarketFactory {
|
|||||||
returns (Market market)
|
returns (Market market)
|
||||||
{
|
{
|
||||||
market = new StandardMarket(msg.sender, eventContract, marketMaker, fee);
|
market = new StandardMarket(msg.sender, eventContract, marketMaker, fee);
|
||||||
MarketCreation(msg.sender, market, eventContract, marketMaker, fee);
|
emit MarketCreation(msg.sender, market, eventContract, marketMaker, fee);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ contract CentralizedOracle is Oracle {
|
|||||||
// Result is not set yet
|
// Result is not set yet
|
||||||
require(!isSet);
|
require(!isSet);
|
||||||
owner = newOwner;
|
owner = newOwner;
|
||||||
OwnerReplacement(newOwner);
|
emit OwnerReplacement(newOwner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Sets event outcome
|
/// @dev Sets event outcome
|
||||||
@ -65,7 +65,7 @@ contract CentralizedOracle is Oracle {
|
|||||||
require(!isSet);
|
require(!isSet);
|
||||||
isSet = true;
|
isSet = true;
|
||||||
outcome = _outcome;
|
outcome = _outcome;
|
||||||
OutcomeAssignment(_outcome);
|
emit OutcomeAssignment(_outcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Returns if winning outcome is set
|
/// @dev Returns if winning outcome is set
|
||||||
|
@ -22,6 +22,6 @@ contract CentralizedOracleFactory {
|
|||||||
returns (CentralizedOracle centralizedOracle)
|
returns (CentralizedOracle centralizedOracle)
|
||||||
{
|
{
|
||||||
centralizedOracle = new CentralizedOracle(msg.sender, ipfsHash);
|
centralizedOracle = new CentralizedOracle(msg.sender, ipfsHash);
|
||||||
CentralizedOracleCreation(msg.sender, centralizedOracle, ipfsHash);
|
emit CentralizedOracleCreation(msg.sender, centralizedOracle, ipfsHash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ contract DifficultyOracle is Oracle {
|
|||||||
// Block number was reached and outcome was not set yet
|
// Block number was reached and outcome was not set yet
|
||||||
require(block.number >= blockNumber && difficulty == 0);
|
require(block.number >= blockNumber && difficulty == 0);
|
||||||
difficulty = block.difficulty;
|
difficulty = block.difficulty;
|
||||||
OutcomeAssignment(difficulty);
|
emit OutcomeAssignment(difficulty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Returns if difficulty is set
|
/// @dev Returns if difficulty is set
|
||||||
|
@ -22,6 +22,6 @@ contract DifficultyOracleFactory {
|
|||||||
returns (DifficultyOracle difficultyOracle)
|
returns (DifficultyOracle difficultyOracle)
|
||||||
{
|
{
|
||||||
difficultyOracle = new DifficultyOracle(blockNumber);
|
difficultyOracle = new DifficultyOracle(blockNumber);
|
||||||
DifficultyOracleCreation(msg.sender, difficultyOracle, blockNumber);
|
emit DifficultyOracleCreation(msg.sender, difficultyOracle, blockNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ contract FutarchyOracle is Oracle {
|
|||||||
require(market.eventContract().collateralToken().approve(market, funding));
|
require(market.eventContract().collateralToken().approve(market, funding));
|
||||||
market.fund(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
|
/// @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
|
// Redeem collateral token for winning outcome tokens and transfer collateral tokens to creator
|
||||||
categoricalEvent.redeemWinnings();
|
categoricalEvent.redeemWinnings();
|
||||||
require(categoricalEvent.collateralToken().transfer(creator, categoricalEvent.collateralToken().balanceOf(this)));
|
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
|
/// @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;
|
winningMarketIndex = highestIndex;
|
||||||
isSet = true;
|
isSet = true;
|
||||||
OutcomeAssignment(winningMarketIndex);
|
emit OutcomeAssignment(winningMarketIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Returns if winning outcome is set
|
/// @dev Returns if winning outcome is set
|
||||||
|
@ -78,7 +78,7 @@ contract FutarchyOracleFactory {
|
|||||||
fee,
|
fee,
|
||||||
deadline
|
deadline
|
||||||
);
|
);
|
||||||
FutarchyOracleCreation(
|
emit FutarchyOracleCreation(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
futarchyOracle,
|
futarchyOracle,
|
||||||
collateralToken,
|
collateralToken,
|
||||||
|
@ -22,6 +22,6 @@ contract MajorityOracleFactory {
|
|||||||
returns (MajorityOracle majorityOracle)
|
returns (MajorityOracle majorityOracle)
|
||||||
{
|
{
|
||||||
majorityOracle = new MajorityOracle(oracles);
|
majorityOracle = new MajorityOracle(oracles);
|
||||||
MajorityOracleCreation(msg.sender, majorityOracle, oracles);
|
emit MajorityOracleCreation(msg.sender, majorityOracle, oracles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ contract SignedMessageOracle is Oracle {
|
|||||||
&& signer == ecrecover(keccak256(descriptionHash, newSigner, _nonce), v, r, s));
|
&& signer == ecrecover(keccak256(descriptionHash, newSigner, _nonce), v, r, s));
|
||||||
nonce = _nonce;
|
nonce = _nonce;
|
||||||
signer = newSigner;
|
signer = newSigner;
|
||||||
SignerReplacement(newSigner);
|
emit SignerReplacement(newSigner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Sets outcome based on signed message
|
/// @dev Sets outcome based on signed message
|
||||||
@ -77,7 +77,7 @@ contract SignedMessageOracle is Oracle {
|
|||||||
&& signer == ecrecover(keccak256(descriptionHash, _outcome), v, r, s));
|
&& signer == ecrecover(keccak256(descriptionHash, _outcome), v, r, s));
|
||||||
isSet = true;
|
isSet = true;
|
||||||
outcome = _outcome;
|
outcome = _outcome;
|
||||||
OutcomeAssignment(_outcome);
|
emit OutcomeAssignment(_outcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Returns if winning outcome
|
/// @dev Returns if winning outcome
|
||||||
|
@ -26,6 +26,6 @@ contract SignedMessageOracleFactory {
|
|||||||
{
|
{
|
||||||
signedMessageOracle = new SignedMessageOracle(descriptionHash, v, r, s);
|
signedMessageOracle = new SignedMessageOracle(descriptionHash, v, r, s);
|
||||||
address oracle = ecrecover(descriptionHash, v, r, s);
|
address oracle = ecrecover(descriptionHash, v, r, s);
|
||||||
SignedMessageOracleCreation(msg.sender, signedMessageOracle, oracle);
|
emit SignedMessageOracleCreation(msg.sender, signedMessageOracle, oracle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ contract UltimateOracle is Oracle {
|
|||||||
&& forwardedOracle.isOutcomeSet());
|
&& forwardedOracle.isOutcomeSet());
|
||||||
forwardedOutcome = forwardedOracle.getOutcome();
|
forwardedOutcome = forwardedOracle.getOutcome();
|
||||||
forwardedOutcomeSetTimestamp = now;
|
forwardedOutcomeSetTimestamp = now;
|
||||||
ForwardedOracleOutcomeAssignment(forwardedOutcome);
|
emit ForwardedOracleOutcomeAssignment(forwardedOutcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows to challenge the oracle outcome
|
/// @dev Allows to challenge the oracle outcome
|
||||||
@ -98,7 +98,7 @@ contract UltimateOracle is Oracle {
|
|||||||
totalAmount = challengeAmount;
|
totalAmount = challengeAmount;
|
||||||
frontRunner = _outcome;
|
frontRunner = _outcome;
|
||||||
frontRunnerSetTimestamp = now;
|
frontRunnerSetTimestamp = now;
|
||||||
OutcomeChallenge(msg.sender, _outcome);
|
emit OutcomeChallenge(msg.sender, _outcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Allows to challenge the oracle outcome
|
/// @dev Allows to challenge the oracle outcome
|
||||||
@ -122,7 +122,7 @@ contract UltimateOracle is Oracle {
|
|||||||
frontRunner = _outcome;
|
frontRunner = _outcome;
|
||||||
frontRunnerSetTimestamp = now;
|
frontRunnerSetTimestamp = now;
|
||||||
}
|
}
|
||||||
OutcomeVote(msg.sender, _outcome, amount);
|
emit OutcomeVote(msg.sender, _outcome, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Withdraws winnings for user
|
/// @dev Withdraws winnings for user
|
||||||
@ -137,7 +137,7 @@ contract UltimateOracle is Oracle {
|
|||||||
outcomeAmounts[msg.sender][frontRunner] = 0;
|
outcomeAmounts[msg.sender][frontRunner] = 0;
|
||||||
// Transfer earnings to contributor
|
// Transfer earnings to contributor
|
||||||
require(collateralToken.transfer(msg.sender, amount));
|
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
|
/// @dev Checks if time to challenge the outcome is over
|
||||||
|
@ -50,7 +50,7 @@ contract UltimateOracleFactory {
|
|||||||
challengeAmount,
|
challengeAmount,
|
||||||
frontRunnerPeriod
|
frontRunnerPeriod
|
||||||
);
|
);
|
||||||
UltimateOracleCreation(
|
emit UltimateOracleCreation(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
ultimateOracle,
|
ultimateOracle,
|
||||||
oracle,
|
oracle,
|
||||||
|
@ -30,7 +30,7 @@ contract EtherToken is StandardToken {
|
|||||||
{
|
{
|
||||||
balances[msg.sender] = balances[msg.sender].add(msg.value);
|
balances[msg.sender] = balances[msg.sender].add(msg.value);
|
||||||
totalTokens = totalTokens.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
|
/// @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);
|
balances[msg.sender] = balances[msg.sender].sub(value);
|
||||||
totalTokens = totalTokens.sub(value);
|
totalTokens = totalTokens.sub(value);
|
||||||
msg.sender.transfer(value);
|
msg.sender.transfer(value);
|
||||||
Withdrawal(msg.sender, value);
|
emit Withdrawal(msg.sender, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ contract OutcomeToken is StandardToken {
|
|||||||
{
|
{
|
||||||
balances[_for] = balances[_for].add(outcomeTokenCount);
|
balances[_for] = balances[_for].add(outcomeTokenCount);
|
||||||
totalTokens = totalTokens.add(outcomeTokenCount);
|
totalTokens = totalTokens.add(outcomeTokenCount);
|
||||||
Issuance(_for, outcomeTokenCount);
|
emit Issuance(_for, outcomeTokenCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Events contract revokes tokens for address. Returns success
|
/// @dev Events contract revokes tokens for address. Returns success
|
||||||
@ -58,6 +58,6 @@ contract OutcomeToken is StandardToken {
|
|||||||
{
|
{
|
||||||
balances[_for] = balances[_for].sub(outcomeTokenCount);
|
balances[_for] = balances[_for].sub(outcomeTokenCount);
|
||||||
totalTokens = totalTokens.sub(outcomeTokenCount);
|
totalTokens = totalTokens.sub(outcomeTokenCount);
|
||||||
Revocation(_for, outcomeTokenCount);
|
emit Revocation(_for, outcomeTokenCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ contract StandardToken is Token {
|
|||||||
return false;
|
return false;
|
||||||
balances[msg.sender] -= value;
|
balances[msg.sender] -= value;
|
||||||
balances[to] += value;
|
balances[to] += value;
|
||||||
Transfer(msg.sender, to, value);
|
emit Transfer(msg.sender, to, value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ contract StandardToken is Token {
|
|||||||
balances[from] -= value;
|
balances[from] -= value;
|
||||||
allowances[from][msg.sender] -= value;
|
allowances[from][msg.sender] -= value;
|
||||||
balances[to] += value;
|
balances[to] += value;
|
||||||
Transfer(from, to, value);
|
emit Transfer(from, to, value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ contract StandardToken is Token {
|
|||||||
returns (bool)
|
returns (bool)
|
||||||
{
|
{
|
||||||
allowances[msg.sender][spender] = value;
|
allowances[msg.sender][spender] = value;
|
||||||
Approval(msg.sender, spender, value);
|
emit Approval(msg.sender, spender, value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ contract MilestoneTracker {
|
|||||||
) onlyRecipient campaignNotCanceled {
|
) onlyRecipient campaignNotCanceled {
|
||||||
proposedMilestones = _newMilestones;
|
proposedMilestones = _newMilestones;
|
||||||
changingMilestones = true;
|
changingMilestones = true;
|
||||||
NewMilestoneListProposed();
|
emit NewMilestoneListProposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ contract MilestoneTracker {
|
|||||||
function unproposeMilestones() onlyRecipient campaignNotCanceled {
|
function unproposeMilestones() onlyRecipient campaignNotCanceled {
|
||||||
delete proposedMilestones;
|
delete proposedMilestones;
|
||||||
changingMilestones = false;
|
changingMilestones = false;
|
||||||
NewMilestoneListUnproposed();
|
emit NewMilestoneListUnproposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice `onlyDonor` Approves the proposed milestone list
|
/// @notice `onlyDonor` Approves the proposed milestone list
|
||||||
@ -249,7 +249,7 @@ contract MilestoneTracker {
|
|||||||
|
|
||||||
delete proposedMilestones;
|
delete proposedMilestones;
|
||||||
changingMilestones = false;
|
changingMilestones = false;
|
||||||
NewMilestoneListAccepted();
|
emit NewMilestoneListAccepted();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice `onlyRecipientOrLeadLink`Marks a milestone as DONE and
|
/// @notice `onlyRecipientOrLeadLink`Marks a milestone as DONE and
|
||||||
@ -268,7 +268,7 @@ contract MilestoneTracker {
|
|||||||
if (now > milestone.maxCompletionDate) throw;
|
if (now > milestone.maxCompletionDate) throw;
|
||||||
milestone.status = MilestoneStatus.Completed;
|
milestone.status = MilestoneStatus.Completed;
|
||||||
milestone.doneTime = now;
|
milestone.doneTime = now;
|
||||||
ProposalStatusChanged(_idMilestone, milestone.status);
|
emit ProposalStatusChanged(_idMilestone, milestone.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice `onlyReviewer` Approves a specific milestone
|
/// @notice `onlyReviewer` Approves a specific milestone
|
||||||
@ -297,7 +297,7 @@ contract MilestoneTracker {
|
|||||||
(milestone.status != MilestoneStatus.Completed)) throw;
|
(milestone.status != MilestoneStatus.Completed)) throw;
|
||||||
|
|
||||||
milestone.status = MilestoneStatus.AcceptedAndInProgress;
|
milestone.status = MilestoneStatus.AcceptedAndInProgress;
|
||||||
ProposalStatusChanged(_idMilestone, milestone.status);
|
emit ProposalStatusChanged(_idMilestone, milestone.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice `onlyRecipientOrLeadLink` Sends the milestone payment as
|
/// @notice `onlyRecipientOrLeadLink` Sends the milestone payment as
|
||||||
@ -330,7 +330,7 @@ contract MilestoneTracker {
|
|||||||
throw;
|
throw;
|
||||||
|
|
||||||
milestone.status = MilestoneStatus.Canceled;
|
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
|
/// @notice `onlyArbitrator` Forces a milestone to be paid out as long as it
|
||||||
@ -350,7 +350,7 @@ contract MilestoneTracker {
|
|||||||
/// milestones.
|
/// milestones.
|
||||||
function arbitrateCancelCampaign() onlyArbitrator campaignNotCanceled {
|
function arbitrateCancelCampaign() onlyArbitrator campaignNotCanceled {
|
||||||
campaignCanceled = true;
|
campaignCanceled = true;
|
||||||
CampaignCanceled();
|
emit CampaignCanceled();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @dev This internal function is executed when the milestone is paid out
|
// @dev This internal function is executed when the milestone is paid out
|
||||||
@ -362,6 +362,6 @@ contract MilestoneTracker {
|
|||||||
milestone.status = MilestoneStatus.AuthorizedForPayment;
|
milestone.status = MilestoneStatus.AuthorizedForPayment;
|
||||||
if (!milestone.paymentSource.call.value(0)(milestone.payData))
|
if (!milestone.paymentSource.call.value(0)(milestone.payData))
|
||||||
throw;
|
throw;
|
||||||
ProposalStatusChanged(_idMilestone, milestone.status);
|
emit ProposalStatusChanged(_idMilestone, milestone.status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ contract Bounty is PullPayment, Destructible {
|
|||||||
function createTarget() returns(Target) {
|
function createTarget() returns(Target) {
|
||||||
Target target = Target(deployContract());
|
Target target = Target(deployContract());
|
||||||
researchers[target] = msg.sender;
|
researchers[target] = msg.sender;
|
||||||
TargetCreated(target);
|
emit TargetCreated(target);
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
|
|||||||
function() payable {
|
function() payable {
|
||||||
// just being sent some cash?
|
// just being sent some cash?
|
||||||
if (msg.value > 0)
|
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) {
|
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.
|
// first, take the opportunity to check that we're under the daily limit.
|
||||||
if (underLimit(_value)) {
|
if (underLimit(_value)) {
|
||||||
SingleTransact(msg.sender, _value, _to, _data);
|
emit SingleTransact(msg.sender, _value, _to, _data);
|
||||||
// yes - just execute the call.
|
// yes - just execute the call.
|
||||||
if (!_to.call.value(_value)(_data)) {
|
if (!_to.call.value(_value)(_data)) {
|
||||||
throw;
|
throw;
|
||||||
@ -71,7 +71,7 @@ contract MultisigWallet is Multisig, Shareable, DayLimit {
|
|||||||
txs[_r].to = _to;
|
txs[_r].to = _to;
|
||||||
txs[_r].value = _value;
|
txs[_r].value = _value;
|
||||||
txs[_r].data = _data;
|
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)) {
|
if (!txs[_h].to.call.value(txs[_h].value)(txs[_h].data)) {
|
||||||
throw;
|
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];
|
delete txs[_h];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ contract Crowdsale {
|
|||||||
weiRaised = updatedWeiRaised;
|
weiRaised = updatedWeiRaised;
|
||||||
|
|
||||||
token.mint(beneficiary, tokens);
|
token.mint(beneficiary, tokens);
|
||||||
TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);
|
emit TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);
|
||||||
|
|
||||||
forwardFunds();
|
forwardFunds();
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ contract FinalizableCrowdsale is Crowdsale, Ownable {
|
|||||||
require(hasEnded());
|
require(hasEnded());
|
||||||
|
|
||||||
finalization();
|
finalization();
|
||||||
Finalized();
|
emit Finalized();
|
||||||
|
|
||||||
isFinalized = true;
|
isFinalized = true;
|
||||||
}
|
}
|
||||||
|
@ -36,14 +36,14 @@ contract RefundVault is Ownable {
|
|||||||
function close() onlyOwner {
|
function close() onlyOwner {
|
||||||
require(state == State.Active);
|
require(state == State.Active);
|
||||||
state = State.Closed;
|
state = State.Closed;
|
||||||
Closed();
|
emit Closed();
|
||||||
wallet.transfer(this.balance);
|
wallet.transfer(this.balance);
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableRefunds() onlyOwner {
|
function enableRefunds() onlyOwner {
|
||||||
require(state == State.Active);
|
require(state == State.Active);
|
||||||
state = State.Refunding;
|
state = State.Refunding;
|
||||||
RefundsEnabled();
|
emit RefundsEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
function refund(address investor) {
|
function refund(address investor) {
|
||||||
@ -51,6 +51,6 @@ contract RefundVault is Ownable {
|
|||||||
uint256 depositedValue = deposited[investor];
|
uint256 depositedValue = deposited[investor];
|
||||||
deposited[investor] = 0;
|
deposited[investor] = 0;
|
||||||
investor.transfer(depositedValue);
|
investor.transfer(depositedValue);
|
||||||
Refunded(investor, depositedValue);
|
emit Refunded(investor, depositedValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ contract Pausable is Ownable {
|
|||||||
*/
|
*/
|
||||||
function pause() onlyOwner whenNotPaused returns (bool) {
|
function pause() onlyOwner whenNotPaused returns (bool) {
|
||||||
paused = true;
|
paused = true;
|
||||||
Pause();
|
emit Pause();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ contract Pausable is Ownable {
|
|||||||
*/
|
*/
|
||||||
function unpause() onlyOwner whenPaused returns (bool) {
|
function unpause() onlyOwner whenPaused returns (bool) {
|
||||||
paused = false;
|
paused = false;
|
||||||
Unpause();
|
emit Unpause();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ contract Shareable {
|
|||||||
if (pending.ownersDone & ownerIndexBit > 0) {
|
if (pending.ownersDone & ownerIndexBit > 0) {
|
||||||
pending.yetNeeded++;
|
pending.yetNeeded++;
|
||||||
pending.ownersDone -= ownerIndexBit;
|
pending.ownersDone -= ownerIndexBit;
|
||||||
Revoke(msg.sender, _operation);
|
emit Revoke(msg.sender, _operation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ contract Shareable {
|
|||||||
uint256 ownerIndexBit = 2**index;
|
uint256 ownerIndexBit = 2**index;
|
||||||
// make sure we (the message sender) haven't confirmed this operation previously.
|
// make sure we (the message sender) haven't confirmed this operation previously.
|
||||||
if (pending.ownersDone & ownerIndexBit == 0) {
|
if (pending.ownersDone & ownerIndexBit == 0) {
|
||||||
Confirmation(msg.sender, _operation);
|
emit Confirmation(msg.sender, _operation);
|
||||||
// ok - check if count is enough to go ahead.
|
// ok - check if count is enough to go ahead.
|
||||||
if (pending.yetNeeded <= 1) {
|
if (pending.yetNeeded <= 1) {
|
||||||
// enough confirmations: reset and run interior.
|
// enough confirmations: reset and run interior.
|
||||||
|
@ -22,7 +22,7 @@ contract BasicToken is ERC20Basic {
|
|||||||
function transfer(address _to, uint256 _value) {
|
function transfer(address _to, uint256 _value) {
|
||||||
balances[msg.sender] = balances[msg.sender].sub(_value);
|
balances[msg.sender] = balances[msg.sender].sub(_value);
|
||||||
balances[_to] = balances[_to].add(_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) {
|
function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) {
|
||||||
totalSupply = totalSupply.add(_amount);
|
totalSupply = totalSupply.add(_amount);
|
||||||
balances[_to] = balances[_to].add(_amount);
|
balances[_to] = balances[_to].add(_amount);
|
||||||
Mint(_to, _amount);
|
emit Mint(_to, _amount);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ contract MintableToken is StandardToken, Ownable {
|
|||||||
*/
|
*/
|
||||||
function finishMinting() onlyOwner returns (bool) {
|
function finishMinting() onlyOwner returns (bool) {
|
||||||
mintingFinished = true;
|
mintingFinished = true;
|
||||||
MintFinished();
|
emit MintFinished();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ contract StandardToken is ERC20, BasicToken {
|
|||||||
balances[_to] = balances[_to].add(_value);
|
balances[_to] = balances[_to].add(_value);
|
||||||
balances[_from] = balances[_from].sub(_value);
|
balances[_from] = balances[_from].sub(_value);
|
||||||
allowed[_from][msg.sender] = _allowance.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;
|
if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw;
|
||||||
|
|
||||||
allowed[msg.sender][_spender] = _value;
|
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);
|
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[receiver] = balances[receiver].add(nonVested);
|
||||||
balances[_holder] = balances[_holder].sub(nonVested);
|
balances[_holder] = balances[_holder].sub(nonVested);
|
||||||
|
|
||||||
Transfer(_holder, receiver, nonVested);
|
emit Transfer(_holder, receiver, nonVested);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user