10
10
11
11
pragma solidity ^ 0.8 ;
12
12
13
- import ".. /IArbitrator.sol " ;
13
+ import "./IArbitrator.sol " ;
14
14
15
15
/**
16
16
* @title DisputeKit
17
- * Dispute kit abstraction for Kleros v2.
17
+ * An abstraction of the Dispute Kits intended for interfacing with KlerosCore
18
+ * This is not intended for use by the front-end clients for voting or appeal funding to allow for implementation-specific differences in parameters.
18
19
*/
19
- abstract contract DisputeKit {
20
+ interface IDisputeKit {
20
21
// ************************************* //
21
22
// * State Modifiers * //
22
23
// ************************************* //
@@ -31,63 +32,14 @@ abstract contract DisputeKit {
31
32
uint256 _disputeID ,
32
33
uint256 _numberOfChoices ,
33
34
bytes calldata _extraData
34
- ) external virtual ;
35
+ ) external ;
35
36
36
37
/** @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.
37
38
* Note: Access restricted to Kleros Core only.
38
39
* @param _disputeID The ID of the dispute in Kleros Core.
39
40
* @return drawnAddress The drawn address.
40
41
*/
41
- function draw (uint256 _disputeID ) external virtual returns (address drawnAddress );
42
-
43
- /** @dev Sets the caller's commit for the specified votes.
44
- * `O(n)` where
45
- * `n` is the number of votes.
46
- * @param _disputeID The ID of the dispute.
47
- * @param _voteIDs The IDs of the votes.
48
- * @param _commit The commit.
49
- */
50
- function castCommit (
51
- uint256 _disputeID ,
52
- uint256 [] calldata _voteIDs ,
53
- bytes32 _commit
54
- ) external virtual ;
55
-
56
- /** @dev Sets the caller's choices for the specified votes.
57
- * `O(n)` where
58
- * `n` is the number of votes.
59
- * @param _disputeID The ID of the dispute.
60
- * @param _voteIDs The IDs of the votes.
61
- * @param _choice The choice.
62
- * @param _salt The salt for the commit if the votes were hidden.
63
- */
64
- function castVote (
65
- uint256 _disputeID ,
66
- uint256 [] calldata _voteIDs ,
67
- uint256 _choice ,
68
- uint256 _salt
69
- ) external virtual ;
70
-
71
- /** @dev Manages contributions, and appeals a dispute if at least two choices are fully funded.
72
- * Note that the surplus deposit will be reimbursed.
73
- * @param _disputeID Index of the dispute in Kleros Core contract.
74
- * @param _choice A choice that receives funding.
75
- */
76
- function fundAppeal (uint256 _disputeID , uint256 _choice ) external payable virtual ;
77
-
78
- /** @dev Allows to withdraw any reimbursable fees or rewards after the dispute gets resolved.
79
- * @param _disputeID Index of the dispute in Kleros Core contract.
80
- * @param _beneficiary The address whose rewards to withdraw.
81
- * @param _round The round the caller wants to withdraw from.
82
- * @param _choice The ruling option that the caller wants to withdraw from.
83
- * @return amount The withdrawn amount.
84
- */
85
- function withdrawFeesAndRewards (
86
- uint256 _disputeID ,
87
- address payable _beneficiary ,
88
- uint256 _round ,
89
- uint256 _choice
90
- ) external virtual returns (uint256 amount );
42
+ function draw (uint256 _disputeID ) external returns (address drawnAddress );
91
43
92
44
// ************************************* //
93
45
// * Public Views * //
@@ -97,7 +49,7 @@ abstract contract DisputeKit {
97
49
* @param _disputeID The ID of the dispute in Kleros Core.
98
50
* @return ruling The current ruling.
99
51
*/
100
- function currentRuling (uint256 _disputeID ) public view virtual returns (uint256 ruling );
52
+ function currentRuling (uint256 _disputeID ) external view returns (uint256 ruling );
101
53
102
54
/** @dev Gets the degree of coherence of a particular voter. This function is called by Kleros Core in order to determine the amount of the reward.
103
55
* @param _disputeID The ID of the dispute in Kleros Core.
@@ -109,14 +61,14 @@ abstract contract DisputeKit {
109
61
uint256 _disputeID ,
110
62
uint256 _round ,
111
63
uint256 _voteID
112
- ) external view virtual returns (uint256 );
64
+ ) external view returns (uint256 );
113
65
114
66
/** @dev Gets the number of jurors who are eligible to a reward in this round.
115
67
* @param _disputeID The ID of the dispute in Kleros Core.
116
68
* @param _round The ID of the round.
117
69
* @return The number of coherent jurors.
118
70
*/
119
- function getCoherentCount (uint256 _disputeID , uint256 _round ) external view virtual returns (uint256 );
71
+ function getCoherentCount (uint256 _disputeID , uint256 _round ) external view returns (uint256 );
120
72
121
73
/** @dev Returns true if the specified voter was active in this round.
122
74
* @param _disputeID The ID of the dispute in Kleros Core.
@@ -128,7 +80,7 @@ abstract contract DisputeKit {
128
80
uint256 _disputeID ,
129
81
uint256 _round ,
130
82
uint256 _voteID
131
- ) external view virtual returns (bool );
83
+ ) external view returns (bool );
132
84
133
85
function getRoundInfo (
134
86
uint256 _disputeID ,
@@ -137,7 +89,6 @@ abstract contract DisputeKit {
137
89
)
138
90
external
139
91
view
140
- virtual
141
92
returns (
142
93
uint256 winningChoice ,
143
94
bool tied ,
@@ -154,7 +105,6 @@ abstract contract DisputeKit {
154
105
)
155
106
external
156
107
view
157
- virtual
158
108
returns (
159
109
address account ,
160
110
bytes32 commit ,
0 commit comments