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:
+6
-4
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user