|
1 | 1 | // SPDX-License-Identifier: MIT
|
2 | 2 |
|
3 |
| -pragma solidity 0.8.18; |
| 3 | +pragma solidity 0.8.24; |
4 | 4 |
|
5 | 5 | import {IArbitrableV2, IArbitratorV2} from "../interfaces/IArbitratorV2.sol";
|
6 | 6 | import {SafeERC20, IERC20} from "../../libraries/SafeERC20.sol";
|
7 |
| -import {Constants} from "../../libraries/Constants.sol"; |
8 |
| -import {OnError} from "../../libraries/Types.sol"; |
9 | 7 | import {UUPSProxiable} from "../../proxy/UUPSProxiable.sol";
|
10 | 8 | import {Initializable} from "../../proxy/Initializable.sol";
|
| 9 | +import "../../libraries/Constants.sol"; |
11 | 10 |
|
12 | 11 | /// @title KlerosCoreRuler
|
13 | 12 | /// Core arbitrator contract for development and testing purposes.
|
@@ -188,7 +187,7 @@ contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {
|
188 | 187 |
|
189 | 188 | // GENERAL_COURT
|
190 | 189 | Court storage court = courts.push();
|
191 |
| - court.parent = Constants.FORKING_COURT; |
| 190 | + court.parent = FORKING_COURT; |
192 | 191 | court.children = new uint256[](0);
|
193 | 192 | court.hiddenVotes = false;
|
194 | 193 | court.minStake = _courtParameters[0];
|
@@ -262,7 +261,7 @@ contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {
|
262 | 261 | uint256 _jurorsForCourtJump,
|
263 | 262 | uint256[4] memory _timesPerPeriod
|
264 | 263 | ) external onlyByGovernor {
|
265 |
| - if (_parent == Constants.FORKING_COURT) revert InvalidForkingCourtAsParent(); |
| 264 | + if (_parent == FORKING_COURT) revert InvalidForkingCourtAsParent(); |
266 | 265 |
|
267 | 266 | uint256 courtID = courts.length;
|
268 | 267 | Court storage court = courts.push();
|
@@ -387,7 +386,7 @@ contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {
|
387 | 386 | ) external payable override returns (uint256 disputeID) {
|
388 | 387 | if (msg.value < arbitrationCost(_extraData)) revert ArbitrationFeesNotEnough();
|
389 | 388 |
|
390 |
| - return _createDispute(_numberOfChoices, _extraData, Constants.NATIVE_CURRENCY, msg.value); |
| 389 | + return _createDispute(_numberOfChoices, _extraData, NATIVE_CURRENCY, msg.value); |
391 | 390 | }
|
392 | 391 |
|
393 | 392 | /// @inheritdoc IArbitratorV2
|
@@ -516,7 +515,7 @@ contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {
|
516 | 515 | Round storage round = dispute.rounds[_round];
|
517 | 516 | uint256 feeReward = round.totalFeesForJurors;
|
518 | 517 | round.sumFeeRewardPaid += feeReward;
|
519 |
| - if (round.feeToken == Constants.NATIVE_CURRENCY) { |
| 518 | + if (round.feeToken == NATIVE_CURRENCY) { |
520 | 519 | // The dispute fees were paid in ETH
|
521 | 520 | payable(account).send(feeReward);
|
522 | 521 | } else {
|
@@ -573,7 +572,7 @@ contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {
|
573 | 572 | uint256 nbVotes = round.totalFeesForJurors / court.feeForJuror;
|
574 | 573 | if (_jump) {
|
575 | 574 | // Jump to parent court.
|
576 |
| - if (dispute.courtID == Constants.GENERAL_COURT) { |
| 575 | + if (dispute.courtID == GENERAL_COURT) { |
577 | 576 | // TODO: Handle the forking when appealed in General court.
|
578 | 577 | cost = NON_PAYABLE_AMOUNT; // Get the cost of the parent court.
|
579 | 578 | } else {
|
@@ -648,19 +647,19 @@ contract KlerosCoreRuler is IArbitratorV2, UUPSProxiable, Initializable {
|
648 | 647 | minJurors := mload(add(_extraData, 0x40))
|
649 | 648 | disputeKitID := mload(add(_extraData, 0x60))
|
650 | 649 | }
|
651 |
| - if (courtID == Constants.FORKING_COURT || courtID >= courts.length) { |
652 |
| - courtID = Constants.GENERAL_COURT; |
| 650 | + if (courtID == FORKING_COURT || courtID >= courts.length) { |
| 651 | + courtID = GENERAL_COURT; |
653 | 652 | }
|
654 | 653 | if (minJurors == 0) {
|
655 |
| - minJurors = Constants.DEFAULT_NB_OF_JURORS; |
| 654 | + minJurors = DEFAULT_NB_OF_JURORS; |
656 | 655 | }
|
657 |
| - if (disputeKitID == Constants.NULL_DISPUTE_KIT) { |
658 |
| - disputeKitID = Constants.DISPUTE_KIT_CLASSIC; // 0 index is not used. |
| 656 | + if (disputeKitID == NULL_DISPUTE_KIT) { |
| 657 | + disputeKitID = DISPUTE_KIT_CLASSIC; // 0 index is not used. |
659 | 658 | }
|
660 | 659 | } else {
|
661 |
| - courtID = Constants.GENERAL_COURT; |
662 |
| - minJurors = Constants.DEFAULT_NB_OF_JURORS; |
663 |
| - disputeKitID = Constants.DISPUTE_KIT_CLASSIC; |
| 660 | + courtID = GENERAL_COURT; |
| 661 | + minJurors = DEFAULT_NB_OF_JURORS; |
| 662 | + disputeKitID = DISPUTE_KIT_CLASSIC; |
664 | 663 | }
|
665 | 664 | }
|
666 | 665 |
|
|
0 commit comments