DisputeResolver

Git Source

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

NameTypeDescription
_arbitratorIArbitratorTarget 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

NameTypeDescription
_arbitratorExtraDatabytesExtra data for the arbitrator of the dispute.
_metaevidenceURIstringLink to metaevidence of the dispute.
_numberOfRulingOptionsuint256Number of ruling options.

Returns

NameTypeDescription
disputeIDuint256Dispute 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

NameTypeDescription
_externalDisputeIDuint256ID of the dispute in arbitrator contract.
_rulinguint256The ruling choice of the arbitration.

Structs

DisputeStruct

struct DisputeStruct {
    bytes arbitratorExtraData;
    bool isRuled;
    uint256 ruling;
    uint256 numberOfRulingOptions;
}