HomeGateway
Inherits: IHomeGateway
State Variables
governor
address public governor;
arbitrator
IArbitrator public arbitrator;
fastBridgeSender
IFastBridgeSender public fastBridgeSender;
receiverGateway
address public override receiverGateway;
receiverChainID
uint256 public immutable override receiverChainID;
disputeIDtoHash
mapping(uint256 => bytes32) public disputeIDtoHash;
disputeHashtoID
mapping(bytes32 => uint256) public disputeHashtoID;
disputeHashtoRelayedData
mapping(bytes32 => RelayedData) public disputeHashtoRelayedData;
Functions
constructor
constructor(
address _governor,
IArbitrator _arbitrator,
IFastBridgeSender _fastBridgeSender,
address _receiverGateway,
uint256 _receiverChainID
);
changeGovernor
Changes the governor.
function changeGovernor(address _governor) external;
Parameters
Name | Type | Description |
---|---|---|
_governor | address | The address of the new governor. |
changeArbitrator
Changes the arbitrator.
function changeArbitrator(IArbitrator _arbitrator) external;
Parameters
Name | Type | Description |
---|---|---|
_arbitrator | IArbitrator | The address of the new arbitrator. |
changeFastbridge
Changes the fastBridge, useful to increase the claim deposit.
function changeFastbridge(IFastBridgeSender _fastBridgeSender) external;
Parameters
Name | Type | Description |
---|---|---|
_fastBridgeSender | IFastBridgeSender | The address of the new fastBridge. |
changeReceiverGateway
Changes the receiver gateway.
function changeReceiverGateway(address _receiverGateway) external;
Parameters
Name | Type | Description |
---|---|---|
_receiverGateway | address | The address of the new receiver gateway. |
relayCreateDispute
Provide the same parameters as on the foreignChain while creating a dispute. Providing incorrect parameters will create a different hash than on the foreignChain and will not affect the actual dispute/arbitrable's ruling.
function relayCreateDispute(
uint256 _foreignChainID,
bytes32 _foreignBlockHash,
uint256 _foreignDisputeID,
uint256 _choices,
bytes calldata _extraData,
address _arbitrable
) external payable override;
Parameters
Name | Type | Description |
---|---|---|
_foreignChainID | uint256 | foreignChainId |
_foreignBlockHash | bytes32 | foreignBlockHash |
_foreignDisputeID | uint256 | foreignDisputeID |
_choices | uint256 | number of ruling choices |
_extraData | bytes | extraData |
_arbitrable | address | arbitrable |
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) external override;
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 "Not able/wanting to make a decision". |
disputeHashToHomeID
Looks up the local home disputeID for a disputeHash. For cross-chain Evidence standard.
function disputeHashToHomeID(bytes32 _disputeHash) external view override returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_disputeHash | bytes32 | dispute hash |
Structs
RelayedData
struct RelayedData {
uint256 arbitrationCost;
address relayer;
}