@@ -81,6 +81,20 @@ contract ModeratedEvidenceModule is IArbitrable, IMetaEvidence {
81
81
82
82
/* Events */
83
83
84
+ /**
85
+ * @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).
86
+ * @param _arbitrator The arbitrator of the contract.
87
+ * @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to.
88
+ * @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.
89
+ * @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'
90
+ */
91
+ event Evidence (
92
+ IArbitrator indexed _arbitrator ,
93
+ uint256 indexed _evidenceGroupID ,
94
+ address indexed _party ,
95
+ string _evidence
96
+ );
97
+
84
98
/** @dev Indicate that a party has to pay a fee or would otherwise be considered as losing.
85
99
* @param _evidenceID The ID of the evidence being moderated.
86
100
* @param _currentWinner The party who is currently winning.
@@ -314,11 +328,10 @@ contract ModeratedEvidenceModule is IArbitrable, IMetaEvidence {
314
328
* @return taken The amount of ETH taken.
315
329
* @return remainder The amount of ETH left from the contribution.
316
330
*/
317
- function calculateContribution (uint256 _available , uint256 _requiredAmount )
318
- internal
319
- pure
320
- returns (uint256 taken , uint256 remainder )
321
- {
331
+ function calculateContribution (
332
+ uint256 _available ,
333
+ uint256 _requiredAmount
334
+ ) internal pure returns (uint256 taken , uint256 remainder ) {
322
335
if (_requiredAmount > _available) return (_available, 0 ); // Take whatever is available, return 0 as leftover ETH.
323
336
324
337
remainder = _available - _requiredAmount;
@@ -420,15 +433,10 @@ contract ModeratedEvidenceModule is IArbitrable, IMetaEvidence {
420
433
* @param _moderationID The ID of the moderation occurence.
421
434
* @return paidFees currentWinner feeRewards The moderation information.
422
435
*/
423
- function getModerationInfo (bytes32 _evidenceID , uint256 _moderationID )
424
- external
425
- view
426
- returns (
427
- uint256 [3 ] memory paidFees ,
428
- Party currentWinner ,
429
- uint256 feeRewards
430
- )
431
- {
436
+ function getModerationInfo (
437
+ bytes32 _evidenceID ,
438
+ uint256 _moderationID
439
+ ) external view returns (uint256 [3 ] memory paidFees , Party currentWinner , uint256 feeRewards ) {
432
440
EvidenceData storage evidenceData = evidences[_evidenceID];
433
441
Moderation storage moderation = evidenceData.moderations[_moderationID];
434
442
return (moderation.paidFees, moderation.currentWinner, moderation.feeRewards);
0 commit comments