@reality.eth/contracts 3.0.44 → 3.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chains/supported.json +1 -1
- package/development/contracts/Arbitrator.sol +0 -25
- package/development/contracts/IArbitrator.sol +17 -20
- package/development/contracts/IArbitratorCore.sol +21 -0
- package/development/contracts/IArbitratorCrowdFundable.sol +7 -0
- package/development/contracts/IArbitratorForeignProxy.sol +15 -7
- package/development/contracts/IArbitratorLegacy.sol +9 -0
- package/development/contracts/IArbitratorManagement.sol +37 -0
- package/development/contracts/IBalanceHolder.sol +1 -1
- package/development/contracts/IBalanceHolder_ERC20.sol +1 -1
- package/development/contracts/IERC20.sol +1 -1
- package/development/contracts/IOwned.sol +1 -1
- package/development/contracts/IRealityETH.sol +1 -1
- package/development/contracts/IRealityETH_ERC20.sol +1 -1
- package/generated/chains.json +1 -1
- package/package.json +2 -2
package/chains/supported.json
CHANGED
|
@@ -18,31 +18,6 @@ contract Arbitrator is Owned, IArbitrator {
|
|
|
18
18
|
|
|
19
19
|
string public metadata;
|
|
20
20
|
|
|
21
|
-
event LogRequestArbitration(
|
|
22
|
-
bytes32 indexed question_id,
|
|
23
|
-
uint256 fee_paid,
|
|
24
|
-
address requester,
|
|
25
|
-
uint256 remaining
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
event LogSetRealitio(
|
|
29
|
-
address realitio
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
event LogSetQuestionFee(
|
|
33
|
-
uint256 fee
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
event LogSetDisputeFee(
|
|
38
|
-
uint256 fee
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
event LogSetCustomDisputeFee(
|
|
42
|
-
bytes32 indexed question_id,
|
|
43
|
-
uint256 fee
|
|
44
|
-
);
|
|
45
|
-
|
|
46
21
|
/// @notice Constructor. Sets the deploying address as owner.
|
|
47
22
|
constructor() {
|
|
48
23
|
owner = msg.sender;
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
2
|
|
|
3
|
-
pragma solidity
|
|
3
|
+
pragma solidity 0.8.10;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
/*
|
|
6
|
+
This interface describes the Arbitrator contract originally deployed and managed by the reality.eth team. See below for the various parts it comprises.
|
|
7
|
+
For the minimal interface that will be able to interact with the reality.eth UI as an arbitrator, use IArbitratorCore.
|
|
8
|
+
*/
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function withdraw ( address addr ) external;
|
|
22
|
-
function withdrawERC20 ( IERC20 _token, address addr ) external;
|
|
23
|
-
function callWithdraw ( ) external;
|
|
24
|
-
function setMetaData ( string memory _metadata ) external;
|
|
10
|
+
import './IArbitratorCore.sol';
|
|
11
|
+
|
|
12
|
+
// This provides management functionality to handle ownership, set fees etc.
|
|
13
|
+
import './IArbitratorManagement.sol';
|
|
14
|
+
|
|
15
|
+
// This provides the old function realitycheck(), replaced by realitio().
|
|
16
|
+
import './IArbitratorLegacy.sol';
|
|
17
|
+
|
|
18
|
+
// This provides a function for querying the status of crowd-funded arbitration.
|
|
19
|
+
import './IArbitratorCrowdFundable.sol';
|
|
20
|
+
|
|
21
|
+
interface IArbitrator is IArbitratorCore, IArbitratorLegacy, IArbitratorManagement, IArbitratorCrowdFundable {
|
|
25
22
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.10;
|
|
4
|
+
|
|
5
|
+
import './IRealityETH.sol';
|
|
6
|
+
|
|
7
|
+
interface IArbitratorCore {
|
|
8
|
+
|
|
9
|
+
event LogRequestArbitration(
|
|
10
|
+
bytes32 indexed question_id,
|
|
11
|
+
uint256 fee_paid,
|
|
12
|
+
address requester,
|
|
13
|
+
uint256 remaining
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
function getDisputeFee ( bytes32 question_id ) external view returns ( uint256 );
|
|
17
|
+
function metadata ( ) external view returns ( string memory );
|
|
18
|
+
function realitio ( ) external view returns ( IRealityETH );
|
|
19
|
+
function requestArbitration ( bytes32 question_id, uint256 max_previous ) external payable returns ( bool );
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
2
|
|
|
3
|
-
pragma solidity
|
|
3
|
+
pragma solidity 0.8.10;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
/*
|
|
6
|
+
This defines the features needed by a "foreign proxy" for a cross-chain arbitrator as created by Kleros, for example see
|
|
7
|
+
https://github.com/kleros/cross-chain-realitio-proxy
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
In this arrangement, the "foreign" side is deployed on the chain where reality.eth is, and the "home" side is deployed on the chain where Kleros is.
|
|
10
|
+
|
|
11
|
+
If you implement this you should also inherit and implement the functions in IArbitratorCore, with the exception of requestArbitration() which is done on the other chain.
|
|
12
|
+
|
|
13
|
+
The metadata() string defined in IArbitratorCore should return some JSON to tell the UI that it is dealing with a foreign proxy, like:
|
|
14
|
+
{ foreignProxy: true }
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
interface IArbitratorForeignProxy {
|
|
18
|
+
function foreignProxy() external returns (address);
|
|
19
|
+
function foreignChainId() external returns (uint256);
|
|
12
20
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.10;
|
|
4
|
+
|
|
5
|
+
import './IERC20.sol';
|
|
6
|
+
import './IOwned.sol';
|
|
7
|
+
|
|
8
|
+
interface IArbitratorManagement {
|
|
9
|
+
|
|
10
|
+
event LogSetRealitio(
|
|
11
|
+
address realitio
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
event LogSetQuestionFee(
|
|
15
|
+
uint256 fee
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
event LogSetDisputeFee(
|
|
19
|
+
uint256 fee
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
event LogSetCustomDisputeFee(
|
|
23
|
+
bytes32 indexed question_id,
|
|
24
|
+
uint256 fee
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
function setRealitio ( address addr ) external;
|
|
28
|
+
function setDisputeFee ( uint256 fee ) external;
|
|
29
|
+
function setCustomDisputeFee ( bytes32 question_id, uint256 fee ) external;
|
|
30
|
+
function setQuestionFee ( uint256 fee ) external;
|
|
31
|
+
function submitAnswerByArbitrator ( bytes32 question_id, bytes32 answer, address answerer ) external;
|
|
32
|
+
function withdraw ( address addr ) external;
|
|
33
|
+
function withdrawERC20 ( IERC20 _token, address addr ) external;
|
|
34
|
+
function callWithdraw ( ) external;
|
|
35
|
+
function setMetaData ( string memory _metadata ) external;
|
|
36
|
+
|
|
37
|
+
}
|
package/generated/chains.json
CHANGED
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
"https://ethereum-holesky.publicnode.com",
|
|
377
377
|
"wss://ethereum-holesky.publicnode.com"
|
|
378
378
|
],
|
|
379
|
-
"hostedRPC": "https://
|
|
379
|
+
"hostedRPC": "https://ethereum-holesky.publicnode.com",
|
|
380
380
|
"blockExplorerUrls": [
|
|
381
381
|
"https://holesky.beaconcha.in",
|
|
382
382
|
"https://holesky.otterscan.io",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reality.eth/contracts",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.46",
|
|
4
4
|
"description": "Collection of smart contracts for the Realitio fact verification platform",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate-chains": "node scripts/generate_chains_json.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"url": "https://github.com/RealityETH/monorepo/issues"
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://reality.eth.link",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "53818da8004aa8227d545643910a0ebc0bdcd8b5",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ethers": "^5.6.8"
|
|
36
36
|
}
|