Skip to content

Commit 48dd0fb

Browse files
committed
feat: added gnosischain support to extract the court policies and parameters
1 parent 0d52e9a commit 48dd0fb

11 files changed

+958
-12
lines changed

contracts/README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,19 @@ yarn etherscan-verify --network <arbitrumGoerli|arbitrumRinkeby|arbitrum|goerli|
144144
#### 1/ Export the registry data from V1
145145

146146
```bash
147-
yarn hardhat run scripts/getPoliciesV1.ts --network mainnet | tee policies.v1.json
148-
yarn hardhat run scripts/getCourtsV1.ts --network mainnet | tee courts.v1.json
147+
for network in mainnet gnosischain
148+
do
149+
yarn hardhat run scripts/getPoliciesV1.ts --network $network | tee config/policies.v1.$network.json
150+
yarn hardhat run scripts/getCourtsV1.ts --network $network | tee config/courts.v1.$network.json
151+
done
149152
```
150153

151154
#### 2/ Import the data to V2 - Local Network
152155

156+
:warning: This script populates only from `*.mainnet.json`, but not from `*.gnosischain.json` at this time.
157+
158+
:warning: It is possible to switch to testnet-friendly court parameters by setting the variable `TESTING_PARAMETERS` to true inside [scripts/populateCourts.ts](scripts/populateCourts.ts).
159+
153160
Shell 1:
154161

155162
```bash
+227
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
[
2+
{
3+
"id": 0,
4+
"parent": "0",
5+
"hiddenVotes": true,
6+
"minStake": "520000000000000000000",
7+
"alpha": "5000",
8+
"feeForJuror": "15000000000000000000",
9+
"jurorsForCourtJump": "15000000000000000000",
10+
"timesPerPeriod": [
11+
280800,
12+
583200,
13+
583200,
14+
388800
15+
]
16+
},
17+
{
18+
"id": 1,
19+
"parent": "0",
20+
"hiddenVotes": false,
21+
"minStake": "520000000000000000000",
22+
"alpha": "3100",
23+
"feeForJuror": "6900000000000000000",
24+
"jurorsForCourtJump": "6900000000000000000",
25+
"timesPerPeriod": [
26+
140400,
27+
291600,
28+
291600,
29+
194400
30+
]
31+
},
32+
{
33+
"id": 2,
34+
"parent": "0",
35+
"hiddenVotes": false,
36+
"minStake": "1200000000000000000000",
37+
"alpha": "5000",
38+
"feeForJuror": "22000000000000000000",
39+
"jurorsForCourtJump": "22000000000000000000",
40+
"timesPerPeriod": [
41+
280800,
42+
437400,
43+
437400,
44+
291600
45+
]
46+
},
47+
{
48+
"id": 3,
49+
"parent": "2",
50+
"hiddenVotes": false,
51+
"minStake": "1200000000000000000000",
52+
"alpha": "1800",
53+
"feeForJuror": "9400000000000000000",
54+
"jurorsForCourtJump": "9400000000000000000",
55+
"timesPerPeriod": [
56+
280800,
57+
437400,
58+
437400,
59+
291600
60+
]
61+
},
62+
{
63+
"id": 4,
64+
"parent": "2",
65+
"hiddenVotes": false,
66+
"minStake": "1200000000000000000000",
67+
"alpha": "1800",
68+
"feeForJuror": "9400000000000000000",
69+
"jurorsForCourtJump": "9400000000000000000",
70+
"timesPerPeriod": [
71+
280800,
72+
437400,
73+
437400,
74+
291600
75+
]
76+
},
77+
{
78+
"id": 5,
79+
"parent": "2",
80+
"hiddenVotes": false,
81+
"minStake": "1200000000000000000000",
82+
"alpha": "1800",
83+
"feeForJuror": "9400000000000000000",
84+
"jurorsForCourtJump": "9400000000000000000",
85+
"timesPerPeriod": [
86+
280800,
87+
437400,
88+
437400,
89+
291600
90+
]
91+
},
92+
{
93+
"id": 6,
94+
"parent": "2",
95+
"hiddenVotes": false,
96+
"minStake": "1200000000000000000000",
97+
"alpha": "2200",
98+
"feeForJuror": "12000000000000000000",
99+
"jurorsForCourtJump": "12000000000000000000",
100+
"timesPerPeriod": [
101+
280800,
102+
437400,
103+
437400,
104+
291600
105+
]
106+
},
107+
{
108+
"id": 7,
109+
"parent": "2",
110+
"hiddenVotes": false,
111+
"minStake": "1200000000000000000000",
112+
"alpha": "2200",
113+
"feeForJuror": "12000000000000000000",
114+
"jurorsForCourtJump": "12000000000000000000",
115+
"timesPerPeriod": [
116+
280800,
117+
437400,
118+
437400,
119+
291600
120+
]
121+
},
122+
{
123+
"id": 8,
124+
"parent": "2",
125+
"hiddenVotes": false,
126+
"minStake": "1200000000000000000000",
127+
"alpha": "2800",
128+
"feeForJuror": "15000000000000000000",
129+
"jurorsForCourtJump": "15000000000000000000",
130+
"timesPerPeriod": [
131+
280800,
132+
437400,
133+
437400,
134+
291600
135+
]
136+
},
137+
{
138+
"id": 9,
139+
"parent": "2",
140+
"hiddenVotes": false,
141+
"minStake": "1200000000000000000000",
142+
"alpha": "2800",
143+
"feeForJuror": "15000000000000000000",
144+
"jurorsForCourtJump": "15000000000000000000",
145+
"timesPerPeriod": [
146+
280800,
147+
437400,
148+
437400,
149+
291600
150+
]
151+
},
152+
{
153+
"id": 10,
154+
"parent": "2",
155+
"hiddenVotes": false,
156+
"minStake": "1200000000000000000000",
157+
"alpha": "2800",
158+
"feeForJuror": "15000000000000000000",
159+
"jurorsForCourtJump": "15000000000000000000",
160+
"timesPerPeriod": [
161+
280800,
162+
437400,
163+
437400,
164+
291600
165+
]
166+
},
167+
{
168+
"id": 11,
169+
"parent": "2",
170+
"hiddenVotes": false,
171+
"minStake": "1200000000000000000000",
172+
"alpha": "2800",
173+
"feeForJuror": "15000000000000000000",
174+
"jurorsForCourtJump": "15000000000000000000",
175+
"timesPerPeriod": [
176+
280800,
177+
437400,
178+
437400,
179+
291600
180+
]
181+
},
182+
{
183+
"id": 12,
184+
"parent": "0",
185+
"hiddenVotes": false,
186+
"minStake": "1400000000000000000000",
187+
"alpha": "5000",
188+
"feeForJuror": "30000000000000000000",
189+
"jurorsForCourtJump": "30000000000000000000",
190+
"timesPerPeriod": [
191+
280800,
192+
437400,
193+
437400,
194+
291600
195+
]
196+
},
197+
{
198+
"id": 13,
199+
"parent": "12",
200+
"hiddenVotes": false,
201+
"minStake": "1400000000000000000000",
202+
"alpha": "1600",
203+
"feeForJuror": "30000000000000000000",
204+
"jurorsForCourtJump": "30000000000000000000",
205+
"timesPerPeriod": [
206+
280800,
207+
437400,
208+
437400,
209+
291600
210+
]
211+
},
212+
{
213+
"id": 14,
214+
"parent": "12",
215+
"hiddenVotes": false,
216+
"minStake": "1400000000000000000000",
217+
"alpha": "1600",
218+
"feeForJuror": "30000000000000000000",
219+
"jurorsForCourtJump": "30000000000000000000",
220+
"timesPerPeriod": [
221+
280800,
222+
437400,
223+
437400,
224+
291600
225+
]
226+
}
227+
]

0 commit comments

Comments
 (0)