Skip to content

Commit 11f84f7

Browse files
committed
fix: typos, natspec, small gas optimisation
1 parent 615effc commit 11f84f7

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

contracts/src/arbitration/KlerosCore.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ contract KlerosCore is IArbitratorV2, Initializable, UUPSProxiable {
13981398
error DisputeKitOnly();
13991399
error SortitionModuleOnly();
14001400
error UnsuccessfulCall();
1401-
error InvalidDisputKitParent();
1401+
error InvalidDisputeKitParent();
14021402
error MinStakeLowerThanParentCourt();
14031403
error UnsupportedDisputeKit();
14041404
error InvalidForkingCourtAsParent();

contracts/src/arbitration/SortitionModule.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,14 +343,14 @@ contract SortitionModule is ISortitionModule, Initializable, UUPSProxiable {
343343

344344
if (availablePenalty == 0) return (juror.stakedPnk, newCourtStake, 0); // No penalty to apply.
345345

346-
uint256 currentStake = _stakeOf(_account, _courtID);
346+
uint256 currentStake = newCourtStake;
347347
uint256 newStake = 0;
348348
if (currentStake >= availablePenalty) {
349349
newStake = currentStake - availablePenalty;
350350
}
351351
_setStake(_account, _courtID, 0, availablePenalty, newStake);
352352
pnkBalance = juror.stakedPnk; // updated by _setStake()
353-
newCourtStake = _stakeOf(_account, _courtID); // updated by _setStake()
353+
newCourtStake = newStake;
354354
}
355355

356356
/// @inheritdoc ISortitionModule

contracts/src/arbitration/interfaces/IArbitratorV2.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interface IArbitratorV2 {
5050
) external payable returns (uint256 disputeID);
5151

5252
/// @notice Create a dispute and pay for the fees in a supported ERC20 token.
53-
/// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData)` in the supported ERC20 token.
53+
/// @dev Must be called by the arbitrable contract and pay at least `arbitrationCost(_extraData, _feeToken)` in the supported ERC20 token.
5454
/// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.
5555
/// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).
5656
/// @param _feeToken The ERC20 token used to pay fees.

contracts/src/arbitration/interfaces/ISortitionModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ interface ISortitionModule {
7878
uint256 _newStake
7979
) external;
8080

81-
/// @notice Update the state of the stakes with a PNK reward deposit, called by KC during rewards execution.
81+
/// @notice Update the state of the stakes with a PNK penalty, called by KC during rewards execution.
8282
///
8383
/// @dev `O(n + p * log_k(j))` where
8484
/// `n` is the number of courts the juror has staked in,

contracts/src/arbitration/university/KlerosCoreUniversity.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ contract KlerosCoreUniversity is IArbitratorV2, UUPSProxiable, Initializable {
11731173
error DisputeKitOnly();
11741174
error SortitionModuleOnly();
11751175
error UnsuccessfulCall();
1176-
error InvalidDisputKitParent();
1176+
error InvalidDisputeKitParent();
11771177
error MinStakeLowerThanParentCourt();
11781178
error UnsupportedDisputeKit();
11791179
error InvalidForkingCourtAsParent();

0 commit comments

Comments
 (0)