DisputeResolver
Inherits: IArbitrable, IMetaEvidence
State Variables
arbitrator
IArbitrator public immutable arbitrator;
disputes
DisputeStruct[] public disputes;
externalIDtoLocalID
mapping(uint256 => uint256) public externalIDtoLocalID;
Functions
constructor
Constructor
constructor(IArbitrator _arbitrator);
Parameters
Name | Type | Description |
---|---|---|
_arbitrator | IArbitrator | Target global arbitrator for any disputes. |
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(
bytes calldata _arbitratorExtraData,
string calldata _metaevidenceURI,
uint256 _numberOfRulingOptions
) external payable returns (uint256 disputeID);
Parameters
Name | Type | Description |
---|---|---|
_arbitratorExtraData | bytes | Extra data for the arbitrator of the dispute. |
_metaevidenceURI | string | Link to metaevidence of the dispute. |
_numberOfRulingOptions | uint256 | Number of ruling options. |
Returns
Name | Type | Description |
---|---|---|
disputeID | uint256 | Dispute id (on arbitrator side) of the created dispute. |
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. |
Structs
DisputeStruct
struct DisputeStruct {
bytes arbitratorExtraData;
bool isRuled;
uint256 ruling;
uint256 numberOfRulingOptions;
}