mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix oracle callback example
This commit is contained in:
parent
42a84946d2
commit
81eea45c2d
@ -368,11 +368,11 @@ Another example that uses external function types::
|
||||
contract Oracle {
|
||||
struct Request {
|
||||
bytes data;
|
||||
function(bytes) external callback;
|
||||
function(bytes memory) external callback;
|
||||
}
|
||||
Request[] requests;
|
||||
event NewRequest(uint);
|
||||
function query(bytes data, function(bytes) external callback) {
|
||||
function query(bytes data, function(bytes memory) external callback) {
|
||||
requests.push(Request(data, callback));
|
||||
NewRequest(requests.length - 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user