ForeignGatewayOnEthereum

Git Source

Inherits: IForeignGatewaySingleMessage

State Variables

MIN_JURORS

uint256 public constant MIN_JURORS = 3;

localDisputeID

uint256 internal localDisputeID = 1;

feeForJuror

uint256[] internal feeForJuror;

chainID

uint256 public chainID;

homeChainID

uint256 public homeChainID;

disputeHashtoDisputeData

mapping(bytes32 => DisputeData) public disputeHashtoDisputeData;

governor

address public governor;

fastbridge

IFastBridgeReceiver public fastbridge;

homeGateway

address public homeGateway;

Functions

onlyFromFastBridge

modifier onlyFromFastBridge();

onlyByGovernor

modifier onlyByGovernor();

constructor

constructor(
    address _governor,
    IFastBridgeReceiver _fastbridge,
    uint256[] memory _feeForJuror,
    address _homeGateway,
    uint256 _homeChainID
);

changeCourtJurorFee

Changes the feeForJuror property value of a specified court.

function changeCourtJurorFee(uint96 _courtID, uint256 _feeForJuror) external onlyByGovernor;

Parameters

NameTypeDescription
_courtIDuint96The ID of the court.
_feeForJuroruint256The new value for the feeForJuror property value.

createDispute

function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);

arbitrationCost

function arbitrationCost(bytes calldata _extraData) public view returns (uint256 cost);

relayRule

Relay the rule call from the home gateway to the arbitrable.

function relayRule(bytes32 _disputeHash, uint256 _ruling, address _relayer) external onlyFromFastBridge;

withdrawFees

function withdrawFees(bytes32 _disputeHash) external;

disputeHashToForeignID

function disputeHashToForeignID(bytes32 _disputeHash) external view returns (uint256);

extraDataToCourtIDMinJurors

function extraDataToCourtIDMinJurors(bytes memory _extraData)
    internal
    view
    returns (uint96 courtID, uint256 minJurors);

Events

OutgoingDispute

event OutgoingDispute(
    bytes32 disputeHash,
    bytes32 blockhash,
    uint256 localDisputeID,
    uint256 _choices,
    bytes _extraData,
    address arbitrable
);

Structs

DisputeData

struct DisputeData {
    uint248 id;
    bool ruled;
    address arbitrable;
    uint256 paid;
    address relayer;
}