HomeGateway
Inherits: IHomeGateway
State Variables
NATIVE_CURRENCY
IERC20 public constant NATIVE_CURRENCY = IERC20(address(0));
governor
address public governor;
arbitrator
IArbitratorV2 public arbitrator;
veaInbox
IVeaInbox public veaInbox;
foreignChainID
uint256 public immutable override foreignChainID;
foreignGateway
address public override foreignGateway;
feeToken
IERC20 public feeToken;
disputeIDtoHash
mapping(uint256 => bytes32) public disputeIDtoHash;
disputeHashtoID
mapping(bytes32 => uint256) public disputeHashtoID;
disputeHashtoRelayedData
mapping(bytes32 => RelayedData) public disputeHashtoRelayedData;
Functions
constructor
constructor(
address _governor,
IArbitratorV2 _arbitrator,
IVeaInbox _veaInbox,
uint256 _foreignChainID,
address _foreignGateway,
IERC20 _feeToken
);
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(IArbitratorV2 _arbitrator) external;
Parameters
Name | Type | Description |
---|---|---|
_arbitrator | IArbitratorV2 | The address of the new arbitrator. |
changeVea
Changes the vea inbox, useful to increase the claim deposit.
function changeVea(IVeaInbox _veaInbox) external;
Parameters
Name | Type | Description |
---|---|---|
_veaInbox | IVeaInbox | The address of the new vea inbox. |
changeForeignGateway
Changes the foreign gateway.
function changeForeignGateway(address _foreignGateway) external;
Parameters
Name | Type | Description |
---|---|---|
_foreignGateway | address | The address of the new foreign gateway. |
changeFeeToken
Changes the fee token.
function changeFeeToken(IERC20 _feeToken) external;
Parameters
Name | Type | Description |
---|---|---|
_feeToken | IERC20 | The address of the new fee token. |
relayCreateDispute
Relays a dispute creation from the ForeignGateway to the home arbitrator using the same parameters as the ones on the foreign chain. Providing incorrect parameters will create a different hash than on the foreignChain and will not affect the actual dispute/arbitrable's ruling. This function accepts the fees payment in the native currency of the home chain, typically ETH.
function relayCreateDispute(RelayCreateDisputeParams memory _params) external payable override;
Parameters
Name | Type | Description |
---|---|---|
_params | RelayCreateDisputeParams | The parameters of the dispute, see RelayCreateDisputeParams . |
relayCreateDispute
Relays a dispute creation from the ForeignGateway to the home arbitrator using the same parameters as the ones on the foreign chain. Providing incorrect parameters will create a different hash than on the foreignChain and will not affect the actual dispute/arbitrable's ruling. This function accepts the fees payment in the native currency of the home chain, typically ETH.
function relayCreateDispute(RelayCreateDisputeParams memory _params, uint256 _feeAmount) external;
Parameters
Name | Type | Description |
---|---|---|
_params | RelayCreateDisputeParams | The parameters of the dispute, see RelayCreateDisputeParams . |
_feeAmount | uint256 |
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 | 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". |
disputeHashToHomeID
Looks up the local home disputeID for a disputeHash
function disputeHashToHomeID(bytes32 _disputeHash) external view override returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_disputeHash | bytes32 | dispute hash |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | disputeID dispute identifier on the home chain |
receiverGateway
function receiverGateway() external view override returns (address);
Structs
RelayedData
struct RelayedData {
uint256 arbitrationCost;
address relayer;
}