@@ -17,7 +17,7 @@ import {TestERC20} from "../../src/token/TestERC20.sol";
1717import {ArbitrableExample, IArbitrableV2} from "../../src/arbitration/arbitrables/ArbitrableExample.sol " ;
1818import {DisputeTemplateRegistry} from "../../src/arbitration/DisputeTemplateRegistry.sol " ;
1919import "../../src/libraries/Constants.sol " ;
20- import {IKlerosCore, KlerosCoreSnapshotProxy} from "../../src/snapshot-proxy /KlerosCoreSnapshotProxy.sol " ;
20+ import {IKlerosCore, KlerosCoreSnapshotProxy} from "../../src/arbitration/view /KlerosCoreSnapshotProxy.sol " ;
2121
2222contract KlerosCoreTest is Test {
2323 event Initialized (uint64 version );
@@ -156,7 +156,7 @@ contract KlerosCoreTest is Test {
156156 assertEq (address (core.pinakion ()), address (pinakion), "Wrong pinakion address " );
157157 assertEq (core.jurorProsecutionModule (), jurorProsecutionModule, "Wrong jurorProsecutionModule address " );
158158 assertEq (address (core.sortitionModule ()), address (sortitionModule), "Wrong sortitionModule address " );
159- assertEq (core.getDisputeKitsLength (), 2 , "Wrong DK array length " );
159+ assertEq (core.getDisputeKitsLength (), 1 , "Wrong DK array length " );
160160 (
161161 uint96 courtParent ,
162162 bool courtHiddenVotes ,
@@ -197,19 +197,16 @@ contract KlerosCoreTest is Test {
197197 assertEq (courtTimesPerPeriod[i], timesPerPeriod[i], "Wrong times per period " );
198198 }
199199
200- assertEq (address (core.disputeKits (NULL_DISPUTE_KIT)), address (0 ), "Wrong address NULL_DISPUTE_KIT " );
201200 assertEq (
202201 address (core.disputeKits (DISPUTE_KIT_CLASSIC)),
203202 address (disputeKit),
204203 "Wrong address DISPUTE_KIT_CLASSIC "
205204 );
206- assertEq (core.isSupported (FORKING_COURT, NULL_DISPUTE_KIT), false , "Forking court null dk should be false " );
207205 assertEq (
208206 core.isSupported (FORKING_COURT, DISPUTE_KIT_CLASSIC),
209207 false ,
210208 "Forking court classic dk should be false "
211209 );
212- assertEq (core.isSupported (GENERAL_COURT, NULL_DISPUTE_KIT), false , "General court null dk should be false " );
213210 assertEq (core.isSupported (GENERAL_COURT, DISPUTE_KIT_CLASSIC), true , "General court classic dk should be true " );
214211 assertEq (core.paused (), false , "Wrong paused value " );
215212
@@ -438,18 +435,18 @@ contract KlerosCoreTest is Test {
438435 core.addNewDisputeKit (newDK);
439436 vm.prank (governor);
440437 vm.expectEmit (true , true , true , true );
441- emit KlerosCoreBase.DisputeKitCreated (2 , newDK);
438+ emit KlerosCoreBase.DisputeKitCreated (1 , newDK);
442439 core.addNewDisputeKit (newDK);
443- assertEq (address (core.disputeKits (2 )), address (newDK), "Wrong address of new DK " );
444- assertEq (core.getDisputeKitsLength (), 3 , "Wrong DK array length " );
440+ assertEq (address (core.disputeKits (1 )), address (newDK), "Wrong address of new DK " );
441+ assertEq (core.getDisputeKitsLength (), 2 , "Wrong DK array length " );
445442 }
446443
447444 function test_createCourt () public {
448445 vm.expectRevert (KlerosCoreBase.GovernorOnly.selector );
449446 vm.prank (other);
450447 uint256 [] memory supportedDK = new uint256 [](2 );
451448 supportedDK[0 ] = DISPUTE_KIT_CLASSIC;
452- supportedDK[1 ] = 2 ; // New DK is added below.
449+ supportedDK[1 ] = 1 ; // New DK is added below.
453450 core.createCourt (
454451 GENERAL_COURT,
455452 true , // Hidden votes
@@ -506,21 +503,6 @@ contract KlerosCoreTest is Test {
506503 );
507504
508505 uint256 [] memory badSupportedDK = new uint256 [](2 );
509- badSupportedDK[0 ] = NULL_DISPUTE_KIT; // Include NULL_DK to check that it reverts
510- badSupportedDK[1 ] = DISPUTE_KIT_CLASSIC;
511- vm.expectRevert (KlerosCoreBase.WrongDisputeKitIndex.selector );
512- vm.prank (governor);
513- core.createCourt (
514- GENERAL_COURT,
515- true , // Hidden votes
516- 2000 , // min stake
517- 10000 , // alpha
518- 0.03 ether, // fee for juror
519- 50 , // jurors for jump
520- [uint256 (10 ), uint256 (20 ), uint256 (30 ), uint256 (40 )], // Times per period
521- abi.encode (uint256 (4 )), // Sortition extra data
522- badSupportedDK
523- );
524506
525507 badSupportedDK[0 ] = DISPUTE_KIT_CLASSIC;
526508 badSupportedDK[1 ] = 2 ; // Check out of bounds index
@@ -543,7 +525,7 @@ contract KlerosCoreTest is Test {
543525 vm.prank (governor);
544526 core.addNewDisputeKit (newDK);
545527 badSupportedDK = new uint256 [](1 );
546- badSupportedDK[0 ] = 2 ; // Include only sybil resistant dk
528+ badSupportedDK[0 ] = 1 ; // Include only sybil resistant dk
547529 vm.expectRevert (KlerosCoreBase.MustSupportDisputeKitClassic.selector );
548530 vm.prank (governor);
549531 core.createCourt (
@@ -562,7 +544,7 @@ contract KlerosCoreTest is Test {
562544 vm.expectEmit (true , true , true , true );
563545 emit KlerosCoreBase.DisputeKitEnabled (2 , DISPUTE_KIT_CLASSIC, true );
564546 vm.expectEmit (true , true , true , true );
565- emit KlerosCoreBase.DisputeKitEnabled (2 , 2 , true );
547+ emit KlerosCoreBase.DisputeKitEnabled (2 , 1 , true );
566548 vm.expectEmit (true , true , true , true );
567549 emit KlerosCoreBase.CourtCreated (
568550 2 ,
@@ -721,7 +703,7 @@ contract KlerosCoreTest is Test {
721703
722704 function test_enableDisputeKits () public {
723705 DisputeKitSybilResistant newDK = new DisputeKitSybilResistant ();
724- uint256 newDkID = 2 ;
706+ uint256 newDkID = 1 ;
725707 vm.prank (governor);
726708 core.addNewDisputeKit (newDK);
727709
@@ -733,12 +715,7 @@ contract KlerosCoreTest is Test {
733715
734716 vm.expectRevert (KlerosCoreBase.WrongDisputeKitIndex.selector );
735717 vm.prank (governor);
736- supportedDK[0 ] = NULL_DISPUTE_KIT;
737- core.enableDisputeKits (GENERAL_COURT, supportedDK, true );
738-
739- vm.expectRevert (KlerosCoreBase.WrongDisputeKitIndex.selector );
740- vm.prank (governor);
741- supportedDK[0 ] = 3 ; // Out of bounds
718+ supportedDK[0 ] = 2 ; // Out of bounds
742719 core.enableDisputeKits (GENERAL_COURT, supportedDK, true );
743720
744721 vm.expectRevert (KlerosCoreBase.CannotDisableClassicDK.selector );
@@ -821,12 +798,12 @@ contract KlerosCoreTest is Test {
821798 core.addNewDisputeKit (disputeKit);
822799 core.addNewDisputeKit (disputeKit);
823800 core.addNewDisputeKit (disputeKit);
824- extraData = abi.encodePacked (uint256 (50 ), uint256 (41 ), uint256 (6 ));
801+ extraData = abi.encodePacked (uint256 (50 ), uint256 (41 ), uint256 (5 ));
825802
826803 (courtID, minJurors, disputeKitID) = core.extraDataToCourtIDMinJurorsDisputeKit (extraData);
827804 assertEq (courtID, GENERAL_COURT, "Wrong courtID " ); // Value in extra data is out of scope so fall back
828805 assertEq (minJurors, 41 , "Wrong minJurors " );
829- assertEq (disputeKitID, 6 , "Wrong disputeKitID " );
806+ assertEq (disputeKitID, 5 , "Wrong disputeKitID " );
830807 }
831808
832809 // *************************************** //
@@ -1316,7 +1293,7 @@ contract KlerosCoreTest is Test {
13161293 uint256 newFee = 0.01 ether ;
13171294 uint96 newCourtID = 2 ;
13181295 uint256 newNbJurors = 4 ;
1319- uint256 newDkID = 2 ;
1296+ uint256 newDkID = 1 ;
13201297 uint256 [] memory supportedDK = new uint256 [](1 );
13211298 supportedDK[0 ] = DISPUTE_KIT_CLASSIC;
13221299 bytes memory newExtraData = abi.encodePacked (uint256 (newCourtID), newNbJurors, newDkID);
@@ -2082,7 +2059,7 @@ contract KlerosCoreTest is Test {
20822059 DisputeKitClassic newDisputeKit = DisputeKitClassic (address (proxyDk));
20832060
20842061 uint96 newCourtID = 2 ;
2085- uint256 newDkID = 2 ;
2062+ uint256 newDkID = 1 ;
20862063 uint256 [] memory supportedDK = new uint256 [](1 );
20872064 supportedDK[0 ] = DISPUTE_KIT_CLASSIC;
20882065 bytes memory newExtraData = abi.encodePacked (uint256 (newCourtID), DEFAULT_NB_OF_JURORS, newDkID);
0 commit comments