ArbitrableExampleEthFee
Inherits: IArbitrable, IMetaEvidence
State Variables
META_EVIDENCE_ID
uint256 META_EVIDENCE_ID = 0;
governor
address public governor;
arbitrator
IArbitrator public immutable arbitrator;
externalIDtoLocalID
mapping(uint256 => uint256) public externalIDtoLocalID;
disputes
DisputeStruct[] public disputes;
Functions
constructor
Constructor
constructor(IArbitrator _arbitrator, string memory _metaEvidence);
Parameters
Name | Type | Description |
---|---|---|
_arbitrator | IArbitrator | The arbitrator to rule on created disputes. |
_metaEvidence | string | The URI of the meta evidence object for evidence submissions requests. |
createDispute
TRUSTED. Calls createDispute function of the specified arbitrator to create a dispute. Note that we don’t need to check that msg.value is enough to pay arbitration fees as it’s the responsibility of the arbitrator contract.
function createDispute(uint256 _numberOfRulingOptions, bytes calldata _arbitratorExtraData, uint256 _evidenceGroupID)
external
payable
returns (uint256 disputeID);
Parameters
Name | Type | Description |
---|---|---|
_numberOfRulingOptions | uint256 | Number of ruling options. Must be greater than 1, otherwise there is nothing to choose from. |
_arbitratorExtraData | bytes | Extra data for the arbitrator. |
_evidenceGroupID | uint256 | Unique identifier of the evidence group that is linked to this dispute. |
Returns
Name | Type | Description |
---|---|---|
disputeID | uint256 | Dispute id (on arbitrator side) of the dispute created. |
rule
To be called by the arbitrator of the dispute, to declare the winning ruling.
function rule(uint256 _externalDisputeID, uint256 _ruling) external override;
Parameters
Name | Type | Description |
---|---|---|
_externalDisputeID | uint256 | ID of the dispute in arbitrator contract. |
_ruling | uint256 | The ruling choice of the arbitration. |
changeMetaEvidence
function changeMetaEvidence(string memory _metaEvidence) external;
Structs
DisputeStruct
struct DisputeStruct {
bool isRuled;
uint256 ruling;
uint256 numberOfRulingOptions;
}