KlerosLiquidToV2Governor
Inherits: IArbitrableV2, ITokenController
State Variables
foreignGateway
IArbitratorV2 public immutable foreignGateway;
klerosLiquid
IKlerosLiquid public immutable klerosLiquid;
governor
address public governor;
klerosLiquidDisputeIDtoGatewayDisputeID
mapping(uint256 => uint256) public klerosLiquidDisputeIDtoGatewayDisputeID;
disputes
mapping(uint256 => DisputeData) public disputes;
frozenTokens
mapping(address => uint256) public frozenTokens;
isDisputeNotified
mapping(uint256 => mapping(uint256 => bool)) public isDisputeNotified;
Functions
onlyByGovernor
modifier onlyByGovernor();
constructor
Constructor. Before this contract is made the new governor of KlerosLiquid, the evidence period of all subcourts has to be set to uint(-1).
constructor(IKlerosLiquid _klerosLiquid, address _governor, IArbitratorV2 _foreignGateway);
Parameters
| Name | Type | Description | 
|---|---|---|
| _klerosLiquid | IKlerosLiquid | The trusted arbitrator to resolve potential disputes. | 
| _governor | address | The trusted governor of the contract. | 
| _foreignGateway | IArbitratorV2 | The trusted gateway that acts as an arbitrator, relaying disputes to v2. | 
executeGovernorProposal
Lets the governor call anything on behalf of the contract.
function executeGovernorProposal(address _destination, uint256 _amount, bytes calldata _data) external onlyByGovernor;
Parameters
| Name | Type | Description | 
|---|---|---|
| _destination | address | The destination of the call. | 
| _amount | uint256 | The value sent with the call. | 
| _data | bytes | The data sent with the call. | 
changeGovernor
Changes the governor storage variable.
function changeGovernor(address _governor) external onlyByGovernor;
Parameters
| Name | Type | Description | 
|---|---|---|
| _governor | address | The new value for the governorstorage variable. | 
relayDispute
Relays disputes from KlerosLiquid to Kleros v2. Only disputes in the evidence period of the initial round can be realyed.
function relayDispute(uint256 _disputeID) external;
Parameters
| Name | Type | Description | 
|---|---|---|
| _disputeID | uint256 | The ID of the dispute as defined in KlerosLiquid. | 
rule
Give a ruling for a dispute. Must be called by the arbitrator. The purpose of this function is to ensure that the address calling it has the right to rule on the contract.
function rule(uint256 _disputeID, uint256 _ruling) public override;
Parameters
| Name | Type | Description | 
|---|---|---|
| _disputeID | uint256 | The identifier of the dispute in the Arbitrator contract. | 
| _ruling | uint256 | Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision". | 
notifyFrozenTokens
Registers jurors' tokens which where locked due to relaying a given dispute. These tokens don't count as locked.
function notifyFrozenTokens(uint256 _disputeID) external;
Parameters
| Name | Type | Description | 
|---|---|---|
| _disputeID | uint256 | The ID of the dispute as defined in KlerosLiquid. | 
proxyPayment
Called when _owner sends ether to the MiniMe Token contract
function proxyPayment(address) external payable override returns (bool allowed);
Parameters
| Name | Type | Description | 
|---|---|---|
| <none> | address | 
Returns
| Name | Type | Description | 
|---|---|---|
| allowed | bool | True if the ether is accepted, false if it throws | 
onTransfer
Notifies the controller about a token transfer allowing the controller to react if desired
function onTransfer(address _from, address, uint256 _amount) external view override returns (bool allowed);
Parameters
| Name | Type | Description | 
|---|---|---|
| _from | address | The origin of the transfer | 
| <none> | address | |
| _amount | uint256 | The amount of the transfer | 
Returns
| Name | Type | Description | 
|---|---|---|
| allowed | bool | False if the controller does not authorize the transfer | 
onApprove
Notifies the controller about an approval allowing the controller to react if desired
function onApprove(address, address, uint256) external pure override returns (bool allowed);
Parameters
| Name | Type | Description | 
|---|---|---|
| <none> | address | |
| <none> | address | |
| <none> | uint256 | 
Returns
| Name | Type | Description | 
|---|---|---|
| allowed | bool | False if the controller does not authorize the approval | 
receive
This contract should be able to receive arbitration fees from KlerosLiquid.
receive() external payable;
Structs
DisputeData
struct DisputeData {
    uint256 klerosLiquidDisputeID;
    bool ruled;
}