@@ -136,6 +136,22 @@ contract KlerosCore is IArbitrator {
136
136
event AppealPossible (uint256 indexed _disputeID , IArbitrable indexed _arbitrable );
137
137
event AppealDecision (uint256 indexed _disputeID , IArbitrable indexed _arbitrable );
138
138
event Draw (address indexed _address , uint256 indexed _disputeID , uint256 _roundID , uint256 _voteID );
139
+ event SubcourtCreation (
140
+ uint256 indexed _subcourtID ,
141
+ uint96 indexed _parent ,
142
+ bool _hiddenVotes ,
143
+ uint256 _minStake ,
144
+ uint256 _alpha ,
145
+ uint256 _feeForJuror ,
146
+ uint256 _jurorsForCourtJump ,
147
+ uint256 [4 ] _timesPerPeriod ,
148
+ uint256 _sortitionSumTreeK ,
149
+ uint256 [] _supportedDisputeKits
150
+ );
151
+ event SubcourtModification (uint96 indexed _subcourtID , string _param );
152
+ event DisputeKitCreation (IDisputeKit indexed _disputeKitAddress , uint256 indexed _parent );
153
+ event DisputeKitEnable (uint96 indexed _subcourtID , uint256 indexed _disputeKitID );
154
+ event DisputeKitDisable (uint96 indexed _subcourtID , uint256 indexed _disputeKitID );
139
155
event CourtJump (
140
156
uint256 indexed _disputeID ,
141
157
uint256 indexed _roundID ,
@@ -361,6 +377,18 @@ contract KlerosCore is IArbitrator {
361
377
sortitionSumTrees.createTree (bytes32 (subcourtID), _sortitionSumTreeK);
362
378
// Update the parent.
363
379
courts[_parent].children.push (subcourtID);
380
+ emit SubcourtCreation (
381
+ subcourtID,
382
+ _parent,
383
+ _hiddenVotes,
384
+ _minStake,
385
+ _alpha,
386
+ _feeForJuror,
387
+ _jurorsForCourtJump,
388
+ _timesPerPeriod,
389
+ _sortitionSumTreeK,
390
+ _supportedDisputeKits
391
+ );
364
392
}
365
393
366
394
/** @dev Changes the `minStake` property value of a specified subcourt. Don't set to a value lower than its parent's `minStake` property value.
@@ -377,6 +405,7 @@ contract KlerosCore is IArbitrator {
377
405
}
378
406
379
407
courts[_subcourtID].minStake = _minStake;
408
+ emit SubcourtModification (_subcourtID, "minStake " );
380
409
}
381
410
382
411
/** @dev Changes the `alpha` property value of a specified subcourt.
@@ -385,6 +414,7 @@ contract KlerosCore is IArbitrator {
385
414
*/
386
415
function changeSubcourtAlpha (uint96 _subcourtID , uint256 _alpha ) external onlyByGovernor {
387
416
courts[_subcourtID].alpha = _alpha;
417
+ emit SubcourtModification (_subcourtID, "alpha " );
388
418
}
389
419
390
420
/** @dev Changes the `feeForJuror` property value of a specified subcourt.
@@ -393,6 +423,7 @@ contract KlerosCore is IArbitrator {
393
423
*/
394
424
function changeSubcourtJurorFee (uint96 _subcourtID , uint256 _feeForJuror ) external onlyByGovernor {
395
425
courts[_subcourtID].feeForJuror = _feeForJuror;
426
+ emit SubcourtModification (_subcourtID, "feeForJuror " );
396
427
}
397
428
398
429
/** @dev Changes the `jurorsForCourtJump` property value of a specified subcourt.
@@ -401,6 +432,7 @@ contract KlerosCore is IArbitrator {
401
432
*/
402
433
function changeSubcourtJurorsForJump (uint96 _subcourtID , uint256 _jurorsForCourtJump ) external onlyByGovernor {
403
434
courts[_subcourtID].jurorsForCourtJump = _jurorsForCourtJump;
435
+ emit SubcourtModification (_subcourtID, "jurorsForCourtJump " );
404
436
}
405
437
406
438
/** @dev Changes the `hiddenVotes` property value of a specified subcourt.
@@ -409,6 +441,7 @@ contract KlerosCore is IArbitrator {
409
441
*/
410
442
function changeHiddenVotes (uint96 _subcourtID , bool _hiddenVotes ) external onlyByGovernor {
411
443
courts[_subcourtID].hiddenVotes = _hiddenVotes;
444
+ emit SubcourtModification (_subcourtID, "hiddenVotes " );
412
445
}
413
446
414
447
/** @dev Changes the `timesPerPeriod` property value of a specified subcourt.
@@ -420,6 +453,7 @@ contract KlerosCore is IArbitrator {
420
453
onlyByGovernor
421
454
{
422
455
courts[_subcourtID].timesPerPeriod = _timesPerPeriod;
456
+ emit SubcourtModification (_subcourtID, "timesPerPeriod " );
423
457
}
424
458
425
459
/** @dev Adds/removes court's support for specified dispute kits..
@@ -437,12 +471,14 @@ contract KlerosCore is IArbitrator {
437
471
if (_enable) {
438
472
require (_disputeKitIDs[i] > 0 && _disputeKitIDs[i] < disputeKitNodes.length , "Wrong DK index " );
439
473
subcourt.supportedDisputeKits[_disputeKitIDs[i]] = true ;
474
+ emit DisputeKitEnable (_subcourtID, _disputeKitIDs[i]);
440
475
} else {
441
476
require (
442
477
! (_subcourtID == GENERAL_COURT && disputeKitNodes[_disputeKitIDs[i]].parent == NULL_DISPUTE_KIT),
443
478
"Can't remove root DK support from the general court "
444
479
);
445
480
subcourt.supportedDisputeKits[_disputeKitIDs[i]] = false ;
481
+ emit DisputeKitDisable (_subcourtID, _disputeKitIDs[i]);
446
482
}
447
483
}
448
484
}
0 commit comments