@reality.eth/contracts 3.0.35 → 3.0.37
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/README.md +10 -8
- package/chains/chainid.network.json +753 -147
- package/chains/deployments/1101/ETH/RealityETH-3.0.json +6 -0
- package/chains/deployments/137/POLK/RealityETH_ERC20-3.0.json +8 -0
- package/chains/supported.json +5 -4
- package/generated/chains.json +24 -21
- package/generated/contracts.json +19 -46
- package/generated/tokens.json +2 -0
- package/package.json +2 -2
- package/scripts/add_chain_and_token.js +81 -0
- package/scripts/deploy.js +2 -2
- package/tokens/ETH.json +1 -0
- package/tokens/POLK.json +1 -0
- package/chains/deployments/42/ETH/RealityETH-2.0.json +0 -10
- package/chains/deployments/42/ETH/RealityETH-3.0.json +0 -9
- package/chains/deployments/42/POLK/Arbitrator.json +0 -5
- package/chains/deployments/42/POLK/RealityETH_ERC20-2.0.json +0 -9
- package/chains/deployments/42/POLK/RealityETH_ERC20-3.0.json +0 -7
package/README.md
CHANGED
|
@@ -34,11 +34,12 @@ The above are combined into JSON files under *generated/* using `npm run-script
|
|
|
34
34
|
|
|
35
35
|
## Compilation
|
|
36
36
|
|
|
37
|
+
Compiled bytecode and ABIs are stored under *bytecode/* and *abi/* respectively. If you need to recompile, do:
|
|
38
|
+
|
|
37
39
|
`$ cd development/contracts/`
|
|
38
40
|
|
|
39
|
-
`$ ./compile.py RealityETH-3.0
|
|
41
|
+
`$ ./compile.py RealityETH-3.0`
|
|
40
42
|
|
|
41
|
-
Bytecode and ABIs will be stored under *bytecode/* and *abi/* respectively.
|
|
42
43
|
|
|
43
44
|
## Tests
|
|
44
45
|
|
|
@@ -52,7 +53,7 @@ You can then test the version in question with, eg
|
|
|
52
53
|
|
|
53
54
|
`$ REALITYETH=RealityETH-3.0 python test.py`
|
|
54
55
|
|
|
55
|
-
These tests test the bytecode not the source code, so you need to
|
|
56
|
+
These tests test the bytecode not the source code, so you need to recompile before testing source code changes.
|
|
56
57
|
|
|
57
58
|
## Deployment
|
|
58
59
|
|
|
@@ -62,6 +63,8 @@ You will need the private key of an account with funds to deploy on the relevant
|
|
|
62
63
|
|
|
63
64
|
The `.gitignore` file should prevent it from being checked into Git, but be careful not to share it.
|
|
64
65
|
|
|
66
|
+
If we have not previously deployed on the chain, add its details to `supported.json` then run `npm run-script generate`.
|
|
67
|
+
|
|
65
68
|
If it's the first time for the token you intend to use to be deployed on the chain you intend to use, add a JSON file describing your token under *tokens/* then run `npm run-script generate`.
|
|
66
69
|
|
|
67
70
|
To deploy contracts using the code compiled under contracts/bytecode, use
|
|
@@ -70,19 +73,18 @@ To deploy contracts using the code compiled under contracts/bytecode, use
|
|
|
70
73
|
|
|
71
74
|
`$ node deploy.js <RealityETH|Arbitrator|ERC20> <network> <token_name> [<dispute_fee>] [<arbitrator_owner>]`
|
|
72
75
|
|
|
73
|
-
|
|
76
|
+
This will add contract addresses to the existing deployed contract .json definitions, and deploy per-token versions in the format expected by the `@reality.eth/dapp` ui.
|
|
74
77
|
|
|
78
|
+
If you prefer to keep your secret keys somewhere else you can pass it as an environment variable, eg
|
|
75
79
|
`$ SECRETS=/home/ed/secrets node deploy.js <RealityETH|Arbitrator|ERC20> <network> <token_name> [<dispute_fee>] [<arbitrator_owner>]`
|
|
76
80
|
|
|
77
|
-
This will add contract addresses to the existing deployed contract .json definitions, and deploy per-token versions in the format expected by the `@reality.eth/dapp` ui.
|
|
78
|
-
|
|
79
81
|
Supported networks are hard-coded in the `deploy.js` file. You may also wish to edit it to alter gas limits, etc.
|
|
80
82
|
|
|
81
|
-
Once the deployment is complete, run `npm run-script generate`.
|
|
83
|
+
Once the deployment is complete, run `npm run-script generate`. You should never edit the `generated/` files directly.
|
|
82
84
|
|
|
83
85
|
## Adding your contracts to the dapp
|
|
84
86
|
|
|
85
|
-
For a new deployment to show up in the dapp it is necessary to rebuild the dapp with the updated `packages/contracts`. For Graph support to work in the dapp, the Subgraph will also need to be republished, using the code under `packages/graph`.
|
|
87
|
+
For a new deployment to show up in the dapp it is necessary to rebuild the dapp with the updated `packages/contracts`. For Graph support to work in the dapp, the Subgraph will also need to be republished, using the code under `packages/graph`. If the chain has not been used before, it also needs to be added to `packages/dapp/src/index.html`.
|
|
86
88
|
|
|
87
89
|
If you have added Reality.eth for a new token, or a new arbitrator, or both, please submit the changes to this repo as a PR so that we can update the dapp at reality.eth and the Subgraphs we maintain.
|
|
88
90
|
|