Documentation about emitting events.

This commit is contained in:
chriseth
2018-02-22 15:17:42 +01:00
parent 04c922e5ed
commit f58024b974
6 changed files with 26 additions and 24 deletions
+6 -4
View File
@@ -724,10 +724,12 @@ All non-indexed arguments will be stored in the data part of the log.
);
function deposit(bytes32 _id) public payable {
// Any call to this function (even deeply nested) can
// be detected from the JavaScript API by filtering
// for `Deposit` to be called.
Deposit(msg.sender, _id, msg.value);
// Events are emitted using `emit`, followed by
// the name of the event and the arguments
// (if any) in parentheses. Any such invocation
// (even deeply nested) can be detected from
// the JavaScript API by filtering for `Deposit`.
emit Deposit(msg.sender, _id, msg.value);
}
}