ArbitrableExampleEthFee

Git Source

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

NameTypeDescription
_arbitratorIArbitratorThe arbitrator to rule on created disputes.
_metaEvidencestringThe 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

NameTypeDescription
_numberOfRulingOptionsuint256Number of ruling options. Must be greater than 1, otherwise there is nothing to choose from.
_arbitratorExtraDatabytesExtra data for the arbitrator.
_evidenceGroupIDuint256Unique identifier of the evidence group that is linked to this dispute.

Returns

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

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

changeMetaEvidence

function changeMetaEvidence(string memory _metaEvidence) external;

Structs

DisputeStruct

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