@reality.eth/contracts 3.0.1 → 3.0.4

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.
Files changed (55) hide show
  1. package/README.md +9 -3
  2. package/chains/chainid.network.json +7691 -1349
  3. package/chains/deployments/1/ETH/RealityETH-3.0.json +4 -1
  4. package/chains/deployments/1/SWISE/RealityETH_ERC20-3.0.json +7 -0
  5. package/chains/deployments/10/OETH/RealityETH-3.0.json +6 -0
  6. package/chains/deployments/100/GNO/RealityETH_ERC20-3.0.json +7 -0
  7. package/chains/deployments/100/SWISE/RealityETH_ERC20-3.0.json +7 -0
  8. package/chains/deployments/100/XDAI/RealityETH-3.0.json +3 -1
  9. package/chains/deployments/1337702/ETH/RealityETH-3.0.json +6 -0
  10. package/chains/deployments/4/ETH/RealityETH-3.0.json +3 -1
  11. package/chains/deployments/42/ETH/RealityETH-3.0.json +2 -1
  12. package/chains/deployments/56/DEXE/RealityETH_ERC20-3.0.json +7 -0
  13. package/chains/deployments/69/OETH/RealityETH-3.0.json +6 -0
  14. package/chains/deployments/77/XDAI/RealityETH-2.1-rc1.json +1 -3
  15. package/chains/deployments/777/CTH/RealityETH-3.0.json +6 -0
  16. package/chains/supported.json +23 -3
  17. package/development/contracts/Arbitrator.sol +7 -6
  18. package/development/contracts/BalanceHolder.sol +4 -2
  19. package/development/contracts/{BalanceHolderERC20.sol → BalanceHolder_ERC20.sol} +3 -2
  20. package/development/contracts/IArbitrator.sol +4 -7
  21. package/development/contracts/IArbitratorForeignProxy.sol +12 -0
  22. package/development/contracts/IBalanceHolder.sol +3 -1
  23. package/development/contracts/IBalanceHolder_ERC20.sol +11 -0
  24. package/development/contracts/IERC20.sol +1 -1
  25. package/development/contracts/IOwned.sol +1 -1
  26. package/development/contracts/IRealityETH.sol +63 -0
  27. package/development/contracts/IRealityETH_ERC20.sol +67 -0
  28. package/development/contracts/Owned.sol +4 -2
  29. package/development/contracts/RealityETH-3.0.sol +4 -82
  30. package/development/contracts/RealityETH_ERC20-3.0.sol +3 -3
  31. package/generated/chains.json +95 -22
  32. package/generated/contracts.json +89 -7
  33. package/generated/tokens.json +34 -2
  34. package/index.js +9 -4
  35. package/package.json +3 -3
  36. package/scripts/deploy.js +14 -3
  37. package/scripts/fetch_and_reformat_chains_json.js +31 -0
  38. package/scripts/{format_abi.js → format_json.js} +0 -0
  39. package/scripts/generate_chains_json.js +3 -0
  40. package/scripts/send_funds.js +52 -0
  41. package/tokens/CTH.json +7 -0
  42. package/tokens/DEXE.json +7 -0
  43. package/tokens/ETH.json +2 -1
  44. package/tokens/GNO.json +1 -0
  45. package/tokens/OETH.json +8 -0
  46. package/tokens/SWISE.json +8 -0
  47. package/development/contracts/IRealitio.sol +0 -44
  48. package/development/contracts/MultiSigWallet.sol +0 -391
  49. package/development/contracts/Realitio.sol +0 -756
  50. package/development/contracts/RealitioERC20.sol +0 -825
  51. package/development/contracts/RealitioSafeMath256.sol +0 -36
  52. package/development/contracts/RealitioSafeMath32.sol +0 -17
  53. package/development/contracts/Realitio_v2_1.sol +0 -819
  54. package/development/contracts/SplitterWallet.sol +0 -142
  55. package/tests/python/test_wallet.py +0 -185
@@ -1,36 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-only
2
-
3
- pragma solidity ^0.8.6;
4
-
5
- /**
6
- * @title ReailtioSafeMath256
7
- * @dev Math operations with safety checks that throw on error
8
- */
9
- library RealitioSafeMath256 {
10
- function mul(uint256 a, uint256 b) internal pure returns (uint256) {
11
- if (a == 0) {
12
- return 0;
13
- }
14
- uint256 c = a * b;
15
- assert(c / a == b);
16
- return c;
17
- }
18
-
19
- function div(uint256 a, uint256 b) internal pure returns (uint256) {
20
- // assert(b > 0); // Solidity automatically throws when dividing by 0
21
- uint256 c = a / b;
22
- // assert(a == b * c + a % b); // There is no case in which this doesn't hold
23
- return c;
24
- }
25
-
26
- function sub(uint256 a, uint256 b) internal pure returns (uint256) {
27
- assert(b <= a);
28
- return a - b;
29
- }
30
-
31
- function add(uint256 a, uint256 b) internal pure returns (uint256) {
32
- uint256 c = a + b;
33
- assert(c >= a);
34
- return c;
35
- }
36
- }
@@ -1,17 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-only
2
-
3
- pragma solidity ^0.8.6;
4
-
5
- /**
6
- * @title RealitioSafeMath32
7
- * @dev Math operations with safety checks that throw on error
8
- * @dev Copy of SafeMath but for uint32 instead of uint256
9
- * @dev Deleted functions we don't use
10
- */
11
- library RealitioSafeMath32 {
12
- function add(uint32 a, uint32 b) internal pure returns (uint32) {
13
- uint32 c = a + b;
14
- assert(c >= a);
15
- return c;
16
- }
17
- }