Skip to content

Commit 3ed7310

Browse files
committed
chore: minor comments tweaks
1 parent 1d37d89 commit 3ed7310

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

contracts/src/arbitration/KlerosCoreBase.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,9 +1079,10 @@ abstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable
10791079
courtJump = true;
10801080

10811081
if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {
1082+
// The current Dispute Kit is not compatible with the new court, jump to another Dispute Kit.
10821083
newDisputeKitID = disputeKits[_round.disputeKitID].getJumpDisputeKitID();
10831084
if (!courts[newCourtID].supportedDisputeKits[newDisputeKitID]) {
1084-
// Switch to classic dispute kit if parent court doesn't support the jump DK.
1085+
// The new Dispute Kit is still not compatible, fall back to `DisputeKitClassic` which is always supported.
10851086
newDisputeKitID = DISPUTE_KIT_CLASSIC;
10861087
}
10871088
disputeKitJump = true;

contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,18 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
180180
owner = _owner;
181181
}
182182

183-
/// @dev Changes the dispute kit ID used for the jump.
184-
/// @param _jumpDisputeKitID The new value for the `jumpDisputeKitID` storage variable.
185-
function changeJumpDisputeKitID(uint256 _jumpDisputeKitID) external onlyByOwner {
186-
jumpDisputeKitID = _jumpDisputeKitID;
187-
}
188-
189183
/// @dev Changes the `core` storage variable.
190184
/// @param _core The new value for the `core` storage variable.
191185
function changeCore(address _core) external onlyByOwner {
192186
core = KlerosCore(_core);
193187
}
194188

189+
/// @dev Changes the dispute kit ID used for the jump.
190+
/// @param _jumpDisputeKitID The new value for the `jumpDisputeKitID` storage variable.
191+
function changeJumpDisputeKitID(uint256 _jumpDisputeKitID) external onlyByOwner {
192+
jumpDisputeKitID = _jumpDisputeKitID;
193+
}
194+
195195
// ************************************* //
196196
// * State Modifiers * //
197197
// ************************************* //
@@ -649,7 +649,9 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
649649
return (_currentNbVotes * 2) + 1;
650650
}
651651

652-
function getJumpDisputeKitID() external view returns (uint256) {
652+
/// @dev Returns the dispute kid ID be used after court jump by Kleros Core.
653+
/// @return The ID of the dispute kit in Kleros Core disputeKits array.
654+
function getJumpDisputeKitID() external view override returns (uint256) {
653655
// Fall back to classic DK in case the jump ID is not defined.
654656
return jumpDisputeKitID == 0 ? DISPUTE_KIT_CLASSIC : jumpDisputeKitID;
655657
}

contracts/src/arbitration/interfaces/IDisputeKit.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ interface IDisputeKit {
127127
uint256 _currentNbVotes
128128
) external view returns (uint256); // TODO: remove previousDisputeKit
129129

130-
/// @dev Returns the dispute kid ID for Kleros Core, that will be used after court jump.
130+
/// @dev Returns the dispute kid ID be used after court jump by Kleros Core.
131131
/// @return The ID of the dispute kit in Kleros Core disputeKits array.
132132
function getJumpDisputeKitID() external view returns (uint256);
133133

0 commit comments

Comments
 (0)