tx · 9YC1hZU7qSPga9Ts4kUWFAtsycG6RRXnCFPiP3exZyRE 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx: -0.01200000 Waves 2023.09.02 15:54 [2737771] smart account 3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx > SELF 0.00000000 Waves
{ "type": 13, "id": "9YC1hZU7qSPga9Ts4kUWFAtsycG6RRXnCFPiP3exZyRE", "fee": 1200000, "feeAssetId": null, "timestamp": 1693659330202, "version": 2, "chainId": 84, "sender": "3N3nfqFcxXfd3T18V9icDdh58MJ9wQ2k2xx", "senderPublicKey": "UGqkWsCpv7xRVXkQRXyLd6pWPDtYGXmPip7FxSd1pAu", "proofs": [ "2mKU1dnuCJbir1N25nndAe1PyXpMVV2DRgWNm7PyRSGqkfyjmHCSPiaZk6YAuZmQVw7wzPz6Z7rf7RnM7GUFB7mi" ], "script": "base64:BgIfCAISBgoEAQEBARIAEgASBAoCCAESBAoCCAESAwoBATQAD0RFRkFVTFRMT0NBVElPTgIPQWZyaWNhX0ZfQWZyaWNhARRrZXlTdGFrZWREdWNrQnlPd25lcgEJb3duZXJBZGRyCQCsAgICEnN0YWtlZER1Y2tCeU93bmVyXwUJb3duZXJBZGRyAQ9rZXlEdWNrTG9jYXRpb24BC2R1Y2tBc3NldElkCQCsAgICDWR1Y2tMb2NhdGlvbl8FC2R1Y2tBc3NldElkAA1sYXN0VG91cklkS2V5Ag4lc19fbGFzdFRvdXJJZAEVa2V5VG91clN0YXRpY0RhdGFCeUlkAQN0SWQJAKwCAgIWJXMlZF9fdG91clN0YXRpY0RhdGFfXwkApAMBBQN0SWQBFmtleVRvdXJEeW5hbWljRGF0YUJ5SWQBA3RJZAkArAICAhclcyVkX190b3VyRHluYW1pY0RhdGFfXwkApAMBBQN0SWQBE2tleVNjb3JlQm9hcmRCeVRvdXIBA3RJZAkArAICAhIlcyVkX19zY29yZUJvYXJkX18JAKQDAQUDdElkARtrZXlMYXN0UmVnaXN0ZXJlZFRvd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QkAlgMBCQDMCAIFDW9sZEJlc3RSZXN1bHQJAMwIAgUHbmV3QmVzdAUDbmlsCQDMCAIJAQtTdHJpbmdFbnRyeQIFCHNjb3JlS2V5BQd1cGRhdGVkBQNuaWwAAAkAlAoCBQNuaWwAAAFpARBmaW5pc2hUb3VybmFtZW50AQN0SWQEBmNhbGxlcgkApQgBCAUBaQZjYWxsZXIDCQEBIQEJAQ9jb250YWluc0VsZW1lbnQCBQphZG1pbnNMaXN0BQZjYWxsZXIJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAQFdERhdGEJAQtnZXRUb3VyRGF0YQIFBHRoaXMFA3RJZAQHZHluYW1pYwkAkQMCBQV0RGF0YQUKaWR4RHluYW1pYwQGc3RhdHVzCQCRAwIFB2R5bmFtaWMFDnREeW5hbWljU3RhdHVzAwkAAAIFBnN0YXR1cwIIQVJDSElWRUQJAAIBCQCsAgIJAKwCAgILVG91cm5hbWVudCAJAKQDAQUDdElkAhQgaXMgYWxyZWFkeSBBUkNISVZFRAQSdXBkYXRlZER5bmFtaWNEYXRhCQELZHluYW1pY0RhdGEFAghBUkNISVZFRAkAkQMCBQdkeW5hbWljBQ90RHluYW1pY1dpbkR1Y2sJAQ1wYXJzZUludFZhbHVlAQkAkQMCBQdkeW5hbWljBRF0RHluYW1pY1dpblJlc3VsdAkBDXBhcnNlSW50VmFsdWUBCQCRAwIFB2R5bmFtaWMFFXREeW5hbWljVG90YWxSZWdDb3VudAkBDXBhcnNlSW50VmFsdWUBCQCRAwIFB2R5bmFtaWMFFXREeW5hbWljVG90YWxBdHRlbXB0cwkAlAoCCQDMCAIJAQtTdHJpbmdFbnRyeQIJARZrZXlUb3VyRHluYW1pY0RhdGFCeUlkAQUDdElkBRJ1cGRhdGVkRHluYW1pY0RhdGEFA25pbAAAAH/Bfq8=", "height": 2737771, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: k9we15it79grTzFQsYa925Nh4fPwNyc3xGEWdPeZHqm Next: 3aoN9AuXMwdLHaBekAL7buTEmtTJQuxrgBgzypWPaab7 Diff:
Old | New | Differences | |
---|---|---|---|
297 | 297 | let aX = aV._1 | |
298 | 298 | let aY = aV._2 | |
299 | 299 | let aS = ay("INPROGRESS", t[z], parseIntValue(t[A]), parseIntValue(t[B]), (parseIntValue(t[C]) + aY)) | |
300 | - | let aZ = split(valueOrElse(getString(W, d(e)), a), "_") | |
301 | - | let ba = aa(invoke(W, "initDuckTourAttempt", [e], nil)) | |
302 | - | $Tuple2([IntegerEntry(aT, aX), StringEntry(i(aI), aS)], [aL, aX, ba]) | |
300 | + | let aZ = aa(invoke(W, "initDuckTourAttempt", [e], nil)) | |
301 | + | $Tuple2([IntegerEntry(aT, aX), StringEntry(i(aI), aS)], [aL, aX, aZ]) | |
303 | 302 | } | |
304 | 303 | } | |
305 | 304 | ||
306 | 305 | ||
307 | 306 | ||
308 | 307 | @Callable(aH) | |
309 | - | func updateDynamicData (e, | |
308 | + | func updateDynamicData (e,ba) = if ((aH.caller != W)) | |
310 | 309 | then throw("Access denied") | |
311 | 310 | else { | |
312 | 311 | let aI = valueOrErrorMessage(getInteger(f), "No active tournaments") | |
313 | 312 | let aP = q(this, aI) | |
314 | 313 | let s = aP[o] | |
315 | 314 | let t = aP[p] | |
316 | - | if (if (if ((parseIntValue(t[A]) >= | |
315 | + | if (if (if ((parseIntValue(t[A]) >= ba)) | |
317 | 316 | then true | |
318 | 317 | else (t[y] != "INPROGRESS")) | |
319 | 318 | then true | |
320 | 319 | else (lastBlock.timestamp > parseIntValue(s[x]))) | |
321 | 320 | then $Tuple2(nil, 0) | |
322 | 321 | else { | |
323 | - | let aS = ay("INPROGRESS", e, | |
322 | + | let aS = ay("INPROGRESS", e, ba, parseIntValue(t[B]), parseIntValue(t[C])) | |
324 | 323 | $Tuple2([StringEntry(i(aI), aS)], 0) | |
325 | 324 | } | |
326 | 325 | } | |
328 | 327 | ||
329 | 328 | ||
330 | 329 | @Callable(aH) | |
331 | - | func saveDuckResult (e, | |
330 | + | func saveDuckResult (e,ba) = if ((aH.caller != W)) | |
332 | 331 | then throw("Access denied") | |
333 | 332 | else { | |
334 | 333 | let aI = valueOrErrorMessage(getInteger(f), "No active tournaments") | |
335 | 334 | let aP = q(this, aI) | |
336 | 335 | let s = aP[o] | |
337 | 336 | let t = aP[p] | |
338 | - | let | |
337 | + | let bb = split(valueOrElse(getString(W, d(e)), a), "_") | |
339 | 338 | let bc = n(aI, e) | |
340 | - | if (if (if (if (( | |
341 | - | then (parseIntValue( | |
339 | + | if (if (if (if ((bb[E] == "T")) | |
340 | + | then (parseIntValue(bb[D]) == aI) | |
342 | 341 | else false) | |
343 | 342 | then (t[y] == "INPROGRESS") | |
344 | 343 | else false) | |
348 | 347 | let bd = valueOrElse(getInteger(bc), 0) | |
349 | 348 | let be = j(aI) | |
350 | 349 | let aR = valueOrElse(getString(be), "") | |
351 | - | let bf = if (( | |
350 | + | let bf = if ((ba > bd)) | |
352 | 351 | then if (!(contains(aR, e))) | |
353 | 352 | then throw(("scoreBoard does not contain " + e)) | |
354 | 353 | else { | |
355 | 354 | let bg = split_51C(aR, e) | |
356 | - | ((((bg[0] + e) + ":") + al( | |
355 | + | ((((bg[0] + e) + ":") + al(ba, 3)) + drop(bg[1], 4)) | |
357 | 356 | } | |
358 | 357 | else aR | |
359 | - | $Tuple2([IntegerEntry(bc, max([bd, | |
358 | + | $Tuple2([IntegerEntry(bc, max([bd, ba])), StringEntry(be, bf)], 0) | |
360 | 359 | } | |
361 | 360 | else $Tuple2(nil, 0) | |
362 | 361 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "Africa_F_Africa" | |
5 | 5 | ||
6 | 6 | func b (c) = ("stakedDuckByOwner_" + c) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (e) = ("duckLocation_" + e) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | let f = "%s__lastTourId" | |
13 | 13 | ||
14 | 14 | func g (h) = ("%s%d__tourStaticData__" + toString(h)) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func i (h) = ("%s%d__tourDynamicData__" + toString(h)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func j (h) = ("%s%d__scoreBoard__" + toString(h)) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func k (e) = ("%s%s__lastRegisteredTourByDuck__" + e) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func l (h,e) = makeString(["%s%d%s__isRegisteredByTourAndDuck", toString(h), e], "__") | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func m (h,e) = makeString(["%s%d%s__lastAttemptByTourAndDuck", toString(h), e], "__") | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func n (h,e) = makeString(["%s%d%s__bestResultByTourAndDuck", toString(h), e], "__") | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | let o = 0 | |
36 | 36 | ||
37 | 37 | let p = 1 | |
38 | 38 | ||
39 | 39 | func q (r,h) = { | |
40 | 40 | let s = split(valueOrErrorMessage(getString(r, g(h)), (("Error reading tournament " + toString(h)) + " data")), "__") | |
41 | 41 | let t = split(valueOrErrorMessage(getString(r, i(h)), (("Error reading tournament " + toString(h)) + " data")), "__") | |
42 | 42 | [s, t] | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | let u = 2 | |
47 | 47 | ||
48 | 48 | let v = 3 | |
49 | 49 | ||
50 | 50 | let w = 5 | |
51 | 51 | ||
52 | 52 | let x = 6 | |
53 | 53 | ||
54 | 54 | let y = 1 | |
55 | 55 | ||
56 | 56 | let z = 2 | |
57 | 57 | ||
58 | 58 | let A = 3 | |
59 | 59 | ||
60 | 60 | let B = 4 | |
61 | 61 | ||
62 | 62 | let C = 5 | |
63 | 63 | ||
64 | 64 | let D = 0 | |
65 | 65 | ||
66 | 66 | let E = 1 | |
67 | 67 | ||
68 | 68 | let F = take(drop(this.bytes, 1), 1) | |
69 | 69 | ||
70 | 70 | let G = { | |
71 | 71 | let H = F | |
72 | 72 | if ((base58'2W' == H)) | |
73 | 73 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
74 | 74 | else if ((base58'2T' == H)) | |
75 | 75 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
76 | 76 | else throw("Unknown chain") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | let I = "__" | |
80 | 80 | ||
81 | 81 | func J (K,L) = valueOrErrorMessage(getString(K, L), makeString(["mandatory ", toString(K), ".", L, " is not defined"], "")) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | let M = 1 | |
85 | 85 | ||
86 | 86 | let N = 4 | |
87 | 87 | ||
88 | 88 | func O () = "%s__restConfig" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func P () = "%s__restAddr" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func Q (R) = split_4C(J(R, O()), I) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func S (T,U) = valueOrErrorMessage(addressFromString(T[U]), ("Rest cfg doesn't contain address at index " + toString(U))) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | let V = addressFromStringValue(valueOrElse(getString(this, P()), G)) | |
101 | 101 | ||
102 | 102 | let T = Q(V) | |
103 | 103 | ||
104 | 104 | let W = S(T, M) | |
105 | 105 | ||
106 | 106 | let X = S(T, N) | |
107 | 107 | ||
108 | 108 | let Y = "wlg_assetId" | |
109 | 109 | ||
110 | 110 | let Z = valueOrErrorMessage(getBinary(X, Y), "Not initialized yet") | |
111 | 111 | ||
112 | 112 | func aa (ab) = { | |
113 | 113 | let H = ab | |
114 | 114 | if ($isInstanceOf(H, "String")) | |
115 | 115 | then { | |
116 | 116 | let ac = H | |
117 | 117 | ac | |
118 | 118 | } | |
119 | 119 | else throw("fail to cast into String") | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func ad (ab) = { | |
124 | 124 | let H = ab | |
125 | 125 | if ($isInstanceOf(H, "Int")) | |
126 | 126 | then { | |
127 | 127 | let ae = H | |
128 | 128 | ae | |
129 | 129 | } | |
130 | 130 | else throw("fail to cast into Int") | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func af (ag,ah) = { | |
135 | 135 | let ai = pow(10, 0, ah, 0, 0, DOWN) | |
136 | 136 | let aj = toString((ag % ai)) | |
137 | 137 | let ak = drop(toString(ai), (1 + size(aj))) | |
138 | 138 | (((toString((ag / ai)) + ".") + ak) + aj) | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func al (ag,am) = { | |
143 | 143 | let an = toString(ag) | |
144 | 144 | let ak = drop(toString(pow(10, 0, (am - size(an)), 0, 0, DOWN)), 1) | |
145 | 145 | (ak + an) | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | let ao = 432000000 | |
150 | 150 | ||
151 | 151 | let ap = 3600000 | |
152 | 152 | ||
153 | 153 | let aq = [toString(this), { | |
154 | 154 | let H = F | |
155 | 155 | if ((base58'2W' == H)) | |
156 | 156 | then "3PEe2RELUHCFCBsmSCNcBJ8N3URLVQende7" | |
157 | 157 | else if ((base58'2T' == H)) | |
158 | 158 | then "3MtBgJTaLxPB3C7UJD1UE8qjkHthfKvFQYY" | |
159 | 159 | else throw("Unknown chain") | |
160 | 160 | }] | |
161 | 161 | ||
162 | 162 | func ar (as,at,au,av,aw,ax) = makeString(["%s%d%d%d%d%d", as, toString(at), toString(au), toString(av), toString(aw), toString(ax)], I) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func ay (az,aA,aB,aC,aD) = makeString(["%s%s%d%d%d", az, aA, toString(aB), toString(aC), toString(aD)], I) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func aE () = ad(invoke(W, "saveLastTx", nil, nil)) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func aF (aG) = valueOrErrorMessage(getString(W, b(toString(aG))), "You don't have a duck staked") | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | @Callable(aH) | |
175 | 175 | func createTournament (aw,ax,at,au) = { | |
176 | 176 | let aG = toString(aH.caller) | |
177 | 177 | if (!(containsElement(aq, aG))) | |
178 | 178 | then throw("Permission denied") | |
179 | 179 | else { | |
180 | 180 | let aI = getInteger(f) | |
181 | 181 | let h = if (isDefined(aI)) | |
182 | 182 | then { | |
183 | 183 | let aJ = value(aI) | |
184 | 184 | let t = valueOrErrorMessage(getString(i(aJ)), (("Error reading tournament " + toString(aJ)) + " data")) | |
185 | 185 | let az = split(t, I)[y] | |
186 | 186 | if ((az != "ARCHIVED")) | |
187 | 187 | then throw(("Current tournement is not completed, status=" + az)) | |
188 | 188 | else (aJ + 1) | |
189 | 189 | } | |
190 | 190 | else 1 | |
191 | 191 | let aK = lastBlock.timestamp | |
192 | 192 | if ((aK > aw)) | |
193 | 193 | then throw(((("startTime=" + toString(aw)) + " < creationTime=") + toString(aK))) | |
194 | 194 | else if ((aw > ax)) | |
195 | 195 | then throw(((("endTime=" + toString(ax)) + " < startTime=") + toString(aw))) | |
196 | 196 | else if (((ax - aw) > ao)) | |
197 | 197 | then throw(((("Tournament period exceeds max: " + toString((ax - aw))) + " > ") + toString(ao))) | |
198 | 198 | else if (if ((0 >= at)) | |
199 | 199 | then true | |
200 | 200 | else (0 >= au)) | |
201 | 201 | then throw(((("Cost should be positive, but passed " + toString(at)) + " and ") + toString(au))) | |
202 | 202 | else $Tuple2([IntegerEntry(f, h), StringEntry(g(h), ar(toBase58String(aH.transactionId), at, au, aK, aw, ax)), StringEntry(i(h), ay("CREATED", " ", 0, 0, 0))], h) | |
203 | 203 | } | |
204 | 204 | } | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | ||
208 | 208 | @Callable(aH) | |
209 | 209 | func register () = { | |
210 | 210 | let aL = aE() | |
211 | 211 | if ((size(aH.payments) != 1)) | |
212 | 212 | then throw("exactly 1 payment must be attached") | |
213 | 213 | else { | |
214 | 214 | let aM = aH.payments[0] | |
215 | 215 | let aN = aM.amount | |
216 | 216 | let aO = valueOrErrorMessage(aM.assetId, "WLGOLD payments only!") | |
217 | 217 | if ((aO != Z)) | |
218 | 218 | then throw("WLGOLD payments only!") | |
219 | 219 | else { | |
220 | 220 | let aI = valueOrErrorMessage(getInteger(f), "No active tournaments") | |
221 | 221 | let aK = lastBlock.timestamp | |
222 | 222 | let aP = q(this, aI) | |
223 | 223 | let s = aP[o] | |
224 | 224 | let t = aP[p] | |
225 | 225 | let az = t[y] | |
226 | 226 | if (!(if (if (if ((az == "CREATED")) | |
227 | 227 | then (aK > parseIntValue(s[w])) | |
228 | 228 | else false) | |
229 | 229 | then ((parseIntValue(s[x]) - ap) > aK) | |
230 | 230 | else false) | |
231 | 231 | then true | |
232 | 232 | else if ((az == "INPROGRESS")) | |
233 | 233 | then ((parseIntValue(s[x]) - ap) > aK) | |
234 | 234 | else false)) | |
235 | 235 | then throw("Cannot register now") | |
236 | 236 | else { | |
237 | 237 | let aQ = parseIntValue(s[u]) | |
238 | 238 | if ((aN != aQ)) | |
239 | 239 | then throw((("Need payment of " + af(aQ, 8)) + " WLGOLD")) | |
240 | 240 | else { | |
241 | 241 | let e = aF(aH.originCaller) | |
242 | 242 | let aR = valueOrElse(getString(j(aI)), "") | |
243 | 243 | if (if (valueOrElse(getBoolean(l(aI, e)), false)) | |
244 | 244 | then true | |
245 | 245 | else contains(aR, e)) | |
246 | 246 | then throw(((("Your duck " + e) + " is already registered at tournament ") + toString(aI))) | |
247 | 247 | else { | |
248 | 248 | let aS = ay("INPROGRESS", t[z], parseIntValue(t[A]), (parseIntValue(t[B]) + 1), parseIntValue(t[C])) | |
249 | 249 | $Tuple2([IntegerEntry(k(e), aI), BooleanEntry(l(aI, e), true), StringEntry(j(aI), if ((aR == "")) | |
250 | 250 | then (e + ":000") | |
251 | 251 | else (((aR + "_") + e) + ":000")), StringEntry(i(aI), aS)], aL) | |
252 | 252 | } | |
253 | 253 | } | |
254 | 254 | } | |
255 | 255 | } | |
256 | 256 | } | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | ||
261 | 261 | @Callable(aH) | |
262 | 262 | func newAttempt () = { | |
263 | 263 | let aL = aE() | |
264 | 264 | let e = aF(aH.originCaller) | |
265 | 265 | let aI = valueOrErrorMessage(getInteger(f), "No active tournaments") | |
266 | 266 | let aK = lastBlock.timestamp | |
267 | 267 | let aP = q(this, aI) | |
268 | 268 | let s = aP[o] | |
269 | 269 | let t = aP[p] | |
270 | 270 | let az = t[y] | |
271 | 271 | if (!(if ((az == "INPROGRESS")) | |
272 | 272 | then ((parseIntValue(s[x]) - ap) > aK) | |
273 | 273 | else false)) | |
274 | 274 | then throw("Attempt is not possible") | |
275 | 275 | else if (!(valueOrElse(getBoolean(l(aI, e)), false))) | |
276 | 276 | then throw(((("Your duck " + e) + " is not registered at tournament ") + toString(aI))) | |
277 | 277 | else { | |
278 | 278 | let aT = m(aI, e) | |
279 | 279 | let aU = getInteger(aT) | |
280 | 280 | let aV = if (!(isDefined(aU))) | |
281 | 281 | then $Tuple2(0, 0) | |
282 | 282 | else if ((size(aH.payments) != 1)) | |
283 | 283 | then throw("exactly 1 payment must be attached") | |
284 | 284 | else { | |
285 | 285 | let aM = aH.payments[0] | |
286 | 286 | let aN = aM.amount | |
287 | 287 | let aO = valueOrErrorMessage(aM.assetId, "WLGOLD payments only!") | |
288 | 288 | if ((aO != Z)) | |
289 | 289 | then throw("WLGOLD payments only!") | |
290 | 290 | else { | |
291 | 291 | let aW = parseIntValue(s[v]) | |
292 | 292 | if ((aN != aW)) | |
293 | 293 | then throw((("Need payment of " + af(aW, 8)) + " WLGOLD")) | |
294 | 294 | else $Tuple2((value(aU) + 1), 1) | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | let aX = aV._1 | |
298 | 298 | let aY = aV._2 | |
299 | 299 | let aS = ay("INPROGRESS", t[z], parseIntValue(t[A]), parseIntValue(t[B]), (parseIntValue(t[C]) + aY)) | |
300 | - | let aZ = split(valueOrElse(getString(W, d(e)), a), "_") | |
301 | - | let ba = aa(invoke(W, "initDuckTourAttempt", [e], nil)) | |
302 | - | $Tuple2([IntegerEntry(aT, aX), StringEntry(i(aI), aS)], [aL, aX, ba]) | |
300 | + | let aZ = aa(invoke(W, "initDuckTourAttempt", [e], nil)) | |
301 | + | $Tuple2([IntegerEntry(aT, aX), StringEntry(i(aI), aS)], [aL, aX, aZ]) | |
303 | 302 | } | |
304 | 303 | } | |
305 | 304 | ||
306 | 305 | ||
307 | 306 | ||
308 | 307 | @Callable(aH) | |
309 | - | func updateDynamicData (e, | |
308 | + | func updateDynamicData (e,ba) = if ((aH.caller != W)) | |
310 | 309 | then throw("Access denied") | |
311 | 310 | else { | |
312 | 311 | let aI = valueOrErrorMessage(getInteger(f), "No active tournaments") | |
313 | 312 | let aP = q(this, aI) | |
314 | 313 | let s = aP[o] | |
315 | 314 | let t = aP[p] | |
316 | - | if (if (if ((parseIntValue(t[A]) >= | |
315 | + | if (if (if ((parseIntValue(t[A]) >= ba)) | |
317 | 316 | then true | |
318 | 317 | else (t[y] != "INPROGRESS")) | |
319 | 318 | then true | |
320 | 319 | else (lastBlock.timestamp > parseIntValue(s[x]))) | |
321 | 320 | then $Tuple2(nil, 0) | |
322 | 321 | else { | |
323 | - | let aS = ay("INPROGRESS", e, | |
322 | + | let aS = ay("INPROGRESS", e, ba, parseIntValue(t[B]), parseIntValue(t[C])) | |
324 | 323 | $Tuple2([StringEntry(i(aI), aS)], 0) | |
325 | 324 | } | |
326 | 325 | } | |
327 | 326 | ||
328 | 327 | ||
329 | 328 | ||
330 | 329 | @Callable(aH) | |
331 | - | func saveDuckResult (e, | |
330 | + | func saveDuckResult (e,ba) = if ((aH.caller != W)) | |
332 | 331 | then throw("Access denied") | |
333 | 332 | else { | |
334 | 333 | let aI = valueOrErrorMessage(getInteger(f), "No active tournaments") | |
335 | 334 | let aP = q(this, aI) | |
336 | 335 | let s = aP[o] | |
337 | 336 | let t = aP[p] | |
338 | - | let | |
337 | + | let bb = split(valueOrElse(getString(W, d(e)), a), "_") | |
339 | 338 | let bc = n(aI, e) | |
340 | - | if (if (if (if (( | |
341 | - | then (parseIntValue( | |
339 | + | if (if (if (if ((bb[E] == "T")) | |
340 | + | then (parseIntValue(bb[D]) == aI) | |
342 | 341 | else false) | |
343 | 342 | then (t[y] == "INPROGRESS") | |
344 | 343 | else false) | |
345 | 344 | then (parseIntValue(s[x]) >= lastBlock.timestamp) | |
346 | 345 | else false) | |
347 | 346 | then { | |
348 | 347 | let bd = valueOrElse(getInteger(bc), 0) | |
349 | 348 | let be = j(aI) | |
350 | 349 | let aR = valueOrElse(getString(be), "") | |
351 | - | let bf = if (( | |
350 | + | let bf = if ((ba > bd)) | |
352 | 351 | then if (!(contains(aR, e))) | |
353 | 352 | then throw(("scoreBoard does not contain " + e)) | |
354 | 353 | else { | |
355 | 354 | let bg = split_51C(aR, e) | |
356 | - | ((((bg[0] + e) + ":") + al( | |
355 | + | ((((bg[0] + e) + ":") + al(ba, 3)) + drop(bg[1], 4)) | |
357 | 356 | } | |
358 | 357 | else aR | |
359 | - | $Tuple2([IntegerEntry(bc, max([bd, | |
358 | + | $Tuple2([IntegerEntry(bc, max([bd, ba])), StringEntry(be, bf)], 0) | |
360 | 359 | } | |
361 | 360 | else $Tuple2(nil, 0) | |
362 | 361 | } | |
363 | 362 | ||
364 | 363 | ||
365 | 364 | ||
366 | 365 | @Callable(aH) | |
367 | 366 | func finishTournament (h) = { | |
368 | 367 | let aG = toString(aH.caller) | |
369 | 368 | if (!(containsElement(aq, aG))) | |
370 | 369 | then throw("Permission denied") | |
371 | 370 | else { | |
372 | 371 | let aP = q(this, h) | |
373 | 372 | let t = aP[p] | |
374 | 373 | let az = t[y] | |
375 | 374 | if ((az == "ARCHIVED")) | |
376 | 375 | then throw((("Tournament " + toString(h)) + " is already ARCHIVED")) | |
377 | 376 | else { | |
378 | 377 | let aS = ay("ARCHIVED", t[z], parseIntValue(t[A]), parseIntValue(t[B]), parseIntValue(t[C])) | |
379 | 378 | $Tuple2([StringEntry(i(h), aS)], 0) | |
380 | 379 | } | |
381 | 380 | } | |
382 | 381 | } | |
383 | 382 | ||
384 | 383 |
github/deemru/w8io/169f3d6 65.63 ms ◑