-
Notifications
You must be signed in to change notification settings - Fork 0
/
Spark.sol
34 lines (30 loc) · 988 Bytes
/
Spark.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// SPDX-License-Identifier: (MIT or Apache-2.0)
pragma solidity ^0.8.19;
contract Spark {
bytes32 public constant FREQUENCY_HOURLY = keccak256("FREQUENCY_HOURLY");
bytes32 public constant FREQUENCY_DAILY = keccak256("FREQUENCY_DAILY");
function schedule(
address account,
string memory multiaddr,
bytes32 frequency
) public payable {
// TODO: Schedule retrieval testing
// TODO: Perform retrieval testing
}
// This assumes the full Spark protocol has been executed, including fraud detection.
// The result is the outcome of the committee process, and not an individual node's
// test.
function onResult(
address account,
bool retrievable
) private {
(bool success, ) = account.call(
abi.encodeWithSignature(
"sparkCallback(string, bool)",
account,
retrievable
)
);
require(success);
}
}