IArbitratorV1
Functions
createDispute
Create a dispute. Must be called by the arbitrable contract. Must be paid at least arbitrationCost(_extraData).
function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);
Parameters
Name | Type | Description |
---|---|---|
_choices | uint256 | Amount of choices the arbitrator can make in this dispute. |
_extraData | bytes | Can be used to give additional info on the dispute to be created. |
Returns
Name | Type | Description |
---|---|---|
disputeID | uint256 | ID 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
Name | Type | Description |
---|---|---|
_extraData | bytes | Can be used to give additional info on the dispute to be created. |
Returns
Name | Type | Description |
---|---|---|
cost | uint256 | Amount to be paid. |
appeal
Appeal a ruling. Note that it has to be called before the arbitrator contract calls rule.
function appeal(uint256 _disputeID, bytes calldata _extraData) external payable;
Parameters
Name | Type | Description |
---|---|---|
_disputeID | uint256 | ID of the dispute to be appealed. |
_extraData | bytes | Can be used to give extra info on the appeal. |
appealCost
Compute the cost of appeal. It is recommended not to increase it often, as it can be higly time and gas consuming for the arbitrated contracts to cope with fee augmentation.
function appealCost(uint256 _disputeID, bytes calldata _extraData) external view returns (uint256 cost);
Parameters
Name | Type | Description |
---|---|---|
_disputeID | uint256 | ID of the dispute to be appealed. |
_extraData | bytes | Can be used to give additional info on the dispute to be created. |
Returns
Name | Type | Description |
---|---|---|
cost | uint256 | Amount to be paid. |
appealPeriod
Compute the start and end of the dispute's current or next appeal period, if possible. If not known or appeal is impossible: should return (0, 0).
function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end);
Parameters
Name | Type | Description |
---|---|---|
_disputeID | uint256 | ID of the dispute. |
Returns
Name | Type | Description |
---|---|---|
start | uint256 | The start of the period. |
end | uint256 | The end of the period. |
disputeStatus
Return the status of a dispute.
function disputeStatus(uint256 _disputeID) external view returns (DisputeStatus status);
Parameters
Name | Type | Description |
---|---|---|
_disputeID | uint256 | ID of the dispute to rule. |
Returns
Name | Type | Description |
---|---|---|
status | DisputeStatus | The status of the dispute. |
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
Name | Type | Description |
---|---|---|
_disputeID | uint256 | ID of the dispute. |
Returns
Name | Type | Description |
---|---|---|
ruling | uint256 | The 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, IArbitrableV1 indexed _arbitrable);
AppealPossible
To be emitted when a dispute can be appealed.
event AppealPossible(uint256 indexed _disputeID, IArbitrableV1 indexed _arbitrable);
AppealDecision
To be emitted when the current ruling is appealed.
event AppealDecision(uint256 indexed _disputeID, IArbitrableV1 indexed _arbitrable);
Enums
DisputeStatus
enum DisputeStatus {
Waiting,
Appealable,
Solved
}