diff options
author | chriseth <chris@ethereum.org> | 2018-02-17 00:32:30 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-22 22:17:42 +0800 |
commit | f58024b9744f557dbc77d5f7bfbc4319bde2e0c7 (patch) | |
tree | abde5538e7cedcf41cafb9fe0681ad505380c496 /std | |
parent | 04c922e5ed038fd5f6d43a364e11b8c459898a93 (diff) | |
download | dexon-solidity-f58024b9744f557dbc77d5f7bfbc4319bde2e0c7.tar.gz dexon-solidity-f58024b9744f557dbc77d5f7bfbc4319bde2e0c7.tar.zst dexon-solidity-f58024b9744f557dbc77d5f7bfbc4319bde2e0c7.zip |
Documentation about emitting events.
Diffstat (limited to 'std')
-rw-r--r-- | std/StandardToken.sol | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/StandardToken.sol b/std/StandardToken.sol index 2986cb56..1b218d67 100644 --- a/std/StandardToken.sol +++ b/std/StandardToken.sol @@ -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; } |