@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.
- package/.prettierrc +16 -0
- package/abi/solc-0.8.20/RealityETH-4.0.abi.json +1 -0
- package/abi/solc-0.8.20/RealityETH_ERC20-4.0.abi.json +1 -0
- package/bytecode/Arbitrator.bin +1 -1
- package/bytecode/RealityETH-3.0.bin +1 -1
- package/bytecode/RealityETH-4.0.bin +1 -0
- package/bytecode/RealityETH_ERC20-3.0.bin +1 -1
- package/bytecode/RealityETH_ERC20-4.0.bin +1 -0
- package/chains/chainid.network.json +5033 -431
- package/chains/deployments/300/ETH/RealityETH-3.0.json +7 -0
- package/chains/supported.json +3 -0
- package/development/contracts/.solhint.json +9 -0
- package/development/contracts/Arbitrator.sol +32 -56
- package/development/contracts/BalanceHolder.sol +4 -10
- package/development/contracts/BalanceHolder_ERC20.sol +5 -11
- package/development/contracts/CallbackClient.sol +3 -10
- package/development/contracts/ERC20Token.sol +29 -30
- package/development/contracts/ExplodingCallbackClient.sol +1 -4
- package/development/contracts/IArbitrator.sol +10 -7
- package/development/contracts/IArbitratorCore.sol +7 -14
- package/development/contracts/IArbitratorCrowdFundable.sol +3 -2
- package/development/contracts/IArbitratorErrors.sol +10 -0
- package/development/contracts/IArbitratorForeignProxy.sol +1 -1
- package/development/contracts/IArbitratorLegacy.sol +3 -3
- package/development/contracts/IArbitratorManagement.sol +15 -27
- package/development/contracts/IBalanceHolder.sol +3 -3
- package/development/contracts/IBalanceHolder_ERC20.sol +5 -5
- package/development/contracts/IERC20.sol +4 -5
- package/development/contracts/IOwned.sol +3 -3
- package/development/contracts/IRealityETH.sol +5 -58
- package/development/contracts/IRealityETHCommitReveal.sol +17 -0
- package/development/contracts/IRealityETHCommitReveal_ERC20.sol +16 -0
- package/development/contracts/IRealityETHCore.sol +135 -0
- package/development/contracts/IRealityETHCore_ERC20.sol +149 -0
- package/development/contracts/IRealityETHErrors.sol +86 -0
- package/development/contracts/IRealityETHErrors_ERC20.sol +13 -0
- package/development/contracts/IRealityETH_ERC20.sol +5 -62
- package/development/contracts/Owned.sol +4 -6
- package/development/contracts/{RealityETH-3.0.sol → RealityETH-4.0.sol} +221 -383
- package/development/contracts/{RealityETH_ERC20-3.0.sol → RealityETH_ERC20-4.0.sol} +238 -474
- package/development/contracts/RealityETH_ERC20_Factory.sol +47 -42
- package/development/contracts/RegisteredWalletArbitrator.sol +8 -15
- package/development/contracts/compile.py +3 -0
- package/development/scripts/string_to_error.py +111 -0
- package/development/version_checksums/check_matches_flat.sh +20 -0
- package/development/version_checksums/check_matches_last.sh +37 -0
- package/development/version_checksums/log_bytecode_history.sh +41 -0
- package/generated/chains.json +33 -5
- package/generated/contracts.json +10 -0
- package/generated/tokens.json +1 -0
- package/non_standard_deployments/zksync/LICENSE +21 -0
- package/non_standard_deployments/zksync/README.md +51 -0
- package/non_standard_deployments/zksync/deploy/deploy.ts +11 -0
- package/non_standard_deployments/zksync/deploy/utils.ts +168 -0
- package/non_standard_deployments/zksync/hardhat.config.ts +55 -0
- package/non_standard_deployments/zksync/package-lock.json +6295 -0
- package/non_standard_deployments/zksync/package.json +34 -0
- package/package.json +7 -3
- package/scripts/transfer_arbitrator.js +60 -0
- package/tests/python/requirements.txt +55 -54
- package/tests/python/test.py +150 -50
- package/tests/python/test_erc20.py +15 -14
- package/tokens/ETH.json +3 -2
- package/non_standard_deployments/zksync2/README +0 -21
- package/non_standard_deployments/zksync2/contracts/RealityETH_ERC20-3.0.sol +0 -1096
- package/non_standard_deployments/zksync2/deploy/deploy.ts +0 -62
- package/non_standard_deployments/zksync2/deploy/deploy_erc20.ts +0 -56
- package/non_standard_deployments/zksync2/deploy/deploy_mainnet.ts +0 -46
- package/non_standard_deployments/zksync2/hardhat.config.ts +0 -27
- package/non_standard_deployments/zksync2/package.json +0 -15
- package/non_standard_deployments/zksync2/yarn.lock +0 -2898
- /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.
|
|
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": "
|
|
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.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
bitarray==
|
|
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==
|
|
11
|
-
cffi==1.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
eth-
|
|
17
|
-
eth-
|
|
18
|
-
eth-
|
|
19
|
-
eth-
|
|
20
|
-
eth-
|
|
21
|
-
eth-
|
|
22
|
-
eth-
|
|
23
|
-
eth-
|
|
24
|
-
eth-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
parsimonious==0.
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
py-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
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.
|
|
50
|
-
rlp==
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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.
|
|
56
|
-
trie==2.0
|
|
57
|
-
typing-extensions==
|
|
58
|
-
urllib3==1.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|