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
- chore: .gitignore and removal of unnecessary yarn cache as we are using "zero installs" ([a6cfdd0](https://github.com/kleros/kleros-v2/commit/a6cfdd0))
using SortitionSumTreeFactoryfor SortitionSumTreeFactory.SortitionSumTrees; // Use library functions for sortition sum trees.
11
+
SortitionSumTreeFactory.SortitionSumTrees internal sortitionSumTrees; // The sortition sum trees.
12
+
13
+
struct Dispute {
14
+
// Note that appeal `0` is equivalent to the first round of the dispute.
15
+
uint96 subcourtID; // The ID of the subcourt the dispute is in.
16
+
IArbitrable arbitrated; // The arbitrated arbitrable contract.
17
+
// The number of choices jurors have when voting. This does not include choice `0` which is reserved for "refuse to arbitrate"/"no ruling".
18
+
uint256 numberOfChoices;
19
+
//Period period; // The current period of the dispute.
20
+
uint256 lastPeriodChange; // The last time the period was changed.
21
+
// 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.
22
+
// Vote[][] votes;
23
+
//VoteCounter[] voteCounters; // The vote counters in the form `voteCounters[appeal]`.
24
+
uint256[] tokensAtStakePerJuror; // The amount of tokens at stake for each juror in the form `tokensAtStakePerJuror[appeal]`.
25
+
uint256[] totalFeesForJurors; // The total juror fees paid in the form `totalFeesForJurors[appeal]`.
26
+
uint256 drawsInRound; // A counter of draws made in the current round.
27
+
uint256 commitsInRound; // A counter of commits made in the current round.
28
+
uint256[] votesInEachRound; // A counter of votes made in each round in the form `votesInEachRound[appeal]`.
29
+
// A counter of vote reward repartitions made in each round in the form `repartitionsInEachRound[appeal]`.
30
+
uint256[] repartitionsInEachRound;
31
+
uint256[] penaltiesInEachRound; // The amount of tokens collected from penalties in each round in the form `penaltiesInEachRound[appeal]`.
32
+
bool ruled; // True if the ruling has been executed, false otherwise.
33
+
}
34
+
35
+
Dispute[] public disputes;
36
+
37
+
constructor() {
38
+
sortitionSumTrees.createTree(bytes32(0), 3);
39
+
}
40
+
41
+
// DisputeKitPlurality disputeKit;
42
+
43
+
function getSortitionSumTree(bytes32_key)
44
+
public
45
+
view
46
+
returns (
47
+
uint256K,
48
+
uint256[] memorystack,
49
+
uint256[] memorynodes
50
+
)
51
+
{
52
+
SortitionSumTreeFactory.SortitionSumTree storage tree = sortitionSumTrees.sortitionSumTrees[_key];
53
+
K = tree.K;
54
+
stack = tree.stack;
55
+
nodes = tree.nodes;
56
+
}
57
+
58
+
function getSortitionSumTreeID(bytes32_key, uint256_nodeIndex) publicviewreturns (bytes32ID) {
59
+
ID = sortitionSumTrees.sortitionSumTrees[_key].nodeIndexesToIDs[_nodeIndex];
60
+
}
61
+
62
+
function getDispute(uint256_id) publicviewreturns (Dispute memory) {
0 commit comments