aboutsummaryrefslogtreecommitdiffstats
path: root/docs/types.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-17 00:32:30 +0800
committerchriseth <chris@ethereum.org>2018-02-22 22:17:42 +0800
commitf58024b9744f557dbc77d5f7bfbc4319bde2e0c7 (patch)
treeabde5538e7cedcf41cafb9fe0681ad505380c496 /docs/types.rst
parent04c922e5ed038fd5f6d43a364e11b8c459898a93 (diff)
downloaddexon-solidity-f58024b9744f557dbc77d5f7bfbc4319bde2e0c7.tar.gz
dexon-solidity-f58024b9744f557dbc77d5f7bfbc4319bde2e0c7.tar.zst
dexon-solidity-f58024b9744f557dbc77d5f7bfbc4319bde2e0c7.zip
Documentation about emitting events.
Diffstat (limited to 'docs/types.rst')
-rw-r--r--docs/types.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/types.rst b/docs/types.rst
index 55eaa69a..3611bc3e 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -470,7 +470,7 @@ Example that shows how to use internal function types::
Another example that uses external function types::
- pragma solidity ^0.4.11;
+ pragma solidity ^0.4.20; // should actually be 0.4.21
contract Oracle {
struct Request {
@@ -481,7 +481,7 @@ Another example that uses external function types::
event NewRequest(uint);
function query(bytes data, function(bytes memory) external callback) public {
requests.push(Request(data, callback));
- NewRequest(requests.length - 1);
+ emit NewRequest(requests.length - 1);
}
function reply(uint requestID, bytes response) public {
// Here goes the check that the reply comes from a trusted source