You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contracts/src/arbitration/DisputeKitPlurality.sol
+26-23Lines changed: 26 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -34,30 +34,30 @@ contract DisputeKitPlurality is AbstractDisputeKit {
34
34
struct Vote {
35
35
address account; // The address of the juror.
36
36
bytes32 commit; // The commit of the juror. For courts with hidden votes.
37
-
uint choice; // The choice of the juror.
37
+
uint256 choice; // The choice of the juror.
38
38
bool voted; // True if the vote has been cast or revealed, false otherwise.
39
39
}
40
40
struct VoteCounter {
41
41
// The choice with the most votes. Note that in the case of a tie, it is the choice that reached the tied number of votes first.
42
-
uint winningChoice;
43
-
mapping(uint=>uint) counts; // The sum of votes for each choice in the form `counts[choice]`.
42
+
uint256 winningChoice;
43
+
mapping(uint256=>uint256) counts; // The sum of votes for each choice in the form `counts[choice]`.
44
44
bool tied; // True if there is a tie, false otherwise.
45
45
}
46
46
struct Dispute {
47
47
//NOTE: arbitrated needed?? But it needs the chainId too, not just an address.
48
48
//IArbitrable arbitrated; // The address of the arbitrable contract.
49
49
bytes arbitratorExtraData; // Extra data for the arbitrator.
50
50
uint256 choices; // The number of choices the arbitrator can choose from.
51
-
uint256 appealPeriodStart; // Time when the appeal funding becomes possible.
51
+
uint256 appealPeriodStart; // Time when the appeal funding becomes possible.
52
52
Vote[][] votes; // The votes in the form `votes[appeal][voteID]`. On each round, a new list is pushed and packed with as many empty votes as there are draws. We use `dispute.votes.length` to get the number of appeals plus 1 for the first round.
53
53
VoteCounter[] voteCounters; // The vote counters in the form `voteCounters[appeal]`.
54
-
uint[] tokensAtStakePerJurorForRound; // The amount of tokens at stake for each juror in the form `tokensAtStakePerJuror[appeal]`.
55
-
uint[] arbitrationFeeForRound; // Fee paid by the arbitrable for the arbitration for each round. Must be equal or higher than arbitration cost.
56
-
uint drawsInCurrentRound; // A counter of draws made in the current round.
57
-
uint commitsInCurrentRound; // A counter of commits made in the current round.
58
-
uint[] votesForRound; // A counter of votes made in each round in the form `votesInEachRound[appeal]`.
59
-
uint[] repartitionsForRound; // A counter of vote reward repartitions made in each round in the form `repartitionsInEachRound[appeal]`.
60
-
uint[] penaltiesForRound; // The amount of tokens collected from penalties in each round in the form `penaltiesInEachRound[appeal]`.
54
+
uint256[] tokensAtStakePerJurorForRound; // The amount of tokens at stake for each juror in the form `tokensAtStakePerJuror[appeal]`.
55
+
uint256[] arbitrationFeeForRound; // Fee paid by the arbitrable for the arbitration for each round. Must be equal or higher than arbitration cost.
56
+
uint256 drawsInCurrentRound; // A counter of draws made in the current round.
57
+
uint256 commitsInCurrentRound; // A counter of commits made in the current round.
58
+
uint256[] votesForRound; // A counter of votes made in each round in the form `votesInEachRound[appeal]`.
59
+
uint256[] repartitionsForRound; // A counter of vote reward repartitions made in each round in the form `repartitionsInEachRound[appeal]`.
60
+
uint256[] penaltiesForRound; // The amount of tokens collected from penalties in each round in the form `penaltiesInEachRound[appeal]`.
61
61
bool ruled; // True if the ruling has been executed, false otherwise.
62
62
uint256 ruling; // Ruling given by the arbitrator.
63
63
}
@@ -74,7 +74,7 @@ contract DisputeKitPlurality is AbstractDisputeKit {
74
74
// * STORAGE * //
75
75
// ************************ //
76
76
77
-
uintpublic constant ALPHA_DIVISOR =1e4; // The number to divide `Court.alpha` by.
77
+
uint256public constant ALPHA_DIVISOR =1e4; // The number to divide `Court.alpha` by.
78
78
79
79
// TODO: extract the necessary interfaces
80
80
MockKlerosCore publicimmutable core;
@@ -124,10 +124,9 @@ contract DisputeKitPlurality is AbstractDisputeKit {
0 commit comments