tx · 5NXBvXDpLiVQxJNNx2rEuwAtuqVkc3XZZAcNMh9PNGfr 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito: -0.05000000 Waves 2021.09.09 17:08 [1695610] smart account 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito > SELF 0.00000000 Waves
{ "type": 13, "id": "5NXBvXDpLiVQxJNNx2rEuwAtuqVkc3XZZAcNMh9PNGfr", "fee": 5000000, "feeAssetId": null, "timestamp": 1631196553677, "version": 2, "chainId": 84, "sender": "3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito", "senderPublicKey": "7PMrxEzirv6h9Z2zqLE47qrZd6v1AbRZER5Aqfo95Eyr", "proofs": [ "5jzmXiraskr8y7Gpt82rVcVRjMNJN7jwo7XMgFnJpfYQznk52d2aF26Dyg5eDmUinjMe3gT9md8XbHPURKRVfATm" ], "script": "base64:AAIFAAAAAAAAACgIAhIGCgQBAQEBEgMKAQESAwoBARIFCgMICAgSAwoBCBIECgIICBIAAAAANAAAAAAQaW5jdWJhdG9yQWRkcmVzcwEAAAAaAVQu1YzRxAHn1ekAzs1AJJ6xFAc06V7PK6oAAAAADmJyZWVkZXJBZGRyZXNzAQAAABoBVIXmeysidPaPsP+lKHIt9Vw8rE+lS45bjgAAAAAVcmFyaXR5UHJvdmlkZXJBZGRyZXNzAQAAABoBVPqvXAIOK77VhJOb48rzK/MJjwrn6vR1pAAAAAALZWdnc0Fzc2V0SWQBAAAAICUCZcz3BGjIvgFZkXjlWFo4ZhQTrUpMSrf+BRdIFxaDAAAAAAVTTE9UUwAAAAAAAAAACgAAAAAHV0FJVElORwAAAAAAAAAACAAAAAAMc3RlcER1cmF0aW9uAAAAAAAAAAAFAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAA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AAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleaF4Ff4=", "height": 1695610, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C79JPnYjxsGb6TbtibisTo5i1U9enaLp5PiZmrGcXYth Next: 36mz51n2TdDLiidgd9yAoxygkhgXpmHgjoNUcbbR4QkC Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let b = base58'3N285kYUMxPi6oZsdWrxhSY34dJHyu4kRN5' | |
7 | 7 | ||
8 | - | let c = base58' | |
8 | + | let c = base58'3NCman4dCzk1HWWU4DPTr5rsbhvuUCwwUZh' | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN' | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 10 | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = 8 | |
15 | 15 | ||
16 | - | func g (h) = { | |
17 | - | let i = getInteger(this, h) | |
18 | - | if ($isInstanceOf(i, "Int")) | |
16 | + | let g = 5 | |
17 | + | ||
18 | + | func h (i) = { | |
19 | + | let j = getInteger(this, i) | |
20 | + | if ($isInstanceOf(j, "Int")) | |
19 | 21 | then { | |
20 | - | let | |
21 | - | | |
22 | + | let k = j | |
23 | + | k | |
22 | 24 | } | |
23 | 25 | else 0 | |
24 | 26 | } | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
28 | - | let | |
29 | - | if ($isInstanceOf( | |
29 | + | func l (i) = { | |
30 | + | let j = getString(this, i) | |
31 | + | if ($isInstanceOf(j, "String")) | |
30 | 32 | then { | |
31 | - | let | |
32 | - | | |
33 | + | let m = j | |
34 | + | m | |
33 | 35 | } | |
34 | 36 | else "" | |
35 | 37 | } | |
36 | 38 | ||
37 | 39 | ||
38 | - | func | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
40 | + | func n (i) = { | |
41 | + | let j = getBoolean(this, i) | |
42 | + | if ($isInstanceOf(j, "Boolean")) | |
41 | 43 | then { | |
42 | - | let | |
43 | - | | |
44 | + | let k = j | |
45 | + | k | |
44 | 46 | } | |
45 | 47 | else false | |
46 | 48 | } | |
47 | 49 | ||
48 | 50 | ||
49 | - | func | |
50 | - | let | |
51 | - | if (( | |
51 | + | func o () = { | |
52 | + | let p = h("nextGameId") | |
53 | + | if ((p == 0)) | |
52 | 54 | then 1 | |
53 | - | else | |
55 | + | else p | |
54 | 56 | } | |
55 | 57 | ||
56 | 58 | ||
57 | - | func | |
59 | + | func q (r) = (r + "_currentGame") | |
58 | 60 | ||
59 | 61 | ||
60 | - | func | |
62 | + | func s (r) = h(q(r)) | |
61 | 63 | ||
62 | 64 | ||
63 | - | func | |
65 | + | func t (u) = ("slot" + toString(u)) | |
64 | 66 | ||
65 | 67 | ||
66 | - | func | |
68 | + | func v (u) = h(t(u)) | |
67 | 69 | ||
68 | 70 | ||
69 | - | func | |
71 | + | func w (x,r) = ((("game" + toString(x)) + "_") + r) | |
70 | 72 | ||
71 | 73 | ||
72 | - | func | |
74 | + | func y (x,r) = l(w(x, r)) | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
77 | + | func z (x) = (("game" + toString(x)) + "_maker") | |
76 | 78 | ||
77 | 79 | ||
78 | - | func | |
80 | + | func A (x) = l(z(x)) | |
79 | 81 | ||
80 | 82 | ||
81 | - | func | |
83 | + | func B (x) = (("game" + toString(x)) + "_taker") | |
82 | 84 | ||
83 | 85 | ||
84 | - | func | |
86 | + | func C (x) = l(B(x)) | |
85 | 87 | ||
86 | 88 | ||
87 | - | func | |
89 | + | func D (x) = (("game" + toString(x)) + "_betEggs") | |
88 | 90 | ||
89 | 91 | ||
90 | - | func | |
92 | + | func E (x) = h(D(x)) | |
91 | 93 | ||
92 | 94 | ||
93 | - | func | |
95 | + | func F (x) = (("game" + toString(x)) + "_waitingExpirationHeight") | |
94 | 96 | ||
95 | 97 | ||
96 | - | func | |
98 | + | func G (x) = h(F(x)) | |
97 | 99 | ||
98 | 100 | ||
99 | - | func | |
101 | + | func H (x) = (("game" + toString(x)) + "_expirationHeight") | |
100 | 102 | ||
101 | 103 | ||
102 | - | func | |
104 | + | func I (x) = h(H(x)) | |
103 | 105 | ||
104 | 106 | ||
105 | - | func | |
107 | + | func J (x,K) = ((("game" + toString(x)) + "_rarityRange_") + K) | |
106 | 108 | ||
107 | 109 | ||
108 | - | func | |
110 | + | func L (x,K) = h(J(x, K)) | |
109 | 111 | ||
110 | 112 | ||
111 | - | func | |
113 | + | func M (x) = (("game" + toString(x)) + "_step") | |
112 | 114 | ||
113 | 115 | ||
114 | - | func | |
116 | + | func N (x) = h(M(x)) | |
115 | 117 | ||
116 | 118 | ||
117 | - | func | |
119 | + | func O (x,P,K) = (((((("game" + toString(x)) + "_") + P) + "_") + K) + "Rarity") | |
118 | 120 | ||
119 | 121 | ||
120 | - | func | |
122 | + | func Q (x,P,K) = h(O(x, P, K)) | |
121 | 123 | ||
122 | 124 | ||
123 | - | func | |
125 | + | func R (x,P,K) = (((((("game" + toString(x)) + "_") + P) + "_") + K) + "DuckId") | |
124 | 126 | ||
125 | 127 | ||
126 | - | func | |
128 | + | func S (x,P,K) = l(R(x, P, K)) | |
127 | 129 | ||
128 | 130 | ||
129 | - | func | |
131 | + | func T (x,P) = (((("game" + toString(x)) + "_") + P) + "_commit") | |
130 | 132 | ||
131 | 133 | ||
132 | - | func | |
134 | + | func U (x,P) = l(T(x, P)) | |
133 | 135 | ||
134 | 136 | ||
135 | - | func | |
137 | + | func V (x,P) = (((("game" + toString(x)) + "_") + P) + "_duckOrder") | |
136 | 138 | ||
137 | 139 | ||
138 | - | func | |
140 | + | func W (x,P) = l(V(x, P)) | |
139 | 141 | ||
140 | 142 | ||
141 | - | func | |
143 | + | func X (x,r) = (((("game" + toString(x)) + "_") + r) + "_result") | |
142 | 144 | ||
143 | 145 | ||
144 | - | func | |
146 | + | func Y (x,r) = l(X(x, r)) | |
145 | 147 | ||
146 | 148 | ||
147 | - | func | |
149 | + | func Z (r) = (r + "_wins") | |
148 | 150 | ||
149 | 151 | ||
150 | - | func | |
152 | + | func aa (r) = h(Z(r)) | |
151 | 153 | ||
152 | 154 | ||
153 | - | func | |
155 | + | func ab (r) = (r + "_loses") | |
154 | 156 | ||
155 | 157 | ||
156 | - | func | |
158 | + | func ac (r) = h(ab(r)) | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
161 | + | func ad (r) = (r + "_draws") | |
160 | 162 | ||
161 | 163 | ||
162 | - | func | |
164 | + | func ae (r) = h(ad(r)) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func ae (af,ag) = if ((ag == "A")) | |
166 | - | then (af + 1) | |
167 | - | else (af + 0) | |
167 | + | func af () = "gamesPlayed" | |
168 | 168 | ||
169 | 169 | ||
170 | - | func ah (af,ag) = if ((ag == "B")) | |
171 | - | then (af + 1) | |
172 | - | else (af + 0) | |
170 | + | func ag () = h(af()) | |
173 | 171 | ||
174 | 172 | ||
175 | - | func ai (af,ag) = if ((ag == "C")) | |
176 | - | then (af + 1) | |
177 | - | else (af + 0) | |
173 | + | func ah (ai,aj) = (assetBalance(ai, aj) > 0) | |
178 | 174 | ||
179 | 175 | ||
180 | - | func aj (af,ag) = if ((ag == "D")) | |
181 | - | then (af + 1) | |
182 | - | else (af + 0) | |
183 | - | ||
184 | - | ||
185 | - | func ak (af,ag) = if ((ag == "E")) | |
186 | - | then (af + 1) | |
187 | - | else (af + 0) | |
188 | - | ||
189 | - | ||
190 | - | func al (af,ag) = if ((ag == "F")) | |
191 | - | then (af + 1) | |
192 | - | else (af + 0) | |
193 | - | ||
194 | - | ||
195 | - | func am (af,ag) = if ((ag == "G")) | |
196 | - | then (af + 1) | |
197 | - | else (af + 0) | |
198 | - | ||
199 | - | ||
200 | - | func an (af,ag) = if ((ag == "H")) | |
201 | - | then (af + 1) | |
202 | - | else (af + 0) | |
203 | - | ||
204 | - | ||
205 | - | func ao (ap) = if (contains(ap, "0")) | |
206 | - | then "" | |
207 | - | else ap | |
208 | - | ||
209 | - | ||
210 | - | func aq (ar) = { | |
211 | - | let as = split(dropRight(drop(ar, 5), 3), "") | |
212 | - | (((((((ao((toString({ | |
213 | - | let at = as | |
214 | - | let au = size(at) | |
215 | - | let av = 0 | |
216 | - | if ((au == 0)) | |
217 | - | then av | |
218 | - | else { | |
219 | - | let aw = ae(av, at[0]) | |
220 | - | if ((au == 1)) | |
221 | - | then aw | |
222 | - | else { | |
223 | - | let ax = ae(aw, at[1]) | |
224 | - | if ((au == 2)) | |
225 | - | then ax | |
226 | - | else { | |
227 | - | let ay = ae(ax, at[2]) | |
228 | - | if ((au == 3)) | |
229 | - | then ay | |
230 | - | else { | |
231 | - | let az = ae(ay, at[3]) | |
232 | - | if ((au == 4)) | |
233 | - | then az | |
234 | - | else { | |
235 | - | let aA = ae(az, at[4]) | |
236 | - | if ((au == 5)) | |
237 | - | then aA | |
238 | - | else { | |
239 | - | let aB = ae(aA, at[5]) | |
240 | - | if ((au == 6)) | |
241 | - | then aB | |
242 | - | else { | |
243 | - | let aC = ae(aB, at[6]) | |
244 | - | if ((au == 7)) | |
245 | - | then aC | |
246 | - | else { | |
247 | - | let aD = ae(aC, at[7]) | |
248 | - | if ((au == 8)) | |
249 | - | then aD | |
250 | - | else { | |
251 | - | let aE = ae(aD, at[8]) | |
252 | - | throw("List size exceed 8") | |
253 | - | } | |
254 | - | } | |
255 | - | } | |
256 | - | } | |
257 | - | } | |
258 | - | } | |
259 | - | } | |
260 | - | } | |
261 | - | } | |
262 | - | }) + "A")) + ao((toString({ | |
263 | - | let aF = as | |
264 | - | let aG = size(aF) | |
265 | - | let aH = 0 | |
266 | - | if ((aG == 0)) | |
267 | - | then aH | |
268 | - | else { | |
269 | - | let aI = ah(aH, aF[0]) | |
270 | - | if ((aG == 1)) | |
271 | - | then aI | |
272 | - | else { | |
273 | - | let aJ = ah(aI, aF[1]) | |
274 | - | if ((aG == 2)) | |
275 | - | then aJ | |
276 | - | else { | |
277 | - | let aK = ah(aJ, aF[2]) | |
278 | - | if ((aG == 3)) | |
279 | - | then aK | |
280 | - | else { | |
281 | - | let aL = ah(aK, aF[3]) | |
282 | - | if ((aG == 4)) | |
283 | - | then aL | |
284 | - | else { | |
285 | - | let aM = ah(aL, aF[4]) | |
286 | - | if ((aG == 5)) | |
287 | - | then aM | |
288 | - | else { | |
289 | - | let aN = ah(aM, aF[5]) | |
290 | - | if ((aG == 6)) | |
291 | - | then aN | |
292 | - | else { | |
293 | - | let aO = ah(aN, aF[6]) | |
294 | - | if ((aG == 7)) | |
295 | - | then aO | |
296 | - | else { | |
297 | - | let aP = ah(aO, aF[7]) | |
298 | - | if ((aG == 8)) | |
299 | - | then aP | |
300 | - | else { | |
301 | - | let aQ = ah(aP, aF[8]) | |
302 | - | throw("List size exceed 8") | |
303 | - | } | |
304 | - | } | |
305 | - | } | |
306 | - | } | |
307 | - | } | |
308 | - | } | |
309 | - | } | |
310 | - | } | |
311 | - | } | |
312 | - | }) + "B"))) + ao((toString({ | |
313 | - | let aR = as | |
314 | - | let aS = size(aR) | |
315 | - | let aT = 0 | |
316 | - | if ((aS == 0)) | |
317 | - | then aT | |
318 | - | else { | |
319 | - | let aU = ai(aT, aR[0]) | |
320 | - | if ((aS == 1)) | |
321 | - | then aU | |
322 | - | else { | |
323 | - | let aV = ai(aU, aR[1]) | |
324 | - | if ((aS == 2)) | |
325 | - | then aV | |
326 | - | else { | |
327 | - | let aW = ai(aV, aR[2]) | |
328 | - | if ((aS == 3)) | |
329 | - | then aW | |
330 | - | else { | |
331 | - | let aX = ai(aW, aR[3]) | |
332 | - | if ((aS == 4)) | |
333 | - | then aX | |
334 | - | else { | |
335 | - | let aY = ai(aX, aR[4]) | |
336 | - | if ((aS == 5)) | |
337 | - | then aY | |
338 | - | else { | |
339 | - | let aZ = ai(aY, aR[5]) | |
340 | - | if ((aS == 6)) | |
341 | - | then aZ | |
342 | - | else { | |
343 | - | let ba = ai(aZ, aR[6]) | |
344 | - | if ((aS == 7)) | |
345 | - | then ba | |
346 | - | else { | |
347 | - | let bb = ai(ba, aR[7]) | |
348 | - | if ((aS == 8)) | |
349 | - | then bb | |
350 | - | else { | |
351 | - | let bc = ai(bb, aR[8]) | |
352 | - | throw("List size exceed 8") | |
353 | - | } | |
354 | - | } | |
355 | - | } | |
356 | - | } | |
357 | - | } | |
358 | - | } | |
359 | - | } | |
360 | - | } | |
361 | - | } | |
362 | - | }) + "C"))) + ao((toString({ | |
363 | - | let bd = as | |
364 | - | let be = size(bd) | |
365 | - | let bf = 0 | |
366 | - | if ((be == 0)) | |
367 | - | then bf | |
368 | - | else { | |
369 | - | let bg = aj(bf, bd[0]) | |
370 | - | if ((be == 1)) | |
371 | - | then bg | |
372 | - | else { | |
373 | - | let bh = aj(bg, bd[1]) | |
374 | - | if ((be == 2)) | |
375 | - | then bh | |
376 | - | else { | |
377 | - | let bi = aj(bh, bd[2]) | |
378 | - | if ((be == 3)) | |
379 | - | then bi | |
380 | - | else { | |
381 | - | let bj = aj(bi, bd[3]) | |
382 | - | if ((be == 4)) | |
383 | - | then bj | |
384 | - | else { | |
385 | - | let bk = aj(bj, bd[4]) | |
386 | - | if ((be == 5)) | |
387 | - | then bk | |
388 | - | else { | |
389 | - | let bl = aj(bk, bd[5]) | |
390 | - | if ((be == 6)) | |
391 | - | then bl | |
392 | - | else { | |
393 | - | let bm = aj(bl, bd[6]) | |
394 | - | if ((be == 7)) | |
395 | - | then bm | |
396 | - | else { | |
397 | - | let bn = aj(bm, bd[7]) | |
398 | - | if ((be == 8)) | |
399 | - | then bn | |
400 | - | else { | |
401 | - | let bo = aj(bn, bd[8]) | |
402 | - | throw("List size exceed 8") | |
403 | - | } | |
404 | - | } | |
405 | - | } | |
406 | - | } | |
407 | - | } | |
408 | - | } | |
409 | - | } | |
410 | - | } | |
411 | - | } | |
412 | - | }) + "D"))) + ao((toString({ | |
413 | - | let bp = as | |
414 | - | let bq = size(bp) | |
415 | - | let br = 0 | |
416 | - | if ((bq == 0)) | |
417 | - | then br | |
418 | - | else { | |
419 | - | let bs = ak(br, bp[0]) | |
420 | - | if ((bq == 1)) | |
421 | - | then bs | |
422 | - | else { | |
423 | - | let bt = ak(bs, bp[1]) | |
424 | - | if ((bq == 2)) | |
425 | - | then bt | |
426 | - | else { | |
427 | - | let bu = ak(bt, bp[2]) | |
428 | - | if ((bq == 3)) | |
429 | - | then bu | |
430 | - | else { | |
431 | - | let bv = ak(bu, bp[3]) | |
432 | - | if ((bq == 4)) | |
433 | - | then bv | |
434 | - | else { | |
435 | - | let bw = ak(bv, bp[4]) | |
436 | - | if ((bq == 5)) | |
437 | - | then bw | |
438 | - | else { | |
439 | - | let bx = ak(bw, bp[5]) | |
440 | - | if ((bq == 6)) | |
441 | - | then bx | |
442 | - | else { | |
443 | - | let by = ak(bx, bp[6]) | |
444 | - | if ((bq == 7)) | |
445 | - | then by | |
446 | - | else { | |
447 | - | let bz = ak(by, bp[7]) | |
448 | - | if ((bq == 8)) | |
449 | - | then bz | |
450 | - | else { | |
451 | - | let bA = ak(bz, bp[8]) | |
452 | - | throw("List size exceed 8") | |
453 | - | } | |
454 | - | } | |
455 | - | } | |
456 | - | } | |
457 | - | } | |
458 | - | } | |
459 | - | } | |
460 | - | } | |
461 | - | } | |
462 | - | }) + "E"))) + ao((toString({ | |
463 | - | let bB = as | |
464 | - | let bC = size(bB) | |
465 | - | let bD = 0 | |
466 | - | if ((bC == 0)) | |
467 | - | then bD | |
468 | - | else { | |
469 | - | let bE = al(bD, bB[0]) | |
470 | - | if ((bC == 1)) | |
471 | - | then bE | |
472 | - | else { | |
473 | - | let bF = al(bE, bB[1]) | |
474 | - | if ((bC == 2)) | |
475 | - | then bF | |
476 | - | else { | |
477 | - | let bG = al(bF, bB[2]) | |
478 | - | if ((bC == 3)) | |
479 | - | then bG | |
480 | - | else { | |
481 | - | let bH = al(bG, bB[3]) | |
482 | - | if ((bC == 4)) | |
483 | - | then bH | |
484 | - | else { | |
485 | - | let bI = al(bH, bB[4]) | |
486 | - | if ((bC == 5)) | |
487 | - | then bI | |
488 | - | else { | |
489 | - | let bJ = al(bI, bB[5]) | |
490 | - | if ((bC == 6)) | |
491 | - | then bJ | |
492 | - | else { | |
493 | - | let bK = al(bJ, bB[6]) | |
494 | - | if ((bC == 7)) | |
495 | - | then bK | |
496 | - | else { | |
497 | - | let bL = al(bK, bB[7]) | |
498 | - | if ((bC == 8)) | |
499 | - | then bL | |
500 | - | else { | |
501 | - | let bM = al(bL, bB[8]) | |
502 | - | throw("List size exceed 8") | |
503 | - | } | |
504 | - | } | |
505 | - | } | |
506 | - | } | |
507 | - | } | |
508 | - | } | |
509 | - | } | |
510 | - | } | |
511 | - | } | |
512 | - | }) + "F"))) + ao((toString({ | |
513 | - | let bN = as | |
514 | - | let bO = size(bN) | |
515 | - | let bP = 0 | |
516 | - | if ((bO == 0)) | |
517 | - | then bP | |
518 | - | else { | |
519 | - | let bQ = am(bP, bN[0]) | |
520 | - | if ((bO == 1)) | |
521 | - | then bQ | |
522 | - | else { | |
523 | - | let bR = am(bQ, bN[1]) | |
524 | - | if ((bO == 2)) | |
525 | - | then bR | |
526 | - | else { | |
527 | - | let bS = am(bR, bN[2]) | |
528 | - | if ((bO == 3)) | |
529 | - | then bS | |
530 | - | else { | |
531 | - | let bT = am(bS, bN[3]) | |
532 | - | if ((bO == 4)) | |
533 | - | then bT | |
534 | - | else { | |
535 | - | let bU = am(bT, bN[4]) | |
536 | - | if ((bO == 5)) | |
537 | - | then bU | |
538 | - | else { | |
539 | - | let bV = am(bU, bN[5]) | |
540 | - | if ((bO == 6)) | |
541 | - | then bV | |
542 | - | else { | |
543 | - | let bW = am(bV, bN[6]) | |
544 | - | if ((bO == 7)) | |
545 | - | then bW | |
546 | - | else { | |
547 | - | let bX = am(bW, bN[7]) | |
548 | - | if ((bO == 8)) | |
549 | - | then bX | |
550 | - | else { | |
551 | - | let bY = am(bX, bN[8]) | |
552 | - | throw("List size exceed 8") | |
553 | - | } | |
554 | - | } | |
555 | - | } | |
556 | - | } | |
557 | - | } | |
558 | - | } | |
559 | - | } | |
560 | - | } | |
561 | - | } | |
562 | - | }) + "G"))) + ao((toString({ | |
563 | - | let bZ = as | |
564 | - | let ca = size(bZ) | |
565 | - | let cb = 0 | |
566 | - | if ((ca == 0)) | |
567 | - | then cb | |
568 | - | else { | |
569 | - | let cc = an(cb, bZ[0]) | |
570 | - | if ((ca == 1)) | |
571 | - | then cc | |
572 | - | else { | |
573 | - | let cd = an(cc, bZ[1]) | |
574 | - | if ((ca == 2)) | |
575 | - | then cd | |
576 | - | else { | |
577 | - | let ce = an(cd, bZ[2]) | |
578 | - | if ((ca == 3)) | |
579 | - | then ce | |
580 | - | else { | |
581 | - | let cf = an(ce, bZ[3]) | |
582 | - | if ((ca == 4)) | |
583 | - | then cf | |
584 | - | else { | |
585 | - | let cg = an(cf, bZ[4]) | |
586 | - | if ((ca == 5)) | |
587 | - | then cg | |
588 | - | else { | |
589 | - | let ch = an(cg, bZ[5]) | |
590 | - | if ((ca == 6)) | |
591 | - | then ch | |
592 | - | else { | |
593 | - | let ci = an(ch, bZ[6]) | |
594 | - | if ((ca == 7)) | |
595 | - | then ci | |
596 | - | else { | |
597 | - | let cj = an(ci, bZ[7]) | |
598 | - | if ((ca == 8)) | |
599 | - | then cj | |
600 | - | else { | |
601 | - | let ck = an(cj, bZ[8]) | |
602 | - | throw("List size exceed 8") | |
603 | - | } | |
604 | - | } | |
605 | - | } | |
606 | - | } | |
607 | - | } | |
608 | - | } | |
609 | - | } | |
610 | - | } | |
611 | - | } | |
612 | - | }) + "H"))) | |
613 | - | } | |
614 | - | ||
615 | - | ||
616 | - | func cl (cm) = if ((cm == "G")) | |
617 | - | then a | |
618 | - | else b | |
619 | - | ||
620 | - | ||
621 | - | func cn (co) = if (if ((value(assetInfo(co)).issuer == Address(b))) | |
622 | - | then true | |
623 | - | else (value(assetInfo(co)).issuer == Address(a))) | |
624 | - | then { | |
625 | - | let ar = value(assetInfo(co)).name | |
626 | - | let cm = take(takeRight(ar, 2), 1) | |
627 | - | let cp = ((aq(ar) + "-") + cm) | |
628 | - | let cq = getIntegerValue(Address(cl(cm)), (("stats_" + cp) + "_quantity")) | |
629 | - | let cr = pow((10000 / cq), 4, 5, 1, 2, FLOOR) | |
630 | - | if ((cr > 0)) | |
631 | - | then cr | |
632 | - | else 2 | |
633 | - | } | |
634 | - | else throw("not valid NFT") | |
635 | - | ||
636 | - | ||
637 | - | func cs (l,j) = if ((l > j)) | |
176 | + | func ak (m,k) = if ((m > k)) | |
638 | 177 | then 1 | |
639 | - | else if (( | |
178 | + | else if ((k > m)) | |
640 | 179 | then -1 | |
641 | 180 | else 0 | |
642 | 181 | ||
643 | 182 | ||
644 | - | func | |
645 | - | let | |
646 | - | if ((6 > | |
183 | + | func al (x) = { | |
184 | + | let am = N(x) | |
185 | + | if ((6 > am)) | |
647 | 186 | then { | |
648 | - | let | |
649 | - | if (( | |
187 | + | let an = I(x) | |
188 | + | if ((an == 0)) | |
650 | 189 | then throw("Game is not started") | |
651 | - | else if (( | |
190 | + | else if ((an > height)) | |
652 | 191 | then throw("Game is not finished or expired") | |
653 | - | else if ((( | |
192 | + | else if (((N(x) % 2) == 0)) | |
654 | 193 | then "maker" | |
655 | 194 | else "taker" | |
656 | 195 | } | |
657 | 196 | else { | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (( | |
197 | + | let ao = split(W(x, "maker"), ",") | |
198 | + | let ap = split(W(x, "taker"), ",") | |
199 | + | let aq = Q(x, "maker", ao[0]) | |
200 | + | let ar = Q(x, "maker", ao[1]) | |
201 | + | let as = Q(x, "maker", ao[2]) | |
202 | + | let at = Q(x, "taker", ap[0]) | |
203 | + | let au = Q(x, "taker", ap[1]) | |
204 | + | let av = Q(x, "taker", ap[2]) | |
205 | + | let aw = ((ak(aq, at) + ak(ar, au)) + ak(as, av)) | |
206 | + | if ((aw > 0)) | |
668 | 207 | then "maker" | |
669 | - | else if ((0 > | |
208 | + | else if ((0 > aw)) | |
670 | 209 | then "taker" | |
671 | 210 | else "draw" | |
672 | 211 | } | |
673 | 212 | } | |
674 | 213 | ||
675 | 214 | ||
676 | - | @Callable( | |
677 | - | func makeGame ( | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
683 | - | if (( | |
215 | + | @Callable(ax) | |
216 | + | func makeGame (u,ay,az,aA) = { | |
217 | + | let aB = toBase58String(ax.caller.bytes) | |
218 | + | let aC = v(u) | |
219 | + | let aD = value(ax.payments[0]) | |
220 | + | let aE = aD.amount | |
221 | + | let x = o() | |
222 | + | if ((s(aB) != 0)) | |
684 | 223 | then throw("You already have an active game") | |
685 | - | else if (if ((0 > | |
224 | + | else if (if ((0 > u)) | |
686 | 225 | then true | |
687 | - | else ( | |
226 | + | else (u >= e)) | |
688 | 227 | then throw("Invalid slot") | |
689 | - | else if (( | |
228 | + | else if ((aC != 0)) | |
690 | 229 | then throw("This slot is busy") | |
691 | - | else if (( | |
692 | - | then throw(("You can attach only EGGs with the following asset id: " + toBase58String( | |
693 | - | else if (( | |
230 | + | else if ((aD.assetId != d)) | |
231 | + | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(d))) | |
232 | + | else if ((aE != 1)) | |
694 | 233 | then throw("Bet must be 0.01 EGG during beta test") | |
695 | - | else if (if ((1 > | |
234 | + | else if (if ((1 > ay)) | |
696 | 235 | then true | |
697 | - | else ( | |
236 | + | else (ay > 5)) | |
698 | 237 | then throw("Invalid rarity range for the worst duck") | |
699 | - | else if (if ((1 > | |
238 | + | else if (if ((1 > az)) | |
700 | 239 | then true | |
701 | - | else ( | |
240 | + | else (az > 5)) | |
702 | 241 | then throw("Invalid rarity range for the medium duck") | |
703 | - | else if (if ((1 > | |
242 | + | else if (if ((1 > aA)) | |
704 | 243 | then true | |
705 | - | else ( | |
244 | + | else (aA > 5)) | |
706 | 245 | then throw("Invalid rarity range for the best duck") | |
707 | - | else if (( | |
708 | - | then throw("The medium | |
709 | - | else if (( | |
710 | - | then throw("The best | |
711 | - | else [IntegerEntry( | |
246 | + | else if ((ay > az)) | |
247 | + | then throw("The medium range can't be less than the worst one") | |
248 | + | else if ((az > aA)) | |
249 | + | then throw("The best range can't be worse than the medium one") | |
250 | + | else [IntegerEntry(q(aB), x), StringEntry(z(x), aB), StringEntry(w(x, aB), "maker"), IntegerEntry(D(x), aE), IntegerEntry(J(x, "worst"), ay), IntegerEntry(J(x, "medium"), az), IntegerEntry(J(x, "best"), aA), IntegerEntry(F(x), (height + f)), IntegerEntry(t(u), x), IntegerEntry("nextGameId", (x + 1))] | |
712 | 251 | } | |
713 | 252 | ||
714 | 253 | ||
715 | 254 | ||
716 | - | @Callable( | |
717 | - | func takeGame ( | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | if (( | |
255 | + | @Callable(ax) | |
256 | + | func takeGame (u) = { | |
257 | + | let aB = toBase58String(ax.caller.bytes) | |
258 | + | let x = v(u) | |
259 | + | let aD = value(ax.payments[0]) | |
260 | + | if ((s(aB) != 0)) | |
722 | 261 | then throw("You already have an active game") | |
723 | - | else if (if ((0 > | |
262 | + | else if (if ((0 > u)) | |
724 | 263 | then true | |
725 | - | else ( | |
264 | + | else (u >= e)) | |
726 | 265 | then throw("Invalid slot") | |
727 | - | else if ((u | |
266 | + | else if ((v(u) == 0)) | |
728 | 267 | then throw("This slot is empty") | |
729 | - | else if (( | |
730 | - | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String( | |
731 | - | else if (( | |
268 | + | else if ((aD.assetId != d)) | |
269 | + | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(d))) | |
270 | + | else if ((aD.amount != E(x))) | |
732 | 271 | then throw("Insufficient eggs amount") | |
733 | - | else if ((height >= | |
272 | + | else if ((height >= G(x))) | |
734 | 273 | then throw("This game is expired") | |
735 | - | else [IntegerEntry( | |
274 | + | else [IntegerEntry(q(aB), x), StringEntry(B(x), aB), StringEntry(w(x, aB), "taker"), IntegerEntry(M(x), 0), IntegerEntry(H(x), (height + g)), IntegerEntry(t(u), 0), IntegerEntry("gamesPlayed", (ag() + 1))] | |
736 | 275 | } | |
737 | 276 | ||
738 | 277 | ||
739 | 278 | ||
740 | - | @Callable( | |
741 | - | func kickGame ( | |
742 | - | let | |
743 | - | if (if ((0 > | |
279 | + | @Callable(ax) | |
280 | + | func kickGame (u) = { | |
281 | + | let x = v(u) | |
282 | + | if (if ((0 > u)) | |
744 | 283 | then true | |
745 | - | else ( | |
284 | + | else (u >= e)) | |
746 | 285 | then throw("Invalid slot") | |
747 | - | else if (( | |
286 | + | else if ((x == 0)) | |
748 | 287 | then throw("Slot is empty") | |
749 | - | else if (( | |
288 | + | else if ((G(x) > height)) | |
750 | 289 | then throw("Waiting is not finished yet") | |
751 | 290 | else { | |
752 | - | let | |
753 | - | [IntegerEntry( | |
291 | + | let aF = A(x) | |
292 | + | [IntegerEntry(q(aF), 0), IntegerEntry(t(u), 0), ScriptTransfer(Address(fromBase58String(aF)), E(x), d)] | |
754 | 293 | } | |
755 | 294 | } | |
756 | 295 | ||
757 | 296 | ||
758 | 297 | ||
759 | - | @Callable(cF) | |
760 | - | func pickDucks () = { | |
761 | - | let cJ = toBase58String(cF.caller.bytes) | |
762 | - | let w = r(cJ) | |
763 | - | let O = x(w, cJ) | |
764 | - | let cu = M(w) | |
765 | - | let cO = K(w, "worst") | |
766 | - | let cP = K(w, "medium") | |
767 | - | let cQ = K(w, "best") | |
768 | - | let cR = value(value(cF.payments[0]).assetId) | |
769 | - | let cS = value(value(cF.payments[1]).assetId) | |
770 | - | let cT = value(value(cF.payments[2]).assetId) | |
771 | - | let cU = cn(cR) | |
772 | - | let cV = cn(cS) | |
773 | - | let cW = cn(cT) | |
774 | - | if ((w == 0)) | |
775 | - | then throw("You don't have an active game") | |
776 | - | else if ((H(w) == 0)) | |
777 | - | then throw("Game is not started") | |
778 | - | else if (if ((cu == 0)) | |
779 | - | then (O != "taker") | |
780 | - | else false) | |
781 | - | then throw("It is the taker's turn to pick now") | |
782 | - | else if (if ((cu == 1)) | |
783 | - | then (O != "maker") | |
784 | - | else false) | |
785 | - | then throw("It is the maker's turn to pick now") | |
786 | - | else if ((cu > 1)) | |
787 | - | then throw("Ducks have already been picked") | |
788 | - | else if (if ((cU > (cO * 10))) | |
789 | - | then true | |
790 | - | else (((cO - 1) * 10) >= cU)) | |
791 | - | then throw("Worst duck doesn't fit rarity range") | |
792 | - | else if (if ((cV > (cP * 10))) | |
793 | - | then true | |
794 | - | else (((cP - 1) * 10) >= cV)) | |
795 | - | then throw("Medium duck doesn't fit rarity range") | |
796 | - | else if (if (if (if ((cQ == 5)) | |
797 | - | then (40 >= cW) | |
798 | - | else false) | |
799 | - | then true | |
800 | - | else (cW > (cQ * 10))) | |
801 | - | then true | |
802 | - | else (((cQ - 1) * 10) >= cW)) | |
803 | - | then throw("Best duck doesn't fit rarity range") | |
804 | - | else [IntegerEntry(N(w, O, "worst"), cU), IntegerEntry(N(w, O, "medium"), cV), IntegerEntry(N(w, O, "best"), cW), StringEntry(Q(w, O, "worst"), toBase58String(cR)), StringEntry(Q(w, O, "medium"), toBase58String(cS)), StringEntry(Q(w, O, "best"), toBase58String(cT)), IntegerEntry(L(w), (cu + 1)), IntegerEntry(G(w), (height + f)), ScriptTransfer(cF.caller, 1, cR), ScriptTransfer(cF.caller, 1, cS), ScriptTransfer(cF.caller, 1, cT)] | |
298 | + | @Callable(ax) | |
299 | + | func pickDucks (aG,aH,aI) = { | |
300 | + | let aB = toBase58String(ax.caller.bytes) | |
301 | + | let x = s(aB) | |
302 | + | let P = y(x, aB) | |
303 | + | let am = N(x) | |
304 | + | let aJ = L(x, "worst") | |
305 | + | let aK = L(x, "medium") | |
306 | + | let aL = L(x, "best") | |
307 | + | let aM = invoke(Address(c), "getAssetRarity", [aG], nil) | |
308 | + | if ((aM == aM)) | |
309 | + | then { | |
310 | + | let aN = { | |
311 | + | let j = aM | |
312 | + | if ($isInstanceOf(j, "Int")) | |
313 | + | then { | |
314 | + | let aO = j | |
315 | + | aO | |
316 | + | } | |
317 | + | else throw("Incorrect invoke result") | |
318 | + | } | |
319 | + | let aP = invoke(Address(c), "getAssetRarity", [aH], nil) | |
320 | + | if ((aP == aP)) | |
321 | + | then { | |
322 | + | let aQ = { | |
323 | + | let j = aP | |
324 | + | if ($isInstanceOf(j, "Int")) | |
325 | + | then { | |
326 | + | let aO = j | |
327 | + | aO | |
328 | + | } | |
329 | + | else throw("Incorrect invoke result") | |
330 | + | } | |
331 | + | let aR = invoke(Address(c), "getAssetRarity", [aI], nil) | |
332 | + | if ((aR == aR)) | |
333 | + | then { | |
334 | + | let aS = { | |
335 | + | let j = aM | |
336 | + | if ($isInstanceOf(j, "Int")) | |
337 | + | then { | |
338 | + | let aO = j | |
339 | + | aO | |
340 | + | } | |
341 | + | else throw("Incorrect invoke result") | |
342 | + | } | |
343 | + | if ((x == 0)) | |
344 | + | then throw("You don't have an active game") | |
345 | + | else if ((I(x) == 0)) | |
346 | + | then throw("Game is not started") | |
347 | + | else if (if ((am == 0)) | |
348 | + | then (P != "taker") | |
349 | + | else false) | |
350 | + | then throw("It is the taker's turn to pick now") | |
351 | + | else if (if ((am == 1)) | |
352 | + | then (P != "maker") | |
353 | + | else false) | |
354 | + | then throw("It is the maker's turn to pick now") | |
355 | + | else if ((am > 1)) | |
356 | + | then throw("Ducks have already been picked") | |
357 | + | else if (ah(ax.caller, fromBase58String(aG))) | |
358 | + | then throw((("Asset " + aG) + " doesn't belong to you")) | |
359 | + | else if (ah(ax.caller, fromBase58String(aH))) | |
360 | + | then throw((("Asset " + aH) + " doesn't belong to you")) | |
361 | + | else if (ah(ax.caller, fromBase58String(aI))) | |
362 | + | then throw((("Asset " + aI) + " doesn't belong to you")) | |
363 | + | else if (if ((5 > aJ)) | |
364 | + | then if ((aN > (aJ * 10))) | |
365 | + | then true | |
366 | + | else (((aJ - 1) * 10) >= aN) | |
367 | + | else false) | |
368 | + | then throw("Worst duck doesn't fit rarity range") | |
369 | + | else if (if ((5 > aK)) | |
370 | + | then if ((aQ > (aK * 10))) | |
371 | + | then true | |
372 | + | else (((aK - 1) * 10) >= aQ) | |
373 | + | else false) | |
374 | + | then throw("Medium duck doesn't fit rarity range") | |
375 | + | else if (if ((5 > aL)) | |
376 | + | then if ((aS > (aL * 10))) | |
377 | + | then true | |
378 | + | else (((aL - 1) * 10) >= aS) | |
379 | + | else false) | |
380 | + | then throw("Best duck doesn't fit rarity range") | |
381 | + | else if (if ((aJ == 5)) | |
382 | + | then (40 >= aN) | |
383 | + | else false) | |
384 | + | then throw("Worst duck doesn't fit rarity range") | |
385 | + | else if (if ((aK == 5)) | |
386 | + | then (40 >= aQ) | |
387 | + | else false) | |
388 | + | then throw("Medium duck doesn't fit rarity range") | |
389 | + | else if (if ((aL == 5)) | |
390 | + | then (40 >= aS) | |
391 | + | else false) | |
392 | + | then throw("Best duck doesn't fit rarity range") | |
393 | + | else if (if (if ((aN == aQ)) | |
394 | + | then true | |
395 | + | else (aN == aS)) | |
396 | + | then true | |
397 | + | else (aQ == aS)) | |
398 | + | then throw("Ducks of the same rarity can't play") | |
399 | + | else [IntegerEntry(O(x, P, "worst"), aN), IntegerEntry(O(x, P, "medium"), aQ), IntegerEntry(O(x, P, "best"), aS), StringEntry(R(x, P, "worst"), aG), StringEntry(R(x, P, "medium"), aH), StringEntry(R(x, P, "best"), aI), IntegerEntry(M(x), (am + 1)), IntegerEntry(H(x), (height + g))] | |
400 | + | } | |
401 | + | else throw("Strict value is not equal to itself.") | |
402 | + | } | |
403 | + | else throw("Strict value is not equal to itself.") | |
404 | + | } | |
405 | + | else throw("Strict value is not equal to itself.") | |
805 | 406 | } | |
806 | 407 | ||
807 | 408 | ||
808 | 409 | ||
809 | - | @Callable( | |
810 | - | func commit ( | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | if (( | |
410 | + | @Callable(ax) | |
411 | + | func commit (aT) = { | |
412 | + | let aB = toBase58String(ax.caller.bytes) | |
413 | + | let x = s(aB) | |
414 | + | let P = y(x, aB) | |
415 | + | let am = N(x) | |
416 | + | if ((x == 0)) | |
816 | 417 | then throw("You don't have an active game") | |
817 | - | else if ((2 > | |
418 | + | else if ((2 > am)) | |
818 | 419 | then throw("Commit is not started") | |
819 | - | else if (if (( | |
820 | - | then ( | |
420 | + | else if (if ((am == 2)) | |
421 | + | then (P != "taker") | |
821 | 422 | else false) | |
822 | 423 | then throw("It is the taker's turn to pick now") | |
823 | - | else if (if (( | |
824 | - | then ( | |
424 | + | else if (if ((am == 3)) | |
425 | + | then (P != "maker") | |
825 | 426 | else false) | |
826 | 427 | then throw("It is the maker's turn to pick now") | |
827 | - | else if (( | |
428 | + | else if ((am > 3)) | |
828 | 429 | then throw("Commit is finished") | |
829 | - | else [StringEntry( | |
430 | + | else [StringEntry(T(x, P), aT), IntegerEntry(M(x), (am + 1)), IntegerEntry(H(x), (height + g))] | |
830 | 431 | } | |
831 | 432 | ||
832 | 433 | ||
833 | 434 | ||
834 | - | @Callable( | |
835 | - | func reveal ( | |
836 | - | let | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | if (( | |
435 | + | @Callable(ax) | |
436 | + | func reveal (aU,aV) = { | |
437 | + | let aB = toBase58String(ax.caller.bytes) | |
438 | + | let x = s(aB) | |
439 | + | let P = y(x, aB) | |
440 | + | let am = N(x) | |
441 | + | if ((x == 0)) | |
841 | 442 | then throw("You don't have an active game") | |
842 | - | else if ((4 > | |
443 | + | else if ((4 > am)) | |
843 | 444 | then throw("Reveal is not started") | |
844 | - | else if (if (( | |
845 | - | then ( | |
445 | + | else if (if ((am == 4)) | |
446 | + | then (P != "taker") | |
846 | 447 | else false) | |
847 | 448 | then throw("It is the taker's turn to pick now") | |
848 | - | else if (if (( | |
849 | - | then ( | |
449 | + | else if (if ((am == 5)) | |
450 | + | then (P != "maker") | |
850 | 451 | else false) | |
851 | 452 | then throw("It is the maker's turn to pick now") | |
852 | - | else if (( | |
453 | + | else if ((am > 5)) | |
853 | 454 | then throw("Reveal is finished") | |
854 | - | else if (if (if (if (if (if (( | |
855 | - | then ( | |
455 | + | else if (if (if (if (if (if ((aU != "worst,medium,best")) | |
456 | + | then (aU != "worst,best,medium") | |
856 | 457 | else false) | |
857 | - | then ( | |
458 | + | then (aU != "medium,worst,best") | |
858 | 459 | else false) | |
859 | - | then ( | |
460 | + | then (aU != "medium,best,worst") | |
860 | 461 | else false) | |
861 | - | then ( | |
462 | + | then (aU != "best,worst,medium") | |
862 | 463 | else false) | |
863 | - | then ( | |
464 | + | then (aU != "best,medium,worst") | |
864 | 465 | else false) | |
865 | 466 | then throw("Reveal data is not valid") | |
866 | - | else if ((toBase58String(sha256(toBytes(( | |
467 | + | else if ((toBase58String(sha256(toBytes((aU + aV)))) != U(x, P))) | |
867 | 468 | then throw("Reveal doesn't match commit") | |
868 | - | else [StringEntry( | |
469 | + | else [StringEntry(V(x, P), aU), IntegerEntry(M(x), (am + 1)), IntegerEntry(H(x), (height + g))] | |
869 | 470 | } | |
870 | 471 | ||
871 | 472 | ||
872 | 473 | ||
873 | - | @Callable( | |
474 | + | @Callable(ax) | |
874 | 475 | func getPrize () = { | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | then | |
880 | - | else | |
881 | - | let | |
882 | - | if (( | |
476 | + | let aB = toBase58String(ax.caller.bytes) | |
477 | + | let x = s(aB) | |
478 | + | let P = y(x, aB) | |
479 | + | let aW = if ((P == "maker")) | |
480 | + | then C(x) | |
481 | + | else A(x) | |
482 | + | let aX = al(x) | |
483 | + | if ((x == 0)) | |
883 | 484 | then throw("You don't have an active game") | |
884 | - | else if (( | |
885 | - | then [IntegerEntry( | |
886 | - | else if (( | |
887 | - | then [IntegerEntry( | |
888 | - | else [IntegerEntry( | |
485 | + | else if ((aX == P)) | |
486 | + | then [IntegerEntry(q(aB), 0), IntegerEntry(q(aW), 0), IntegerEntry(Z(aB), (aa(aB) + 1)), IntegerEntry(ab(aW), (ac(aW) + 1)), StringEntry(X(x, aB), "win"), StringEntry(X(x, aW), "lose"), ScriptTransfer(ax.caller, (E(x) * 2), d)] | |
487 | + | else if ((aX == "draw")) | |
488 | + | then [IntegerEntry(q(aB), 0), IntegerEntry(ad(aB), (ae(aB) + 1)), StringEntry(X(x, aB), "draw"), ScriptTransfer(ax.caller, E(x), d)] | |
489 | + | else [IntegerEntry(q(aB), 0)] | |
889 | 490 | } | |
890 | 491 | ||
891 | 492 | ||
892 | - | @Verifier( | |
893 | - | func | |
493 | + | @Verifier(aY) | |
494 | + | func aZ () = sigVerify(aY.bodyBytes, aY.proofs[0], aY.senderPublicKey) | |
894 | 495 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh' | |
5 | 5 | ||
6 | 6 | let b = base58'3N285kYUMxPi6oZsdWrxhSY34dJHyu4kRN5' | |
7 | 7 | ||
8 | - | let c = base58' | |
8 | + | let c = base58'3NCman4dCzk1HWWU4DPTr5rsbhvuUCwwUZh' | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN' | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 10 | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = 8 | |
15 | 15 | ||
16 | - | func g (h) = { | |
17 | - | let i = getInteger(this, h) | |
18 | - | if ($isInstanceOf(i, "Int")) | |
16 | + | let g = 5 | |
17 | + | ||
18 | + | func h (i) = { | |
19 | + | let j = getInteger(this, i) | |
20 | + | if ($isInstanceOf(j, "Int")) | |
19 | 21 | then { | |
20 | - | let | |
21 | - | | |
22 | + | let k = j | |
23 | + | k | |
22 | 24 | } | |
23 | 25 | else 0 | |
24 | 26 | } | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
28 | - | let | |
29 | - | if ($isInstanceOf( | |
29 | + | func l (i) = { | |
30 | + | let j = getString(this, i) | |
31 | + | if ($isInstanceOf(j, "String")) | |
30 | 32 | then { | |
31 | - | let | |
32 | - | | |
33 | + | let m = j | |
34 | + | m | |
33 | 35 | } | |
34 | 36 | else "" | |
35 | 37 | } | |
36 | 38 | ||
37 | 39 | ||
38 | - | func | |
39 | - | let | |
40 | - | if ($isInstanceOf( | |
40 | + | func n (i) = { | |
41 | + | let j = getBoolean(this, i) | |
42 | + | if ($isInstanceOf(j, "Boolean")) | |
41 | 43 | then { | |
42 | - | let | |
43 | - | | |
44 | + | let k = j | |
45 | + | k | |
44 | 46 | } | |
45 | 47 | else false | |
46 | 48 | } | |
47 | 49 | ||
48 | 50 | ||
49 | - | func | |
50 | - | let | |
51 | - | if (( | |
51 | + | func o () = { | |
52 | + | let p = h("nextGameId") | |
53 | + | if ((p == 0)) | |
52 | 54 | then 1 | |
53 | - | else | |
55 | + | else p | |
54 | 56 | } | |
55 | 57 | ||
56 | 58 | ||
57 | - | func | |
59 | + | func q (r) = (r + "_currentGame") | |
58 | 60 | ||
59 | 61 | ||
60 | - | func | |
62 | + | func s (r) = h(q(r)) | |
61 | 63 | ||
62 | 64 | ||
63 | - | func | |
65 | + | func t (u) = ("slot" + toString(u)) | |
64 | 66 | ||
65 | 67 | ||
66 | - | func | |
68 | + | func v (u) = h(t(u)) | |
67 | 69 | ||
68 | 70 | ||
69 | - | func | |
71 | + | func w (x,r) = ((("game" + toString(x)) + "_") + r) | |
70 | 72 | ||
71 | 73 | ||
72 | - | func | |
74 | + | func y (x,r) = l(w(x, r)) | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
77 | + | func z (x) = (("game" + toString(x)) + "_maker") | |
76 | 78 | ||
77 | 79 | ||
78 | - | func | |
80 | + | func A (x) = l(z(x)) | |
79 | 81 | ||
80 | 82 | ||
81 | - | func | |
83 | + | func B (x) = (("game" + toString(x)) + "_taker") | |
82 | 84 | ||
83 | 85 | ||
84 | - | func | |
86 | + | func C (x) = l(B(x)) | |
85 | 87 | ||
86 | 88 | ||
87 | - | func | |
89 | + | func D (x) = (("game" + toString(x)) + "_betEggs") | |
88 | 90 | ||
89 | 91 | ||
90 | - | func | |
92 | + | func E (x) = h(D(x)) | |
91 | 93 | ||
92 | 94 | ||
93 | - | func | |
95 | + | func F (x) = (("game" + toString(x)) + "_waitingExpirationHeight") | |
94 | 96 | ||
95 | 97 | ||
96 | - | func | |
98 | + | func G (x) = h(F(x)) | |
97 | 99 | ||
98 | 100 | ||
99 | - | func | |
101 | + | func H (x) = (("game" + toString(x)) + "_expirationHeight") | |
100 | 102 | ||
101 | 103 | ||
102 | - | func | |
104 | + | func I (x) = h(H(x)) | |
103 | 105 | ||
104 | 106 | ||
105 | - | func | |
107 | + | func J (x,K) = ((("game" + toString(x)) + "_rarityRange_") + K) | |
106 | 108 | ||
107 | 109 | ||
108 | - | func | |
110 | + | func L (x,K) = h(J(x, K)) | |
109 | 111 | ||
110 | 112 | ||
111 | - | func | |
113 | + | func M (x) = (("game" + toString(x)) + "_step") | |
112 | 114 | ||
113 | 115 | ||
114 | - | func | |
116 | + | func N (x) = h(M(x)) | |
115 | 117 | ||
116 | 118 | ||
117 | - | func | |
119 | + | func O (x,P,K) = (((((("game" + toString(x)) + "_") + P) + "_") + K) + "Rarity") | |
118 | 120 | ||
119 | 121 | ||
120 | - | func | |
122 | + | func Q (x,P,K) = h(O(x, P, K)) | |
121 | 123 | ||
122 | 124 | ||
123 | - | func | |
125 | + | func R (x,P,K) = (((((("game" + toString(x)) + "_") + P) + "_") + K) + "DuckId") | |
124 | 126 | ||
125 | 127 | ||
126 | - | func | |
128 | + | func S (x,P,K) = l(R(x, P, K)) | |
127 | 129 | ||
128 | 130 | ||
129 | - | func | |
131 | + | func T (x,P) = (((("game" + toString(x)) + "_") + P) + "_commit") | |
130 | 132 | ||
131 | 133 | ||
132 | - | func | |
134 | + | func U (x,P) = l(T(x, P)) | |
133 | 135 | ||
134 | 136 | ||
135 | - | func | |
137 | + | func V (x,P) = (((("game" + toString(x)) + "_") + P) + "_duckOrder") | |
136 | 138 | ||
137 | 139 | ||
138 | - | func | |
140 | + | func W (x,P) = l(V(x, P)) | |
139 | 141 | ||
140 | 142 | ||
141 | - | func | |
143 | + | func X (x,r) = (((("game" + toString(x)) + "_") + r) + "_result") | |
142 | 144 | ||
143 | 145 | ||
144 | - | func | |
146 | + | func Y (x,r) = l(X(x, r)) | |
145 | 147 | ||
146 | 148 | ||
147 | - | func | |
149 | + | func Z (r) = (r + "_wins") | |
148 | 150 | ||
149 | 151 | ||
150 | - | func | |
152 | + | func aa (r) = h(Z(r)) | |
151 | 153 | ||
152 | 154 | ||
153 | - | func | |
155 | + | func ab (r) = (r + "_loses") | |
154 | 156 | ||
155 | 157 | ||
156 | - | func | |
158 | + | func ac (r) = h(ab(r)) | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
161 | + | func ad (r) = (r + "_draws") | |
160 | 162 | ||
161 | 163 | ||
162 | - | func | |
164 | + | func ae (r) = h(ad(r)) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func ae (af,ag) = if ((ag == "A")) | |
166 | - | then (af + 1) | |
167 | - | else (af + 0) | |
167 | + | func af () = "gamesPlayed" | |
168 | 168 | ||
169 | 169 | ||
170 | - | func ah (af,ag) = if ((ag == "B")) | |
171 | - | then (af + 1) | |
172 | - | else (af + 0) | |
170 | + | func ag () = h(af()) | |
173 | 171 | ||
174 | 172 | ||
175 | - | func ai (af,ag) = if ((ag == "C")) | |
176 | - | then (af + 1) | |
177 | - | else (af + 0) | |
173 | + | func ah (ai,aj) = (assetBalance(ai, aj) > 0) | |
178 | 174 | ||
179 | 175 | ||
180 | - | func aj (af,ag) = if ((ag == "D")) | |
181 | - | then (af + 1) | |
182 | - | else (af + 0) | |
183 | - | ||
184 | - | ||
185 | - | func ak (af,ag) = if ((ag == "E")) | |
186 | - | then (af + 1) | |
187 | - | else (af + 0) | |
188 | - | ||
189 | - | ||
190 | - | func al (af,ag) = if ((ag == "F")) | |
191 | - | then (af + 1) | |
192 | - | else (af + 0) | |
193 | - | ||
194 | - | ||
195 | - | func am (af,ag) = if ((ag == "G")) | |
196 | - | then (af + 1) | |
197 | - | else (af + 0) | |
198 | - | ||
199 | - | ||
200 | - | func an (af,ag) = if ((ag == "H")) | |
201 | - | then (af + 1) | |
202 | - | else (af + 0) | |
203 | - | ||
204 | - | ||
205 | - | func ao (ap) = if (contains(ap, "0")) | |
206 | - | then "" | |
207 | - | else ap | |
208 | - | ||
209 | - | ||
210 | - | func aq (ar) = { | |
211 | - | let as = split(dropRight(drop(ar, 5), 3), "") | |
212 | - | (((((((ao((toString({ | |
213 | - | let at = as | |
214 | - | let au = size(at) | |
215 | - | let av = 0 | |
216 | - | if ((au == 0)) | |
217 | - | then av | |
218 | - | else { | |
219 | - | let aw = ae(av, at[0]) | |
220 | - | if ((au == 1)) | |
221 | - | then aw | |
222 | - | else { | |
223 | - | let ax = ae(aw, at[1]) | |
224 | - | if ((au == 2)) | |
225 | - | then ax | |
226 | - | else { | |
227 | - | let ay = ae(ax, at[2]) | |
228 | - | if ((au == 3)) | |
229 | - | then ay | |
230 | - | else { | |
231 | - | let az = ae(ay, at[3]) | |
232 | - | if ((au == 4)) | |
233 | - | then az | |
234 | - | else { | |
235 | - | let aA = ae(az, at[4]) | |
236 | - | if ((au == 5)) | |
237 | - | then aA | |
238 | - | else { | |
239 | - | let aB = ae(aA, at[5]) | |
240 | - | if ((au == 6)) | |
241 | - | then aB | |
242 | - | else { | |
243 | - | let aC = ae(aB, at[6]) | |
244 | - | if ((au == 7)) | |
245 | - | then aC | |
246 | - | else { | |
247 | - | let aD = ae(aC, at[7]) | |
248 | - | if ((au == 8)) | |
249 | - | then aD | |
250 | - | else { | |
251 | - | let aE = ae(aD, at[8]) | |
252 | - | throw("List size exceed 8") | |
253 | - | } | |
254 | - | } | |
255 | - | } | |
256 | - | } | |
257 | - | } | |
258 | - | } | |
259 | - | } | |
260 | - | } | |
261 | - | } | |
262 | - | }) + "A")) + ao((toString({ | |
263 | - | let aF = as | |
264 | - | let aG = size(aF) | |
265 | - | let aH = 0 | |
266 | - | if ((aG == 0)) | |
267 | - | then aH | |
268 | - | else { | |
269 | - | let aI = ah(aH, aF[0]) | |
270 | - | if ((aG == 1)) | |
271 | - | then aI | |
272 | - | else { | |
273 | - | let aJ = ah(aI, aF[1]) | |
274 | - | if ((aG == 2)) | |
275 | - | then aJ | |
276 | - | else { | |
277 | - | let aK = ah(aJ, aF[2]) | |
278 | - | if ((aG == 3)) | |
279 | - | then aK | |
280 | - | else { | |
281 | - | let aL = ah(aK, aF[3]) | |
282 | - | if ((aG == 4)) | |
283 | - | then aL | |
284 | - | else { | |
285 | - | let aM = ah(aL, aF[4]) | |
286 | - | if ((aG == 5)) | |
287 | - | then aM | |
288 | - | else { | |
289 | - | let aN = ah(aM, aF[5]) | |
290 | - | if ((aG == 6)) | |
291 | - | then aN | |
292 | - | else { | |
293 | - | let aO = ah(aN, aF[6]) | |
294 | - | if ((aG == 7)) | |
295 | - | then aO | |
296 | - | else { | |
297 | - | let aP = ah(aO, aF[7]) | |
298 | - | if ((aG == 8)) | |
299 | - | then aP | |
300 | - | else { | |
301 | - | let aQ = ah(aP, aF[8]) | |
302 | - | throw("List size exceed 8") | |
303 | - | } | |
304 | - | } | |
305 | - | } | |
306 | - | } | |
307 | - | } | |
308 | - | } | |
309 | - | } | |
310 | - | } | |
311 | - | } | |
312 | - | }) + "B"))) + ao((toString({ | |
313 | - | let aR = as | |
314 | - | let aS = size(aR) | |
315 | - | let aT = 0 | |
316 | - | if ((aS == 0)) | |
317 | - | then aT | |
318 | - | else { | |
319 | - | let aU = ai(aT, aR[0]) | |
320 | - | if ((aS == 1)) | |
321 | - | then aU | |
322 | - | else { | |
323 | - | let aV = ai(aU, aR[1]) | |
324 | - | if ((aS == 2)) | |
325 | - | then aV | |
326 | - | else { | |
327 | - | let aW = ai(aV, aR[2]) | |
328 | - | if ((aS == 3)) | |
329 | - | then aW | |
330 | - | else { | |
331 | - | let aX = ai(aW, aR[3]) | |
332 | - | if ((aS == 4)) | |
333 | - | then aX | |
334 | - | else { | |
335 | - | let aY = ai(aX, aR[4]) | |
336 | - | if ((aS == 5)) | |
337 | - | then aY | |
338 | - | else { | |
339 | - | let aZ = ai(aY, aR[5]) | |
340 | - | if ((aS == 6)) | |
341 | - | then aZ | |
342 | - | else { | |
343 | - | let ba = ai(aZ, aR[6]) | |
344 | - | if ((aS == 7)) | |
345 | - | then ba | |
346 | - | else { | |
347 | - | let bb = ai(ba, aR[7]) | |
348 | - | if ((aS == 8)) | |
349 | - | then bb | |
350 | - | else { | |
351 | - | let bc = ai(bb, aR[8]) | |
352 | - | throw("List size exceed 8") | |
353 | - | } | |
354 | - | } | |
355 | - | } | |
356 | - | } | |
357 | - | } | |
358 | - | } | |
359 | - | } | |
360 | - | } | |
361 | - | } | |
362 | - | }) + "C"))) + ao((toString({ | |
363 | - | let bd = as | |
364 | - | let be = size(bd) | |
365 | - | let bf = 0 | |
366 | - | if ((be == 0)) | |
367 | - | then bf | |
368 | - | else { | |
369 | - | let bg = aj(bf, bd[0]) | |
370 | - | if ((be == 1)) | |
371 | - | then bg | |
372 | - | else { | |
373 | - | let bh = aj(bg, bd[1]) | |
374 | - | if ((be == 2)) | |
375 | - | then bh | |
376 | - | else { | |
377 | - | let bi = aj(bh, bd[2]) | |
378 | - | if ((be == 3)) | |
379 | - | then bi | |
380 | - | else { | |
381 | - | let bj = aj(bi, bd[3]) | |
382 | - | if ((be == 4)) | |
383 | - | then bj | |
384 | - | else { | |
385 | - | let bk = aj(bj, bd[4]) | |
386 | - | if ((be == 5)) | |
387 | - | then bk | |
388 | - | else { | |
389 | - | let bl = aj(bk, bd[5]) | |
390 | - | if ((be == 6)) | |
391 | - | then bl | |
392 | - | else { | |
393 | - | let bm = aj(bl, bd[6]) | |
394 | - | if ((be == 7)) | |
395 | - | then bm | |
396 | - | else { | |
397 | - | let bn = aj(bm, bd[7]) | |
398 | - | if ((be == 8)) | |
399 | - | then bn | |
400 | - | else { | |
401 | - | let bo = aj(bn, bd[8]) | |
402 | - | throw("List size exceed 8") | |
403 | - | } | |
404 | - | } | |
405 | - | } | |
406 | - | } | |
407 | - | } | |
408 | - | } | |
409 | - | } | |
410 | - | } | |
411 | - | } | |
412 | - | }) + "D"))) + ao((toString({ | |
413 | - | let bp = as | |
414 | - | let bq = size(bp) | |
415 | - | let br = 0 | |
416 | - | if ((bq == 0)) | |
417 | - | then br | |
418 | - | else { | |
419 | - | let bs = ak(br, bp[0]) | |
420 | - | if ((bq == 1)) | |
421 | - | then bs | |
422 | - | else { | |
423 | - | let bt = ak(bs, bp[1]) | |
424 | - | if ((bq == 2)) | |
425 | - | then bt | |
426 | - | else { | |
427 | - | let bu = ak(bt, bp[2]) | |
428 | - | if ((bq == 3)) | |
429 | - | then bu | |
430 | - | else { | |
431 | - | let bv = ak(bu, bp[3]) | |
432 | - | if ((bq == 4)) | |
433 | - | then bv | |
434 | - | else { | |
435 | - | let bw = ak(bv, bp[4]) | |
436 | - | if ((bq == 5)) | |
437 | - | then bw | |
438 | - | else { | |
439 | - | let bx = ak(bw, bp[5]) | |
440 | - | if ((bq == 6)) | |
441 | - | then bx | |
442 | - | else { | |
443 | - | let by = ak(bx, bp[6]) | |
444 | - | if ((bq == 7)) | |
445 | - | then by | |
446 | - | else { | |
447 | - | let bz = ak(by, bp[7]) | |
448 | - | if ((bq == 8)) | |
449 | - | then bz | |
450 | - | else { | |
451 | - | let bA = ak(bz, bp[8]) | |
452 | - | throw("List size exceed 8") | |
453 | - | } | |
454 | - | } | |
455 | - | } | |
456 | - | } | |
457 | - | } | |
458 | - | } | |
459 | - | } | |
460 | - | } | |
461 | - | } | |
462 | - | }) + "E"))) + ao((toString({ | |
463 | - | let bB = as | |
464 | - | let bC = size(bB) | |
465 | - | let bD = 0 | |
466 | - | if ((bC == 0)) | |
467 | - | then bD | |
468 | - | else { | |
469 | - | let bE = al(bD, bB[0]) | |
470 | - | if ((bC == 1)) | |
471 | - | then bE | |
472 | - | else { | |
473 | - | let bF = al(bE, bB[1]) | |
474 | - | if ((bC == 2)) | |
475 | - | then bF | |
476 | - | else { | |
477 | - | let bG = al(bF, bB[2]) | |
478 | - | if ((bC == 3)) | |
479 | - | then bG | |
480 | - | else { | |
481 | - | let bH = al(bG, bB[3]) | |
482 | - | if ((bC == 4)) | |
483 | - | then bH | |
484 | - | else { | |
485 | - | let bI = al(bH, bB[4]) | |
486 | - | if ((bC == 5)) | |
487 | - | then bI | |
488 | - | else { | |
489 | - | let bJ = al(bI, bB[5]) | |
490 | - | if ((bC == 6)) | |
491 | - | then bJ | |
492 | - | else { | |
493 | - | let bK = al(bJ, bB[6]) | |
494 | - | if ((bC == 7)) | |
495 | - | then bK | |
496 | - | else { | |
497 | - | let bL = al(bK, bB[7]) | |
498 | - | if ((bC == 8)) | |
499 | - | then bL | |
500 | - | else { | |
501 | - | let bM = al(bL, bB[8]) | |
502 | - | throw("List size exceed 8") | |
503 | - | } | |
504 | - | } | |
505 | - | } | |
506 | - | } | |
507 | - | } | |
508 | - | } | |
509 | - | } | |
510 | - | } | |
511 | - | } | |
512 | - | }) + "F"))) + ao((toString({ | |
513 | - | let bN = as | |
514 | - | let bO = size(bN) | |
515 | - | let bP = 0 | |
516 | - | if ((bO == 0)) | |
517 | - | then bP | |
518 | - | else { | |
519 | - | let bQ = am(bP, bN[0]) | |
520 | - | if ((bO == 1)) | |
521 | - | then bQ | |
522 | - | else { | |
523 | - | let bR = am(bQ, bN[1]) | |
524 | - | if ((bO == 2)) | |
525 | - | then bR | |
526 | - | else { | |
527 | - | let bS = am(bR, bN[2]) | |
528 | - | if ((bO == 3)) | |
529 | - | then bS | |
530 | - | else { | |
531 | - | let bT = am(bS, bN[3]) | |
532 | - | if ((bO == 4)) | |
533 | - | then bT | |
534 | - | else { | |
535 | - | let bU = am(bT, bN[4]) | |
536 | - | if ((bO == 5)) | |
537 | - | then bU | |
538 | - | else { | |
539 | - | let bV = am(bU, bN[5]) | |
540 | - | if ((bO == 6)) | |
541 | - | then bV | |
542 | - | else { | |
543 | - | let bW = am(bV, bN[6]) | |
544 | - | if ((bO == 7)) | |
545 | - | then bW | |
546 | - | else { | |
547 | - | let bX = am(bW, bN[7]) | |
548 | - | if ((bO == 8)) | |
549 | - | then bX | |
550 | - | else { | |
551 | - | let bY = am(bX, bN[8]) | |
552 | - | throw("List size exceed 8") | |
553 | - | } | |
554 | - | } | |
555 | - | } | |
556 | - | } | |
557 | - | } | |
558 | - | } | |
559 | - | } | |
560 | - | } | |
561 | - | } | |
562 | - | }) + "G"))) + ao((toString({ | |
563 | - | let bZ = as | |
564 | - | let ca = size(bZ) | |
565 | - | let cb = 0 | |
566 | - | if ((ca == 0)) | |
567 | - | then cb | |
568 | - | else { | |
569 | - | let cc = an(cb, bZ[0]) | |
570 | - | if ((ca == 1)) | |
571 | - | then cc | |
572 | - | else { | |
573 | - | let cd = an(cc, bZ[1]) | |
574 | - | if ((ca == 2)) | |
575 | - | then cd | |
576 | - | else { | |
577 | - | let ce = an(cd, bZ[2]) | |
578 | - | if ((ca == 3)) | |
579 | - | then ce | |
580 | - | else { | |
581 | - | let cf = an(ce, bZ[3]) | |
582 | - | if ((ca == 4)) | |
583 | - | then cf | |
584 | - | else { | |
585 | - | let cg = an(cf, bZ[4]) | |
586 | - | if ((ca == 5)) | |
587 | - | then cg | |
588 | - | else { | |
589 | - | let ch = an(cg, bZ[5]) | |
590 | - | if ((ca == 6)) | |
591 | - | then ch | |
592 | - | else { | |
593 | - | let ci = an(ch, bZ[6]) | |
594 | - | if ((ca == 7)) | |
595 | - | then ci | |
596 | - | else { | |
597 | - | let cj = an(ci, bZ[7]) | |
598 | - | if ((ca == 8)) | |
599 | - | then cj | |
600 | - | else { | |
601 | - | let ck = an(cj, bZ[8]) | |
602 | - | throw("List size exceed 8") | |
603 | - | } | |
604 | - | } | |
605 | - | } | |
606 | - | } | |
607 | - | } | |
608 | - | } | |
609 | - | } | |
610 | - | } | |
611 | - | } | |
612 | - | }) + "H"))) | |
613 | - | } | |
614 | - | ||
615 | - | ||
616 | - | func cl (cm) = if ((cm == "G")) | |
617 | - | then a | |
618 | - | else b | |
619 | - | ||
620 | - | ||
621 | - | func cn (co) = if (if ((value(assetInfo(co)).issuer == Address(b))) | |
622 | - | then true | |
623 | - | else (value(assetInfo(co)).issuer == Address(a))) | |
624 | - | then { | |
625 | - | let ar = value(assetInfo(co)).name | |
626 | - | let cm = take(takeRight(ar, 2), 1) | |
627 | - | let cp = ((aq(ar) + "-") + cm) | |
628 | - | let cq = getIntegerValue(Address(cl(cm)), (("stats_" + cp) + "_quantity")) | |
629 | - | let cr = pow((10000 / cq), 4, 5, 1, 2, FLOOR) | |
630 | - | if ((cr > 0)) | |
631 | - | then cr | |
632 | - | else 2 | |
633 | - | } | |
634 | - | else throw("not valid NFT") | |
635 | - | ||
636 | - | ||
637 | - | func cs (l,j) = if ((l > j)) | |
176 | + | func ak (m,k) = if ((m > k)) | |
638 | 177 | then 1 | |
639 | - | else if (( | |
178 | + | else if ((k > m)) | |
640 | 179 | then -1 | |
641 | 180 | else 0 | |
642 | 181 | ||
643 | 182 | ||
644 | - | func | |
645 | - | let | |
646 | - | if ((6 > | |
183 | + | func al (x) = { | |
184 | + | let am = N(x) | |
185 | + | if ((6 > am)) | |
647 | 186 | then { | |
648 | - | let | |
649 | - | if (( | |
187 | + | let an = I(x) | |
188 | + | if ((an == 0)) | |
650 | 189 | then throw("Game is not started") | |
651 | - | else if (( | |
190 | + | else if ((an > height)) | |
652 | 191 | then throw("Game is not finished or expired") | |
653 | - | else if ((( | |
192 | + | else if (((N(x) % 2) == 0)) | |
654 | 193 | then "maker" | |
655 | 194 | else "taker" | |
656 | 195 | } | |
657 | 196 | else { | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (( | |
197 | + | let ao = split(W(x, "maker"), ",") | |
198 | + | let ap = split(W(x, "taker"), ",") | |
199 | + | let aq = Q(x, "maker", ao[0]) | |
200 | + | let ar = Q(x, "maker", ao[1]) | |
201 | + | let as = Q(x, "maker", ao[2]) | |
202 | + | let at = Q(x, "taker", ap[0]) | |
203 | + | let au = Q(x, "taker", ap[1]) | |
204 | + | let av = Q(x, "taker", ap[2]) | |
205 | + | let aw = ((ak(aq, at) + ak(ar, au)) + ak(as, av)) | |
206 | + | if ((aw > 0)) | |
668 | 207 | then "maker" | |
669 | - | else if ((0 > | |
208 | + | else if ((0 > aw)) | |
670 | 209 | then "taker" | |
671 | 210 | else "draw" | |
672 | 211 | } | |
673 | 212 | } | |
674 | 213 | ||
675 | 214 | ||
676 | - | @Callable( | |
677 | - | func makeGame ( | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
683 | - | if (( | |
215 | + | @Callable(ax) | |
216 | + | func makeGame (u,ay,az,aA) = { | |
217 | + | let aB = toBase58String(ax.caller.bytes) | |
218 | + | let aC = v(u) | |
219 | + | let aD = value(ax.payments[0]) | |
220 | + | let aE = aD.amount | |
221 | + | let x = o() | |
222 | + | if ((s(aB) != 0)) | |
684 | 223 | then throw("You already have an active game") | |
685 | - | else if (if ((0 > | |
224 | + | else if (if ((0 > u)) | |
686 | 225 | then true | |
687 | - | else ( | |
226 | + | else (u >= e)) | |
688 | 227 | then throw("Invalid slot") | |
689 | - | else if (( | |
228 | + | else if ((aC != 0)) | |
690 | 229 | then throw("This slot is busy") | |
691 | - | else if (( | |
692 | - | then throw(("You can attach only EGGs with the following asset id: " + toBase58String( | |
693 | - | else if (( | |
230 | + | else if ((aD.assetId != d)) | |
231 | + | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(d))) | |
232 | + | else if ((aE != 1)) | |
694 | 233 | then throw("Bet must be 0.01 EGG during beta test") | |
695 | - | else if (if ((1 > | |
234 | + | else if (if ((1 > ay)) | |
696 | 235 | then true | |
697 | - | else ( | |
236 | + | else (ay > 5)) | |
698 | 237 | then throw("Invalid rarity range for the worst duck") | |
699 | - | else if (if ((1 > | |
238 | + | else if (if ((1 > az)) | |
700 | 239 | then true | |
701 | - | else ( | |
240 | + | else (az > 5)) | |
702 | 241 | then throw("Invalid rarity range for the medium duck") | |
703 | - | else if (if ((1 > | |
242 | + | else if (if ((1 > aA)) | |
704 | 243 | then true | |
705 | - | else ( | |
244 | + | else (aA > 5)) | |
706 | 245 | then throw("Invalid rarity range for the best duck") | |
707 | - | else if (( | |
708 | - | then throw("The medium | |
709 | - | else if (( | |
710 | - | then throw("The best | |
711 | - | else [IntegerEntry( | |
246 | + | else if ((ay > az)) | |
247 | + | then throw("The medium range can't be less than the worst one") | |
248 | + | else if ((az > aA)) | |
249 | + | then throw("The best range can't be worse than the medium one") | |
250 | + | else [IntegerEntry(q(aB), x), StringEntry(z(x), aB), StringEntry(w(x, aB), "maker"), IntegerEntry(D(x), aE), IntegerEntry(J(x, "worst"), ay), IntegerEntry(J(x, "medium"), az), IntegerEntry(J(x, "best"), aA), IntegerEntry(F(x), (height + f)), IntegerEntry(t(u), x), IntegerEntry("nextGameId", (x + 1))] | |
712 | 251 | } | |
713 | 252 | ||
714 | 253 | ||
715 | 254 | ||
716 | - | @Callable( | |
717 | - | func takeGame ( | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | if (( | |
255 | + | @Callable(ax) | |
256 | + | func takeGame (u) = { | |
257 | + | let aB = toBase58String(ax.caller.bytes) | |
258 | + | let x = v(u) | |
259 | + | let aD = value(ax.payments[0]) | |
260 | + | if ((s(aB) != 0)) | |
722 | 261 | then throw("You already have an active game") | |
723 | - | else if (if ((0 > | |
262 | + | else if (if ((0 > u)) | |
724 | 263 | then true | |
725 | - | else ( | |
264 | + | else (u >= e)) | |
726 | 265 | then throw("Invalid slot") | |
727 | - | else if ((u | |
266 | + | else if ((v(u) == 0)) | |
728 | 267 | then throw("This slot is empty") | |
729 | - | else if (( | |
730 | - | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String( | |
731 | - | else if (( | |
268 | + | else if ((aD.assetId != d)) | |
269 | + | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(d))) | |
270 | + | else if ((aD.amount != E(x))) | |
732 | 271 | then throw("Insufficient eggs amount") | |
733 | - | else if ((height >= | |
272 | + | else if ((height >= G(x))) | |
734 | 273 | then throw("This game is expired") | |
735 | - | else [IntegerEntry( | |
274 | + | else [IntegerEntry(q(aB), x), StringEntry(B(x), aB), StringEntry(w(x, aB), "taker"), IntegerEntry(M(x), 0), IntegerEntry(H(x), (height + g)), IntegerEntry(t(u), 0), IntegerEntry("gamesPlayed", (ag() + 1))] | |
736 | 275 | } | |
737 | 276 | ||
738 | 277 | ||
739 | 278 | ||
740 | - | @Callable( | |
741 | - | func kickGame ( | |
742 | - | let | |
743 | - | if (if ((0 > | |
279 | + | @Callable(ax) | |
280 | + | func kickGame (u) = { | |
281 | + | let x = v(u) | |
282 | + | if (if ((0 > u)) | |
744 | 283 | then true | |
745 | - | else ( | |
284 | + | else (u >= e)) | |
746 | 285 | then throw("Invalid slot") | |
747 | - | else if (( | |
286 | + | else if ((x == 0)) | |
748 | 287 | then throw("Slot is empty") | |
749 | - | else if (( | |
288 | + | else if ((G(x) > height)) | |
750 | 289 | then throw("Waiting is not finished yet") | |
751 | 290 | else { | |
752 | - | let | |
753 | - | [IntegerEntry( | |
291 | + | let aF = A(x) | |
292 | + | [IntegerEntry(q(aF), 0), IntegerEntry(t(u), 0), ScriptTransfer(Address(fromBase58String(aF)), E(x), d)] | |
754 | 293 | } | |
755 | 294 | } | |
756 | 295 | ||
757 | 296 | ||
758 | 297 | ||
759 | - | @Callable(cF) | |
760 | - | func pickDucks () = { | |
761 | - | let cJ = toBase58String(cF.caller.bytes) | |
762 | - | let w = r(cJ) | |
763 | - | let O = x(w, cJ) | |
764 | - | let cu = M(w) | |
765 | - | let cO = K(w, "worst") | |
766 | - | let cP = K(w, "medium") | |
767 | - | let cQ = K(w, "best") | |
768 | - | let cR = value(value(cF.payments[0]).assetId) | |
769 | - | let cS = value(value(cF.payments[1]).assetId) | |
770 | - | let cT = value(value(cF.payments[2]).assetId) | |
771 | - | let cU = cn(cR) | |
772 | - | let cV = cn(cS) | |
773 | - | let cW = cn(cT) | |
774 | - | if ((w == 0)) | |
775 | - | then throw("You don't have an active game") | |
776 | - | else if ((H(w) == 0)) | |
777 | - | then throw("Game is not started") | |
778 | - | else if (if ((cu == 0)) | |
779 | - | then (O != "taker") | |
780 | - | else false) | |
781 | - | then throw("It is the taker's turn to pick now") | |
782 | - | else if (if ((cu == 1)) | |
783 | - | then (O != "maker") | |
784 | - | else false) | |
785 | - | then throw("It is the maker's turn to pick now") | |
786 | - | else if ((cu > 1)) | |
787 | - | then throw("Ducks have already been picked") | |
788 | - | else if (if ((cU > (cO * 10))) | |
789 | - | then true | |
790 | - | else (((cO - 1) * 10) >= cU)) | |
791 | - | then throw("Worst duck doesn't fit rarity range") | |
792 | - | else if (if ((cV > (cP * 10))) | |
793 | - | then true | |
794 | - | else (((cP - 1) * 10) >= cV)) | |
795 | - | then throw("Medium duck doesn't fit rarity range") | |
796 | - | else if (if (if (if ((cQ == 5)) | |
797 | - | then (40 >= cW) | |
798 | - | else false) | |
799 | - | then true | |
800 | - | else (cW > (cQ * 10))) | |
801 | - | then true | |
802 | - | else (((cQ - 1) * 10) >= cW)) | |
803 | - | then throw("Best duck doesn't fit rarity range") | |
804 | - | else [IntegerEntry(N(w, O, "worst"), cU), IntegerEntry(N(w, O, "medium"), cV), IntegerEntry(N(w, O, "best"), cW), StringEntry(Q(w, O, "worst"), toBase58String(cR)), StringEntry(Q(w, O, "medium"), toBase58String(cS)), StringEntry(Q(w, O, "best"), toBase58String(cT)), IntegerEntry(L(w), (cu + 1)), IntegerEntry(G(w), (height + f)), ScriptTransfer(cF.caller, 1, cR), ScriptTransfer(cF.caller, 1, cS), ScriptTransfer(cF.caller, 1, cT)] | |
298 | + | @Callable(ax) | |
299 | + | func pickDucks (aG,aH,aI) = { | |
300 | + | let aB = toBase58String(ax.caller.bytes) | |
301 | + | let x = s(aB) | |
302 | + | let P = y(x, aB) | |
303 | + | let am = N(x) | |
304 | + | let aJ = L(x, "worst") | |
305 | + | let aK = L(x, "medium") | |
306 | + | let aL = L(x, "best") | |
307 | + | let aM = invoke(Address(c), "getAssetRarity", [aG], nil) | |
308 | + | if ((aM == aM)) | |
309 | + | then { | |
310 | + | let aN = { | |
311 | + | let j = aM | |
312 | + | if ($isInstanceOf(j, "Int")) | |
313 | + | then { | |
314 | + | let aO = j | |
315 | + | aO | |
316 | + | } | |
317 | + | else throw("Incorrect invoke result") | |
318 | + | } | |
319 | + | let aP = invoke(Address(c), "getAssetRarity", [aH], nil) | |
320 | + | if ((aP == aP)) | |
321 | + | then { | |
322 | + | let aQ = { | |
323 | + | let j = aP | |
324 | + | if ($isInstanceOf(j, "Int")) | |
325 | + | then { | |
326 | + | let aO = j | |
327 | + | aO | |
328 | + | } | |
329 | + | else throw("Incorrect invoke result") | |
330 | + | } | |
331 | + | let aR = invoke(Address(c), "getAssetRarity", [aI], nil) | |
332 | + | if ((aR == aR)) | |
333 | + | then { | |
334 | + | let aS = { | |
335 | + | let j = aM | |
336 | + | if ($isInstanceOf(j, "Int")) | |
337 | + | then { | |
338 | + | let aO = j | |
339 | + | aO | |
340 | + | } | |
341 | + | else throw("Incorrect invoke result") | |
342 | + | } | |
343 | + | if ((x == 0)) | |
344 | + | then throw("You don't have an active game") | |
345 | + | else if ((I(x) == 0)) | |
346 | + | then throw("Game is not started") | |
347 | + | else if (if ((am == 0)) | |
348 | + | then (P != "taker") | |
349 | + | else false) | |
350 | + | then throw("It is the taker's turn to pick now") | |
351 | + | else if (if ((am == 1)) | |
352 | + | then (P != "maker") | |
353 | + | else false) | |
354 | + | then throw("It is the maker's turn to pick now") | |
355 | + | else if ((am > 1)) | |
356 | + | then throw("Ducks have already been picked") | |
357 | + | else if (ah(ax.caller, fromBase58String(aG))) | |
358 | + | then throw((("Asset " + aG) + " doesn't belong to you")) | |
359 | + | else if (ah(ax.caller, fromBase58String(aH))) | |
360 | + | then throw((("Asset " + aH) + " doesn't belong to you")) | |
361 | + | else if (ah(ax.caller, fromBase58String(aI))) | |
362 | + | then throw((("Asset " + aI) + " doesn't belong to you")) | |
363 | + | else if (if ((5 > aJ)) | |
364 | + | then if ((aN > (aJ * 10))) | |
365 | + | then true | |
366 | + | else (((aJ - 1) * 10) >= aN) | |
367 | + | else false) | |
368 | + | then throw("Worst duck doesn't fit rarity range") | |
369 | + | else if (if ((5 > aK)) | |
370 | + | then if ((aQ > (aK * 10))) | |
371 | + | then true | |
372 | + | else (((aK - 1) * 10) >= aQ) | |
373 | + | else false) | |
374 | + | then throw("Medium duck doesn't fit rarity range") | |
375 | + | else if (if ((5 > aL)) | |
376 | + | then if ((aS > (aL * 10))) | |
377 | + | then true | |
378 | + | else (((aL - 1) * 10) >= aS) | |
379 | + | else false) | |
380 | + | then throw("Best duck doesn't fit rarity range") | |
381 | + | else if (if ((aJ == 5)) | |
382 | + | then (40 >= aN) | |
383 | + | else false) | |
384 | + | then throw("Worst duck doesn't fit rarity range") | |
385 | + | else if (if ((aK == 5)) | |
386 | + | then (40 >= aQ) | |
387 | + | else false) | |
388 | + | then throw("Medium duck doesn't fit rarity range") | |
389 | + | else if (if ((aL == 5)) | |
390 | + | then (40 >= aS) | |
391 | + | else false) | |
392 | + | then throw("Best duck doesn't fit rarity range") | |
393 | + | else if (if (if ((aN == aQ)) | |
394 | + | then true | |
395 | + | else (aN == aS)) | |
396 | + | then true | |
397 | + | else (aQ == aS)) | |
398 | + | then throw("Ducks of the same rarity can't play") | |
399 | + | else [IntegerEntry(O(x, P, "worst"), aN), IntegerEntry(O(x, P, "medium"), aQ), IntegerEntry(O(x, P, "best"), aS), StringEntry(R(x, P, "worst"), aG), StringEntry(R(x, P, "medium"), aH), StringEntry(R(x, P, "best"), aI), IntegerEntry(M(x), (am + 1)), IntegerEntry(H(x), (height + g))] | |
400 | + | } | |
401 | + | else throw("Strict value is not equal to itself.") | |
402 | + | } | |
403 | + | else throw("Strict value is not equal to itself.") | |
404 | + | } | |
405 | + | else throw("Strict value is not equal to itself.") | |
805 | 406 | } | |
806 | 407 | ||
807 | 408 | ||
808 | 409 | ||
809 | - | @Callable( | |
810 | - | func commit ( | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | if (( | |
410 | + | @Callable(ax) | |
411 | + | func commit (aT) = { | |
412 | + | let aB = toBase58String(ax.caller.bytes) | |
413 | + | let x = s(aB) | |
414 | + | let P = y(x, aB) | |
415 | + | let am = N(x) | |
416 | + | if ((x == 0)) | |
816 | 417 | then throw("You don't have an active game") | |
817 | - | else if ((2 > | |
418 | + | else if ((2 > am)) | |
818 | 419 | then throw("Commit is not started") | |
819 | - | else if (if (( | |
820 | - | then ( | |
420 | + | else if (if ((am == 2)) | |
421 | + | then (P != "taker") | |
821 | 422 | else false) | |
822 | 423 | then throw("It is the taker's turn to pick now") | |
823 | - | else if (if (( | |
824 | - | then ( | |
424 | + | else if (if ((am == 3)) | |
425 | + | then (P != "maker") | |
825 | 426 | else false) | |
826 | 427 | then throw("It is the maker's turn to pick now") | |
827 | - | else if (( | |
428 | + | else if ((am > 3)) | |
828 | 429 | then throw("Commit is finished") | |
829 | - | else [StringEntry( | |
430 | + | else [StringEntry(T(x, P), aT), IntegerEntry(M(x), (am + 1)), IntegerEntry(H(x), (height + g))] | |
830 | 431 | } | |
831 | 432 | ||
832 | 433 | ||
833 | 434 | ||
834 | - | @Callable( | |
835 | - | func reveal ( | |
836 | - | let | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | if (( | |
435 | + | @Callable(ax) | |
436 | + | func reveal (aU,aV) = { | |
437 | + | let aB = toBase58String(ax.caller.bytes) | |
438 | + | let x = s(aB) | |
439 | + | let P = y(x, aB) | |
440 | + | let am = N(x) | |
441 | + | if ((x == 0)) | |
841 | 442 | then throw("You don't have an active game") | |
842 | - | else if ((4 > | |
443 | + | else if ((4 > am)) | |
843 | 444 | then throw("Reveal is not started") | |
844 | - | else if (if (( | |
845 | - | then ( | |
445 | + | else if (if ((am == 4)) | |
446 | + | then (P != "taker") | |
846 | 447 | else false) | |
847 | 448 | then throw("It is the taker's turn to pick now") | |
848 | - | else if (if (( | |
849 | - | then ( | |
449 | + | else if (if ((am == 5)) | |
450 | + | then (P != "maker") | |
850 | 451 | else false) | |
851 | 452 | then throw("It is the maker's turn to pick now") | |
852 | - | else if (( | |
453 | + | else if ((am > 5)) | |
853 | 454 | then throw("Reveal is finished") | |
854 | - | else if (if (if (if (if (if (( | |
855 | - | then ( | |
455 | + | else if (if (if (if (if (if ((aU != "worst,medium,best")) | |
456 | + | then (aU != "worst,best,medium") | |
856 | 457 | else false) | |
857 | - | then ( | |
458 | + | then (aU != "medium,worst,best") | |
858 | 459 | else false) | |
859 | - | then ( | |
460 | + | then (aU != "medium,best,worst") | |
860 | 461 | else false) | |
861 | - | then ( | |
462 | + | then (aU != "best,worst,medium") | |
862 | 463 | else false) | |
863 | - | then ( | |
464 | + | then (aU != "best,medium,worst") | |
864 | 465 | else false) | |
865 | 466 | then throw("Reveal data is not valid") | |
866 | - | else if ((toBase58String(sha256(toBytes(( | |
467 | + | else if ((toBase58String(sha256(toBytes((aU + aV)))) != U(x, P))) | |
867 | 468 | then throw("Reveal doesn't match commit") | |
868 | - | else [StringEntry( | |
469 | + | else [StringEntry(V(x, P), aU), IntegerEntry(M(x), (am + 1)), IntegerEntry(H(x), (height + g))] | |
869 | 470 | } | |
870 | 471 | ||
871 | 472 | ||
872 | 473 | ||
873 | - | @Callable( | |
474 | + | @Callable(ax) | |
874 | 475 | func getPrize () = { | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | then | |
880 | - | else | |
881 | - | let | |
882 | - | if (( | |
476 | + | let aB = toBase58String(ax.caller.bytes) | |
477 | + | let x = s(aB) | |
478 | + | let P = y(x, aB) | |
479 | + | let aW = if ((P == "maker")) | |
480 | + | then C(x) | |
481 | + | else A(x) | |
482 | + | let aX = al(x) | |
483 | + | if ((x == 0)) | |
883 | 484 | then throw("You don't have an active game") | |
884 | - | else if (( | |
885 | - | then [IntegerEntry( | |
886 | - | else if (( | |
887 | - | then [IntegerEntry( | |
888 | - | else [IntegerEntry( | |
485 | + | else if ((aX == P)) | |
486 | + | then [IntegerEntry(q(aB), 0), IntegerEntry(q(aW), 0), IntegerEntry(Z(aB), (aa(aB) + 1)), IntegerEntry(ab(aW), (ac(aW) + 1)), StringEntry(X(x, aB), "win"), StringEntry(X(x, aW), "lose"), ScriptTransfer(ax.caller, (E(x) * 2), d)] | |
487 | + | else if ((aX == "draw")) | |
488 | + | then [IntegerEntry(q(aB), 0), IntegerEntry(ad(aB), (ae(aB) + 1)), StringEntry(X(x, aB), "draw"), ScriptTransfer(ax.caller, E(x), d)] | |
489 | + | else [IntegerEntry(q(aB), 0)] | |
889 | 490 | } | |
890 | 491 | ||
891 | 492 | ||
892 | - | @Verifier( | |
893 | - | func | |
493 | + | @Verifier(aY) | |
494 | + | func aZ () = sigVerify(aY.bodyBytes, aY.proofs[0], aY.senderPublicKey) | |
894 | 495 |
github/deemru/w8io/026f985 198.00 ms ◑