Skip to content

Commit d256d77

Browse files
committed
feat(contracts): add degreeOfCoherency and round to TokenAndETHShift event
1 parent 453ae55 commit d256d77

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

contracts/src/arbitration/KlerosCore.sol

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ contract KlerosCore is IArbitrator {
170170
event TokenAndETHShift(
171171
address indexed _account,
172172
uint256 indexed _disputeID,
173+
uint256 indexed _roundID,
174+
uint256 _degreeOfCoherency,
173175
int256 _tokenAmount,
174176
int256 _ethAmount
175177
);
@@ -811,7 +813,7 @@ contract KlerosCore is IArbitrator {
811813
setStakeForAccount(account, courtIDs[j], 0, 0);
812814
}
813815
}
814-
emit TokenAndETHShift(account, _disputeID, -int256(penalty), 0);
816+
emit TokenAndETHShift(account, _disputeID, _round, degreeOfCoherence, -int256(penalty), 0);
815817

816818
if (i == numberOfVotesInRound - 1) {
817819
if (coherentCount == 0) {
@@ -846,7 +848,14 @@ contract KlerosCore is IArbitrator {
846848
uint256 ethReward = ((round.totalFeesForJurors / coherentCount) * degreeOfCoherence) / ALPHA_DIVISOR;
847849
safeTransfer(account, tokenReward);
848850
payable(account).send(ethReward);
849-
emit TokenAndETHShift(account, _disputeID, int256(tokenReward), int256(ethReward));
851+
emit TokenAndETHShift(
852+
account,
853+
_disputeID,
854+
_round,
855+
degreeOfCoherence,
856+
int256(tokenReward),
857+
int256(ethReward)
858+
);
850859
}
851860
}
852861

0 commit comments

Comments
 (0)