KlerosLiquidToV2Governor
Inherits: IArbitrable, ITokenController
State Variables
foreignGateway
IArbitrator 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, IArbitrator _foreignGateway);
Parameters
Name | Type | Description |
---|---|---|
_klerosLiquid | IKlerosLiquid | The trusted arbitrator to resolve potential disputes. |
_governor | address | The trusted governor of the contract. |
_foreignGateway | IArbitrator | 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 governor storage 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. Can only be called by the arbitrator. TRUSTED. Triggers rule() from KlerosLiquid to the arbitrable contract which created the dispute.
function rule(uint256 _disputeID, uint256 _ruling) public;
Parameters
Name | Type | Description |
---|---|---|
_disputeID | uint256 | ID of the dispute in the arbitrator contract. |
_ruling | uint256 | Ruling given by the arbitrator. Note that 0 is reserved for "Refused to arbitrate". |
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 _owner) external payable returns (bool allowed);
Parameters
Name | Type | Description |
---|---|---|
_owner | address | The address that sent the ether to create tokens. |
Returns
Name | Type | Description |
---|---|---|
allowed | bool | Whether the operation should be allowed or not. |
onTransfer
Notifies the controller about a token transfer allowing the controller to react if desired.
function onTransfer(address _from, address _to, uint256 _amount) external returns (bool allowed);
Parameters
Name | Type | Description |
---|---|---|
_from | address | The origin of the transfer. |
_to | address | The destination of the transfer. |
_amount | uint256 | The amount of the transfer. |
Returns
Name | Type | Description |
---|---|---|
allowed | bool | Whether the operation should be allowed or not. |
onApprove
Notifies the controller about an approval allowing the controller to react if desired.
function onApprove(address _owner, address _spender, uint256 _amount) external returns (bool allowed);
Parameters
Name | Type | Description |
---|---|---|
_owner | address | The address that calls approve() . |
_spender | address | The spender in the approve() call. |
_amount | uint256 | The amount in the approve() call. |
Returns
Name | Type | Description |
---|---|---|
allowed | bool | Whether the operation should be allowed or not. |
receive
This contract should be able to receive arbitration fees from KlerosLiquid.
receive() external payable;
Structs
DisputeData
struct DisputeData {
uint256 klerosLiquidDisputeID;
bool ruled;
}