IArbitratorV2

Git Source

Functions

createDispute

Create a dispute and pay for the fees in the native currency, typically ETH. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).

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

Parameters

NameTypeDescription
_numberOfChoicesuint256The number of choices the arbitrator can choose from in this dispute.
_extraDatabytesAdditional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).

Returns

NameTypeDescription
disputeIDuint256The identifier of the dispute created.

createDispute

Create a dispute and pay for the fees in a supported ERC20 token. Must be called by the arbitrable contract. Must pay at least arbitrationCost(_extraData).

function createDispute(uint256 _numberOfChoices, bytes calldata _extraData, IERC20 _feeToken, uint256 _feeAmount)
    external
    returns (uint256 disputeID);

Parameters

NameTypeDescription
_numberOfChoicesuint256The number of choices the arbitrator can choose from in this dispute.
_extraDatabytesAdditional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).
_feeTokenIERC20The ERC20 token used to pay fees.
_feeAmountuint256Amount of the ERC20 token used to pay fees.

Returns

NameTypeDescription
disputeIDuint256The identifier of the dispute created.

arbitrationCost

Compute the cost of arbitration denominated in the native currency, typically ETH. 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
_extraDatabytesAdditional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).

Returns

NameTypeDescription
costuint256The arbitration cost in ETH.

arbitrationCost

Compute the cost of arbitration denominated in _feeToken. 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, IERC20 _feeToken) external view returns (uint256 cost);

Parameters

NameTypeDescription
_extraDatabytesAdditional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).
_feeTokenIERC20The ERC20 token used to pay fees.

Returns

NameTypeDescription
costuint256The arbitration cost in _feeToken.

currentRuling

Gets the current ruling of a specified dispute.

function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);

Parameters

NameTypeDescription
_disputeIDuint256The ID of the dispute.

Returns

NameTypeDescription
rulinguint256The current ruling.
tiedboolWhether it's a tie or not.
overriddenboolWhether the ruling was overridden by appeal funding or not.

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);

AcceptedFeeToken

To be emitted when an ERC20 token is added or removed as a method to pay fees.

event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);