ArbitrableExampleEthFee
Inherits: IArbitrableV2
State Variables
governor
address public governor;
arbitrator
IArbitratorV2 public arbitrator;
disputeTemplates
uint256 public disputeTemplates;
externalIDtoLocalID
mapping(uint256 => uint256) public externalIDtoLocalID;
disputes
DisputeStruct[] public disputes;
Functions
constructor
Constructor
constructor(IArbitratorV2 _arbitrator, string memory _templateData);
Parameters
Name | Type | Description |
---|---|---|
_arbitrator | IArbitratorV2 | The arbitrator to rule on created disputes. |
_templateData | string | The dispute template data. |
createDispute
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 _templateId, string calldata _action, bytes calldata _arbitratorExtraData)
external
payable
returns (uint256 disputeID);
Parameters
Name | Type | Description |
---|---|---|
_templateId | uint256 | The identifier of the dispute template. Should not be used with _templateUri. |
_action | string | The action that requires arbitration. |
_arbitratorExtraData | bytes | Extra data for the arbitrator. |
Returns
Name | Type | Description |
---|---|---|
disputeID | uint256 | Dispute 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
Name | Type | Description |
---|---|---|
_externalDisputeID | uint256 | ID of the dispute in arbitrator contract. |
_ruling | uint256 | The ruling choice of the arbitration. |
changeDisputeTemplate
function changeDisputeTemplate(string memory _templateData) external;
changeArbitrator
function changeArbitrator(IArbitratorV2 _arbitrator) external;
Events
Action
event Action(string indexed _action);
Structs
DisputeStruct
struct DisputeStruct {
bool isRuled;
uint256 ruling;
uint256 numberOfRulingOptions;
}