1010
1111pragma solidity ^ 0.8 ;
1212
13- import ".. /IArbitrator.sol " ;
13+ import "./IArbitrator.sol " ;
1414
1515/**
1616 * @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.
1819 */
19- abstract contract DisputeKit {
20+ interface IDisputeKit {
2021 // ************************************* //
2122 // * State Modifiers * //
2223 // ************************************* //
@@ -31,63 +32,14 @@ abstract contract DisputeKit {
3132 uint256 _disputeID ,
3233 uint256 _numberOfChoices ,
3334 bytes calldata _extraData
34- ) external virtual ;
35+ ) external ;
3536
3637 /** @dev Draws the juror from the sortition tree. The drawn address is picked up by Kleros Core.
3738 * Note: Access restricted to Kleros Core only.
3839 * @param _disputeID The ID of the dispute in Kleros Core.
3940 * @return drawnAddress The drawn address.
4041 */
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 );
9143
9244 // ************************************* //
9345 // * Public Views * //
@@ -97,7 +49,7 @@ abstract contract DisputeKit {
9749 * @param _disputeID The ID of the dispute in Kleros Core.
9850 * @return ruling The current ruling.
9951 */
100- function currentRuling (uint256 _disputeID ) public view virtual returns (uint256 ruling );
52+ function currentRuling (uint256 _disputeID ) external view returns (uint256 ruling );
10153
10254 /** @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.
10355 * @param _disputeID The ID of the dispute in Kleros Core.
@@ -109,14 +61,14 @@ abstract contract DisputeKit {
10961 uint256 _disputeID ,
11062 uint256 _round ,
11163 uint256 _voteID
112- ) external view virtual returns (uint256 );
64+ ) external view returns (uint256 );
11365
11466 /** @dev Gets the number of jurors who are eligible to a reward in this round.
11567 * @param _disputeID The ID of the dispute in Kleros Core.
11668 * @param _round The ID of the round.
11769 * @return The number of coherent jurors.
11870 */
119- function getCoherentCount (uint256 _disputeID , uint256 _round ) external view virtual returns (uint256 );
71+ function getCoherentCount (uint256 _disputeID , uint256 _round ) external view returns (uint256 );
12072
12173 /** @dev Returns true if the specified voter was active in this round.
12274 * @param _disputeID The ID of the dispute in Kleros Core.
@@ -128,7 +80,7 @@ abstract contract DisputeKit {
12880 uint256 _disputeID ,
12981 uint256 _round ,
13082 uint256 _voteID
131- ) external view virtual returns (bool );
83+ ) external view returns (bool );
13284
13385 function getRoundInfo (
13486 uint256 _disputeID ,
@@ -137,7 +89,6 @@ abstract contract DisputeKit {
13789 )
13890 external
13991 view
140- virtual
14192 returns (
14293 uint256 winningChoice ,
14394 bool tied ,
@@ -154,7 +105,6 @@ abstract contract DisputeKit {
154105 )
155106 external
156107 view
157- virtual
158108 returns (
159109 address account ,
160110 bytes32 commit ,
0 commit comments