Skip to content

Commit 13ef142

Browse files
unknownunknown1jaybuidl
authored andcommitted
fix(IMetaevidence): remove evidence
1 parent 17696d8 commit 13ef142

File tree

6 files changed

+36
-30
lines changed

6 files changed

+36
-30
lines changed

contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ contract DisputeKitClassic is BaseDisputeKit, IEvidence {
482482
* @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'.
483483
*/
484484
function submitEvidence(uint256 _evidenceGroupID, string calldata _evidence) external {
485-
emit Evidence(core, _evidenceGroupID, msg.sender, _evidence);
485+
emit Evidence(_evidenceGroupID, msg.sender, _evidence);
486486
}
487487

488488
// ************************************* //

contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ contract DisputeKitSybilResistant is BaseDisputeKit, IEvidence {
508508
* @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'.
509509
*/
510510
function submitEvidence(uint256 _evidenceGroupID, string calldata _evidence) external {
511-
emit Evidence(core, _evidenceGroupID, msg.sender, _evidence);
511+
emit Evidence(_evidenceGroupID, msg.sender, _evidence);
512512
}
513513

514514
// ************************************* //

contracts/src/evidence/EvidenceModule.sol

+8-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616
pragma solidity ^0.8;
1717

1818
// TODO: standard interfaces should be placed in a separated repo (?)
19-
import "./IEvidence.sol";
2019
import "../arbitration/IArbitrator.sol";
2120

22-
contract EvidenceModule is IEvidence {
21+
contract EvidenceModule {
2322
IArbitrator public arbitrator;
2423

24+
event Evidence(
25+
IArbitrator indexed _arbitrator,
26+
uint256 indexed _evidenceGroupID,
27+
address indexed _party,
28+
string _evidence
29+
);
30+
2531
constructor(IArbitrator _arbitrator) {
2632
arbitrator = _arbitrator;
2733
}

contracts/src/evidence/IEvidence.sol

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,13 @@ pragma solidity ^0.8.0;
55
import "../arbitration/IArbitrator.sol";
66

77
/** @title IEvidence
8-
* ERC-1497: Evidence Standard
98
*/
109
interface IEvidence {
1110
/**
1211
* @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).
13-
* @param _arbitrator The arbitrator of the contract.
1412
* @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to.
1513
* @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.
1614
* @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'
1715
*/
18-
event Evidence(
19-
IArbitrator indexed _arbitrator,
20-
uint256 indexed _evidenceGroupID,
21-
address indexed _party,
22-
string _evidence
23-
);
16+
event Evidence(uint256 indexed _evidenceGroupID, address indexed _party, string _evidence);
2417
}

contracts/src/evidence/IMetaEvidence.sol

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
pragma solidity ^0.8.0;
44

55
import "../arbitration/IArbitrator.sol";
6-
import "./IEvidence.sol";
76

8-
/** @title IEvidence
9-
* ERC-1497: Evidence Standard
7+
/** @title IMetaEvidence
8+
* ERC-1497: Evidence Standard excluding evidence emission as it will be handled by the arbitrator.
109
*/
11-
interface IMetaEvidence is IEvidence {
10+
interface IMetaEvidence {
1211
/**
1312
* @dev To be emitted when meta-evidence is submitted.
1413
* @param _metaEvidenceID Unique identifier of meta-evidence.

contracts/src/evidence/ModeratedEvidenceModule.sol

+22-14
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,20 @@ contract ModeratedEvidenceModule is IArbitrable, IMetaEvidence {
8181

8282
/* Events */
8383

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+
8498
/** @dev Indicate that a party has to pay a fee or would otherwise be considered as losing.
8599
* @param _evidenceID The ID of the evidence being moderated.
86100
* @param _currentWinner The party who is currently winning.
@@ -314,11 +328,10 @@ contract ModeratedEvidenceModule is IArbitrable, IMetaEvidence {
314328
* @return taken The amount of ETH taken.
315329
* @return remainder The amount of ETH left from the contribution.
316330
*/
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) {
322335
if (_requiredAmount > _available) return (_available, 0); // Take whatever is available, return 0 as leftover ETH.
323336

324337
remainder = _available - _requiredAmount;
@@ -420,15 +433,10 @@ contract ModeratedEvidenceModule is IArbitrable, IMetaEvidence {
420433
* @param _moderationID The ID of the moderation occurence.
421434
* @return paidFees currentWinner feeRewards The moderation information.
422435
*/
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) {
432440
EvidenceData storage evidenceData = evidences[_evidenceID];
433441
Moderation storage moderation = evidenceData.moderations[_moderationID];
434442
return (moderation.paidFees, moderation.currentWinner, moderation.feeRewards);

0 commit comments

Comments
 (0)