tx · 8kgTW8Yn9Gkzxu48u6EacyUV76LQpRo1vdijoDmrjqkg 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB: -0.01400000 Waves 2021.06.03 13:18 [1554052] smart account 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB > SELF 0.00000000 Waves
{ "type": 13, "id": "8kgTW8Yn9Gkzxu48u6EacyUV76LQpRo1vdijoDmrjqkg", "fee": 1400000, "feeAssetId": null, "timestamp": 1622715535391, "version": 2, "chainId": 84, "sender": "3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB", "senderPublicKey": "CQ7vntBAYh2QZcKcqiiyEnQWWXsr98ysDptD23Wgxmvb", "proofs": [ "SjjHLdQ4Xatbt79mb77Nd51edKPvadkdBMro6Gtboty1QFeghe9pdyBauSSKVjP1jtCzdVD5cDZdZDihgK1EH4N" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAQEAAAAJbGlzdFRvU3RyAAAAAQAAAANhcnIKAQAAAAhmb2xkRnVuYwAAAAIAAAAEbGlzdAAAAAFhCQAETAAAAAIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQUAAAABYQUAAAAEbGlzdAQAAAALJGxpc3QxOTEyMTcFAAAAA2FycgQAAAALJHNpemUxOTEyMTcJAAGQAAAAAQUAAAALJGxpc3QxOTEyMTcEAAAACyRhY2MwMTkxMjE3BQAAAANuaWwDCQAAAAAAAAIFAAAACyRzaXplMTkxMjE3AAAAAAAAAAAABQAAAAskYWNjMDE5MTIxNwQAAAALJGFjYzExOTEyMTcJAQAAAAhmb2xkRnVuYwAAAAIFAAAACyRhY2MwMTkxMjE3CQABkQAAAAIFAAAACyRsaXN0MTkxMjE3AAAAAAAAAAAAAwkAAAAAAAACBQAAAAskc2l6ZTE5MTIxNwAAAAAAAAAAAQUAAAALJGFjYzExOTEyMTcEAAAACyRhY2MyMTkxMjE3CQEAAAAIZm9sZEZ1bmMAAAACBQAAAAskYWNjMTE5MTIxNwkAAZEAAAACBQAAAAskbGlzdDE5MTIxNwAAAAAAAAAAAQMJAAAAAAAAAgUAAAALJHNpemUxOTEyMTcAAAAAAAAAAAIFAAAACyRhY2MyMTkxMjE3BAAAAAskYWNjMzE5MTIxNwkBAAAACGZvbGRGdW5jAAAAAgUAAAALJGFjYzIxOTEyMTcJAAGRAAAAAgUAAAALJGxpc3QxOTEyMTcAAAAAAAAAAAIDCQAAAAAAAAIFAAAACyRzaXplMTkxMjE3AAAAAAAAAAADBQAAAAskYWNjMzE5MTIxNwQAAAALJGFjYzQxOTEyMTcJAQAAAAhmb2xkRnVuYwAAAAIFAAAACyRhY2MzMTkxMjE3CQABkQAAAAIFAAAACyRsaXN0MTkxMjE3AAAAAAAAAAADCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgMwAAAAEAAAABaQEAAAAEY2FsbAAAAAAEAAAABWNvdW50AAAAAAAAAAABBAAAAAdzdHJMaXN0CQEAAAAJbGlzdFRvU3RyAAAAAQkABEwAAAACAgAAAAExCQAETAAAAAICAAAAATIJAARMAAAAAgIAAAABMwUAAAADbmlsAwkAAAAAAAACBQAAAAVjb3VudAAAAAAAAAAAAQkAAAIAAAABCQABLAAAAAICAAAADHN0ckxpc3QsMD09PgkAAaQAAAABCQABkQAAAAIFAAAAB3N0ckxpc3QAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAA2ludAAAAAAAAAAAAQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXns8pK7", "height": 1554052, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Aja8V2et7V5pX6uq9GFpqjEUzQXrmFSpmVzCrLR2rG3H Next: 9E6Xd63K6Frp2JPTzrmVzMu3Yvp4UKxpgqS7HQUKEgh8 Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let handiId = base58'BJFTCAVHNhppygeLqYUyG5NB9GwNRjEjFeweJpXXi1DQ' | |
4 | + | func listToStr (arr) = { | |
5 | + | func foldFunc (list,a) = parseIntValue(a) :: list | |
5 | 6 | ||
6 | - | let numList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] | |
7 | - | ||
8 | - | func listSum (arr) = { | |
9 | - | func sum (a,b) = (a + b) | |
10 | - | ||
11 | - | let $list322343 = arr | |
12 | - | let $size322343 = size($list322343) | |
13 | - | let $acc0322343 = 0 | |
14 | - | if (($size322343 == 0)) | |
15 | - | then $acc0322343 | |
7 | + | let $list191217 = arr | |
8 | + | let $size191217 = size($list191217) | |
9 | + | let $acc0191217 = nil | |
10 | + | if (($size191217 == 0)) | |
11 | + | then $acc0191217 | |
16 | 12 | else { | |
17 | - | let $ | |
18 | - | if (($ | |
19 | - | then $ | |
13 | + | let $acc1191217 = foldFunc($acc0191217, $list191217[0]) | |
14 | + | if (($size191217 == 1)) | |
15 | + | then $acc1191217 | |
20 | 16 | else { | |
21 | - | let $ | |
22 | - | if (($ | |
23 | - | then $ | |
17 | + | let $acc2191217 = foldFunc($acc1191217, $list191217[1]) | |
18 | + | if (($size191217 == 2)) | |
19 | + | then $acc2191217 | |
24 | 20 | else { | |
25 | - | let $ | |
26 | - | if (($ | |
27 | - | then $ | |
21 | + | let $acc3191217 = foldFunc($acc2191217, $list191217[2]) | |
22 | + | if (($size191217 == 3)) | |
23 | + | then $acc3191217 | |
28 | 24 | else { | |
29 | - | let $acc4322343 = sum($acc3322343, $list322343[3]) | |
30 | - | if (($size322343 == 4)) | |
31 | - | then $acc4322343 | |
32 | - | else { | |
33 | - | let $acc5322343 = sum($acc4322343, $list322343[4]) | |
34 | - | if (($size322343 == 5)) | |
35 | - | then $acc5322343 | |
36 | - | else { | |
37 | - | let $acc6322343 = sum($acc5322343, $list322343[5]) | |
38 | - | if (($size322343 == 6)) | |
39 | - | then $acc6322343 | |
40 | - | else { | |
41 | - | let $acc7322343 = sum($acc6322343, $list322343[6]) | |
42 | - | if (($size322343 == 7)) | |
43 | - | then $acc7322343 | |
44 | - | else { | |
45 | - | let $acc8322343 = sum($acc7322343, $list322343[7]) | |
46 | - | if (($size322343 == 8)) | |
47 | - | then $acc8322343 | |
48 | - | else { | |
49 | - | let $acc9322343 = sum($acc8322343, $list322343[8]) | |
50 | - | if (($size322343 == 9)) | |
51 | - | then $acc9322343 | |
52 | - | else { | |
53 | - | let $acc10322343 = sum($acc9322343, $list322343[9]) | |
54 | - | if (($size322343 == 10)) | |
55 | - | then $acc10322343 | |
56 | - | else { | |
57 | - | let $acc11322343 = sum($acc10322343, $list322343[10]) | |
58 | - | if (($size322343 == 11)) | |
59 | - | then $acc11322343 | |
60 | - | else { | |
61 | - | let $acc12322343 = sum($acc11322343, $list322343[11]) | |
62 | - | if (($size322343 == 12)) | |
63 | - | then $acc12322343 | |
64 | - | else { | |
65 | - | let $acc13322343 = sum($acc12322343, $list322343[12]) | |
66 | - | if (($size322343 == 13)) | |
67 | - | then $acc13322343 | |
68 | - | else { | |
69 | - | let $acc14322343 = sum($acc13322343, $list322343[13]) | |
70 | - | if (($size322343 == 14)) | |
71 | - | then $acc14322343 | |
72 | - | else { | |
73 | - | let $acc15322343 = sum($acc14322343, $list322343[14]) | |
74 | - | if (($size322343 == 15)) | |
75 | - | then $acc15322343 | |
76 | - | else { | |
77 | - | let $acc16322343 = sum($acc15322343, $list322343[15]) | |
78 | - | if (($size322343 == 16)) | |
79 | - | then $acc16322343 | |
80 | - | else { | |
81 | - | let $acc17322343 = sum($acc16322343, $list322343[16]) | |
82 | - | if (($size322343 == 17)) | |
83 | - | then $acc17322343 | |
84 | - | else { | |
85 | - | let $acc18322343 = sum($acc17322343, $list322343[17]) | |
86 | - | if (($size322343 == 18)) | |
87 | - | then $acc18322343 | |
88 | - | else { | |
89 | - | let $acc19322343 = sum($acc18322343, $list322343[18]) | |
90 | - | throw("List size exceed 18") | |
91 | - | } | |
92 | - | } | |
93 | - | } | |
94 | - | } | |
95 | - | } | |
96 | - | } | |
97 | - | } | |
98 | - | } | |
99 | - | } | |
100 | - | } | |
101 | - | } | |
102 | - | } | |
103 | - | } | |
104 | - | } | |
105 | - | } | |
25 | + | let $acc4191217 = foldFunc($acc3191217, $list191217[3]) | |
26 | + | throw("List size exceed 3") | |
106 | 27 | } | |
107 | 28 | } | |
108 | 29 | } | |
110 | 31 | } | |
111 | 32 | ||
112 | 33 | ||
113 | - | func parseIntList (list) = [parseIntValue(list[0]), parseIntValue(list[1]), parseIntValue(list[2]), parseIntValue(list[3]), parseIntValue(list[4]), parseIntValue(list[5]), parseIntValue(list[6]), parseIntValue(list[7]), parseIntValue(list[8]), parseIntValue(list[9]), parseIntValue(list[10]), parseIntValue(list[11]), parseIntValue(list[12]), parseIntValue(list[13]), parseIntValue(list[14]), parseIntValue(list[15]), parseIntValue(list[16]), parseIntValue(list[17])] | |
114 | - | ||
115 | - | ||
116 | - | func getRoundScore (roundCount,currentKey) = match getString(this, ((currentKey + "_round_score_") + toString(roundCount))) { | |
117 | - | case a: String => | |
118 | - | a | |
119 | - | case _ => | |
120 | - | "" | |
121 | - | } | |
122 | - | ||
123 | - | ||
124 | - | func getRoundCourse (roundCount,currentKey) = match getString(this, ((currentKey + "_round_course_") + toString(roundCount))) { | |
125 | - | case a: String => | |
126 | - | a | |
127 | - | case _ => | |
128 | - | "" | |
129 | - | } | |
130 | - | ||
131 | - | ||
132 | - | func holeStrokeReceiveFunc (handicapIndex,hdcp) = if ((handicapIndex >= hdcp)) | |
133 | - | then 1 | |
134 | - | else 0 | |
135 | - | ||
136 | - | ||
137 | - | func foldFuncHoldHandi (score,par,hdcpList,handicap) = { | |
138 | - | func foldFunc (acc,i) = { | |
139 | - | let holeStrokeReceive = holeStrokeReceiveFunc(handicap, hdcpList[i]) | |
140 | - | let netDoubleBogey = ((par[i] + 2) + holeStrokeReceive) | |
141 | - | if ((score[i] > netDoubleBogey)) | |
142 | - | then (acc :+ netDoubleBogey) | |
143 | - | else (acc :+ score[i]) | |
144 | - | } | |
145 | - | ||
146 | - | let $list20482079 = numList | |
147 | - | let $size20482079 = size($list20482079) | |
148 | - | let $acc020482079 = nil | |
149 | - | if (($size20482079 == 0)) | |
150 | - | then $acc020482079 | |
151 | - | else { | |
152 | - | let $acc120482079 = foldFunc($acc020482079, $list20482079[0]) | |
153 | - | if (($size20482079 == 1)) | |
154 | - | then $acc120482079 | |
155 | - | else { | |
156 | - | let $acc220482079 = foldFunc($acc120482079, $list20482079[1]) | |
157 | - | if (($size20482079 == 2)) | |
158 | - | then $acc220482079 | |
159 | - | else { | |
160 | - | let $acc320482079 = foldFunc($acc220482079, $list20482079[2]) | |
161 | - | if (($size20482079 == 3)) | |
162 | - | then $acc320482079 | |
163 | - | else { | |
164 | - | let $acc420482079 = foldFunc($acc320482079, $list20482079[3]) | |
165 | - | if (($size20482079 == 4)) | |
166 | - | then $acc420482079 | |
167 | - | else { | |
168 | - | let $acc520482079 = foldFunc($acc420482079, $list20482079[4]) | |
169 | - | if (($size20482079 == 5)) | |
170 | - | then $acc520482079 | |
171 | - | else { | |
172 | - | let $acc620482079 = foldFunc($acc520482079, $list20482079[5]) | |
173 | - | if (($size20482079 == 6)) | |
174 | - | then $acc620482079 | |
175 | - | else { | |
176 | - | let $acc720482079 = foldFunc($acc620482079, $list20482079[6]) | |
177 | - | if (($size20482079 == 7)) | |
178 | - | then $acc720482079 | |
179 | - | else { | |
180 | - | let $acc820482079 = foldFunc($acc720482079, $list20482079[7]) | |
181 | - | if (($size20482079 == 8)) | |
182 | - | then $acc820482079 | |
183 | - | else { | |
184 | - | let $acc920482079 = foldFunc($acc820482079, $list20482079[8]) | |
185 | - | if (($size20482079 == 9)) | |
186 | - | then $acc920482079 | |
187 | - | else { | |
188 | - | let $acc1020482079 = foldFunc($acc920482079, $list20482079[9]) | |
189 | - | if (($size20482079 == 10)) | |
190 | - | then $acc1020482079 | |
191 | - | else { | |
192 | - | let $acc1120482079 = foldFunc($acc1020482079, $list20482079[10]) | |
193 | - | if (($size20482079 == 11)) | |
194 | - | then $acc1120482079 | |
195 | - | else { | |
196 | - | let $acc1220482079 = foldFunc($acc1120482079, $list20482079[11]) | |
197 | - | if (($size20482079 == 12)) | |
198 | - | then $acc1220482079 | |
199 | - | else { | |
200 | - | let $acc1320482079 = foldFunc($acc1220482079, $list20482079[12]) | |
201 | - | if (($size20482079 == 13)) | |
202 | - | then $acc1320482079 | |
203 | - | else { | |
204 | - | let $acc1420482079 = foldFunc($acc1320482079, $list20482079[13]) | |
205 | - | if (($size20482079 == 14)) | |
206 | - | then $acc1420482079 | |
207 | - | else { | |
208 | - | let $acc1520482079 = foldFunc($acc1420482079, $list20482079[14]) | |
209 | - | if (($size20482079 == 15)) | |
210 | - | then $acc1520482079 | |
211 | - | else { | |
212 | - | let $acc1620482079 = foldFunc($acc1520482079, $list20482079[15]) | |
213 | - | if (($size20482079 == 16)) | |
214 | - | then $acc1620482079 | |
215 | - | else { | |
216 | - | let $acc1720482079 = foldFunc($acc1620482079, $list20482079[16]) | |
217 | - | if (($size20482079 == 17)) | |
218 | - | then $acc1720482079 | |
219 | - | else { | |
220 | - | let $acc1820482079 = foldFunc($acc1720482079, $list20482079[17]) | |
221 | - | if (($size20482079 == 18)) | |
222 | - | then $acc1820482079 | |
223 | - | else { | |
224 | - | let $acc1920482079 = foldFunc($acc1820482079, $list20482079[18]) | |
225 | - | throw("List size exceed 18") | |
226 | - | } | |
227 | - | } | |
228 | - | } | |
229 | - | } | |
230 | - | } | |
231 | - | } | |
232 | - | } | |
233 | - | } | |
234 | - | } | |
235 | - | } | |
236 | - | } | |
237 | - | } | |
238 | - | } | |
239 | - | } | |
240 | - | } | |
241 | - | } | |
242 | - | } | |
243 | - | } | |
244 | - | } | |
245 | - | } | |
246 | - | ||
247 | - | ||
248 | - | func foldFuncNoHandi (score,par) = { | |
249 | - | func foldFunc (acc,i) = if ((score[i] > (par[i] + 5))) | |
250 | - | then (acc :+ (par[i] + 5)) | |
251 | - | else (acc :+ score[i]) | |
252 | - | ||
253 | - | let $list23532384 = numList | |
254 | - | let $size23532384 = size($list23532384) | |
255 | - | let $acc023532384 = nil | |
256 | - | if (($size23532384 == 0)) | |
257 | - | then $acc023532384 | |
258 | - | else { | |
259 | - | let $acc123532384 = foldFunc($acc023532384, $list23532384[0]) | |
260 | - | if (($size23532384 == 1)) | |
261 | - | then $acc123532384 | |
262 | - | else { | |
263 | - | let $acc223532384 = foldFunc($acc123532384, $list23532384[1]) | |
264 | - | if (($size23532384 == 2)) | |
265 | - | then $acc223532384 | |
266 | - | else { | |
267 | - | let $acc323532384 = foldFunc($acc223532384, $list23532384[2]) | |
268 | - | if (($size23532384 == 3)) | |
269 | - | then $acc323532384 | |
270 | - | else { | |
271 | - | let $acc423532384 = foldFunc($acc323532384, $list23532384[3]) | |
272 | - | if (($size23532384 == 4)) | |
273 | - | then $acc423532384 | |
274 | - | else { | |
275 | - | let $acc523532384 = foldFunc($acc423532384, $list23532384[4]) | |
276 | - | if (($size23532384 == 5)) | |
277 | - | then $acc523532384 | |
278 | - | else { | |
279 | - | let $acc623532384 = foldFunc($acc523532384, $list23532384[5]) | |
280 | - | if (($size23532384 == 6)) | |
281 | - | then $acc623532384 | |
282 | - | else { | |
283 | - | let $acc723532384 = foldFunc($acc623532384, $list23532384[6]) | |
284 | - | if (($size23532384 == 7)) | |
285 | - | then $acc723532384 | |
286 | - | else { | |
287 | - | let $acc823532384 = foldFunc($acc723532384, $list23532384[7]) | |
288 | - | if (($size23532384 == 8)) | |
289 | - | then $acc823532384 | |
290 | - | else { | |
291 | - | let $acc923532384 = foldFunc($acc823532384, $list23532384[8]) | |
292 | - | if (($size23532384 == 9)) | |
293 | - | then $acc923532384 | |
294 | - | else { | |
295 | - | let $acc1023532384 = foldFunc($acc923532384, $list23532384[9]) | |
296 | - | if (($size23532384 == 10)) | |
297 | - | then $acc1023532384 | |
298 | - | else { | |
299 | - | let $acc1123532384 = foldFunc($acc1023532384, $list23532384[10]) | |
300 | - | if (($size23532384 == 11)) | |
301 | - | then $acc1123532384 | |
302 | - | else { | |
303 | - | let $acc1223532384 = foldFunc($acc1123532384, $list23532384[11]) | |
304 | - | if (($size23532384 == 12)) | |
305 | - | then $acc1223532384 | |
306 | - | else { | |
307 | - | let $acc1323532384 = foldFunc($acc1223532384, $list23532384[12]) | |
308 | - | if (($size23532384 == 13)) | |
309 | - | then $acc1323532384 | |
310 | - | else { | |
311 | - | let $acc1423532384 = foldFunc($acc1323532384, $list23532384[13]) | |
312 | - | if (($size23532384 == 14)) | |
313 | - | then $acc1423532384 | |
314 | - | else { | |
315 | - | let $acc1523532384 = foldFunc($acc1423532384, $list23532384[14]) | |
316 | - | if (($size23532384 == 15)) | |
317 | - | then $acc1523532384 | |
318 | - | else { | |
319 | - | let $acc1623532384 = foldFunc($acc1523532384, $list23532384[15]) | |
320 | - | if (($size23532384 == 16)) | |
321 | - | then $acc1623532384 | |
322 | - | else { | |
323 | - | let $acc1723532384 = foldFunc($acc1623532384, $list23532384[16]) | |
324 | - | if (($size23532384 == 17)) | |
325 | - | then $acc1723532384 | |
326 | - | else { | |
327 | - | let $acc1823532384 = foldFunc($acc1723532384, $list23532384[17]) | |
328 | - | if (($size23532384 == 18)) | |
329 | - | then $acc1823532384 | |
330 | - | else { | |
331 | - | let $acc1923532384 = foldFunc($acc1823532384, $list23532384[18]) | |
332 | - | throw("List size exceed 18") | |
333 | - | } | |
334 | - | } | |
335 | - | } | |
336 | - | } | |
337 | - | } | |
338 | - | } | |
339 | - | } | |
340 | - | } | |
341 | - | } | |
342 | - | } | |
343 | - | } | |
344 | - | } | |
345 | - | } | |
346 | - | } | |
347 | - | } | |
348 | - | } | |
349 | - | } | |
350 | - | } | |
351 | - | } | |
352 | - | } | |
353 | - | ||
354 | - | ||
355 | - | func scoreAdjustmentCalc (score,par,hdcpList,handicap) = if ((handicap == -1)) | |
356 | - | then foldFuncNoHandi(score, par) | |
357 | - | else foldFuncHoldHandi(score, par, hdcpList, handicap) | |
358 | - | ||
359 | - | ||
360 | - | func scoreDifferential (scoreList,parList,hdcpList,courseRating,slopeRating,handicap) = { | |
361 | - | let scoreAdjustmentList = scoreAdjustmentCalc(scoreList, parList, hdcpList, handicap) | |
362 | - | let scoreAdjustedTotal = listSum(scoreAdjustmentList) | |
363 | - | let scoreSum = listSum(scoreList) | |
364 | - | let pcc = 0 | |
365 | - | let a = (113 / slopeRating) | |
366 | - | let b = ((scoreAdjustedTotal - courseRating) - pcc) | |
367 | - | let c = 1 | |
368 | - | let result = fraction(a, b, c, HALFUP) | |
369 | - | result | |
370 | - | } | |
371 | - | ||
372 | - | ||
373 | - | func handicapIndexRequirements (num) = if ((num > 54)) | |
374 | - | then 54 | |
375 | - | else if ((0 > num)) | |
376 | - | then 0 | |
377 | - | else num | |
378 | - | ||
379 | - | ||
380 | - | let count = 1 | |
381 | - | ||
382 | 34 | @Callable(i) | |
383 | - | func issueHandicapIndex () = { | |
384 | - | let currentKey = toBase58String(i.caller.bytes) | |
385 | - | let getHandicapIndex = 20 | |
386 | - | let getRoundCount = match getInteger(this, (currentKey + "_round_count")) { | |
387 | - | case a: Int => | |
388 | - | a | |
389 | - | case _ => | |
390 | - | -1 | |
391 | - | } | |
392 | - | let scoreString = "4_&&_6_&&_7_&&_4_&&_7_&&_8_&&_5_&&_8_&&_6_&&_6_&&_7_&&_8_&&_6_&&_6_&&_5_&&_7_&&_7_&&_6" | |
393 | - | let roundCourseString = "3N8DnpwTffUEjDXXEsn6btFrbgWC8VZJhTZ_&&_course_1_&&_course_2_&&_green_1_&&_70_&&_110_&&_men_&&_1622640688000_&&_cloudy_&&_11" | |
394 | - | let coursePar = "4_&&_4_&&_4_&&_4_&&_3_&&_5_&&_4_&&_5_&&_6_&&_5_&&_3_&&_5_&&_4_&&_4_&&_5_&&_4_&&_4_&&_4" | |
395 | - | let courseHdcp = "1_&&_2_&&_3_&&_4_&&_5_&&_6_&&_7_&&_8_&&_9_&&_10_&&_11_&&_12_&&_13_&&_14_&&_15_&&_16_&&_17_&&_18" | |
396 | - | let score1 = parseIntList(split(scoreString, "_&&_")) | |
397 | - | let score2 = parseIntList(split(scoreString, "_&&_")) | |
398 | - | let score3 = parseIntList(split(scoreString, "_&&_")) | |
399 | - | let roundCourse1 = split(roundCourseString, "_&&_") | |
400 | - | let roundCourse2 = split(roundCourseString, "_&&_") | |
401 | - | let roundCourse3 = split(roundCourseString, "_&&_") | |
402 | - | let coursePar1 = parseIntList(split(coursePar, "_&&_")) | |
403 | - | let coursePar2 = parseIntList(split(coursePar, "_&&_")) | |
404 | - | let coursePar3 = parseIntList(split(coursePar, "_&&_")) | |
405 | - | let courseHdcp1 = parseIntList(split(courseHdcp, "_&&_")) | |
406 | - | let courseHdcp2 = parseIntList(split(courseHdcp, "_&&_")) | |
407 | - | let courseHdcp3 = parseIntList(split(courseHdcp, "_&&_")) | |
408 | - | let scoreDifferential1 = scoreDifferential(score1, coursePar1, courseHdcp1, parseIntValue(roundCourse1[5]), parseIntValue(roundCourse1[6]), getHandicapIndex) | |
409 | - | let scoreDifferential2 = scoreDifferential(score2, coursePar2, courseHdcp2, parseIntValue(roundCourse2[5]), parseIntValue(roundCourse2[6]), getHandicapIndex) | |
410 | - | let scoreDifferential3 = scoreDifferential(score3, coursePar3, courseHdcp3, parseIntValue(roundCourse3[5]), parseIntValue(roundCourse3[6]), getHandicapIndex) | |
411 | - | let scoreDifferentialLowest = max([scoreDifferential1, scoreDifferential2, scoreDifferential3]) | |
412 | - | let result = (scoreDifferentialLowest - 2) | |
413 | - | let handicapIndex = handicapIndexRequirements(result) | |
414 | - | [Reissue(handiId, handicapIndex, false), IntegerEntry((currentKey + "_handicapIndex"), handicapIndex), ScriptTransfer(i.caller, handicapIndex, handiId)] | |
35 | + | func call () = { | |
36 | + | let count = 1 | |
37 | + | let strList = listToStr(["1", "2", "3"]) | |
38 | + | if ((count == 1)) | |
39 | + | then throw(("strList,0==>" + toString(strList[0]))) | |
40 | + | else [IntegerEntry("int", 1)] | |
415 | 41 | } | |
416 | 42 | ||
417 | 43 |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let handiId = base58'BJFTCAVHNhppygeLqYUyG5NB9GwNRjEjFeweJpXXi1DQ' | |
4 | + | func listToStr (arr) = { | |
5 | + | func foldFunc (list,a) = parseIntValue(a) :: list | |
5 | 6 | ||
6 | - | let numList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] | |
7 | - | ||
8 | - | func listSum (arr) = { | |
9 | - | func sum (a,b) = (a + b) | |
10 | - | ||
11 | - | let $list322343 = arr | |
12 | - | let $size322343 = size($list322343) | |
13 | - | let $acc0322343 = 0 | |
14 | - | if (($size322343 == 0)) | |
15 | - | then $acc0322343 | |
7 | + | let $list191217 = arr | |
8 | + | let $size191217 = size($list191217) | |
9 | + | let $acc0191217 = nil | |
10 | + | if (($size191217 == 0)) | |
11 | + | then $acc0191217 | |
16 | 12 | else { | |
17 | - | let $ | |
18 | - | if (($ | |
19 | - | then $ | |
13 | + | let $acc1191217 = foldFunc($acc0191217, $list191217[0]) | |
14 | + | if (($size191217 == 1)) | |
15 | + | then $acc1191217 | |
20 | 16 | else { | |
21 | - | let $ | |
22 | - | if (($ | |
23 | - | then $ | |
17 | + | let $acc2191217 = foldFunc($acc1191217, $list191217[1]) | |
18 | + | if (($size191217 == 2)) | |
19 | + | then $acc2191217 | |
24 | 20 | else { | |
25 | - | let $ | |
26 | - | if (($ | |
27 | - | then $ | |
21 | + | let $acc3191217 = foldFunc($acc2191217, $list191217[2]) | |
22 | + | if (($size191217 == 3)) | |
23 | + | then $acc3191217 | |
28 | 24 | else { | |
29 | - | let $acc4322343 = sum($acc3322343, $list322343[3]) | |
30 | - | if (($size322343 == 4)) | |
31 | - | then $acc4322343 | |
32 | - | else { | |
33 | - | let $acc5322343 = sum($acc4322343, $list322343[4]) | |
34 | - | if (($size322343 == 5)) | |
35 | - | then $acc5322343 | |
36 | - | else { | |
37 | - | let $acc6322343 = sum($acc5322343, $list322343[5]) | |
38 | - | if (($size322343 == 6)) | |
39 | - | then $acc6322343 | |
40 | - | else { | |
41 | - | let $acc7322343 = sum($acc6322343, $list322343[6]) | |
42 | - | if (($size322343 == 7)) | |
43 | - | then $acc7322343 | |
44 | - | else { | |
45 | - | let $acc8322343 = sum($acc7322343, $list322343[7]) | |
46 | - | if (($size322343 == 8)) | |
47 | - | then $acc8322343 | |
48 | - | else { | |
49 | - | let $acc9322343 = sum($acc8322343, $list322343[8]) | |
50 | - | if (($size322343 == 9)) | |
51 | - | then $acc9322343 | |
52 | - | else { | |
53 | - | let $acc10322343 = sum($acc9322343, $list322343[9]) | |
54 | - | if (($size322343 == 10)) | |
55 | - | then $acc10322343 | |
56 | - | else { | |
57 | - | let $acc11322343 = sum($acc10322343, $list322343[10]) | |
58 | - | if (($size322343 == 11)) | |
59 | - | then $acc11322343 | |
60 | - | else { | |
61 | - | let $acc12322343 = sum($acc11322343, $list322343[11]) | |
62 | - | if (($size322343 == 12)) | |
63 | - | then $acc12322343 | |
64 | - | else { | |
65 | - | let $acc13322343 = sum($acc12322343, $list322343[12]) | |
66 | - | if (($size322343 == 13)) | |
67 | - | then $acc13322343 | |
68 | - | else { | |
69 | - | let $acc14322343 = sum($acc13322343, $list322343[13]) | |
70 | - | if (($size322343 == 14)) | |
71 | - | then $acc14322343 | |
72 | - | else { | |
73 | - | let $acc15322343 = sum($acc14322343, $list322343[14]) | |
74 | - | if (($size322343 == 15)) | |
75 | - | then $acc15322343 | |
76 | - | else { | |
77 | - | let $acc16322343 = sum($acc15322343, $list322343[15]) | |
78 | - | if (($size322343 == 16)) | |
79 | - | then $acc16322343 | |
80 | - | else { | |
81 | - | let $acc17322343 = sum($acc16322343, $list322343[16]) | |
82 | - | if (($size322343 == 17)) | |
83 | - | then $acc17322343 | |
84 | - | else { | |
85 | - | let $acc18322343 = sum($acc17322343, $list322343[17]) | |
86 | - | if (($size322343 == 18)) | |
87 | - | then $acc18322343 | |
88 | - | else { | |
89 | - | let $acc19322343 = sum($acc18322343, $list322343[18]) | |
90 | - | throw("List size exceed 18") | |
91 | - | } | |
92 | - | } | |
93 | - | } | |
94 | - | } | |
95 | - | } | |
96 | - | } | |
97 | - | } | |
98 | - | } | |
99 | - | } | |
100 | - | } | |
101 | - | } | |
102 | - | } | |
103 | - | } | |
104 | - | } | |
105 | - | } | |
25 | + | let $acc4191217 = foldFunc($acc3191217, $list191217[3]) | |
26 | + | throw("List size exceed 3") | |
106 | 27 | } | |
107 | 28 | } | |
108 | 29 | } | |
109 | 30 | } | |
110 | 31 | } | |
111 | 32 | ||
112 | 33 | ||
113 | - | func parseIntList (list) = [parseIntValue(list[0]), parseIntValue(list[1]), parseIntValue(list[2]), parseIntValue(list[3]), parseIntValue(list[4]), parseIntValue(list[5]), parseIntValue(list[6]), parseIntValue(list[7]), parseIntValue(list[8]), parseIntValue(list[9]), parseIntValue(list[10]), parseIntValue(list[11]), parseIntValue(list[12]), parseIntValue(list[13]), parseIntValue(list[14]), parseIntValue(list[15]), parseIntValue(list[16]), parseIntValue(list[17])] | |
114 | - | ||
115 | - | ||
116 | - | func getRoundScore (roundCount,currentKey) = match getString(this, ((currentKey + "_round_score_") + toString(roundCount))) { | |
117 | - | case a: String => | |
118 | - | a | |
119 | - | case _ => | |
120 | - | "" | |
121 | - | } | |
122 | - | ||
123 | - | ||
124 | - | func getRoundCourse (roundCount,currentKey) = match getString(this, ((currentKey + "_round_course_") + toString(roundCount))) { | |
125 | - | case a: String => | |
126 | - | a | |
127 | - | case _ => | |
128 | - | "" | |
129 | - | } | |
130 | - | ||
131 | - | ||
132 | - | func holeStrokeReceiveFunc (handicapIndex,hdcp) = if ((handicapIndex >= hdcp)) | |
133 | - | then 1 | |
134 | - | else 0 | |
135 | - | ||
136 | - | ||
137 | - | func foldFuncHoldHandi (score,par,hdcpList,handicap) = { | |
138 | - | func foldFunc (acc,i) = { | |
139 | - | let holeStrokeReceive = holeStrokeReceiveFunc(handicap, hdcpList[i]) | |
140 | - | let netDoubleBogey = ((par[i] + 2) + holeStrokeReceive) | |
141 | - | if ((score[i] > netDoubleBogey)) | |
142 | - | then (acc :+ netDoubleBogey) | |
143 | - | else (acc :+ score[i]) | |
144 | - | } | |
145 | - | ||
146 | - | let $list20482079 = numList | |
147 | - | let $size20482079 = size($list20482079) | |
148 | - | let $acc020482079 = nil | |
149 | - | if (($size20482079 == 0)) | |
150 | - | then $acc020482079 | |
151 | - | else { | |
152 | - | let $acc120482079 = foldFunc($acc020482079, $list20482079[0]) | |
153 | - | if (($size20482079 == 1)) | |
154 | - | then $acc120482079 | |
155 | - | else { | |
156 | - | let $acc220482079 = foldFunc($acc120482079, $list20482079[1]) | |
157 | - | if (($size20482079 == 2)) | |
158 | - | then $acc220482079 | |
159 | - | else { | |
160 | - | let $acc320482079 = foldFunc($acc220482079, $list20482079[2]) | |
161 | - | if (($size20482079 == 3)) | |
162 | - | then $acc320482079 | |
163 | - | else { | |
164 | - | let $acc420482079 = foldFunc($acc320482079, $list20482079[3]) | |
165 | - | if (($size20482079 == 4)) | |
166 | - | then $acc420482079 | |
167 | - | else { | |
168 | - | let $acc520482079 = foldFunc($acc420482079, $list20482079[4]) | |
169 | - | if (($size20482079 == 5)) | |
170 | - | then $acc520482079 | |
171 | - | else { | |
172 | - | let $acc620482079 = foldFunc($acc520482079, $list20482079[5]) | |
173 | - | if (($size20482079 == 6)) | |
174 | - | then $acc620482079 | |
175 | - | else { | |
176 | - | let $acc720482079 = foldFunc($acc620482079, $list20482079[6]) | |
177 | - | if (($size20482079 == 7)) | |
178 | - | then $acc720482079 | |
179 | - | else { | |
180 | - | let $acc820482079 = foldFunc($acc720482079, $list20482079[7]) | |
181 | - | if (($size20482079 == 8)) | |
182 | - | then $acc820482079 | |
183 | - | else { | |
184 | - | let $acc920482079 = foldFunc($acc820482079, $list20482079[8]) | |
185 | - | if (($size20482079 == 9)) | |
186 | - | then $acc920482079 | |
187 | - | else { | |
188 | - | let $acc1020482079 = foldFunc($acc920482079, $list20482079[9]) | |
189 | - | if (($size20482079 == 10)) | |
190 | - | then $acc1020482079 | |
191 | - | else { | |
192 | - | let $acc1120482079 = foldFunc($acc1020482079, $list20482079[10]) | |
193 | - | if (($size20482079 == 11)) | |
194 | - | then $acc1120482079 | |
195 | - | else { | |
196 | - | let $acc1220482079 = foldFunc($acc1120482079, $list20482079[11]) | |
197 | - | if (($size20482079 == 12)) | |
198 | - | then $acc1220482079 | |
199 | - | else { | |
200 | - | let $acc1320482079 = foldFunc($acc1220482079, $list20482079[12]) | |
201 | - | if (($size20482079 == 13)) | |
202 | - | then $acc1320482079 | |
203 | - | else { | |
204 | - | let $acc1420482079 = foldFunc($acc1320482079, $list20482079[13]) | |
205 | - | if (($size20482079 == 14)) | |
206 | - | then $acc1420482079 | |
207 | - | else { | |
208 | - | let $acc1520482079 = foldFunc($acc1420482079, $list20482079[14]) | |
209 | - | if (($size20482079 == 15)) | |
210 | - | then $acc1520482079 | |
211 | - | else { | |
212 | - | let $acc1620482079 = foldFunc($acc1520482079, $list20482079[15]) | |
213 | - | if (($size20482079 == 16)) | |
214 | - | then $acc1620482079 | |
215 | - | else { | |
216 | - | let $acc1720482079 = foldFunc($acc1620482079, $list20482079[16]) | |
217 | - | if (($size20482079 == 17)) | |
218 | - | then $acc1720482079 | |
219 | - | else { | |
220 | - | let $acc1820482079 = foldFunc($acc1720482079, $list20482079[17]) | |
221 | - | if (($size20482079 == 18)) | |
222 | - | then $acc1820482079 | |
223 | - | else { | |
224 | - | let $acc1920482079 = foldFunc($acc1820482079, $list20482079[18]) | |
225 | - | throw("List size exceed 18") | |
226 | - | } | |
227 | - | } | |
228 | - | } | |
229 | - | } | |
230 | - | } | |
231 | - | } | |
232 | - | } | |
233 | - | } | |
234 | - | } | |
235 | - | } | |
236 | - | } | |
237 | - | } | |
238 | - | } | |
239 | - | } | |
240 | - | } | |
241 | - | } | |
242 | - | } | |
243 | - | } | |
244 | - | } | |
245 | - | } | |
246 | - | ||
247 | - | ||
248 | - | func foldFuncNoHandi (score,par) = { | |
249 | - | func foldFunc (acc,i) = if ((score[i] > (par[i] + 5))) | |
250 | - | then (acc :+ (par[i] + 5)) | |
251 | - | else (acc :+ score[i]) | |
252 | - | ||
253 | - | let $list23532384 = numList | |
254 | - | let $size23532384 = size($list23532384) | |
255 | - | let $acc023532384 = nil | |
256 | - | if (($size23532384 == 0)) | |
257 | - | then $acc023532384 | |
258 | - | else { | |
259 | - | let $acc123532384 = foldFunc($acc023532384, $list23532384[0]) | |
260 | - | if (($size23532384 == 1)) | |
261 | - | then $acc123532384 | |
262 | - | else { | |
263 | - | let $acc223532384 = foldFunc($acc123532384, $list23532384[1]) | |
264 | - | if (($size23532384 == 2)) | |
265 | - | then $acc223532384 | |
266 | - | else { | |
267 | - | let $acc323532384 = foldFunc($acc223532384, $list23532384[2]) | |
268 | - | if (($size23532384 == 3)) | |
269 | - | then $acc323532384 | |
270 | - | else { | |
271 | - | let $acc423532384 = foldFunc($acc323532384, $list23532384[3]) | |
272 | - | if (($size23532384 == 4)) | |
273 | - | then $acc423532384 | |
274 | - | else { | |
275 | - | let $acc523532384 = foldFunc($acc423532384, $list23532384[4]) | |
276 | - | if (($size23532384 == 5)) | |
277 | - | then $acc523532384 | |
278 | - | else { | |
279 | - | let $acc623532384 = foldFunc($acc523532384, $list23532384[5]) | |
280 | - | if (($size23532384 == 6)) | |
281 | - | then $acc623532384 | |
282 | - | else { | |
283 | - | let $acc723532384 = foldFunc($acc623532384, $list23532384[6]) | |
284 | - | if (($size23532384 == 7)) | |
285 | - | then $acc723532384 | |
286 | - | else { | |
287 | - | let $acc823532384 = foldFunc($acc723532384, $list23532384[7]) | |
288 | - | if (($size23532384 == 8)) | |
289 | - | then $acc823532384 | |
290 | - | else { | |
291 | - | let $acc923532384 = foldFunc($acc823532384, $list23532384[8]) | |
292 | - | if (($size23532384 == 9)) | |
293 | - | then $acc923532384 | |
294 | - | else { | |
295 | - | let $acc1023532384 = foldFunc($acc923532384, $list23532384[9]) | |
296 | - | if (($size23532384 == 10)) | |
297 | - | then $acc1023532384 | |
298 | - | else { | |
299 | - | let $acc1123532384 = foldFunc($acc1023532384, $list23532384[10]) | |
300 | - | if (($size23532384 == 11)) | |
301 | - | then $acc1123532384 | |
302 | - | else { | |
303 | - | let $acc1223532384 = foldFunc($acc1123532384, $list23532384[11]) | |
304 | - | if (($size23532384 == 12)) | |
305 | - | then $acc1223532384 | |
306 | - | else { | |
307 | - | let $acc1323532384 = foldFunc($acc1223532384, $list23532384[12]) | |
308 | - | if (($size23532384 == 13)) | |
309 | - | then $acc1323532384 | |
310 | - | else { | |
311 | - | let $acc1423532384 = foldFunc($acc1323532384, $list23532384[13]) | |
312 | - | if (($size23532384 == 14)) | |
313 | - | then $acc1423532384 | |
314 | - | else { | |
315 | - | let $acc1523532384 = foldFunc($acc1423532384, $list23532384[14]) | |
316 | - | if (($size23532384 == 15)) | |
317 | - | then $acc1523532384 | |
318 | - | else { | |
319 | - | let $acc1623532384 = foldFunc($acc1523532384, $list23532384[15]) | |
320 | - | if (($size23532384 == 16)) | |
321 | - | then $acc1623532384 | |
322 | - | else { | |
323 | - | let $acc1723532384 = foldFunc($acc1623532384, $list23532384[16]) | |
324 | - | if (($size23532384 == 17)) | |
325 | - | then $acc1723532384 | |
326 | - | else { | |
327 | - | let $acc1823532384 = foldFunc($acc1723532384, $list23532384[17]) | |
328 | - | if (($size23532384 == 18)) | |
329 | - | then $acc1823532384 | |
330 | - | else { | |
331 | - | let $acc1923532384 = foldFunc($acc1823532384, $list23532384[18]) | |
332 | - | throw("List size exceed 18") | |
333 | - | } | |
334 | - | } | |
335 | - | } | |
336 | - | } | |
337 | - | } | |
338 | - | } | |
339 | - | } | |
340 | - | } | |
341 | - | } | |
342 | - | } | |
343 | - | } | |
344 | - | } | |
345 | - | } | |
346 | - | } | |
347 | - | } | |
348 | - | } | |
349 | - | } | |
350 | - | } | |
351 | - | } | |
352 | - | } | |
353 | - | ||
354 | - | ||
355 | - | func scoreAdjustmentCalc (score,par,hdcpList,handicap) = if ((handicap == -1)) | |
356 | - | then foldFuncNoHandi(score, par) | |
357 | - | else foldFuncHoldHandi(score, par, hdcpList, handicap) | |
358 | - | ||
359 | - | ||
360 | - | func scoreDifferential (scoreList,parList,hdcpList,courseRating,slopeRating,handicap) = { | |
361 | - | let scoreAdjustmentList = scoreAdjustmentCalc(scoreList, parList, hdcpList, handicap) | |
362 | - | let scoreAdjustedTotal = listSum(scoreAdjustmentList) | |
363 | - | let scoreSum = listSum(scoreList) | |
364 | - | let pcc = 0 | |
365 | - | let a = (113 / slopeRating) | |
366 | - | let b = ((scoreAdjustedTotal - courseRating) - pcc) | |
367 | - | let c = 1 | |
368 | - | let result = fraction(a, b, c, HALFUP) | |
369 | - | result | |
370 | - | } | |
371 | - | ||
372 | - | ||
373 | - | func handicapIndexRequirements (num) = if ((num > 54)) | |
374 | - | then 54 | |
375 | - | else if ((0 > num)) | |
376 | - | then 0 | |
377 | - | else num | |
378 | - | ||
379 | - | ||
380 | - | let count = 1 | |
381 | - | ||
382 | 34 | @Callable(i) | |
383 | - | func issueHandicapIndex () = { | |
384 | - | let currentKey = toBase58String(i.caller.bytes) | |
385 | - | let getHandicapIndex = 20 | |
386 | - | let getRoundCount = match getInteger(this, (currentKey + "_round_count")) { | |
387 | - | case a: Int => | |
388 | - | a | |
389 | - | case _ => | |
390 | - | -1 | |
391 | - | } | |
392 | - | let scoreString = "4_&&_6_&&_7_&&_4_&&_7_&&_8_&&_5_&&_8_&&_6_&&_6_&&_7_&&_8_&&_6_&&_6_&&_5_&&_7_&&_7_&&_6" | |
393 | - | let roundCourseString = "3N8DnpwTffUEjDXXEsn6btFrbgWC8VZJhTZ_&&_course_1_&&_course_2_&&_green_1_&&_70_&&_110_&&_men_&&_1622640688000_&&_cloudy_&&_11" | |
394 | - | let coursePar = "4_&&_4_&&_4_&&_4_&&_3_&&_5_&&_4_&&_5_&&_6_&&_5_&&_3_&&_5_&&_4_&&_4_&&_5_&&_4_&&_4_&&_4" | |
395 | - | let courseHdcp = "1_&&_2_&&_3_&&_4_&&_5_&&_6_&&_7_&&_8_&&_9_&&_10_&&_11_&&_12_&&_13_&&_14_&&_15_&&_16_&&_17_&&_18" | |
396 | - | let score1 = parseIntList(split(scoreString, "_&&_")) | |
397 | - | let score2 = parseIntList(split(scoreString, "_&&_")) | |
398 | - | let score3 = parseIntList(split(scoreString, "_&&_")) | |
399 | - | let roundCourse1 = split(roundCourseString, "_&&_") | |
400 | - | let roundCourse2 = split(roundCourseString, "_&&_") | |
401 | - | let roundCourse3 = split(roundCourseString, "_&&_") | |
402 | - | let coursePar1 = parseIntList(split(coursePar, "_&&_")) | |
403 | - | let coursePar2 = parseIntList(split(coursePar, "_&&_")) | |
404 | - | let coursePar3 = parseIntList(split(coursePar, "_&&_")) | |
405 | - | let courseHdcp1 = parseIntList(split(courseHdcp, "_&&_")) | |
406 | - | let courseHdcp2 = parseIntList(split(courseHdcp, "_&&_")) | |
407 | - | let courseHdcp3 = parseIntList(split(courseHdcp, "_&&_")) | |
408 | - | let scoreDifferential1 = scoreDifferential(score1, coursePar1, courseHdcp1, parseIntValue(roundCourse1[5]), parseIntValue(roundCourse1[6]), getHandicapIndex) | |
409 | - | let scoreDifferential2 = scoreDifferential(score2, coursePar2, courseHdcp2, parseIntValue(roundCourse2[5]), parseIntValue(roundCourse2[6]), getHandicapIndex) | |
410 | - | let scoreDifferential3 = scoreDifferential(score3, coursePar3, courseHdcp3, parseIntValue(roundCourse3[5]), parseIntValue(roundCourse3[6]), getHandicapIndex) | |
411 | - | let scoreDifferentialLowest = max([scoreDifferential1, scoreDifferential2, scoreDifferential3]) | |
412 | - | let result = (scoreDifferentialLowest - 2) | |
413 | - | let handicapIndex = handicapIndexRequirements(result) | |
414 | - | [Reissue(handiId, handicapIndex, false), IntegerEntry((currentKey + "_handicapIndex"), handicapIndex), ScriptTransfer(i.caller, handicapIndex, handiId)] | |
35 | + | func call () = { | |
36 | + | let count = 1 | |
37 | + | let strList = listToStr(["1", "2", "3"]) | |
38 | + | if ((count == 1)) | |
39 | + | then throw(("strList,0==>" + toString(strList[0]))) | |
40 | + | else [IntegerEntry("int", 1)] | |
415 | 41 | } | |
416 | 42 | ||
417 | 43 | ||
418 | 44 | @Verifier(tx) | |
419 | 45 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
420 | 46 |
github/deemru/w8io/026f985 60.41 ms ◑