IArbitratorV2

Git Source

Functions

createDispute

Create a dispute. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).

function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);

Parameters

NameTypeDescription
_choicesuint256Amount of choices the arbitrator can make in this dispute.
_extraDatabytesCan be used to give additional info on the dispute to be created.

Returns

NameTypeDescription
disputeIDuint256The identifier of the dispute created.

arbitrationCost

Compute the cost of arbitration. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.

function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);

Parameters

NameTypeDescription
_extraDatabytesCan be used to give additional info on the dispute to be created.

Returns

NameTypeDescription
costuint256Required cost of arbitration.

currentRuling

Return the current ruling of a dispute. This is useful for parties to know if they should appeal.

function currentRuling(uint256 _disputeID) external view returns (uint256 ruling);

Parameters

NameTypeDescription
_disputeIDuint256The identifer of the dispute.

Returns

NameTypeDescription
rulinguint256The ruling which has been given or the one which will be given if there is no appeal.

Events

DisputeCreation

To be emitted when a dispute is created.

event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);

Ruling

To be raised when a ruling is given.

event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);