Skip to content

Commit 17323f7

Browse files
committed
chore: renamed the constant MIN_JURORS to DEFAULT_NB_OF_JURORS
1 parent 1b3a45f commit 17323f7

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

contracts/src/arbitration/KlerosCore.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ contract KlerosCore is IArbitrator {
9595
uint96 public constant GENERAL_COURT = 1; // Index of the default (general) court.
9696
uint256 public constant NULL_DISPUTE_KIT = 0; // Null pattern to indicate a top-level DK which has no parent.
9797
uint256 public constant DISPUTE_KIT_CLASSIC = 1; // Index of the default DK. 0 index is skipped.
98-
uint256 public constant MIN_JURORS = 3; // The global default minimum number of jurors in a dispute.
98+
uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.
9999
uint256 public constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.
100100
uint256 public constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.
101101
uint256 public constant SEARCH_ITERATIONS = 10; // Number of iterations to search for suitable parent court before jumping to the top court.
@@ -1109,14 +1109,14 @@ contract KlerosCore is IArbitrator {
11091109
courtID = GENERAL_COURT;
11101110
}
11111111
if (minJurors == 0) {
1112-
minJurors = MIN_JURORS;
1112+
minJurors = DEFAULT_NB_OF_JURORS;
11131113
}
11141114
if (disputeKitID == NULL_DISPUTE_KIT || disputeKitID >= disputeKitNodes.length) {
11151115
disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used.
11161116
}
11171117
} else {
11181118
courtID = GENERAL_COURT;
1119-
minJurors = MIN_JURORS;
1119+
minJurors = DEFAULT_NB_OF_JURORS;
11201120
disputeKitID = DISPUTE_KIT_CLASSIC;
11211121
}
11221122
}

contracts/src/gateway/ForeignGateway.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ contract ForeignGateway is IForeignGateway {
4545
// * Storage * //
4646
// ************************************* //
4747

48-
uint256 public constant MIN_JURORS = 3; // The global default minimum number of jurors in a dispute.
48+
uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.
4949
uint256 internal localDisputeID = 1; // The disputeID must start from 1 as the KlerosV1 proxy governor depends on this implementation. We now also depend on localDisputeID not ever being zero.
5050
mapping(uint96 => uint256) public feeForJuror; // feeForJuror[courtID], it mirrors the value on KlerosCore.
5151
address public governor;
@@ -222,10 +222,10 @@ contract ForeignGateway is IForeignGateway {
222222
minJurors := mload(add(_extraData, 0x40))
223223
}
224224
if (feeForJuror[courtID] == 0) courtID = 0;
225-
if (minJurors == 0) minJurors = MIN_JURORS;
225+
if (minJurors == 0) minJurors = DEFAULT_NB_OF_JURORS;
226226
} else {
227227
courtID = 0;
228-
minJurors = MIN_JURORS;
228+
minJurors = DEFAULT_NB_OF_JURORS;
229229
}
230230
}
231231
}

contracts/src/gateway/ForeignGatewayOnGnosis.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ contract ForeignGatewayOnGnosis is IForeignGateway {
4646
// * Storage * //
4747
// ************************************* //
4848

49-
uint256 public constant MIN_JURORS = 3; // The global default minimum number of jurors in a dispute.
49+
uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.
5050
IERC20 public immutable weth; // WETH token on xDai.
5151
uint256 internal localDisputeID = 1; // The disputeID must start from 1 as the KlerosV1 proxy governor depends on this implementation. We now also depend on localDisputeID not ever being zero.
5252
mapping(uint96 => uint256) public feeForJuror; // feeForJuror[courtID], it mirrors the value on KlerosCore.
@@ -226,10 +226,10 @@ contract ForeignGatewayOnGnosis is IForeignGateway {
226226
minJurors := mload(add(_extraData, 0x40))
227227
}
228228
if (feeForJuror[courtID] == 0) courtID = 0;
229-
if (minJurors == 0) minJurors = MIN_JURORS;
229+
if (minJurors == 0) minJurors = DEFAULT_NB_OF_JURORS;
230230
} else {
231231
courtID = 0;
232-
minJurors = MIN_JURORS;
232+
minJurors = DEFAULT_NB_OF_JURORS;
233233
}
234234
}
235235
}

contracts/src/kleros-v1/kleros-liquid-xdai/xKlerosLiquidV2.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ contract xKlerosLiquidV2 is Initializable, ITokenController, IArbitrator {
138138

139139
// General Constants
140140
uint256 public constant MAX_STAKE_PATHS = 4; // The maximum number of stake paths a juror can have.
141-
uint256 public constant MIN_JURORS = 3; // The global default minimum number of jurors in a dispute.
141+
uint256 public constant DEFAULT_NB_OF_JURORS = 3; // The default number of jurors in a dispute.
142142
uint256 public constant NON_PAYABLE_AMOUNT = (2 ** 256 - 2) / 2; // An amount higher than the supply of ETH.
143143
uint256 public constant ALPHA_DIVISOR = 1e4; // The number to divide `Court.alpha` by.
144144
// General Contracts
@@ -579,10 +579,10 @@ contract xKlerosLiquidV2 is Initializable, ITokenController, IArbitrator {
579579
minJurors := mload(add(_extraData, 0x40))
580580
}
581581
if (subcourtID >= courts.length) subcourtID = 0;
582-
if (minJurors == 0) minJurors = MIN_JURORS;
582+
if (minJurors == 0) minJurors = DEFAULT_NB_OF_JURORS;
583583
} else {
584584
subcourtID = 0;
585-
minJurors = MIN_JURORS;
585+
minJurors = DEFAULT_NB_OF_JURORS;
586586
}
587587
}
588588

0 commit comments

Comments
 (0)