-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #142
- Loading branch information
Showing
2 changed files
with
56 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* @title IArbitrable | ||
* @author Enrique Piqueras - <enrique@kleros.io> | ||
* Bug Bounties: This code hasn't undertaken a bug bounty program yet. | ||
*/ | ||
|
||
pragma solidity ^0.4.15; | ||
|
||
import "./Arbitrator.sol"; | ||
|
||
/** @title IArbitrable | ||
* Arbitrable interface. | ||
* When developing arbitrable contracts, we need to: | ||
* -Define the action taken when a ruling is received by the contract. We should do so in executeRuling. | ||
* -Allow dispute creation. For this a function must: | ||
* -Call arbitrator.createDispute.value(_fee)(_choices,_extraData); | ||
* -Create the event Dispute(_arbitrator,_disputeID,_rulingOptions); | ||
*/ | ||
interface IArbitrable { | ||
/** @dev To be emmited when meta-evidence is submitted. | ||
* @param _metaEvidenceID Unique identifier of meta-evidence. | ||
* @param _evidence A link to the meta-evidence JSON. | ||
*/ | ||
event MetaEvidence(uint indexed _metaEvidenceID, string _evidence); | ||
|
||
/** @dev To be emmited when a dispute is created to link the correct meta-evidence to the disputeID | ||
* @param _arbitrator The arbitrator of the contract. | ||
* @param _disputeID ID of the dispute in the Arbitrator contract. | ||
* @param _metaEvidenceID Unique identifier of meta-evidence. | ||
*/ | ||
event Dispute(Arbitrator indexed _arbitrator, uint indexed _disputeID, uint _metaEvidenceID); | ||
|
||
/** @dev To be raised when evidence are submitted. Should point to the ressource (evidences are not to be stored on chain due to gas considerations). | ||
* @param _arbitrator The arbitrator of the contract. | ||
* @param _disputeID ID of the dispute in the Arbitrator contract. | ||
* @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party. | ||
* @param _evidence A URI to the evidence JSON file whose name should be its keccak256 hash followed by .json. | ||
*/ | ||
event Evidence(Arbitrator indexed _arbitrator, uint indexed _disputeID, address indexed _party, string _evidence); | ||
|
||
/** @dev To be raised when a ruling is given. | ||
* @param _arbitrator The arbitrator giving the ruling. | ||
* @param _disputeID ID of the dispute in the Arbitrator contract. | ||
* @param _ruling The ruling which was given. | ||
*/ | ||
event Ruling(Arbitrator indexed _arbitrator, uint indexed _disputeID, uint _ruling); | ||
|
||
/** @dev Give a ruling for a dispute. Must be called by the arbitrator. | ||
* The purpose of this function is to ensure that the address calling it has the right to rule on the contract. | ||
* @param _disputeID ID of the dispute in the Arbitrator contract. | ||
* @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision". | ||
*/ | ||
function rule(uint _disputeID, uint _ruling) public; | ||
} |