-
Notifications
You must be signed in to change notification settings - Fork 14
/
OracleInterface.sol
38 lines (30 loc) · 1.09 KB
/
OracleInterface.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
35
36
37
38
pragma solidity ^0.4.17;
contract OracleInterface {
enum MatchOutcome {
Pending, //match has not been fought to decision
Underway, //match has started & is underway
Draw, //anything other than a clear winner (e.g. cancelled)
Decided //index of participant who is the winner
}
function getPendingMatches() public view returns (bytes32[]);
function getAllMatches() public view returns (bytes32[]);
function matchExists(bytes32 _matchId) public view returns (bool);
function getMatch(bytes32 _matchId) public view returns (
bytes32 id,
string name,
string participants,
uint8 participantCount,
uint date,
MatchOutcome outcome,
int8 winner);
function getMostRecentMatch(bool _pending) public view returns (
bytes32 id,
string name,
string participants,
uint participantCount,
uint date,
MatchOutcome outcome,
int8 winner);
function testConnection() public pure returns (bool);
function addTestData() public;
}