IArbitratorV2
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
Name | Type | Description |
---|---|---|
_numberOfChoices | uint256 | The number of choices the arbitrator can choose from in this dispute. |
_extraData | bytes | Additional 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
Name | Type | Description |
---|---|---|
disputeID | uint256 | The 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
Name | Type | Description |
---|---|---|
_numberOfChoices | uint256 | The number of choices the arbitrator can choose from in this dispute. |
_extraData | bytes | Additional 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). |
_feeToken | IERC20 | The ERC20 token used to pay fees. |
_feeAmount | uint256 | Amount of the ERC20 token used to pay fees. |
Returns
Name | Type | Description |
---|---|---|
disputeID | uint256 | The 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
Name | Type | Description |
---|---|---|
_extraData | bytes | Additional 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
Name | Type | Description |
---|---|---|
cost | uint256 | The 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
Name | Type | Description |
---|---|---|
_extraData | bytes | Additional 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). |
_feeToken | IERC20 | The ERC20 token used to pay fees. |
Returns
Name | Type | Description |
---|---|---|
cost | uint256 | The 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
Name | Type | Description |
---|---|---|
_disputeID | uint256 | The ID of the dispute. |
Returns
Name | Type | Description |
---|---|---|
ruling | uint256 | The current ruling. |
tied | bool | Whether it's a tie or not. |
overridden | bool | Whether 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);