tx · D9nuK465nEitbyB4YKUs6J6jZjaekCQL7PVwq5Mzafkb 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito: -0.05000000 Waves 2021.09.10 14:31 [1696896] smart account 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito > SELF 0.00000000 Waves
{ "type": 13, "id": "D9nuK465nEitbyB4YKUs6J6jZjaekCQL7PVwq5Mzafkb", "fee": 5000000, "feeAssetId": null, "timestamp": 1631273516753, "version": 2, "chainId": 84, "sender": "3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito", "senderPublicKey": "7PMrxEzirv6h9Z2zqLE47qrZd6v1AbRZER5Aqfo95Eyr", "proofs": [ "43vV1cqQoUEEUt8xp3fSaqD8c3XVZBqf3aG72aPUPaZa2BkfUPLeMQZsDYHcpqrinHzC4CWfcDZczgHJ8F7CZwVp" ], "script": "base64:AAIFAAAAAAAAACgIAhIGCgQBAQEBEgMKAQESAwoBARIFCgMICAgSAwoBCBIECgIICBIAAAAANgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAGgFU8jY5wCvKx9IdZ1jq9byeNi+peiAgajPTAAAAABVyYXJpdHlQcm92aWRlckFkZHJlc3MBAAAAGgFU+q9cAg4rvtWEk5vjyvMr8wmPCufq9HWkAAAAAAtlZ2dzQXNzZXRJZAEAAAAgJQJlzPcEaMi+AVmReOVYWjhmFBOtSkxKt/4FF0gXFoMAAAAABVNMT1RTAAAAAAAAAAAKAAAAAAdXQUlUSU5HAAAAAAAAAAAIAAAAAAxzdGVwRHVyYXRpb24AAAAAAAAAAAUBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAA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gkBAAAACmdldEJldEVnZ3MAAAABBQAAAAZnYW1lSWQFAAAAC2VnZ3NBc3NldElkBQAAAANuaWwJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAABdnZXRQbGF5ZXJDdXJyZW50R2FtZUtleQAAAAEFAAAADWNhbGxlckFkZHJlc3MAAAAAAAAAAAAFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5SO2dRA==", "height": 1696896, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9a6rU1qowbZ5NXSPGYtrE1gYgxL6XKM4DLaN4Gf2Uouv Next: DWsNfa7Fy7sePxsPSaL8vMtwUvq4313c1UBzyhTDXV13 Diff:
Old | New | Differences | |
---|---|---|---|
144 | 144 | func X (w,q) = k(W(w, q)) | |
145 | 145 | ||
146 | 146 | ||
147 | - | func Y (q) = ( | |
147 | + | func Y (w,q) = (((("game" + toString(w)) + "_") + q) + "_prize") | |
148 | 148 | ||
149 | 149 | ||
150 | - | func Z (q) = | |
150 | + | func Z (w,q) = k(Y(w, q)) | |
151 | 151 | ||
152 | 152 | ||
153 | - | func aa (q) = (q + "_ | |
153 | + | func aa (q) = (q + "_wins") | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func ab (q) = g(aa(q)) | |
157 | 157 | ||
158 | 158 | ||
159 | - | func ac (q) = (q + "_ | |
159 | + | func ac (q) = (q + "_loses") | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func ad (q) = g(ac(q)) | |
163 | 163 | ||
164 | 164 | ||
165 | - | func ae () = " | |
165 | + | func ae (q) = (q + "_draws") | |
166 | 166 | ||
167 | 167 | ||
168 | - | func af () = g(ae()) | |
168 | + | func af (q) = g(ae(q)) | |
169 | 169 | ||
170 | 170 | ||
171 | - | func ag (ah,ai) = { | |
172 | - | let i = getInteger(Address(a), (((("address_" + ah) + "_asset_") + ai) + "_farmingPower")) | |
171 | + | func ag () = "gamesPlayed" | |
172 | + | ||
173 | + | ||
174 | + | func ah () = g(ag()) | |
175 | + | ||
176 | + | ||
177 | + | func ai (aj,ak) = { | |
178 | + | let i = getInteger(Address(a), (((("address_" + aj) + "_asset_") + ak) + "_farmingPower")) | |
173 | 179 | if ($isInstanceOf(i, "Int")) | |
174 | 180 | then { | |
175 | - | let | |
176 | - | | |
181 | + | let al = i | |
182 | + | al | |
177 | 183 | } | |
178 | 184 | else 0 | |
179 | 185 | } | |
180 | 186 | ||
181 | 187 | ||
182 | - | func | |
188 | + | func am (an,ak) = if ((assetBalance(an, ak) > 0)) | |
183 | 189 | then true | |
184 | - | else ( | |
190 | + | else (ai(toBase58String(an.bytes), toBase58String(ak)) > 0) | |
185 | 191 | ||
186 | 192 | ||
187 | - | func | |
193 | + | func ao (l,j) = if ((l > j)) | |
188 | 194 | then 1 | |
189 | 195 | else if ((j > l)) | |
190 | 196 | then -1 | |
191 | 197 | else 0 | |
192 | 198 | ||
193 | 199 | ||
194 | - | func | |
195 | - | let | |
196 | - | if ((6 > | |
200 | + | func ap (w) = { | |
201 | + | let aq = M(w) | |
202 | + | if ((6 > aq)) | |
197 | 203 | then { | |
198 | - | let | |
199 | - | if (( | |
204 | + | let ar = H(w) | |
205 | + | if ((ar == 0)) | |
200 | 206 | then throw("Game is not started") | |
201 | - | else if (( | |
207 | + | else if ((ar > height)) | |
202 | 208 | then throw("Game is not finished or expired") | |
203 | 209 | else if (((M(w) % 2) == 0)) | |
204 | 210 | then "maker" | |
205 | 211 | else "taker" | |
206 | 212 | } | |
207 | 213 | else { | |
208 | - | let | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | if (( | |
214 | + | let as = split(V(w, "maker"), ",") | |
215 | + | let at = split(V(w, "taker"), ",") | |
216 | + | let au = P(w, "maker", as[0]) | |
217 | + | let av = P(w, "maker", as[1]) | |
218 | + | let aw = P(w, "maker", as[2]) | |
219 | + | let ax = P(w, "taker", at[0]) | |
220 | + | let ay = P(w, "taker", at[1]) | |
221 | + | let az = P(w, "taker", at[2]) | |
222 | + | let aA = ((ao(au, ax) + ao(av, ay)) + ao(aw, az)) | |
223 | + | if ((aA > 0)) | |
218 | 224 | then "maker" | |
219 | - | else if ((0 > | |
225 | + | else if ((0 > aA)) | |
220 | 226 | then "taker" | |
221 | 227 | else "draw" | |
222 | 228 | } | |
223 | 229 | } | |
224 | 230 | ||
225 | 231 | ||
226 | - | @Callable( | |
227 | - | func makeGame (t, | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | + | @Callable(aB) | |
233 | + | func makeGame (t,aC,aD,aE) = { | |
234 | + | let aF = toBase58String(aB.caller.bytes) | |
235 | + | let aG = u(t) | |
236 | + | let aH = value(aB.payments[0]) | |
237 | + | let aI = aH.amount | |
232 | 238 | let w = n() | |
233 | - | if ((r( | |
239 | + | if ((r(aF) != 0)) | |
234 | 240 | then throw("You already have an active game") | |
235 | 241 | else if (if ((0 > t)) | |
236 | 242 | then true | |
237 | 243 | else (t >= d)) | |
238 | 244 | then throw("Invalid slot") | |
239 | - | else if (( | |
245 | + | else if ((aG != 0)) | |
240 | 246 | then throw("This slot is busy") | |
241 | - | else if (( | |
247 | + | else if ((aH.assetId != c)) | |
242 | 248 | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(c))) | |
243 | - | else if (( | |
249 | + | else if ((aI != 1)) | |
244 | 250 | then throw("Bet must be 0.01 EGG during beta test") | |
245 | - | else if (if ((1 > | |
251 | + | else if (if ((1 > aC)) | |
246 | 252 | then true | |
247 | - | else ( | |
253 | + | else (aC > 5)) | |
248 | 254 | then throw("Invalid rarity range for the worst duck") | |
249 | - | else if (if ((1 > | |
255 | + | else if (if ((1 > aD)) | |
250 | 256 | then true | |
251 | - | else ( | |
257 | + | else (aD > 5)) | |
252 | 258 | then throw("Invalid rarity range for the medium duck") | |
253 | - | else if (if ((1 > | |
259 | + | else if (if ((1 > aE)) | |
254 | 260 | then true | |
255 | - | else ( | |
261 | + | else (aE > 5)) | |
256 | 262 | then throw("Invalid rarity range for the best duck") | |
257 | - | else if (( | |
263 | + | else if ((aC > aD)) | |
258 | 264 | then throw("The medium range can't be less than the worst one") | |
259 | - | else if (( | |
265 | + | else if ((aD > aE)) | |
260 | 266 | then throw("The best range can't be worse than the medium one") | |
261 | - | else [IntegerEntry(p( | |
267 | + | else [IntegerEntry(p(aF), w), StringEntry(y(w), aF), StringEntry(v(w, aF), "maker"), IntegerEntry(C(w), aI), IntegerEntry(I(w, "worst"), aC), IntegerEntry(I(w, "medium"), aD), IntegerEntry(I(w, "best"), aE), IntegerEntry(E(w), (height + e)), IntegerEntry(s(t), w), IntegerEntry("nextGameId", (w + 1))] | |
262 | 268 | } | |
263 | 269 | ||
264 | 270 | ||
265 | 271 | ||
266 | - | @Callable( | |
272 | + | @Callable(aB) | |
267 | 273 | func takeGame (t) = { | |
268 | - | let | |
274 | + | let aF = toBase58String(aB.caller.bytes) | |
269 | 275 | let w = u(t) | |
270 | - | let | |
271 | - | if ((r( | |
276 | + | let aH = value(aB.payments[0]) | |
277 | + | if ((r(aF) != 0)) | |
272 | 278 | then throw("You already have an active game") | |
273 | 279 | else if (if ((0 > t)) | |
274 | 280 | then true | |
276 | 282 | then throw("Invalid slot") | |
277 | 283 | else if ((u(t) == 0)) | |
278 | 284 | then throw("This slot is empty") | |
279 | - | else if (( | |
285 | + | else if ((aH.assetId != c)) | |
280 | 286 | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(c))) | |
281 | - | else if (( | |
287 | + | else if ((aH.amount != D(w))) | |
282 | 288 | then throw("Insufficient eggs amount") | |
283 | 289 | else if ((height >= F(w))) | |
284 | 290 | then throw("This game is expired") | |
285 | - | else [IntegerEntry(p( | |
291 | + | else [IntegerEntry(p(aF), w), StringEntry(A(w), aF), StringEntry(v(w, aF), "taker"), IntegerEntry(L(w), 0), IntegerEntry(G(w), (height + f)), IntegerEntry(s(t), 0), IntegerEntry("gamesPlayed", (ah() + 1))] | |
286 | 292 | } | |
287 | 293 | ||
288 | 294 | ||
289 | 295 | ||
290 | - | @Callable( | |
296 | + | @Callable(aB) | |
291 | 297 | func kickGame (t) = { | |
292 | 298 | let w = u(t) | |
293 | 299 | if (if ((0 > t)) | |
299 | 305 | else if ((F(w) > height)) | |
300 | 306 | then throw("Waiting is not finished yet") | |
301 | 307 | else { | |
302 | - | let | |
303 | - | [IntegerEntry(p( | |
308 | + | let aJ = z(w) | |
309 | + | [IntegerEntry(p(aJ), 0), IntegerEntry(s(t), 0), ScriptTransfer(Address(fromBase58String(aJ)), D(w), c)] | |
304 | 310 | } | |
305 | 311 | } | |
306 | 312 | ||
307 | 313 | ||
308 | 314 | ||
309 | - | @Callable( | |
310 | - | func pickDucks ( | |
311 | - | let | |
312 | - | let w = r( | |
313 | - | let O = x(w, | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | if (( | |
315 | + | @Callable(aB) | |
316 | + | func pickDucks (aK,aL,aM) = { | |
317 | + | let aF = toBase58String(aB.caller.bytes) | |
318 | + | let w = r(aF) | |
319 | + | let O = x(w, aF) | |
320 | + | let aq = M(w) | |
321 | + | let aN = K(w, "worst") | |
322 | + | let aO = K(w, "medium") | |
323 | + | let aP = K(w, "best") | |
324 | + | let aQ = invoke(Address(b), "getAssetRarity", [aK], nil) | |
325 | + | if ((aQ == aQ)) | |
320 | 326 | then { | |
321 | - | let | |
322 | - | let i = | |
327 | + | let aR = { | |
328 | + | let i = aQ | |
323 | 329 | if ($isInstanceOf(i, "Int")) | |
324 | 330 | then { | |
325 | - | let | |
326 | - | | |
331 | + | let aS = i | |
332 | + | aS | |
327 | 333 | } | |
328 | 334 | else throw("Incorrect invoke result") | |
329 | 335 | } | |
330 | - | let | |
331 | - | if (( | |
336 | + | let aT = invoke(Address(b), "getAssetRarity", [aL], nil) | |
337 | + | if ((aT == aT)) | |
332 | 338 | then { | |
333 | - | let | |
334 | - | let i = | |
339 | + | let aU = { | |
340 | + | let i = aT | |
335 | 341 | if ($isInstanceOf(i, "Int")) | |
336 | 342 | then { | |
337 | - | let | |
338 | - | | |
343 | + | let aS = i | |
344 | + | aS | |
339 | 345 | } | |
340 | 346 | else throw("Incorrect invoke result") | |
341 | 347 | } | |
342 | - | let | |
343 | - | if (( | |
348 | + | let aV = invoke(Address(b), "getAssetRarity", [aM], nil) | |
349 | + | if ((aV == aV)) | |
344 | 350 | then { | |
345 | - | let | |
346 | - | let i = | |
351 | + | let aW = { | |
352 | + | let i = aV | |
347 | 353 | if ($isInstanceOf(i, "Int")) | |
348 | 354 | then { | |
349 | - | let | |
350 | - | | |
355 | + | let aS = i | |
356 | + | aS | |
351 | 357 | } | |
352 | 358 | else throw("Incorrect invoke result") | |
353 | 359 | } | |
355 | 361 | then throw("You don't have an active game") | |
356 | 362 | else if ((H(w) == 0)) | |
357 | 363 | then throw("Game is not started") | |
358 | - | else if (if (( | |
364 | + | else if (if ((aq == 0)) | |
359 | 365 | then (O != "taker") | |
360 | 366 | else false) | |
361 | 367 | then throw("It is the taker's turn to pick now") | |
362 | - | else if (if (( | |
368 | + | else if (if ((aq == 1)) | |
363 | 369 | then (O != "maker") | |
364 | 370 | else false) | |
365 | 371 | then throw("It is the maker's turn to pick now") | |
366 | - | else if (( | |
372 | + | else if ((aq > 1)) | |
367 | 373 | then throw("Ducks have already been picked") | |
368 | - | else if (!( | |
369 | - | then throw((("Asset " + | |
370 | - | else if (!( | |
371 | - | then throw((("Asset " + | |
372 | - | else if (!( | |
373 | - | then throw((("Asset " + | |
374 | - | else if (if ((5 > | |
375 | - | then if (( | |
374 | + | else if (!(am(aB.caller, fromBase58String(aK)))) | |
375 | + | then throw((("Asset " + aK) + " doesn't belong to you")) | |
376 | + | else if (!(am(aB.caller, fromBase58String(aL)))) | |
377 | + | then throw((("Asset " + aL) + " doesn't belong to you")) | |
378 | + | else if (!(am(aB.caller, fromBase58String(aM)))) | |
379 | + | then throw((("Asset " + aM) + " doesn't belong to you")) | |
380 | + | else if (if ((5 > aN)) | |
381 | + | then if ((aR > (aN * 10))) | |
376 | 382 | then true | |
377 | - | else ((( | |
383 | + | else (((aN - 1) * 10) >= aR) | |
378 | 384 | else false) | |
379 | 385 | then throw("Worst duck doesn't fit rarity range") | |
380 | - | else if (if ((5 > | |
381 | - | then if (( | |
386 | + | else if (if ((5 > aO)) | |
387 | + | then if ((aU > (aO * 10))) | |
382 | 388 | then true | |
383 | - | else ((( | |
389 | + | else (((aO - 1) * 10) >= aU) | |
384 | 390 | else false) | |
385 | 391 | then throw("Medium duck doesn't fit rarity range") | |
386 | - | else if (if ((5 > | |
387 | - | then if (( | |
392 | + | else if (if ((5 > aP)) | |
393 | + | then if ((aW > (aP * 10))) | |
388 | 394 | then true | |
389 | - | else ((( | |
395 | + | else (((aP - 1) * 10) >= aW) | |
390 | 396 | else false) | |
391 | 397 | then throw("Best duck doesn't fit rarity range") | |
392 | - | else if (if (( | |
393 | - | then (40 >= | |
398 | + | else if (if ((aN == 5)) | |
399 | + | then (40 >= aR) | |
394 | 400 | else false) | |
395 | 401 | then throw("Worst duck doesn't fit rarity range") | |
396 | - | else if (if (( | |
397 | - | then (40 >= | |
402 | + | else if (if ((aO == 5)) | |
403 | + | then (40 >= aU) | |
398 | 404 | else false) | |
399 | 405 | then throw("Medium duck doesn't fit rarity range") | |
400 | - | else if (if (( | |
401 | - | then (40 >= | |
406 | + | else if (if ((aP == 5)) | |
407 | + | then (40 >= aW) | |
402 | 408 | else false) | |
403 | 409 | then throw("Best duck doesn't fit rarity range") | |
404 | - | else if (if (if (( | |
410 | + | else if (if (if ((aR == aU)) | |
405 | 411 | then true | |
406 | - | else ( | |
412 | + | else (aR == aW)) | |
407 | 413 | then true | |
408 | - | else ( | |
414 | + | else (aU == aW)) | |
409 | 415 | then throw("Ducks must have different rarities") | |
410 | - | else [IntegerEntry(N(w, O, "worst"), | |
416 | + | else [IntegerEntry(N(w, O, "worst"), aR), IntegerEntry(N(w, O, "medium"), aU), IntegerEntry(N(w, O, "best"), aW), StringEntry(Q(w, O, "worst"), aK), StringEntry(Q(w, O, "medium"), aL), StringEntry(Q(w, O, "best"), aM), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))] | |
411 | 417 | } | |
412 | 418 | else throw("Strict value is not equal to itself.") | |
413 | 419 | } | |
418 | 424 | ||
419 | 425 | ||
420 | 426 | ||
421 | - | @Callable( | |
422 | - | func commit ( | |
423 | - | let | |
424 | - | let w = r( | |
425 | - | let O = x(w, | |
426 | - | let | |
427 | + | @Callable(aB) | |
428 | + | func commit (aX) = { | |
429 | + | let aF = toBase58String(aB.caller.bytes) | |
430 | + | let w = r(aF) | |
431 | + | let O = x(w, aF) | |
432 | + | let aq = M(w) | |
427 | 433 | if ((w == 0)) | |
428 | 434 | then throw("You don't have an active game") | |
429 | - | else if ((2 > | |
435 | + | else if ((2 > aq)) | |
430 | 436 | then throw("Commit is not started") | |
431 | - | else if (if (( | |
437 | + | else if (if ((aq == 2)) | |
432 | 438 | then (O != "taker") | |
433 | 439 | else false) | |
434 | 440 | then throw("It is the taker's turn to pick now") | |
435 | - | else if (if (( | |
441 | + | else if (if ((aq == 3)) | |
436 | 442 | then (O != "maker") | |
437 | 443 | else false) | |
438 | 444 | then throw("It is the maker's turn to pick now") | |
439 | - | else if (( | |
445 | + | else if ((aq > 3)) | |
440 | 446 | then throw("Commit is finished") | |
441 | - | else [StringEntry(S(w, O), | |
447 | + | else [StringEntry(S(w, O), aX), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))] | |
442 | 448 | } | |
443 | 449 | ||
444 | 450 | ||
445 | 451 | ||
446 | - | @Callable( | |
447 | - | func reveal ( | |
448 | - | let | |
449 | - | let w = r( | |
450 | - | let O = x(w, | |
451 | - | let | |
452 | + | @Callable(aB) | |
453 | + | func reveal (aY,aZ) = { | |
454 | + | let aF = toBase58String(aB.caller.bytes) | |
455 | + | let w = r(aF) | |
456 | + | let O = x(w, aF) | |
457 | + | let aq = M(w) | |
452 | 458 | if ((w == 0)) | |
453 | 459 | then throw("You don't have an active game") | |
454 | - | else if ((4 > | |
460 | + | else if ((4 > aq)) | |
455 | 461 | then throw("Reveal is not started") | |
456 | - | else if (if (( | |
462 | + | else if (if ((aq == 4)) | |
457 | 463 | then (O != "taker") | |
458 | 464 | else false) | |
459 | 465 | then throw("It is the taker's turn to pick now") | |
460 | - | else if (if (( | |
466 | + | else if (if ((aq == 5)) | |
461 | 467 | then (O != "maker") | |
462 | 468 | else false) | |
463 | 469 | then throw("It is the maker's turn to pick now") | |
464 | - | else if (( | |
470 | + | else if ((aq > 5)) | |
465 | 471 | then throw("Reveal is finished") | |
466 | - | else if (if (if (if (if (if (( | |
467 | - | then ( | |
472 | + | else if (if (if (if (if (if ((aY != "worst,medium,best")) | |
473 | + | then (aY != "worst,best,medium") | |
468 | 474 | else false) | |
469 | - | then ( | |
475 | + | then (aY != "medium,worst,best") | |
470 | 476 | else false) | |
471 | - | then ( | |
477 | + | then (aY != "medium,best,worst") | |
472 | 478 | else false) | |
473 | - | then ( | |
479 | + | then (aY != "best,worst,medium") | |
474 | 480 | else false) | |
475 | - | then ( | |
481 | + | then (aY != "best,medium,worst") | |
476 | 482 | else false) | |
477 | 483 | then throw("Reveal data is not valid") | |
478 | - | else if ((toBase58String(sha256(toBytes(( | |
484 | + | else if ((toBase58String(sha256(toBytes((aY + aZ)))) != T(w, O))) | |
479 | 485 | then throw("Reveal doesn't match commit") | |
480 | - | else [StringEntry(U(w, O), | |
486 | + | else [StringEntry(U(w, O), aY), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))] | |
481 | 487 | } | |
482 | 488 | ||
483 | 489 | ||
484 | 490 | ||
485 | - | @Callable( | |
491 | + | @Callable(aB) | |
486 | 492 | func getPrize () = { | |
487 | - | let | |
488 | - | let w = r( | |
489 | - | let O = x(w, | |
490 | - | let | |
493 | + | let aF = toBase58String(aB.caller.bytes) | |
494 | + | let w = r(aF) | |
495 | + | let O = x(w, aF) | |
496 | + | let ba = if ((O == "maker")) | |
491 | 497 | then B(w) | |
492 | 498 | else z(w) | |
493 | - | let | |
499 | + | let bb = ap(w) | |
494 | 500 | if ((w == 0)) | |
495 | 501 | then throw("You don't have an active game") | |
496 | - | else if ((aZ == O)) | |
497 | - | then [IntegerEntry(p(aD), 0), IntegerEntry(p(aY), 0), IntegerEntry(Y(aD), (Z(aD) + 1)), IntegerEntry(aa(aY), (ab(aY) + 1)), StringEntry(W(w, aD), "win"), StringEntry(W(w, aY), "lose"), ScriptTransfer(az.caller, (D(w) * 2), c)] | |
498 | - | else if ((aZ == "draw")) | |
499 | - | then [IntegerEntry(p(aD), 0), IntegerEntry(ac(aD), (ad(aD) + 1)), StringEntry(W(w, aD), "draw"), ScriptTransfer(az.caller, D(w), c)] | |
500 | - | else [IntegerEntry(p(aD), 0)] | |
502 | + | else if ((bb == O)) | |
503 | + | then { | |
504 | + | let bc = D(w) | |
505 | + | [IntegerEntry(p(aF), 0), IntegerEntry(p(ba), 0), IntegerEntry(aa(aF), (ab(aF) + 1)), IntegerEntry(ac(ba), (ad(ba) + 1)), StringEntry(W(w, aF), "win"), StringEntry(W(w, ba), "lose"), IntegerEntry(Y(w, aF), bc), IntegerEntry(Y(w, ba), -(bc)), ScriptTransfer(aB.caller, (D(w) * 2), c)] | |
506 | + | } | |
507 | + | else if ((bb == "draw")) | |
508 | + | then [IntegerEntry(p(aF), 0), IntegerEntry(ae(aF), (af(aF) + 1)), StringEntry(W(w, aF), "draw"), IntegerEntry(Y(w, aF), 0), ScriptTransfer(aB.caller, D(w), c)] | |
509 | + | else [IntegerEntry(p(aF), 0)] | |
501 | 510 | } | |
502 | 511 | ||
503 | 512 | ||
504 | - | @Verifier( | |
505 | - | func | |
513 | + | @Verifier(bd) | |
514 | + | func be () = sigVerify(bd.bodyBytes, bd.proofs[0], bd.senderPublicKey) | |
506 | 515 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC' | |
5 | 5 | ||
6 | 6 | let b = base58'3NCman4dCzk1HWWU4DPTr5rsbhvuUCwwUZh' | |
7 | 7 | ||
8 | 8 | let c = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN' | |
9 | 9 | ||
10 | 10 | let d = 10 | |
11 | 11 | ||
12 | 12 | let e = 8 | |
13 | 13 | ||
14 | 14 | let f = 5 | |
15 | 15 | ||
16 | 16 | func g (h) = { | |
17 | 17 | let i = getInteger(this, h) | |
18 | 18 | if ($isInstanceOf(i, "Int")) | |
19 | 19 | then { | |
20 | 20 | let j = i | |
21 | 21 | j | |
22 | 22 | } | |
23 | 23 | else 0 | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func k (h) = { | |
28 | 28 | let i = getString(this, h) | |
29 | 29 | if ($isInstanceOf(i, "String")) | |
30 | 30 | then { | |
31 | 31 | let l = i | |
32 | 32 | l | |
33 | 33 | } | |
34 | 34 | else "" | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func m (h) = { | |
39 | 39 | let i = getBoolean(this, h) | |
40 | 40 | if ($isInstanceOf(i, "Boolean")) | |
41 | 41 | then { | |
42 | 42 | let j = i | |
43 | 43 | j | |
44 | 44 | } | |
45 | 45 | else false | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func n () = { | |
50 | 50 | let o = g("nextGameId") | |
51 | 51 | if ((o == 0)) | |
52 | 52 | then 1 | |
53 | 53 | else o | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func p (q) = (q + "_currentGame") | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func r (q) = g(p(q)) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func s (t) = ("slot" + toString(t)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func u (t) = g(s(t)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func v (w,q) = ((("game" + toString(w)) + "_") + q) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func x (w,q) = k(v(w, q)) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func y (w) = (("game" + toString(w)) + "_maker") | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func z (w) = k(y(w)) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func A (w) = (("game" + toString(w)) + "_taker") | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func B (w) = k(A(w)) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func C (w) = (("game" + toString(w)) + "_betEggs") | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func D (w) = g(C(w)) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func E (w) = (("game" + toString(w)) + "_waitingExpirationHeight") | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func F (w) = g(E(w)) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func G (w) = (("game" + toString(w)) + "_expirationHeight") | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func H (w) = g(G(w)) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func I (w,J) = ((("game" + toString(w)) + "_rarityRange_") + J) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func K (w,J) = g(I(w, J)) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func L (w) = (("game" + toString(w)) + "_step") | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func M (w) = g(L(w)) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func N (w,O,J) = (((((("game" + toString(w)) + "_") + O) + "_") + J) + "Rarity") | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func P (w,O,J) = g(N(w, O, J)) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func Q (w,O,J) = (((((("game" + toString(w)) + "_") + O) + "_") + J) + "DuckId") | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func R (w,O,J) = k(Q(w, O, J)) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func S (w,O) = (((("game" + toString(w)) + "_") + O) + "_commit") | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func T (w,O) = k(S(w, O)) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func U (w,O) = (((("game" + toString(w)) + "_") + O) + "_duckOrder") | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func V (w,O) = k(U(w, O)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func W (w,q) = (((("game" + toString(w)) + "_") + q) + "_result") | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func X (w,q) = k(W(w, q)) | |
145 | 145 | ||
146 | 146 | ||
147 | - | func Y (q) = ( | |
147 | + | func Y (w,q) = (((("game" + toString(w)) + "_") + q) + "_prize") | |
148 | 148 | ||
149 | 149 | ||
150 | - | func Z (q) = | |
150 | + | func Z (w,q) = k(Y(w, q)) | |
151 | 151 | ||
152 | 152 | ||
153 | - | func aa (q) = (q + "_ | |
153 | + | func aa (q) = (q + "_wins") | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func ab (q) = g(aa(q)) | |
157 | 157 | ||
158 | 158 | ||
159 | - | func ac (q) = (q + "_ | |
159 | + | func ac (q) = (q + "_loses") | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func ad (q) = g(ac(q)) | |
163 | 163 | ||
164 | 164 | ||
165 | - | func ae () = " | |
165 | + | func ae (q) = (q + "_draws") | |
166 | 166 | ||
167 | 167 | ||
168 | - | func af () = g(ae()) | |
168 | + | func af (q) = g(ae(q)) | |
169 | 169 | ||
170 | 170 | ||
171 | - | func ag (ah,ai) = { | |
172 | - | let i = getInteger(Address(a), (((("address_" + ah) + "_asset_") + ai) + "_farmingPower")) | |
171 | + | func ag () = "gamesPlayed" | |
172 | + | ||
173 | + | ||
174 | + | func ah () = g(ag()) | |
175 | + | ||
176 | + | ||
177 | + | func ai (aj,ak) = { | |
178 | + | let i = getInteger(Address(a), (((("address_" + aj) + "_asset_") + ak) + "_farmingPower")) | |
173 | 179 | if ($isInstanceOf(i, "Int")) | |
174 | 180 | then { | |
175 | - | let | |
176 | - | | |
181 | + | let al = i | |
182 | + | al | |
177 | 183 | } | |
178 | 184 | else 0 | |
179 | 185 | } | |
180 | 186 | ||
181 | 187 | ||
182 | - | func | |
188 | + | func am (an,ak) = if ((assetBalance(an, ak) > 0)) | |
183 | 189 | then true | |
184 | - | else ( | |
190 | + | else (ai(toBase58String(an.bytes), toBase58String(ak)) > 0) | |
185 | 191 | ||
186 | 192 | ||
187 | - | func | |
193 | + | func ao (l,j) = if ((l > j)) | |
188 | 194 | then 1 | |
189 | 195 | else if ((j > l)) | |
190 | 196 | then -1 | |
191 | 197 | else 0 | |
192 | 198 | ||
193 | 199 | ||
194 | - | func | |
195 | - | let | |
196 | - | if ((6 > | |
200 | + | func ap (w) = { | |
201 | + | let aq = M(w) | |
202 | + | if ((6 > aq)) | |
197 | 203 | then { | |
198 | - | let | |
199 | - | if (( | |
204 | + | let ar = H(w) | |
205 | + | if ((ar == 0)) | |
200 | 206 | then throw("Game is not started") | |
201 | - | else if (( | |
207 | + | else if ((ar > height)) | |
202 | 208 | then throw("Game is not finished or expired") | |
203 | 209 | else if (((M(w) % 2) == 0)) | |
204 | 210 | then "maker" | |
205 | 211 | else "taker" | |
206 | 212 | } | |
207 | 213 | else { | |
208 | - | let | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | if (( | |
214 | + | let as = split(V(w, "maker"), ",") | |
215 | + | let at = split(V(w, "taker"), ",") | |
216 | + | let au = P(w, "maker", as[0]) | |
217 | + | let av = P(w, "maker", as[1]) | |
218 | + | let aw = P(w, "maker", as[2]) | |
219 | + | let ax = P(w, "taker", at[0]) | |
220 | + | let ay = P(w, "taker", at[1]) | |
221 | + | let az = P(w, "taker", at[2]) | |
222 | + | let aA = ((ao(au, ax) + ao(av, ay)) + ao(aw, az)) | |
223 | + | if ((aA > 0)) | |
218 | 224 | then "maker" | |
219 | - | else if ((0 > | |
225 | + | else if ((0 > aA)) | |
220 | 226 | then "taker" | |
221 | 227 | else "draw" | |
222 | 228 | } | |
223 | 229 | } | |
224 | 230 | ||
225 | 231 | ||
226 | - | @Callable( | |
227 | - | func makeGame (t, | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | + | @Callable(aB) | |
233 | + | func makeGame (t,aC,aD,aE) = { | |
234 | + | let aF = toBase58String(aB.caller.bytes) | |
235 | + | let aG = u(t) | |
236 | + | let aH = value(aB.payments[0]) | |
237 | + | let aI = aH.amount | |
232 | 238 | let w = n() | |
233 | - | if ((r( | |
239 | + | if ((r(aF) != 0)) | |
234 | 240 | then throw("You already have an active game") | |
235 | 241 | else if (if ((0 > t)) | |
236 | 242 | then true | |
237 | 243 | else (t >= d)) | |
238 | 244 | then throw("Invalid slot") | |
239 | - | else if (( | |
245 | + | else if ((aG != 0)) | |
240 | 246 | then throw("This slot is busy") | |
241 | - | else if (( | |
247 | + | else if ((aH.assetId != c)) | |
242 | 248 | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(c))) | |
243 | - | else if (( | |
249 | + | else if ((aI != 1)) | |
244 | 250 | then throw("Bet must be 0.01 EGG during beta test") | |
245 | - | else if (if ((1 > | |
251 | + | else if (if ((1 > aC)) | |
246 | 252 | then true | |
247 | - | else ( | |
253 | + | else (aC > 5)) | |
248 | 254 | then throw("Invalid rarity range for the worst duck") | |
249 | - | else if (if ((1 > | |
255 | + | else if (if ((1 > aD)) | |
250 | 256 | then true | |
251 | - | else ( | |
257 | + | else (aD > 5)) | |
252 | 258 | then throw("Invalid rarity range for the medium duck") | |
253 | - | else if (if ((1 > | |
259 | + | else if (if ((1 > aE)) | |
254 | 260 | then true | |
255 | - | else ( | |
261 | + | else (aE > 5)) | |
256 | 262 | then throw("Invalid rarity range for the best duck") | |
257 | - | else if (( | |
263 | + | else if ((aC > aD)) | |
258 | 264 | then throw("The medium range can't be less than the worst one") | |
259 | - | else if (( | |
265 | + | else if ((aD > aE)) | |
260 | 266 | then throw("The best range can't be worse than the medium one") | |
261 | - | else [IntegerEntry(p( | |
267 | + | else [IntegerEntry(p(aF), w), StringEntry(y(w), aF), StringEntry(v(w, aF), "maker"), IntegerEntry(C(w), aI), IntegerEntry(I(w, "worst"), aC), IntegerEntry(I(w, "medium"), aD), IntegerEntry(I(w, "best"), aE), IntegerEntry(E(w), (height + e)), IntegerEntry(s(t), w), IntegerEntry("nextGameId", (w + 1))] | |
262 | 268 | } | |
263 | 269 | ||
264 | 270 | ||
265 | 271 | ||
266 | - | @Callable( | |
272 | + | @Callable(aB) | |
267 | 273 | func takeGame (t) = { | |
268 | - | let | |
274 | + | let aF = toBase58String(aB.caller.bytes) | |
269 | 275 | let w = u(t) | |
270 | - | let | |
271 | - | if ((r( | |
276 | + | let aH = value(aB.payments[0]) | |
277 | + | if ((r(aF) != 0)) | |
272 | 278 | then throw("You already have an active game") | |
273 | 279 | else if (if ((0 > t)) | |
274 | 280 | then true | |
275 | 281 | else (t >= d)) | |
276 | 282 | then throw("Invalid slot") | |
277 | 283 | else if ((u(t) == 0)) | |
278 | 284 | then throw("This slot is empty") | |
279 | - | else if (( | |
285 | + | else if ((aH.assetId != c)) | |
280 | 286 | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(c))) | |
281 | - | else if (( | |
287 | + | else if ((aH.amount != D(w))) | |
282 | 288 | then throw("Insufficient eggs amount") | |
283 | 289 | else if ((height >= F(w))) | |
284 | 290 | then throw("This game is expired") | |
285 | - | else [IntegerEntry(p( | |
291 | + | else [IntegerEntry(p(aF), w), StringEntry(A(w), aF), StringEntry(v(w, aF), "taker"), IntegerEntry(L(w), 0), IntegerEntry(G(w), (height + f)), IntegerEntry(s(t), 0), IntegerEntry("gamesPlayed", (ah() + 1))] | |
286 | 292 | } | |
287 | 293 | ||
288 | 294 | ||
289 | 295 | ||
290 | - | @Callable( | |
296 | + | @Callable(aB) | |
291 | 297 | func kickGame (t) = { | |
292 | 298 | let w = u(t) | |
293 | 299 | if (if ((0 > t)) | |
294 | 300 | then true | |
295 | 301 | else (t >= d)) | |
296 | 302 | then throw("Invalid slot") | |
297 | 303 | else if ((w == 0)) | |
298 | 304 | then throw("Slot is empty") | |
299 | 305 | else if ((F(w) > height)) | |
300 | 306 | then throw("Waiting is not finished yet") | |
301 | 307 | else { | |
302 | - | let | |
303 | - | [IntegerEntry(p( | |
308 | + | let aJ = z(w) | |
309 | + | [IntegerEntry(p(aJ), 0), IntegerEntry(s(t), 0), ScriptTransfer(Address(fromBase58String(aJ)), D(w), c)] | |
304 | 310 | } | |
305 | 311 | } | |
306 | 312 | ||
307 | 313 | ||
308 | 314 | ||
309 | - | @Callable( | |
310 | - | func pickDucks ( | |
311 | - | let | |
312 | - | let w = r( | |
313 | - | let O = x(w, | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | if (( | |
315 | + | @Callable(aB) | |
316 | + | func pickDucks (aK,aL,aM) = { | |
317 | + | let aF = toBase58String(aB.caller.bytes) | |
318 | + | let w = r(aF) | |
319 | + | let O = x(w, aF) | |
320 | + | let aq = M(w) | |
321 | + | let aN = K(w, "worst") | |
322 | + | let aO = K(w, "medium") | |
323 | + | let aP = K(w, "best") | |
324 | + | let aQ = invoke(Address(b), "getAssetRarity", [aK], nil) | |
325 | + | if ((aQ == aQ)) | |
320 | 326 | then { | |
321 | - | let | |
322 | - | let i = | |
327 | + | let aR = { | |
328 | + | let i = aQ | |
323 | 329 | if ($isInstanceOf(i, "Int")) | |
324 | 330 | then { | |
325 | - | let | |
326 | - | | |
331 | + | let aS = i | |
332 | + | aS | |
327 | 333 | } | |
328 | 334 | else throw("Incorrect invoke result") | |
329 | 335 | } | |
330 | - | let | |
331 | - | if (( | |
336 | + | let aT = invoke(Address(b), "getAssetRarity", [aL], nil) | |
337 | + | if ((aT == aT)) | |
332 | 338 | then { | |
333 | - | let | |
334 | - | let i = | |
339 | + | let aU = { | |
340 | + | let i = aT | |
335 | 341 | if ($isInstanceOf(i, "Int")) | |
336 | 342 | then { | |
337 | - | let | |
338 | - | | |
343 | + | let aS = i | |
344 | + | aS | |
339 | 345 | } | |
340 | 346 | else throw("Incorrect invoke result") | |
341 | 347 | } | |
342 | - | let | |
343 | - | if (( | |
348 | + | let aV = invoke(Address(b), "getAssetRarity", [aM], nil) | |
349 | + | if ((aV == aV)) | |
344 | 350 | then { | |
345 | - | let | |
346 | - | let i = | |
351 | + | let aW = { | |
352 | + | let i = aV | |
347 | 353 | if ($isInstanceOf(i, "Int")) | |
348 | 354 | then { | |
349 | - | let | |
350 | - | | |
355 | + | let aS = i | |
356 | + | aS | |
351 | 357 | } | |
352 | 358 | else throw("Incorrect invoke result") | |
353 | 359 | } | |
354 | 360 | if ((w == 0)) | |
355 | 361 | then throw("You don't have an active game") | |
356 | 362 | else if ((H(w) == 0)) | |
357 | 363 | then throw("Game is not started") | |
358 | - | else if (if (( | |
364 | + | else if (if ((aq == 0)) | |
359 | 365 | then (O != "taker") | |
360 | 366 | else false) | |
361 | 367 | then throw("It is the taker's turn to pick now") | |
362 | - | else if (if (( | |
368 | + | else if (if ((aq == 1)) | |
363 | 369 | then (O != "maker") | |
364 | 370 | else false) | |
365 | 371 | then throw("It is the maker's turn to pick now") | |
366 | - | else if (( | |
372 | + | else if ((aq > 1)) | |
367 | 373 | then throw("Ducks have already been picked") | |
368 | - | else if (!( | |
369 | - | then throw((("Asset " + | |
370 | - | else if (!( | |
371 | - | then throw((("Asset " + | |
372 | - | else if (!( | |
373 | - | then throw((("Asset " + | |
374 | - | else if (if ((5 > | |
375 | - | then if (( | |
374 | + | else if (!(am(aB.caller, fromBase58String(aK)))) | |
375 | + | then throw((("Asset " + aK) + " doesn't belong to you")) | |
376 | + | else if (!(am(aB.caller, fromBase58String(aL)))) | |
377 | + | then throw((("Asset " + aL) + " doesn't belong to you")) | |
378 | + | else if (!(am(aB.caller, fromBase58String(aM)))) | |
379 | + | then throw((("Asset " + aM) + " doesn't belong to you")) | |
380 | + | else if (if ((5 > aN)) | |
381 | + | then if ((aR > (aN * 10))) | |
376 | 382 | then true | |
377 | - | else ((( | |
383 | + | else (((aN - 1) * 10) >= aR) | |
378 | 384 | else false) | |
379 | 385 | then throw("Worst duck doesn't fit rarity range") | |
380 | - | else if (if ((5 > | |
381 | - | then if (( | |
386 | + | else if (if ((5 > aO)) | |
387 | + | then if ((aU > (aO * 10))) | |
382 | 388 | then true | |
383 | - | else ((( | |
389 | + | else (((aO - 1) * 10) >= aU) | |
384 | 390 | else false) | |
385 | 391 | then throw("Medium duck doesn't fit rarity range") | |
386 | - | else if (if ((5 > | |
387 | - | then if (( | |
392 | + | else if (if ((5 > aP)) | |
393 | + | then if ((aW > (aP * 10))) | |
388 | 394 | then true | |
389 | - | else ((( | |
395 | + | else (((aP - 1) * 10) >= aW) | |
390 | 396 | else false) | |
391 | 397 | then throw("Best duck doesn't fit rarity range") | |
392 | - | else if (if (( | |
393 | - | then (40 >= | |
398 | + | else if (if ((aN == 5)) | |
399 | + | then (40 >= aR) | |
394 | 400 | else false) | |
395 | 401 | then throw("Worst duck doesn't fit rarity range") | |
396 | - | else if (if (( | |
397 | - | then (40 >= | |
402 | + | else if (if ((aO == 5)) | |
403 | + | then (40 >= aU) | |
398 | 404 | else false) | |
399 | 405 | then throw("Medium duck doesn't fit rarity range") | |
400 | - | else if (if (( | |
401 | - | then (40 >= | |
406 | + | else if (if ((aP == 5)) | |
407 | + | then (40 >= aW) | |
402 | 408 | else false) | |
403 | 409 | then throw("Best duck doesn't fit rarity range") | |
404 | - | else if (if (if (( | |
410 | + | else if (if (if ((aR == aU)) | |
405 | 411 | then true | |
406 | - | else ( | |
412 | + | else (aR == aW)) | |
407 | 413 | then true | |
408 | - | else ( | |
414 | + | else (aU == aW)) | |
409 | 415 | then throw("Ducks must have different rarities") | |
410 | - | else [IntegerEntry(N(w, O, "worst"), | |
416 | + | else [IntegerEntry(N(w, O, "worst"), aR), IntegerEntry(N(w, O, "medium"), aU), IntegerEntry(N(w, O, "best"), aW), StringEntry(Q(w, O, "worst"), aK), StringEntry(Q(w, O, "medium"), aL), StringEntry(Q(w, O, "best"), aM), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))] | |
411 | 417 | } | |
412 | 418 | else throw("Strict value is not equal to itself.") | |
413 | 419 | } | |
414 | 420 | else throw("Strict value is not equal to itself.") | |
415 | 421 | } | |
416 | 422 | else throw("Strict value is not equal to itself.") | |
417 | 423 | } | |
418 | 424 | ||
419 | 425 | ||
420 | 426 | ||
421 | - | @Callable( | |
422 | - | func commit ( | |
423 | - | let | |
424 | - | let w = r( | |
425 | - | let O = x(w, | |
426 | - | let | |
427 | + | @Callable(aB) | |
428 | + | func commit (aX) = { | |
429 | + | let aF = toBase58String(aB.caller.bytes) | |
430 | + | let w = r(aF) | |
431 | + | let O = x(w, aF) | |
432 | + | let aq = M(w) | |
427 | 433 | if ((w == 0)) | |
428 | 434 | then throw("You don't have an active game") | |
429 | - | else if ((2 > | |
435 | + | else if ((2 > aq)) | |
430 | 436 | then throw("Commit is not started") | |
431 | - | else if (if (( | |
437 | + | else if (if ((aq == 2)) | |
432 | 438 | then (O != "taker") | |
433 | 439 | else false) | |
434 | 440 | then throw("It is the taker's turn to pick now") | |
435 | - | else if (if (( | |
441 | + | else if (if ((aq == 3)) | |
436 | 442 | then (O != "maker") | |
437 | 443 | else false) | |
438 | 444 | then throw("It is the maker's turn to pick now") | |
439 | - | else if (( | |
445 | + | else if ((aq > 3)) | |
440 | 446 | then throw("Commit is finished") | |
441 | - | else [StringEntry(S(w, O), | |
447 | + | else [StringEntry(S(w, O), aX), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))] | |
442 | 448 | } | |
443 | 449 | ||
444 | 450 | ||
445 | 451 | ||
446 | - | @Callable( | |
447 | - | func reveal ( | |
448 | - | let | |
449 | - | let w = r( | |
450 | - | let O = x(w, | |
451 | - | let | |
452 | + | @Callable(aB) | |
453 | + | func reveal (aY,aZ) = { | |
454 | + | let aF = toBase58String(aB.caller.bytes) | |
455 | + | let w = r(aF) | |
456 | + | let O = x(w, aF) | |
457 | + | let aq = M(w) | |
452 | 458 | if ((w == 0)) | |
453 | 459 | then throw("You don't have an active game") | |
454 | - | else if ((4 > | |
460 | + | else if ((4 > aq)) | |
455 | 461 | then throw("Reveal is not started") | |
456 | - | else if (if (( | |
462 | + | else if (if ((aq == 4)) | |
457 | 463 | then (O != "taker") | |
458 | 464 | else false) | |
459 | 465 | then throw("It is the taker's turn to pick now") | |
460 | - | else if (if (( | |
466 | + | else if (if ((aq == 5)) | |
461 | 467 | then (O != "maker") | |
462 | 468 | else false) | |
463 | 469 | then throw("It is the maker's turn to pick now") | |
464 | - | else if (( | |
470 | + | else if ((aq > 5)) | |
465 | 471 | then throw("Reveal is finished") | |
466 | - | else if (if (if (if (if (if (( | |
467 | - | then ( | |
472 | + | else if (if (if (if (if (if ((aY != "worst,medium,best")) | |
473 | + | then (aY != "worst,best,medium") | |
468 | 474 | else false) | |
469 | - | then ( | |
475 | + | then (aY != "medium,worst,best") | |
470 | 476 | else false) | |
471 | - | then ( | |
477 | + | then (aY != "medium,best,worst") | |
472 | 478 | else false) | |
473 | - | then ( | |
479 | + | then (aY != "best,worst,medium") | |
474 | 480 | else false) | |
475 | - | then ( | |
481 | + | then (aY != "best,medium,worst") | |
476 | 482 | else false) | |
477 | 483 | then throw("Reveal data is not valid") | |
478 | - | else if ((toBase58String(sha256(toBytes(( | |
484 | + | else if ((toBase58String(sha256(toBytes((aY + aZ)))) != T(w, O))) | |
479 | 485 | then throw("Reveal doesn't match commit") | |
480 | - | else [StringEntry(U(w, O), | |
486 | + | else [StringEntry(U(w, O), aY), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))] | |
481 | 487 | } | |
482 | 488 | ||
483 | 489 | ||
484 | 490 | ||
485 | - | @Callable( | |
491 | + | @Callable(aB) | |
486 | 492 | func getPrize () = { | |
487 | - | let | |
488 | - | let w = r( | |
489 | - | let O = x(w, | |
490 | - | let | |
493 | + | let aF = toBase58String(aB.caller.bytes) | |
494 | + | let w = r(aF) | |
495 | + | let O = x(w, aF) | |
496 | + | let ba = if ((O == "maker")) | |
491 | 497 | then B(w) | |
492 | 498 | else z(w) | |
493 | - | let | |
499 | + | let bb = ap(w) | |
494 | 500 | if ((w == 0)) | |
495 | 501 | then throw("You don't have an active game") | |
496 | - | else if ((aZ == O)) | |
497 | - | then [IntegerEntry(p(aD), 0), IntegerEntry(p(aY), 0), IntegerEntry(Y(aD), (Z(aD) + 1)), IntegerEntry(aa(aY), (ab(aY) + 1)), StringEntry(W(w, aD), "win"), StringEntry(W(w, aY), "lose"), ScriptTransfer(az.caller, (D(w) * 2), c)] | |
498 | - | else if ((aZ == "draw")) | |
499 | - | then [IntegerEntry(p(aD), 0), IntegerEntry(ac(aD), (ad(aD) + 1)), StringEntry(W(w, aD), "draw"), ScriptTransfer(az.caller, D(w), c)] | |
500 | - | else [IntegerEntry(p(aD), 0)] | |
502 | + | else if ((bb == O)) | |
503 | + | then { | |
504 | + | let bc = D(w) | |
505 | + | [IntegerEntry(p(aF), 0), IntegerEntry(p(ba), 0), IntegerEntry(aa(aF), (ab(aF) + 1)), IntegerEntry(ac(ba), (ad(ba) + 1)), StringEntry(W(w, aF), "win"), StringEntry(W(w, ba), "lose"), IntegerEntry(Y(w, aF), bc), IntegerEntry(Y(w, ba), -(bc)), ScriptTransfer(aB.caller, (D(w) * 2), c)] | |
506 | + | } | |
507 | + | else if ((bb == "draw")) | |
508 | + | then [IntegerEntry(p(aF), 0), IntegerEntry(ae(aF), (af(aF) + 1)), StringEntry(W(w, aF), "draw"), IntegerEntry(Y(w, aF), 0), ScriptTransfer(aB.caller, D(w), c)] | |
509 | + | else [IntegerEntry(p(aF), 0)] | |
501 | 510 | } | |
502 | 511 | ||
503 | 512 | ||
504 | - | @Verifier( | |
505 | - | func | |
513 | + | @Verifier(bd) | |
514 | + | func be () = sigVerify(bd.bodyBytes, bd.proofs[0], bd.senderPublicKey) | |
506 | 515 |
github/deemru/w8io/169f3d6 166.69 ms ◑