You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contracts/src/gateway/HomeGateway.sol
+20-10
Original file line number
Diff line number
Diff line change
@@ -76,28 +76,28 @@ contract HomeGateway is IHomeGateway {
76
76
// ************************************* //
77
77
78
78
/**
79
-
* @dev Provide the same parameters as on the originalChain while creating a dispute. Providing incorrect parameters will create a different hash than on the originalChain and will not affect the actual dispute/arbitrable's ruling.
80
-
* @param _originalChainID originalChainId
81
-
* @param _originalBlockHash originalBlockHash
82
-
* @param _originalDisputeID originalDisputeID
79
+
* @dev 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.
80
+
* @param _foreignChainID foreignChainId
81
+
* @param _foreignBlockHash foreignBlockHash
82
+
* @param _foreignDisputeID foreignDisputeID
83
83
* @param _choices number of ruling choices
84
84
* @param _extraData extraData
85
85
* @param _arbitrable arbitrable
86
86
*/
87
87
function relayCreateDispute(
88
-
uint256_originalChainID,
89
-
bytes32_originalBlockHash,
90
-
uint256_originalDisputeID,
88
+
uint256_foreignChainID,
89
+
bytes32_foreignBlockHash,
90
+
uint256_foreignDisputeID,
91
91
uint256_choices,
92
92
bytescalldata_extraData,
93
93
address_arbitrable
94
94
) externalpayableoverride {
95
95
bytes32 disputeHash =keccak256(
96
96
abi.encodePacked(
97
-
_originalChainID,
98
-
_originalBlockHash,
97
+
_foreignChainID,
98
+
_foreignBlockHash,
99
99
"createDispute",
100
-
_originalDisputeID,
100
+
_foreignDisputeID,
101
101
_choices,
102
102
_extraData,
103
103
_arbitrable
@@ -118,6 +118,12 @@ contract HomeGateway is IHomeGateway {
118
118
emitDispute(arbitrator, disputeID, 0, 0);
119
119
}
120
120
121
+
/**
122
+
* @dev Give a ruling for a dispute. Must be called by the arbitrator.
123
+
* The purpose of this function is to ensure that the address calling it has the right to rule on the contract.
124
+
* @param _disputeID ID of the dispute in the Arbitrator contract.
125
+
* @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision".
126
+
*/
121
127
function rule(uint256_disputeID, uint256_ruling) externaloverride {
* @dev 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.
20
+
* @param _foreignChainID foreignChainId
21
+
* @param _foreignBlockHash foreignBlockHash
22
+
* @param _foreignDisputeID foreignDisputeID
23
+
* @param _choices number of ruling choices
24
+
* @param _extraData extraData
25
+
* @param _arbitrable arbitrable
26
+
*/
18
27
function relayCreateDispute(
19
-
uint256_originalChainID,
20
-
bytes32_originalBlockHash,
21
-
uint256_originalDisputeID,
28
+
uint256_foreignChainID,
29
+
bytes32_foreignBlockHash,
30
+
uint256_foreignDisputeID,
22
31
uint256_choices,
23
32
bytescalldata_extraData,
24
33
address_arbitrable
25
34
) externalpayable;
26
35
27
-
// For cross-chain Evidence standard
36
+
/**
37
+
* @dev Looks up the local home disputeID for a disputeHash. For cross-chain Evidence standard.
38
+
* @param _disputeHash dispute hash
39
+
*/
28
40
function disputeHashToHomeID(bytes32_disputeHash) externalviewreturns (uint256);
0 commit comments