-
Notifications
You must be signed in to change notification settings - Fork 0
/
IColabXStorage.sol
104 lines (76 loc) · 2.35 KB
/
IColabXStorage.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.6;
import "./SharedStructs.sol";
interface IColabXStorage {
/**
* Deals
*/
function getDeal(
string memory dealId
) external returns (SharedStructs.Deal memory);
function getDealsForParty(
address party
) external returns (uint256[] memory);
function ensureDeal(
string memory dealId,
SharedStructs.DealMembers memory members,
SharedStructs.DealTimeouts memory timeouts,
SharedStructs.DealPricing memory pricing
) external returns (SharedStructs.Deal memory);
/**
* Agreements
*/
function getAgreement(
string memory dealId
) external returns (SharedStructs.Agreement memory);
function agreeResourceProvider(
string memory dealId
) external returns (SharedStructs.Agreement memory);
function agreeJobCreator(
string memory dealId
) external returns (SharedStructs.Agreement memory);
/**
* Post Results
*/
function getResult(
string memory dealId
) external returns (SharedStructs.Result memory);
function addResult(
string memory dealId,
string memory resultsId,
string memory dataId,
uint256 instructionCount
) external returns (SharedStructs.Result memory);
/**
* Judge Results
*/
function acceptResult(string memory dealId) external;
function checkResult(string memory dealId) external;
/**
* Mediation
*/
function mediationAcceptResult(string memory dealId) external;
function mediationRejectResult(string memory dealId) external;
/**
* Timeouts
*/
function timeoutAgree(string memory dealId) external;
function timeoutSubmitResult(string memory dealId) external;
function timeoutJudgeResult(string memory dealId) external;
function timeoutMediateResult(string memory dealId) external;
/**
* Costings
*/
function getJobCost(string memory dealId) external returns (uint256);
function getResultsCollateral(
string memory dealId
) external returns (uint256);
/**
* Checkers
*/
function hasDeal(string memory dealId) external returns (bool);
function isState(
string memory dealId,
SharedStructs.AgreementState state
) external returns (bool);
}