mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Documentation about emitting events.
This commit is contained in:
@@ -40,7 +40,7 @@ contract StandardToken is Token {
|
||||
if (balance[_from] >= _value && balance[_to] + _value >= balance[_to]) {
|
||||
balance[_from] -= _value;
|
||||
balance[_to] += _value;
|
||||
Transfer(_from, _to, _value);
|
||||
emit Transfer(_from, _to, _value);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -49,7 +49,7 @@ contract StandardToken is Token {
|
||||
|
||||
function approve(address _spender, uint256 _value) public returns (bool success) {
|
||||
m_allowance[msg.sender][_spender] = _value;
|
||||
Approval(msg.sender, _spender, _value);
|
||||
emit Approval(msg.sender, _spender, _value);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user