@reality.eth/contracts 3.0.46 → 3.0.48

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 (72) hide show
  1. package/.prettierrc +16 -0
  2. package/abi/solc-0.8.20/RealityETH-4.0.abi.json +1 -0
  3. package/abi/solc-0.8.20/RealityETH_ERC20-4.0.abi.json +1 -0
  4. package/bytecode/Arbitrator.bin +1 -1
  5. package/bytecode/RealityETH-3.0.bin +1 -1
  6. package/bytecode/RealityETH-4.0.bin +1 -0
  7. package/bytecode/RealityETH_ERC20-3.0.bin +1 -1
  8. package/bytecode/RealityETH_ERC20-4.0.bin +1 -0
  9. package/chains/chainid.network.json +5033 -431
  10. package/chains/deployments/300/ETH/RealityETH-3.0.json +7 -0
  11. package/chains/supported.json +3 -0
  12. package/development/contracts/.solhint.json +9 -0
  13. package/development/contracts/Arbitrator.sol +32 -56
  14. package/development/contracts/BalanceHolder.sol +4 -10
  15. package/development/contracts/BalanceHolder_ERC20.sol +5 -11
  16. package/development/contracts/CallbackClient.sol +3 -10
  17. package/development/contracts/ERC20Token.sol +29 -30
  18. package/development/contracts/ExplodingCallbackClient.sol +1 -4
  19. package/development/contracts/IArbitrator.sol +10 -7
  20. package/development/contracts/IArbitratorCore.sol +7 -14
  21. package/development/contracts/IArbitratorCrowdFundable.sol +3 -2
  22. package/development/contracts/IArbitratorErrors.sol +10 -0
  23. package/development/contracts/IArbitratorForeignProxy.sol +1 -1
  24. package/development/contracts/IArbitratorLegacy.sol +3 -3
  25. package/development/contracts/IArbitratorManagement.sol +15 -27
  26. package/development/contracts/IBalanceHolder.sol +3 -3
  27. package/development/contracts/IBalanceHolder_ERC20.sol +5 -5
  28. package/development/contracts/IERC20.sol +4 -5
  29. package/development/contracts/IOwned.sol +3 -3
  30. package/development/contracts/IRealityETH.sol +5 -58
  31. package/development/contracts/IRealityETHCommitReveal.sol +17 -0
  32. package/development/contracts/IRealityETHCommitReveal_ERC20.sol +16 -0
  33. package/development/contracts/IRealityETHCore.sol +135 -0
  34. package/development/contracts/IRealityETHCore_ERC20.sol +149 -0
  35. package/development/contracts/IRealityETHErrors.sol +86 -0
  36. package/development/contracts/IRealityETHErrors_ERC20.sol +13 -0
  37. package/development/contracts/IRealityETH_ERC20.sol +5 -62
  38. package/development/contracts/Owned.sol +4 -6
  39. package/development/contracts/{RealityETH-3.0.sol → RealityETH-4.0.sol} +221 -383
  40. package/development/contracts/{RealityETH_ERC20-3.0.sol → RealityETH_ERC20-4.0.sol} +238 -474
  41. package/development/contracts/RealityETH_ERC20_Factory.sol +47 -42
  42. package/development/contracts/RegisteredWalletArbitrator.sol +8 -15
  43. package/development/contracts/compile.py +3 -0
  44. package/development/scripts/string_to_error.py +111 -0
  45. package/development/version_checksums/check_matches_flat.sh +20 -0
  46. package/development/version_checksums/check_matches_last.sh +37 -0
  47. package/development/version_checksums/log_bytecode_history.sh +41 -0
  48. package/generated/chains.json +33 -5
  49. package/generated/contracts.json +10 -0
  50. package/generated/tokens.json +1 -0
  51. package/non_standard_deployments/zksync/LICENSE +21 -0
  52. package/non_standard_deployments/zksync/README.md +51 -0
  53. package/non_standard_deployments/zksync/deploy/deploy.ts +11 -0
  54. package/non_standard_deployments/zksync/deploy/utils.ts +168 -0
  55. package/non_standard_deployments/zksync/hardhat.config.ts +55 -0
  56. package/non_standard_deployments/zksync/package-lock.json +6295 -0
  57. package/non_standard_deployments/zksync/package.json +34 -0
  58. package/package.json +7 -3
  59. package/scripts/transfer_arbitrator.js +60 -0
  60. package/tests/python/requirements.txt +55 -54
  61. package/tests/python/test.py +150 -50
  62. package/tests/python/test_erc20.py +15 -14
  63. package/tokens/ETH.json +3 -2
  64. package/non_standard_deployments/zksync2/README +0 -21
  65. package/non_standard_deployments/zksync2/contracts/RealityETH_ERC20-3.0.sol +0 -1096
  66. package/non_standard_deployments/zksync2/deploy/deploy.ts +0 -62
  67. package/non_standard_deployments/zksync2/deploy/deploy_erc20.ts +0 -56
  68. package/non_standard_deployments/zksync2/deploy/deploy_mainnet.ts +0 -46
  69. package/non_standard_deployments/zksync2/hardhat.config.ts +0 -27
  70. package/non_standard_deployments/zksync2/package.json +0 -15
  71. package/non_standard_deployments/zksync2/yarn.lock +0 -2898
  72. /package/non_standard_deployments/{zksync2 → zksync}/contracts/RealityETH-3.0.sol +0 -0
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "zksync-hardhat-template",
3
+ "description": "A template for zkSync smart contracts development with Hardhat",
4
+ "private": true,
5
+ "author": "Matter Labs",
6
+ "license": "MIT",
7
+ "repository": "https://github.com/matter-labs/zksync-hardhat-template.git",
8
+ "scripts": {
9
+ "deploy": "hardhat deploy-zksync --script deploy.ts",
10
+ "interact": "hardhat deploy-zksync --script interact.ts",
11
+ "compile": "hardhat compile",
12
+ "clean": "hardhat clean",
13
+ "test": "hardhat test --network hardhat"
14
+ },
15
+ "devDependencies": {
16
+ "@matterlabs/hardhat-zksync-deploy": "^1.1.2",
17
+ "@matterlabs/hardhat-zksync-node": "^1.0.1",
18
+ "@matterlabs/hardhat-zksync-solc": "^1.0.6",
19
+ "@matterlabs/hardhat-zksync-verify": "^1.2.2",
20
+ "@matterlabs/zksync-contracts": "^0.6.1",
21
+ "@nomiclabs/hardhat-etherscan": "^3.1.7",
22
+ "@openzeppelin/contracts": "^4.6.0",
23
+ "@types/chai": "^4.3.4",
24
+ "@types/mocha": "^10.0.1",
25
+ "chai": "^4.3.7",
26
+ "dotenv": "^16.0.3",
27
+ "ethers": "^6.9.2",
28
+ "hardhat": "^2.12.4",
29
+ "mocha": "^10.2.0",
30
+ "ts-node": "^10.9.1",
31
+ "typescript": "^4.9.5",
32
+ "zksync-ethers": "^6.0.0"
33
+ }
34
+ }
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@reality.eth/contracts",
3
- "version": "3.0.46",
3
+ "version": "3.0.48",
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",
7
7
  "generate-contracts": "node scripts/generate_contract_json.js",
8
8
  "generate-tokens": "node scripts/generate_token_json.js",
9
- "generate": "node scripts/generate_token_json.js && node scripts/generate_chains_json.js && node scripts/generate_contract_json.js && node scripts/generate_factory_json.js"
9
+ "generate": "node scripts/generate_token_json.js && node scripts/generate_chains_json.js && node scripts/generate_contract_json.js && node scripts/generate_factory_json.js",
10
+ "fmt": "prettier 'development/contracts/*.sol' -w",
11
+ "fmt:check": "prettier 'development/contracts/*.sol' -c"
10
12
  },
11
13
  "main": "index.js",
12
14
  "keywords": [
@@ -20,6 +22,8 @@
20
22
  "author": "Edmund Edgar (https://reality.eth.link)",
21
23
  "license": "GPL-3.0",
22
24
  "devDependencies": {
25
+ "prettier": "^3.2.4",
26
+ "prettier-plugin-solidity": "^1.3.1",
23
27
  "require-glob": "^3.2.0"
24
28
  },
25
29
  "repository": {
@@ -30,7 +34,7 @@
30
34
  "url": "https://github.com/RealityETH/monorepo/issues"
31
35
  },
32
36
  "homepage": "https://reality.eth.link",
33
- "gitHead": "53818da8004aa8227d545643910a0ebc0bdcd8b5",
37
+ "gitHead": "94611f2560bbff608c8c481d9ed6e65efba70159",
34
38
  "dependencies": {
35
39
  "ethers": "^5.6.8"
36
40
  }
@@ -0,0 +1,60 @@
1
+ const fs = require('fs');
2
+ const ethers = require('ethers');
3
+
4
+ const usage_message = "Usage: node transfer_arbitrator.js <key> <arbitrator> <to> <rpc>";
5
+
6
+ const from = process.argv[2]
7
+
8
+ if (!from) {
9
+ throw new Error(usage_message);
10
+ }
11
+
12
+ const arbitrator = process.argv[3]
13
+ if (!arbitrator) {
14
+ throw new Error(usage_message);
15
+ }
16
+
17
+
18
+ const to = process.argv[4]
19
+ if (!to) {
20
+ throw new Error(usage_message);
21
+ }
22
+
23
+ const rpc = process.argv[5];
24
+ if (!rpc) {
25
+ throw new Error(usage_message);
26
+ }
27
+
28
+ const arb_abi = require('../abi/solc-0.4.25/Arbitrator.abi.json');
29
+
30
+ // For infura we just pass the network name eg kovan
31
+ const provider = (rpc.startsWith('http')) ? new ethers.providers.JsonRpcProvider(rpc) : new ethers.providers.InfuraProvider(rpc);
32
+
33
+ const fpriv = fs.readFileSync(from, 'utf8').replace(/\n/, '')
34
+ const f = new ethers.Wallet(fpriv, provider);
35
+
36
+ transferArbitrator(f, arbitrator, to);
37
+
38
+ async function transferArbitrator(f, arb, to_addr) {
39
+
40
+ const arb_contract = new ethers.Contract(arb, arb_abi, f);
41
+
42
+ const gas_price = await provider.getGasPrice()
43
+ const nonce = await provider.getTransactionCount(f.address, 'latest')
44
+ const gas_limit = 80000;
45
+
46
+ console.log('Using gas price', gas_price);
47
+
48
+ const override_options = {
49
+ gasLimit: 80000,
50
+ gasPrice: gas_price,
51
+ nonce: nonce
52
+ };
53
+
54
+ // console.log(f)
55
+
56
+ console.log('Transferring ownership of arbitration contract', arb, 'to address', to_addr);
57
+ const response = await arb_contract.transferOwnership(to_addr, override_options);
58
+ console.log('sent tx', response.hash)
59
+
60
+ };
@@ -1,62 +1,63 @@
1
- aiohttp==3.7.4.post0
2
- asn1crypto==1.4.0
3
- async-timeout==3.0.1
4
- attrs==21.2.0
5
- base58==2.1.0
6
- bitarray==1.2.2
1
+ aiohttp==3.9.1
2
+ aiosignal==1.3.1
3
+ asn1crypto==1.5.1
4
+ async-timeout==4.0.3
5
+ attrs==23.2.0
6
+ bitarray==2.9.2
7
7
  bitcoin==1.1.42
8
- blake2b-py==0.1.4
9
8
  cached-property==1.5.2
10
- certifi==2021.5.30
11
- cffi==1.14.6
12
- chardet==4.0.0
13
- charset-normalizer==2.0.3
14
- coincurve==15.0.0
15
- cytoolz==0.11.0
16
- eth-abi==2.1.1
17
- eth-account==0.5.4
18
- eth-bloom==1.0.4
19
- eth-hash==0.3.1
20
- eth-keyfile==0.5.1
21
- eth-keys==0.3.3
22
- eth-rlp==0.2.1
23
- eth-tester==0.5.0b4
24
- eth-typing==2.2.2
25
- eth-utils==1.10.0
9
+ certifi==2023.11.17
10
+ cffi==1.16.0
11
+ charset-normalizer==3.3.2
12
+ coincurve==18.0.0
13
+ cytoolz==0.12.2
14
+ eth-abi==4.2.1
15
+ eth-account==0.10.0
16
+ eth-bloom==3.0.0
17
+ eth-hash==0.5.2
18
+ eth-keyfile==0.7.0
19
+ eth-keys==0.4.0
20
+ eth-rlp==1.0.0
21
+ eth-tester==0.10.0b1
22
+ eth-typing==3.5.2
23
+ eth-utils==2.3.1
26
24
  ethereum==2.3.2
27
- future==0.18.2
28
- hexbytes==0.2.1
29
- idna==3.2
30
- ipfshttpclient==0.7.0
31
- jsonschema==3.2.0
32
- lru-dict==1.1.7
33
- multiaddr==0.0.9
34
- multidict==5.1.0
35
- mypy-extensions==0.4.3
36
- netaddr==0.8.0
37
- parsimonious==0.8.1
25
+ frozenlist==1.4.1
26
+ future==0.18.3
27
+ hexbytes==0.3.1
28
+ idna==3.6
29
+ importlib-resources==6.1.1
30
+ jsonschema==4.20.0
31
+ jsonschema-specifications==2023.12.1
32
+ lru-dict==1.2.0
33
+ multidict==6.0.4
34
+ mypy-extensions==1.0.0
35
+ parsimonious==0.9.0
38
36
  pbkdf2==1.3
39
- protobuf==3.17.3
40
- py-ecc==4.1.0
41
- py-evm==0.4.0a4
42
- pycparser==2.20
43
- pycryptodome==3.10.1
37
+ pkgutil-resolve-name==1.3.10
38
+ protobuf==4.25.1
39
+ py-ecc==6.0.0
40
+ py-evm==0.8.0b1
41
+ pycparser==2.21
42
+ pycryptodome==3.19.1
44
43
  pyethash==0.1.27
45
- pyrsistent==0.18.0
46
44
  pysha3==1.0.2
47
- PyYAML==5.4.1
45
+ pyunormalize==15.1.0
46
+ PyYAML==6.0.1
47
+ referencing==0.32.1
48
+ regex==2023.12.25
48
49
  repoze.lru==0.7
49
- requests==2.26.0
50
- rlp==2.0.1
51
- scrypt==0.8.18
52
- semantic-version==2.8.5
53
- six==1.16.0
50
+ requests==2.31.0
51
+ rlp==3.0.0
52
+ rpds-py==0.16.2
53
+ scrypt==0.8.20
54
+ semantic-version==2.10.0
54
55
  sortedcontainers==2.4.0
55
- toolz==0.11.1
56
- trie==2.0.0a5
57
- typing-extensions==3.10.0.0
58
- urllib3==1.26.6
59
- varint==1.0.2
60
- web3==5.21.0
61
- websockets==9.1
62
- yarl==1.6.3
56
+ toolz==0.12.0
57
+ trie==2.2.0
58
+ typing-extensions==4.9.0
59
+ urllib3==2.1.0
60
+ web3==6.13.0
61
+ websockets==12.0
62
+ yarl==1.9.4
63
+ zipp==3.17.0