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/4FF0gXFoMAAAAABVNMT1RTAAAAAAAAAAAKAAAAAAdXQUlUSU5HAAAAAAAAAAAIAAAAAAxzdGVwRHVyYXRpb24AAAAAAAAAAAUBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAA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cgkBAAAACmdldEJldEVnZ3MAAAABBQAAAAZnYW1lSWQFAAAAC2VnZ3NBc3NldElkBQAAAANuaWwJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAABdnZXRQbGF5ZXJDdXJyZW50R2FtZUtleQAAAAEFAAAADWNhbGxlckFkZHJlc3MAAAAAAAAAAAAFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5SO2dRA==", "height": 1696896, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9a6rU1qowbZ5NXSPGYtrE1gYgxL6XKM4DLaN4Gf2Uouv Next: DWsNfa7Fy7sePxsPSaL8vMtwUvq4313c1UBzyhTDXV13 Diff:
OldNewDifferences
144144 func X (w,q) = k(W(w, q))
145145
146146
147-func Y (q) = (q + "_wins")
147+func Y (w,q) = (((("game" + toString(w)) + "_") + q) + "_prize")
148148
149149
150-func Z (q) = g(Y(q))
150+func Z (w,q) = k(Y(w, q))
151151
152152
153-func aa (q) = (q + "_loses")
153+func aa (q) = (q + "_wins")
154154
155155
156156 func ab (q) = g(aa(q))
157157
158158
159-func ac (q) = (q + "_draws")
159+func ac (q) = (q + "_loses")
160160
161161
162162 func ad (q) = g(ac(q))
163163
164164
165-func ae () = "gamesPlayed"
165+func ae (q) = (q + "_draws")
166166
167167
168-func af () = g(ae())
168+func af (q) = g(ae(q))
169169
170170
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"))
173179 if ($isInstanceOf(i, "Int"))
174180 then {
175- let aj = i
176- aj
181+ let al = i
182+ al
177183 }
178184 else 0
179185 }
180186
181187
182-func ak (al,ai) = if ((assetBalance(al, ai) > 0))
188+func am (an,ak) = if ((assetBalance(an, ak) > 0))
183189 then true
184- else (ag(toBase58String(al.bytes), toBase58String(ai)) > 0)
190+ else (ai(toBase58String(an.bytes), toBase58String(ak)) > 0)
185191
186192
187-func am (l,j) = if ((l > j))
193+func ao (l,j) = if ((l > j))
188194 then 1
189195 else if ((j > l))
190196 then -1
191197 else 0
192198
193199
194-func an (w) = {
195- let ao = M(w)
196- if ((6 > ao))
200+func ap (w) = {
201+ let aq = M(w)
202+ if ((6 > aq))
197203 then {
198- let ap = H(w)
199- if ((ap == 0))
204+ let ar = H(w)
205+ if ((ar == 0))
200206 then throw("Game is not started")
201- else if ((ap > height))
207+ else if ((ar > height))
202208 then throw("Game is not finished or expired")
203209 else if (((M(w) % 2) == 0))
204210 then "maker"
205211 else "taker"
206212 }
207213 else {
208- let aq = split(V(w, "maker"), ",")
209- let ar = split(V(w, "taker"), ",")
210- let as = P(w, "maker", aq[0])
211- let at = P(w, "maker", aq[1])
212- let au = P(w, "maker", aq[2])
213- let av = P(w, "taker", ar[0])
214- let aw = P(w, "taker", ar[1])
215- let ax = P(w, "taker", ar[2])
216- let ay = ((am(as, av) + am(at, aw)) + am(au, ax))
217- if ((ay > 0))
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))
218224 then "maker"
219- else if ((0 > ay))
225+ else if ((0 > aA))
220226 then "taker"
221227 else "draw"
222228 }
223229 }
224230
225231
226-@Callable(az)
227-func makeGame (t,aA,aB,aC) = {
228- let aD = toBase58String(az.caller.bytes)
229- let aE = u(t)
230- let aF = value(az.payments[0])
231- let aG = aF.amount
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
232238 let w = n()
233- if ((r(aD) != 0))
239+ if ((r(aF) != 0))
234240 then throw("You already have an active game")
235241 else if (if ((0 > t))
236242 then true
237243 else (t >= d))
238244 then throw("Invalid slot")
239- else if ((aE != 0))
245+ else if ((aG != 0))
240246 then throw("This slot is busy")
241- else if ((aF.assetId != c))
247+ else if ((aH.assetId != c))
242248 then throw(("You can attach only EGGs with the following asset id: " + toBase58String(c)))
243- else if ((aG != 1))
249+ else if ((aI != 1))
244250 then throw("Bet must be 0.01 EGG during beta test")
245- else if (if ((1 > aA))
251+ else if (if ((1 > aC))
246252 then true
247- else (aA > 5))
253+ else (aC > 5))
248254 then throw("Invalid rarity range for the worst duck")
249- else if (if ((1 > aB))
255+ else if (if ((1 > aD))
250256 then true
251- else (aB > 5))
257+ else (aD > 5))
252258 then throw("Invalid rarity range for the medium duck")
253- else if (if ((1 > aC))
259+ else if (if ((1 > aE))
254260 then true
255- else (aC > 5))
261+ else (aE > 5))
256262 then throw("Invalid rarity range for the best duck")
257- else if ((aA > aB))
263+ else if ((aC > aD))
258264 then throw("The medium range can't be less than the worst one")
259- else if ((aB > aC))
265+ else if ((aD > aE))
260266 then throw("The best range can't be worse than the medium one")
261- else [IntegerEntry(p(aD), w), StringEntry(y(w), aD), StringEntry(v(w, aD), "maker"), IntegerEntry(C(w), aG), IntegerEntry(I(w, "worst"), aA), IntegerEntry(I(w, "medium"), aB), IntegerEntry(I(w, "best"), aC), IntegerEntry(E(w), (height + e)), IntegerEntry(s(t), w), IntegerEntry("nextGameId", (w + 1))]
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))]
262268 }
263269
264270
265271
266-@Callable(az)
272+@Callable(aB)
267273 func takeGame (t) = {
268- let aD = toBase58String(az.caller.bytes)
274+ let aF = toBase58String(aB.caller.bytes)
269275 let w = u(t)
270- let aF = value(az.payments[0])
271- if ((r(aD) != 0))
276+ let aH = value(aB.payments[0])
277+ if ((r(aF) != 0))
272278 then throw("You already have an active game")
273279 else if (if ((0 > t))
274280 then true
276282 then throw("Invalid slot")
277283 else if ((u(t) == 0))
278284 then throw("This slot is empty")
279- else if ((aF.assetId != c))
285+ else if ((aH.assetId != c))
280286 then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(c)))
281- else if ((aF.amount != D(w)))
287+ else if ((aH.amount != D(w)))
282288 then throw("Insufficient eggs amount")
283289 else if ((height >= F(w)))
284290 then throw("This game is expired")
285- else [IntegerEntry(p(aD), w), StringEntry(A(w), aD), StringEntry(v(w, aD), "taker"), IntegerEntry(L(w), 0), IntegerEntry(G(w), (height + f)), IntegerEntry(s(t), 0), IntegerEntry("gamesPlayed", (af() + 1))]
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))]
286292 }
287293
288294
289295
290-@Callable(az)
296+@Callable(aB)
291297 func kickGame (t) = {
292298 let w = u(t)
293299 if (if ((0 > t))
299305 else if ((F(w) > height))
300306 then throw("Waiting is not finished yet")
301307 else {
302- let aH = z(w)
303-[IntegerEntry(p(aH), 0), IntegerEntry(s(t), 0), ScriptTransfer(Address(fromBase58String(aH)), D(w), c)]
308+ let aJ = z(w)
309+[IntegerEntry(p(aJ), 0), IntegerEntry(s(t), 0), ScriptTransfer(Address(fromBase58String(aJ)), D(w), c)]
304310 }
305311 }
306312
307313
308314
309-@Callable(az)
310-func pickDucks (aI,aJ,aK) = {
311- let aD = toBase58String(az.caller.bytes)
312- let w = r(aD)
313- let O = x(w, aD)
314- let ao = M(w)
315- let aL = K(w, "worst")
316- let aM = K(w, "medium")
317- let aN = K(w, "best")
318- let aO = invoke(Address(b), "getAssetRarity", [aI], nil)
319- if ((aO == aO))
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))
320326 then {
321- let aP = {
322- let i = aO
327+ let aR = {
328+ let i = aQ
323329 if ($isInstanceOf(i, "Int"))
324330 then {
325- let aQ = i
326- aQ
331+ let aS = i
332+ aS
327333 }
328334 else throw("Incorrect invoke result")
329335 }
330- let aR = invoke(Address(b), "getAssetRarity", [aJ], nil)
331- if ((aR == aR))
336+ let aT = invoke(Address(b), "getAssetRarity", [aL], nil)
337+ if ((aT == aT))
332338 then {
333- let aS = {
334- let i = aR
339+ let aU = {
340+ let i = aT
335341 if ($isInstanceOf(i, "Int"))
336342 then {
337- let aQ = i
338- aQ
343+ let aS = i
344+ aS
339345 }
340346 else throw("Incorrect invoke result")
341347 }
342- let aT = invoke(Address(b), "getAssetRarity", [aK], nil)
343- if ((aT == aT))
348+ let aV = invoke(Address(b), "getAssetRarity", [aM], nil)
349+ if ((aV == aV))
344350 then {
345- let aU = {
346- let i = aT
351+ let aW = {
352+ let i = aV
347353 if ($isInstanceOf(i, "Int"))
348354 then {
349- let aQ = i
350- aQ
355+ let aS = i
356+ aS
351357 }
352358 else throw("Incorrect invoke result")
353359 }
355361 then throw("You don't have an active game")
356362 else if ((H(w) == 0))
357363 then throw("Game is not started")
358- else if (if ((ao == 0))
364+ else if (if ((aq == 0))
359365 then (O != "taker")
360366 else false)
361367 then throw("It is the taker's turn to pick now")
362- else if (if ((ao == 1))
368+ else if (if ((aq == 1))
363369 then (O != "maker")
364370 else false)
365371 then throw("It is the maker's turn to pick now")
366- else if ((ao > 1))
372+ else if ((aq > 1))
367373 then throw("Ducks have already been picked")
368- else if (!(ak(az.caller, fromBase58String(aI))))
369- then throw((("Asset " + aI) + " doesn't belong to you"))
370- else if (!(ak(az.caller, fromBase58String(aJ))))
371- then throw((("Asset " + aJ) + " doesn't belong to you"))
372- else if (!(ak(az.caller, fromBase58String(aK))))
373- then throw((("Asset " + aK) + " doesn't belong to you"))
374- else if (if ((5 > aL))
375- then if ((aP > (aL * 10)))
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)))
376382 then true
377- else (((aL - 1) * 10) >= aP)
383+ else (((aN - 1) * 10) >= aR)
378384 else false)
379385 then throw("Worst duck doesn't fit rarity range")
380- else if (if ((5 > aM))
381- then if ((aS > (aM * 10)))
386+ else if (if ((5 > aO))
387+ then if ((aU > (aO * 10)))
382388 then true
383- else (((aM - 1) * 10) >= aS)
389+ else (((aO - 1) * 10) >= aU)
384390 else false)
385391 then throw("Medium duck doesn't fit rarity range")
386- else if (if ((5 > aN))
387- then if ((aU > (aN * 10)))
392+ else if (if ((5 > aP))
393+ then if ((aW > (aP * 10)))
388394 then true
389- else (((aN - 1) * 10) >= aU)
395+ else (((aP - 1) * 10) >= aW)
390396 else false)
391397 then throw("Best duck doesn't fit rarity range")
392- else if (if ((aL == 5))
393- then (40 >= aP)
398+ else if (if ((aN == 5))
399+ then (40 >= aR)
394400 else false)
395401 then throw("Worst duck doesn't fit rarity range")
396- else if (if ((aM == 5))
397- then (40 >= aS)
402+ else if (if ((aO == 5))
403+ then (40 >= aU)
398404 else false)
399405 then throw("Medium duck doesn't fit rarity range")
400- else if (if ((aN == 5))
401- then (40 >= aU)
406+ else if (if ((aP == 5))
407+ then (40 >= aW)
402408 else false)
403409 then throw("Best duck doesn't fit rarity range")
404- else if (if (if ((aP == aS))
410+ else if (if (if ((aR == aU))
405411 then true
406- else (aP == aU))
412+ else (aR == aW))
407413 then true
408- else (aS == aU))
414+ else (aU == aW))
409415 then throw("Ducks must have different rarities")
410- else [IntegerEntry(N(w, O, "worst"), aP), IntegerEntry(N(w, O, "medium"), aS), IntegerEntry(N(w, O, "best"), aU), StringEntry(Q(w, O, "worst"), aI), StringEntry(Q(w, O, "medium"), aJ), StringEntry(Q(w, O, "best"), aK), IntegerEntry(L(w), (ao + 1)), IntegerEntry(G(w), (height + f))]
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))]
411417 }
412418 else throw("Strict value is not equal to itself.")
413419 }
418424
419425
420426
421-@Callable(az)
422-func commit (aV) = {
423- let aD = toBase58String(az.caller.bytes)
424- let w = r(aD)
425- let O = x(w, aD)
426- let ao = M(w)
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)
427433 if ((w == 0))
428434 then throw("You don't have an active game")
429- else if ((2 > ao))
435+ else if ((2 > aq))
430436 then throw("Commit is not started")
431- else if (if ((ao == 2))
437+ else if (if ((aq == 2))
432438 then (O != "taker")
433439 else false)
434440 then throw("It is the taker's turn to pick now")
435- else if (if ((ao == 3))
441+ else if (if ((aq == 3))
436442 then (O != "maker")
437443 else false)
438444 then throw("It is the maker's turn to pick now")
439- else if ((ao > 3))
445+ else if ((aq > 3))
440446 then throw("Commit is finished")
441- else [StringEntry(S(w, O), aV), IntegerEntry(L(w), (ao + 1)), IntegerEntry(G(w), (height + f))]
447+ else [StringEntry(S(w, O), aX), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))]
442448 }
443449
444450
445451
446-@Callable(az)
447-func reveal (aW,aX) = {
448- let aD = toBase58String(az.caller.bytes)
449- let w = r(aD)
450- let O = x(w, aD)
451- let ao = M(w)
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)
452458 if ((w == 0))
453459 then throw("You don't have an active game")
454- else if ((4 > ao))
460+ else if ((4 > aq))
455461 then throw("Reveal is not started")
456- else if (if ((ao == 4))
462+ else if (if ((aq == 4))
457463 then (O != "taker")
458464 else false)
459465 then throw("It is the taker's turn to pick now")
460- else if (if ((ao == 5))
466+ else if (if ((aq == 5))
461467 then (O != "maker")
462468 else false)
463469 then throw("It is the maker's turn to pick now")
464- else if ((ao > 5))
470+ else if ((aq > 5))
465471 then throw("Reveal is finished")
466- else if (if (if (if (if (if ((aW != "worst,medium,best"))
467- then (aW != "worst,best,medium")
472+ else if (if (if (if (if (if ((aY != "worst,medium,best"))
473+ then (aY != "worst,best,medium")
468474 else false)
469- then (aW != "medium,worst,best")
475+ then (aY != "medium,worst,best")
470476 else false)
471- then (aW != "medium,best,worst")
477+ then (aY != "medium,best,worst")
472478 else false)
473- then (aW != "best,worst,medium")
479+ then (aY != "best,worst,medium")
474480 else false)
475- then (aW != "best,medium,worst")
481+ then (aY != "best,medium,worst")
476482 else false)
477483 then throw("Reveal data is not valid")
478- else if ((toBase58String(sha256(toBytes((aW + aX)))) != T(w, O)))
484+ else if ((toBase58String(sha256(toBytes((aY + aZ)))) != T(w, O)))
479485 then throw("Reveal doesn't match commit")
480- else [StringEntry(U(w, O), aW), IntegerEntry(L(w), (ao + 1)), IntegerEntry(G(w), (height + f))]
486+ else [StringEntry(U(w, O), aY), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))]
481487 }
482488
483489
484490
485-@Callable(az)
491+@Callable(aB)
486492 func getPrize () = {
487- let aD = toBase58String(az.caller.bytes)
488- let w = r(aD)
489- let O = x(w, aD)
490- let aY = if ((O == "maker"))
493+ let aF = toBase58String(aB.caller.bytes)
494+ let w = r(aF)
495+ let O = x(w, aF)
496+ let ba = if ((O == "maker"))
491497 then B(w)
492498 else z(w)
493- let aZ = an(w)
499+ let bb = ap(w)
494500 if ((w == 0))
495501 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)]
501510 }
502511
503512
504-@Verifier(ba)
505-func bb () = sigVerify(ba.bodyBytes, ba.proofs[0], ba.senderPublicKey)
513+@Verifier(bd)
514+func be () = sigVerify(bd.bodyBytes, bd.proofs[0], bd.senderPublicKey)
506515
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC'
55
66 let b = base58'3NCman4dCzk1HWWU4DPTr5rsbhvuUCwwUZh'
77
88 let c = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN'
99
1010 let d = 10
1111
1212 let e = 8
1313
1414 let f = 5
1515
1616 func g (h) = {
1717 let i = getInteger(this, h)
1818 if ($isInstanceOf(i, "Int"))
1919 then {
2020 let j = i
2121 j
2222 }
2323 else 0
2424 }
2525
2626
2727 func k (h) = {
2828 let i = getString(this, h)
2929 if ($isInstanceOf(i, "String"))
3030 then {
3131 let l = i
3232 l
3333 }
3434 else ""
3535 }
3636
3737
3838 func m (h) = {
3939 let i = getBoolean(this, h)
4040 if ($isInstanceOf(i, "Boolean"))
4141 then {
4242 let j = i
4343 j
4444 }
4545 else false
4646 }
4747
4848
4949 func n () = {
5050 let o = g("nextGameId")
5151 if ((o == 0))
5252 then 1
5353 else o
5454 }
5555
5656
5757 func p (q) = (q + "_currentGame")
5858
5959
6060 func r (q) = g(p(q))
6161
6262
6363 func s (t) = ("slot" + toString(t))
6464
6565
6666 func u (t) = g(s(t))
6767
6868
6969 func v (w,q) = ((("game" + toString(w)) + "_") + q)
7070
7171
7272 func x (w,q) = k(v(w, q))
7373
7474
7575 func y (w) = (("game" + toString(w)) + "_maker")
7676
7777
7878 func z (w) = k(y(w))
7979
8080
8181 func A (w) = (("game" + toString(w)) + "_taker")
8282
8383
8484 func B (w) = k(A(w))
8585
8686
8787 func C (w) = (("game" + toString(w)) + "_betEggs")
8888
8989
9090 func D (w) = g(C(w))
9191
9292
9393 func E (w) = (("game" + toString(w)) + "_waitingExpirationHeight")
9494
9595
9696 func F (w) = g(E(w))
9797
9898
9999 func G (w) = (("game" + toString(w)) + "_expirationHeight")
100100
101101
102102 func H (w) = g(G(w))
103103
104104
105105 func I (w,J) = ((("game" + toString(w)) + "_rarityRange_") + J)
106106
107107
108108 func K (w,J) = g(I(w, J))
109109
110110
111111 func L (w) = (("game" + toString(w)) + "_step")
112112
113113
114114 func M (w) = g(L(w))
115115
116116
117117 func N (w,O,J) = (((((("game" + toString(w)) + "_") + O) + "_") + J) + "Rarity")
118118
119119
120120 func P (w,O,J) = g(N(w, O, J))
121121
122122
123123 func Q (w,O,J) = (((((("game" + toString(w)) + "_") + O) + "_") + J) + "DuckId")
124124
125125
126126 func R (w,O,J) = k(Q(w, O, J))
127127
128128
129129 func S (w,O) = (((("game" + toString(w)) + "_") + O) + "_commit")
130130
131131
132132 func T (w,O) = k(S(w, O))
133133
134134
135135 func U (w,O) = (((("game" + toString(w)) + "_") + O) + "_duckOrder")
136136
137137
138138 func V (w,O) = k(U(w, O))
139139
140140
141141 func W (w,q) = (((("game" + toString(w)) + "_") + q) + "_result")
142142
143143
144144 func X (w,q) = k(W(w, q))
145145
146146
147-func Y (q) = (q + "_wins")
147+func Y (w,q) = (((("game" + toString(w)) + "_") + q) + "_prize")
148148
149149
150-func Z (q) = g(Y(q))
150+func Z (w,q) = k(Y(w, q))
151151
152152
153-func aa (q) = (q + "_loses")
153+func aa (q) = (q + "_wins")
154154
155155
156156 func ab (q) = g(aa(q))
157157
158158
159-func ac (q) = (q + "_draws")
159+func ac (q) = (q + "_loses")
160160
161161
162162 func ad (q) = g(ac(q))
163163
164164
165-func ae () = "gamesPlayed"
165+func ae (q) = (q + "_draws")
166166
167167
168-func af () = g(ae())
168+func af (q) = g(ae(q))
169169
170170
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"))
173179 if ($isInstanceOf(i, "Int"))
174180 then {
175- let aj = i
176- aj
181+ let al = i
182+ al
177183 }
178184 else 0
179185 }
180186
181187
182-func ak (al,ai) = if ((assetBalance(al, ai) > 0))
188+func am (an,ak) = if ((assetBalance(an, ak) > 0))
183189 then true
184- else (ag(toBase58String(al.bytes), toBase58String(ai)) > 0)
190+ else (ai(toBase58String(an.bytes), toBase58String(ak)) > 0)
185191
186192
187-func am (l,j) = if ((l > j))
193+func ao (l,j) = if ((l > j))
188194 then 1
189195 else if ((j > l))
190196 then -1
191197 else 0
192198
193199
194-func an (w) = {
195- let ao = M(w)
196- if ((6 > ao))
200+func ap (w) = {
201+ let aq = M(w)
202+ if ((6 > aq))
197203 then {
198- let ap = H(w)
199- if ((ap == 0))
204+ let ar = H(w)
205+ if ((ar == 0))
200206 then throw("Game is not started")
201- else if ((ap > height))
207+ else if ((ar > height))
202208 then throw("Game is not finished or expired")
203209 else if (((M(w) % 2) == 0))
204210 then "maker"
205211 else "taker"
206212 }
207213 else {
208- let aq = split(V(w, "maker"), ",")
209- let ar = split(V(w, "taker"), ",")
210- let as = P(w, "maker", aq[0])
211- let at = P(w, "maker", aq[1])
212- let au = P(w, "maker", aq[2])
213- let av = P(w, "taker", ar[0])
214- let aw = P(w, "taker", ar[1])
215- let ax = P(w, "taker", ar[2])
216- let ay = ((am(as, av) + am(at, aw)) + am(au, ax))
217- if ((ay > 0))
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))
218224 then "maker"
219- else if ((0 > ay))
225+ else if ((0 > aA))
220226 then "taker"
221227 else "draw"
222228 }
223229 }
224230
225231
226-@Callable(az)
227-func makeGame (t,aA,aB,aC) = {
228- let aD = toBase58String(az.caller.bytes)
229- let aE = u(t)
230- let aF = value(az.payments[0])
231- let aG = aF.amount
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
232238 let w = n()
233- if ((r(aD) != 0))
239+ if ((r(aF) != 0))
234240 then throw("You already have an active game")
235241 else if (if ((0 > t))
236242 then true
237243 else (t >= d))
238244 then throw("Invalid slot")
239- else if ((aE != 0))
245+ else if ((aG != 0))
240246 then throw("This slot is busy")
241- else if ((aF.assetId != c))
247+ else if ((aH.assetId != c))
242248 then throw(("You can attach only EGGs with the following asset id: " + toBase58String(c)))
243- else if ((aG != 1))
249+ else if ((aI != 1))
244250 then throw("Bet must be 0.01 EGG during beta test")
245- else if (if ((1 > aA))
251+ else if (if ((1 > aC))
246252 then true
247- else (aA > 5))
253+ else (aC > 5))
248254 then throw("Invalid rarity range for the worst duck")
249- else if (if ((1 > aB))
255+ else if (if ((1 > aD))
250256 then true
251- else (aB > 5))
257+ else (aD > 5))
252258 then throw("Invalid rarity range for the medium duck")
253- else if (if ((1 > aC))
259+ else if (if ((1 > aE))
254260 then true
255- else (aC > 5))
261+ else (aE > 5))
256262 then throw("Invalid rarity range for the best duck")
257- else if ((aA > aB))
263+ else if ((aC > aD))
258264 then throw("The medium range can't be less than the worst one")
259- else if ((aB > aC))
265+ else if ((aD > aE))
260266 then throw("The best range can't be worse than the medium one")
261- else [IntegerEntry(p(aD), w), StringEntry(y(w), aD), StringEntry(v(w, aD), "maker"), IntegerEntry(C(w), aG), IntegerEntry(I(w, "worst"), aA), IntegerEntry(I(w, "medium"), aB), IntegerEntry(I(w, "best"), aC), IntegerEntry(E(w), (height + e)), IntegerEntry(s(t), w), IntegerEntry("nextGameId", (w + 1))]
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))]
262268 }
263269
264270
265271
266-@Callable(az)
272+@Callable(aB)
267273 func takeGame (t) = {
268- let aD = toBase58String(az.caller.bytes)
274+ let aF = toBase58String(aB.caller.bytes)
269275 let w = u(t)
270- let aF = value(az.payments[0])
271- if ((r(aD) != 0))
276+ let aH = value(aB.payments[0])
277+ if ((r(aF) != 0))
272278 then throw("You already have an active game")
273279 else if (if ((0 > t))
274280 then true
275281 else (t >= d))
276282 then throw("Invalid slot")
277283 else if ((u(t) == 0))
278284 then throw("This slot is empty")
279- else if ((aF.assetId != c))
285+ else if ((aH.assetId != c))
280286 then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(c)))
281- else if ((aF.amount != D(w)))
287+ else if ((aH.amount != D(w)))
282288 then throw("Insufficient eggs amount")
283289 else if ((height >= F(w)))
284290 then throw("This game is expired")
285- else [IntegerEntry(p(aD), w), StringEntry(A(w), aD), StringEntry(v(w, aD), "taker"), IntegerEntry(L(w), 0), IntegerEntry(G(w), (height + f)), IntegerEntry(s(t), 0), IntegerEntry("gamesPlayed", (af() + 1))]
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))]
286292 }
287293
288294
289295
290-@Callable(az)
296+@Callable(aB)
291297 func kickGame (t) = {
292298 let w = u(t)
293299 if (if ((0 > t))
294300 then true
295301 else (t >= d))
296302 then throw("Invalid slot")
297303 else if ((w == 0))
298304 then throw("Slot is empty")
299305 else if ((F(w) > height))
300306 then throw("Waiting is not finished yet")
301307 else {
302- let aH = z(w)
303-[IntegerEntry(p(aH), 0), IntegerEntry(s(t), 0), ScriptTransfer(Address(fromBase58String(aH)), D(w), c)]
308+ let aJ = z(w)
309+[IntegerEntry(p(aJ), 0), IntegerEntry(s(t), 0), ScriptTransfer(Address(fromBase58String(aJ)), D(w), c)]
304310 }
305311 }
306312
307313
308314
309-@Callable(az)
310-func pickDucks (aI,aJ,aK) = {
311- let aD = toBase58String(az.caller.bytes)
312- let w = r(aD)
313- let O = x(w, aD)
314- let ao = M(w)
315- let aL = K(w, "worst")
316- let aM = K(w, "medium")
317- let aN = K(w, "best")
318- let aO = invoke(Address(b), "getAssetRarity", [aI], nil)
319- if ((aO == aO))
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))
320326 then {
321- let aP = {
322- let i = aO
327+ let aR = {
328+ let i = aQ
323329 if ($isInstanceOf(i, "Int"))
324330 then {
325- let aQ = i
326- aQ
331+ let aS = i
332+ aS
327333 }
328334 else throw("Incorrect invoke result")
329335 }
330- let aR = invoke(Address(b), "getAssetRarity", [aJ], nil)
331- if ((aR == aR))
336+ let aT = invoke(Address(b), "getAssetRarity", [aL], nil)
337+ if ((aT == aT))
332338 then {
333- let aS = {
334- let i = aR
339+ let aU = {
340+ let i = aT
335341 if ($isInstanceOf(i, "Int"))
336342 then {
337- let aQ = i
338- aQ
343+ let aS = i
344+ aS
339345 }
340346 else throw("Incorrect invoke result")
341347 }
342- let aT = invoke(Address(b), "getAssetRarity", [aK], nil)
343- if ((aT == aT))
348+ let aV = invoke(Address(b), "getAssetRarity", [aM], nil)
349+ if ((aV == aV))
344350 then {
345- let aU = {
346- let i = aT
351+ let aW = {
352+ let i = aV
347353 if ($isInstanceOf(i, "Int"))
348354 then {
349- let aQ = i
350- aQ
355+ let aS = i
356+ aS
351357 }
352358 else throw("Incorrect invoke result")
353359 }
354360 if ((w == 0))
355361 then throw("You don't have an active game")
356362 else if ((H(w) == 0))
357363 then throw("Game is not started")
358- else if (if ((ao == 0))
364+ else if (if ((aq == 0))
359365 then (O != "taker")
360366 else false)
361367 then throw("It is the taker's turn to pick now")
362- else if (if ((ao == 1))
368+ else if (if ((aq == 1))
363369 then (O != "maker")
364370 else false)
365371 then throw("It is the maker's turn to pick now")
366- else if ((ao > 1))
372+ else if ((aq > 1))
367373 then throw("Ducks have already been picked")
368- else if (!(ak(az.caller, fromBase58String(aI))))
369- then throw((("Asset " + aI) + " doesn't belong to you"))
370- else if (!(ak(az.caller, fromBase58String(aJ))))
371- then throw((("Asset " + aJ) + " doesn't belong to you"))
372- else if (!(ak(az.caller, fromBase58String(aK))))
373- then throw((("Asset " + aK) + " doesn't belong to you"))
374- else if (if ((5 > aL))
375- then if ((aP > (aL * 10)))
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)))
376382 then true
377- else (((aL - 1) * 10) >= aP)
383+ else (((aN - 1) * 10) >= aR)
378384 else false)
379385 then throw("Worst duck doesn't fit rarity range")
380- else if (if ((5 > aM))
381- then if ((aS > (aM * 10)))
386+ else if (if ((5 > aO))
387+ then if ((aU > (aO * 10)))
382388 then true
383- else (((aM - 1) * 10) >= aS)
389+ else (((aO - 1) * 10) >= aU)
384390 else false)
385391 then throw("Medium duck doesn't fit rarity range")
386- else if (if ((5 > aN))
387- then if ((aU > (aN * 10)))
392+ else if (if ((5 > aP))
393+ then if ((aW > (aP * 10)))
388394 then true
389- else (((aN - 1) * 10) >= aU)
395+ else (((aP - 1) * 10) >= aW)
390396 else false)
391397 then throw("Best duck doesn't fit rarity range")
392- else if (if ((aL == 5))
393- then (40 >= aP)
398+ else if (if ((aN == 5))
399+ then (40 >= aR)
394400 else false)
395401 then throw("Worst duck doesn't fit rarity range")
396- else if (if ((aM == 5))
397- then (40 >= aS)
402+ else if (if ((aO == 5))
403+ then (40 >= aU)
398404 else false)
399405 then throw("Medium duck doesn't fit rarity range")
400- else if (if ((aN == 5))
401- then (40 >= aU)
406+ else if (if ((aP == 5))
407+ then (40 >= aW)
402408 else false)
403409 then throw("Best duck doesn't fit rarity range")
404- else if (if (if ((aP == aS))
410+ else if (if (if ((aR == aU))
405411 then true
406- else (aP == aU))
412+ else (aR == aW))
407413 then true
408- else (aS == aU))
414+ else (aU == aW))
409415 then throw("Ducks must have different rarities")
410- else [IntegerEntry(N(w, O, "worst"), aP), IntegerEntry(N(w, O, "medium"), aS), IntegerEntry(N(w, O, "best"), aU), StringEntry(Q(w, O, "worst"), aI), StringEntry(Q(w, O, "medium"), aJ), StringEntry(Q(w, O, "best"), aK), IntegerEntry(L(w), (ao + 1)), IntegerEntry(G(w), (height + f))]
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))]
411417 }
412418 else throw("Strict value is not equal to itself.")
413419 }
414420 else throw("Strict value is not equal to itself.")
415421 }
416422 else throw("Strict value is not equal to itself.")
417423 }
418424
419425
420426
421-@Callable(az)
422-func commit (aV) = {
423- let aD = toBase58String(az.caller.bytes)
424- let w = r(aD)
425- let O = x(w, aD)
426- let ao = M(w)
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)
427433 if ((w == 0))
428434 then throw("You don't have an active game")
429- else if ((2 > ao))
435+ else if ((2 > aq))
430436 then throw("Commit is not started")
431- else if (if ((ao == 2))
437+ else if (if ((aq == 2))
432438 then (O != "taker")
433439 else false)
434440 then throw("It is the taker's turn to pick now")
435- else if (if ((ao == 3))
441+ else if (if ((aq == 3))
436442 then (O != "maker")
437443 else false)
438444 then throw("It is the maker's turn to pick now")
439- else if ((ao > 3))
445+ else if ((aq > 3))
440446 then throw("Commit is finished")
441- else [StringEntry(S(w, O), aV), IntegerEntry(L(w), (ao + 1)), IntegerEntry(G(w), (height + f))]
447+ else [StringEntry(S(w, O), aX), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))]
442448 }
443449
444450
445451
446-@Callable(az)
447-func reveal (aW,aX) = {
448- let aD = toBase58String(az.caller.bytes)
449- let w = r(aD)
450- let O = x(w, aD)
451- let ao = M(w)
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)
452458 if ((w == 0))
453459 then throw("You don't have an active game")
454- else if ((4 > ao))
460+ else if ((4 > aq))
455461 then throw("Reveal is not started")
456- else if (if ((ao == 4))
462+ else if (if ((aq == 4))
457463 then (O != "taker")
458464 else false)
459465 then throw("It is the taker's turn to pick now")
460- else if (if ((ao == 5))
466+ else if (if ((aq == 5))
461467 then (O != "maker")
462468 else false)
463469 then throw("It is the maker's turn to pick now")
464- else if ((ao > 5))
470+ else if ((aq > 5))
465471 then throw("Reveal is finished")
466- else if (if (if (if (if (if ((aW != "worst,medium,best"))
467- then (aW != "worst,best,medium")
472+ else if (if (if (if (if (if ((aY != "worst,medium,best"))
473+ then (aY != "worst,best,medium")
468474 else false)
469- then (aW != "medium,worst,best")
475+ then (aY != "medium,worst,best")
470476 else false)
471- then (aW != "medium,best,worst")
477+ then (aY != "medium,best,worst")
472478 else false)
473- then (aW != "best,worst,medium")
479+ then (aY != "best,worst,medium")
474480 else false)
475- then (aW != "best,medium,worst")
481+ then (aY != "best,medium,worst")
476482 else false)
477483 then throw("Reveal data is not valid")
478- else if ((toBase58String(sha256(toBytes((aW + aX)))) != T(w, O)))
484+ else if ((toBase58String(sha256(toBytes((aY + aZ)))) != T(w, O)))
479485 then throw("Reveal doesn't match commit")
480- else [StringEntry(U(w, O), aW), IntegerEntry(L(w), (ao + 1)), IntegerEntry(G(w), (height + f))]
486+ else [StringEntry(U(w, O), aY), IntegerEntry(L(w), (aq + 1)), IntegerEntry(G(w), (height + f))]
481487 }
482488
483489
484490
485-@Callable(az)
491+@Callable(aB)
486492 func getPrize () = {
487- let aD = toBase58String(az.caller.bytes)
488- let w = r(aD)
489- let O = x(w, aD)
490- let aY = if ((O == "maker"))
493+ let aF = toBase58String(aB.caller.bytes)
494+ let w = r(aF)
495+ let O = x(w, aF)
496+ let ba = if ((O == "maker"))
491497 then B(w)
492498 else z(w)
493- let aZ = an(w)
499+ let bb = ap(w)
494500 if ((w == 0))
495501 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)]
501510 }
502511
503512
504-@Verifier(ba)
505-func bb () = sigVerify(ba.bodyBytes, ba.proofs[0], ba.senderPublicKey)
513+@Verifier(bd)
514+func be () = sigVerify(bd.bodyBytes, bd.proofs[0], bd.senderPublicKey)
506515

github/deemru/w8io/169f3d6 
166.69 ms