tx · DWsNfa7Fy7sePxsPSaL8vMtwUvq4313c1UBzyhTDXV13

3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito:  -0.05000000 Waves

2021.09.10 14:34 [1696899] smart account 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito > SELF 0.00000000 Waves

{ "type": 13, "id": "DWsNfa7Fy7sePxsPSaL8vMtwUvq4313c1UBzyhTDXV13", "fee": 5000000, "feeAssetId": null, "timestamp": 1631273686951, "version": 2, "chainId": 84, "sender": "3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito", "senderPublicKey": "7PMrxEzirv6h9Z2zqLE47qrZd6v1AbRZER5Aqfo95Eyr", "proofs": [ "4fD7YVPVoY3MshqCxNnmyMK5AoW574hwTYEnKfmmV9Tv9uuc3xfJuxVEzfRRhmnqcNGyrPitJcdHxNsj4Edjp684" ], "script": "base64:AAIFAAAAAAAAACgIAhIGCgQBAQEBEgMKAQESAwoBARIFCgMICAgSAwoBCBIECgIICBIAAAAANgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAGgFU8jY5wCvKx9IdZ1jq9byeNi+peiAgajPTAAAAABVyYXJpdHlQcm92aWRlckFkZHJlc3MBAAAAGgFU+q9cAg4rvtWEk5vjyvMr8wmPCufq9HWkAAAAAAtlZ2dzQXNzZXRJZAEAAAAgJQJlzPcEaMi+AVmReOVYWjhmFBOtSkxKt/4FF0gXFoMAAAAABVNMT1RTAAAAAAAAAAAKAAAAAAdXQUlUSU5HAAAAAAAAAAAIAAAAAAxzdGVwRHVyYXRpb24AAAAAAAAAAAUBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAA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kBQAAAAtlZ2dzQXNzZXRJZAUAAAADbmlsCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAXZ2V0UGxheWVyQ3VycmVudEdhbWVLZXkAAAABBQAAAA1jYWxsZXJBZGRyZXNzAAAAAAAAAAAABQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleYrAvpA=", "height": 1696899, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D9nuK465nEitbyB4YKUs6J6jZjaekCQL7PVwq5Mzafkb Next: MbkQLMiRfWsQVZ1vycsxEwVeZSiXeM5kio3Tga2XUrj Diff:
OldNewDifferences
138138 func getGamePrizeKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_prize")
139139
140140
141-func getGamePrize (gameId,playerAddress) = tryGetString(getGamePrizeKey(gameId, playerAddress))
141+func getGamePrize (gameId,playerAddress) = tryGetInteger(getGamePrizeKey(gameId, playerAddress))
142142
143143
144144 func getPlayerWinsKey (playerAddress) = (playerAddress + "_wins")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let farmingAddress = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC'
55
66 let rarityProviderAddress = base58'3NCman4dCzk1HWWU4DPTr5rsbhvuUCwwUZh'
77
88 let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN'
99
1010 let SLOTS = 10
1111
1212 let WAITING = 8
1313
1414 let stepDuration = 5
1515
1616 func tryGetInteger (key) = match getInteger(this, key) {
1717 case b: Int =>
1818 b
1919 case _ =>
2020 0
2121 }
2222
2323
2424 func tryGetString (key) = match getString(this, key) {
2525 case a: String =>
2626 a
2727 case _ =>
2828 ""
2929 }
3030
3131
3232 func tryGetBoolean (key) = match getBoolean(this, key) {
3333 case b: Boolean =>
3434 b
3535 case _ =>
3636 false
3737 }
3838
3939
4040 func getNextGameId () = {
4141 let nextId = tryGetInteger("nextGameId")
4242 if ((nextId == 0))
4343 then 1
4444 else nextId
4545 }
4646
4747
4848 func getPlayerCurrentGameKey (playerAddress) = (playerAddress + "_currentGame")
4949
5050
5151 func getPlayerCurrentGame (playerAddress) = tryGetInteger(getPlayerCurrentGameKey(playerAddress))
5252
5353
5454 func getSlotKey (slot) = ("slot" + toString(slot))
5555
5656
5757 func getSlot (slot) = tryGetInteger(getSlotKey(slot))
5858
5959
6060 func getPlayerRoleKey (gameId,playerAddress) = ((("game" + toString(gameId)) + "_") + playerAddress)
6161
6262
6363 func getPlayerRole (gameId,playerAddress) = tryGetString(getPlayerRoleKey(gameId, playerAddress))
6464
6565
6666 func getMakerKey (gameId) = (("game" + toString(gameId)) + "_maker")
6767
6868
6969 func getMaker (gameId) = tryGetString(getMakerKey(gameId))
7070
7171
7272 func getTakerKey (gameId) = (("game" + toString(gameId)) + "_taker")
7373
7474
7575 func getTaker (gameId) = tryGetString(getTakerKey(gameId))
7676
7777
7878 func getBetEggsKey (gameId) = (("game" + toString(gameId)) + "_betEggs")
7979
8080
8181 func getBetEggs (gameId) = tryGetInteger(getBetEggsKey(gameId))
8282
8383
8484 func getWaitingExpirationHeightKey (gameId) = (("game" + toString(gameId)) + "_waitingExpirationHeight")
8585
8686
8787 func getWaitingExpirationHeight (gameId) = tryGetInteger(getWaitingExpirationHeightKey(gameId))
8888
8989
9090 func getExpirationHeightKey (gameId) = (("game" + toString(gameId)) + "_expirationHeight")
9191
9292
9393 func getExpirationHeight (gameId) = tryGetInteger(getExpirationHeightKey(gameId))
9494
9595
9696 func getRarityRangeKey (gameId,rangePosition) = ((("game" + toString(gameId)) + "_rarityRange_") + rangePosition)
9797
9898
9999 func getRarityRange (gameId,rangePosition) = tryGetInteger(getRarityRangeKey(gameId, rangePosition))
100100
101101
102102 func getStepKey (gameId) = (("game" + toString(gameId)) + "_step")
103103
104104
105105 func getStep (gameId) = tryGetInteger(getStepKey(gameId))
106106
107107
108108 func getRarityKey (gameId,playerRole,rangePosition) = (((((("game" + toString(gameId)) + "_") + playerRole) + "_") + rangePosition) + "Rarity")
109109
110110
111111 func getRarity (gameId,playerRole,rangePosition) = tryGetInteger(getRarityKey(gameId, playerRole, rangePosition))
112112
113113
114114 func getDuckIdKey (gameId,playerRole,rangePosition) = (((((("game" + toString(gameId)) + "_") + playerRole) + "_") + rangePosition) + "DuckId")
115115
116116
117117 func getDuckId (gameId,playerRole,rangePosition) = tryGetString(getDuckIdKey(gameId, playerRole, rangePosition))
118118
119119
120120 func getCommitKey (gameId,playerRole) = (((("game" + toString(gameId)) + "_") + playerRole) + "_commit")
121121
122122
123123 func getCommit (gameId,playerRole) = tryGetString(getCommitKey(gameId, playerRole))
124124
125125
126126 func getDuckOrderKey (gameId,playerRole) = (((("game" + toString(gameId)) + "_") + playerRole) + "_duckOrder")
127127
128128
129129 func getDuckOrder (gameId,playerRole) = tryGetString(getDuckOrderKey(gameId, playerRole))
130130
131131
132132 func getGameResultKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_result")
133133
134134
135135 func getGameResult (gameId,playerAddress) = tryGetString(getGameResultKey(gameId, playerAddress))
136136
137137
138138 func getGamePrizeKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_prize")
139139
140140
141-func getGamePrize (gameId,playerAddress) = tryGetString(getGamePrizeKey(gameId, playerAddress))
141+func getGamePrize (gameId,playerAddress) = tryGetInteger(getGamePrizeKey(gameId, playerAddress))
142142
143143
144144 func getPlayerWinsKey (playerAddress) = (playerAddress + "_wins")
145145
146146
147147 func getPlayerWins (playerAddress) = tryGetInteger(getPlayerWinsKey(playerAddress))
148148
149149
150150 func getPlayerLosesKey (playerAddress) = (playerAddress + "_loses")
151151
152152
153153 func getPlayerLoses (playerAddress) = tryGetInteger(getPlayerLosesKey(playerAddress))
154154
155155
156156 func getPlayerDrawsKey (playerAddress) = (playerAddress + "_draws")
157157
158158
159159 func getPlayerDraws (playerAddress) = tryGetInteger(getPlayerDrawsKey(playerAddress))
160160
161161
162162 func getGamesPlayedKey () = "gamesPlayed"
163163
164164
165165 func getGamesPlayed () = tryGetInteger(getGamesPlayedKey())
166166
167167
168168 func getFarmingPower (address,assetId) = match getInteger(Address(farmingAddress), (((("address_" + address) + "_asset_") + assetId) + "_farmingPower")) {
169169 case fp: Int =>
170170 fp
171171 case _ =>
172172 0
173173 }
174174
175175
176176 func checkDuckOwner (ownerAddress,assetId) = if ((assetBalance(ownerAddress, assetId) > 0))
177177 then true
178178 else (getFarmingPower(toBase58String(ownerAddress.bytes), toBase58String(assetId)) > 0)
179179
180180
181181 func getScore (a,b) = if ((a > b))
182182 then 1
183183 else if ((b > a))
184184 then -1
185185 else 0
186186
187187
188188 func getWinner (gameId) = {
189189 let gameStep = getStep(gameId)
190190 if ((6 > gameStep))
191191 then {
192192 let expirationHeight = getExpirationHeight(gameId)
193193 if ((expirationHeight == 0))
194194 then throw("Game is not started")
195195 else if ((expirationHeight > height))
196196 then throw("Game is not finished or expired")
197197 else if (((getStep(gameId) % 2) == 0))
198198 then "maker"
199199 else "taker"
200200 }
201201 else {
202202 let makerDuckOrder = split(getDuckOrder(gameId, "maker"), ",")
203203 let takerDuckOrder = split(getDuckOrder(gameId, "taker"), ",")
204204 let makerRarity1 = getRarity(gameId, "maker", makerDuckOrder[0])
205205 let makerRarity2 = getRarity(gameId, "maker", makerDuckOrder[1])
206206 let makerRarity3 = getRarity(gameId, "maker", makerDuckOrder[2])
207207 let takerRarity1 = getRarity(gameId, "taker", takerDuckOrder[0])
208208 let takerRarity2 = getRarity(gameId, "taker", takerDuckOrder[1])
209209 let takerRarity3 = getRarity(gameId, "taker", takerDuckOrder[2])
210210 let makerScore = ((getScore(makerRarity1, takerRarity1) + getScore(makerRarity2, takerRarity2)) + getScore(makerRarity3, takerRarity3))
211211 if ((makerScore > 0))
212212 then "maker"
213213 else if ((0 > makerScore))
214214 then "taker"
215215 else "draw"
216216 }
217217 }
218218
219219
220220 @Callable(i)
221221 func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = {
222222 let callerAddress = toBase58String(i.caller.bytes)
223223 let slotGameId = getSlot(slot)
224224 let payment = value(i.payments[0])
225225 let eggs = payment.amount
226226 let gameId = getNextGameId()
227227 if ((getPlayerCurrentGame(callerAddress) != 0))
228228 then throw("You already have an active game")
229229 else if (if ((0 > slot))
230230 then true
231231 else (slot >= SLOTS))
232232 then throw("Invalid slot")
233233 else if ((slotGameId != 0))
234234 then throw("This slot is busy")
235235 else if ((payment.assetId != eggsAssetId))
236236 then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId)))
237237 else if ((eggs != 1))
238238 then throw("Bet must be 0.01 EGG during beta test")
239239 else if (if ((1 > rarityRangeWorst))
240240 then true
241241 else (rarityRangeWorst > 5))
242242 then throw("Invalid rarity range for the worst duck")
243243 else if (if ((1 > rarityRangeMedium))
244244 then true
245245 else (rarityRangeMedium > 5))
246246 then throw("Invalid rarity range for the medium duck")
247247 else if (if ((1 > rarityRangeBest))
248248 then true
249249 else (rarityRangeBest > 5))
250250 then throw("Invalid rarity range for the best duck")
251251 else if ((rarityRangeWorst > rarityRangeMedium))
252252 then throw("The medium range can't be less than the worst one")
253253 else if ((rarityRangeMedium > rarityRangeBest))
254254 then throw("The best range can't be worse than the medium one")
255255 else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), gameId), StringEntry(getMakerKey(gameId), callerAddress), StringEntry(getPlayerRoleKey(gameId, callerAddress), "maker"), IntegerEntry(getBetEggsKey(gameId), eggs), IntegerEntry(getRarityRangeKey(gameId, "worst"), rarityRangeWorst), IntegerEntry(getRarityRangeKey(gameId, "medium"), rarityRangeMedium), IntegerEntry(getRarityRangeKey(gameId, "best"), rarityRangeBest), IntegerEntry(getWaitingExpirationHeightKey(gameId), (height + WAITING)), IntegerEntry(getSlotKey(slot), gameId), IntegerEntry("nextGameId", (gameId + 1))]
256256 }
257257
258258
259259
260260 @Callable(i)
261261 func takeGame (slot) = {
262262 let callerAddress = toBase58String(i.caller.bytes)
263263 let gameId = getSlot(slot)
264264 let payment = value(i.payments[0])
265265 if ((getPlayerCurrentGame(callerAddress) != 0))
266266 then throw("You already have an active game")
267267 else if (if ((0 > slot))
268268 then true
269269 else (slot >= SLOTS))
270270 then throw("Invalid slot")
271271 else if ((getSlot(slot) == 0))
272272 then throw("This slot is empty")
273273 else if ((payment.assetId != eggsAssetId))
274274 then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId)))
275275 else if ((payment.amount != getBetEggs(gameId)))
276276 then throw("Insufficient eggs amount")
277277 else if ((height >= getWaitingExpirationHeight(gameId)))
278278 then throw("This game is expired")
279279 else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), gameId), StringEntry(getTakerKey(gameId), callerAddress), StringEntry(getPlayerRoleKey(gameId, callerAddress), "taker"), IntegerEntry(getStepKey(gameId), 0), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration)), IntegerEntry(getSlotKey(slot), 0), IntegerEntry("gamesPlayed", (getGamesPlayed() + 1))]
280280 }
281281
282282
283283
284284 @Callable(i)
285285 func kickGame (slot) = {
286286 let gameId = getSlot(slot)
287287 if (if ((0 > slot))
288288 then true
289289 else (slot >= SLOTS))
290290 then throw("Invalid slot")
291291 else if ((gameId == 0))
292292 then throw("Slot is empty")
293293 else if ((getWaitingExpirationHeight(gameId) > height))
294294 then throw("Waiting is not finished yet")
295295 else {
296296 let maker = getMaker(gameId)
297297 [IntegerEntry(getPlayerCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(fromBase58String(maker)), getBetEggs(gameId), eggsAssetId)]
298298 }
299299 }
300300
301301
302302
303303 @Callable(i)
304304 func pickDucks (worstDuckId,mediumDuckId,bestDuckId) = {
305305 let callerAddress = toBase58String(i.caller.bytes)
306306 let gameId = getPlayerCurrentGame(callerAddress)
307307 let playerRole = getPlayerRole(gameId, callerAddress)
308308 let gameStep = getStep(gameId)
309309 let worstRarityRange = getRarityRange(gameId, "worst")
310310 let mediumRarityRange = getRarityRange(gameId, "medium")
311311 let bestRarityRange = getRarityRange(gameId, "best")
312312 let invokeWorstRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [worstDuckId], nil)
313313 if ((invokeWorstRes == invokeWorstRes))
314314 then {
315315 let worstRarity = match invokeWorstRes {
316316 case r: Int =>
317317 r
318318 case _ =>
319319 throw("Incorrect invoke result")
320320 }
321321 let invokeMediumRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [mediumDuckId], nil)
322322 if ((invokeMediumRes == invokeMediumRes))
323323 then {
324324 let mediumRarity = match invokeMediumRes {
325325 case r: Int =>
326326 r
327327 case _ =>
328328 throw("Incorrect invoke result")
329329 }
330330 let invokeBestRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [bestDuckId], nil)
331331 if ((invokeBestRes == invokeBestRes))
332332 then {
333333 let bestRarity = match invokeBestRes {
334334 case r: Int =>
335335 r
336336 case _ =>
337337 throw("Incorrect invoke result")
338338 }
339339 if ((gameId == 0))
340340 then throw("You don't have an active game")
341341 else if ((getExpirationHeight(gameId) == 0))
342342 then throw("Game is not started")
343343 else if (if ((gameStep == 0))
344344 then (playerRole != "taker")
345345 else false)
346346 then throw("It is the taker's turn to pick now")
347347 else if (if ((gameStep == 1))
348348 then (playerRole != "maker")
349349 else false)
350350 then throw("It is the maker's turn to pick now")
351351 else if ((gameStep > 1))
352352 then throw("Ducks have already been picked")
353353 else if (!(checkDuckOwner(i.caller, fromBase58String(worstDuckId))))
354354 then throw((("Asset " + worstDuckId) + " doesn't belong to you"))
355355 else if (!(checkDuckOwner(i.caller, fromBase58String(mediumDuckId))))
356356 then throw((("Asset " + mediumDuckId) + " doesn't belong to you"))
357357 else if (!(checkDuckOwner(i.caller, fromBase58String(bestDuckId))))
358358 then throw((("Asset " + bestDuckId) + " doesn't belong to you"))
359359 else if (if ((5 > worstRarityRange))
360360 then if ((worstRarity > (worstRarityRange * 10)))
361361 then true
362362 else (((worstRarityRange - 1) * 10) >= worstRarity)
363363 else false)
364364 then throw("Worst duck doesn't fit rarity range")
365365 else if (if ((5 > mediumRarityRange))
366366 then if ((mediumRarity > (mediumRarityRange * 10)))
367367 then true
368368 else (((mediumRarityRange - 1) * 10) >= mediumRarity)
369369 else false)
370370 then throw("Medium duck doesn't fit rarity range")
371371 else if (if ((5 > bestRarityRange))
372372 then if ((bestRarity > (bestRarityRange * 10)))
373373 then true
374374 else (((bestRarityRange - 1) * 10) >= bestRarity)
375375 else false)
376376 then throw("Best duck doesn't fit rarity range")
377377 else if (if ((worstRarityRange == 5))
378378 then (40 >= worstRarity)
379379 else false)
380380 then throw("Worst duck doesn't fit rarity range")
381381 else if (if ((mediumRarityRange == 5))
382382 then (40 >= mediumRarity)
383383 else false)
384384 then throw("Medium duck doesn't fit rarity range")
385385 else if (if ((bestRarityRange == 5))
386386 then (40 >= bestRarity)
387387 else false)
388388 then throw("Best duck doesn't fit rarity range")
389389 else if (if (if ((worstRarity == mediumRarity))
390390 then true
391391 else (worstRarity == bestRarity))
392392 then true
393393 else (mediumRarity == bestRarity))
394394 then throw("Ducks must have different rarities")
395395 else [IntegerEntry(getRarityKey(gameId, playerRole, "worst"), worstRarity), IntegerEntry(getRarityKey(gameId, playerRole, "medium"), mediumRarity), IntegerEntry(getRarityKey(gameId, playerRole, "best"), bestRarity), StringEntry(getDuckIdKey(gameId, playerRole, "worst"), worstDuckId), StringEntry(getDuckIdKey(gameId, playerRole, "medium"), mediumDuckId), StringEntry(getDuckIdKey(gameId, playerRole, "best"), bestDuckId), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
396396 }
397397 else throw("Strict value is not equal to itself.")
398398 }
399399 else throw("Strict value is not equal to itself.")
400400 }
401401 else throw("Strict value is not equal to itself.")
402402 }
403403
404404
405405
406406 @Callable(i)
407407 func commit (hash) = {
408408 let callerAddress = toBase58String(i.caller.bytes)
409409 let gameId = getPlayerCurrentGame(callerAddress)
410410 let playerRole = getPlayerRole(gameId, callerAddress)
411411 let gameStep = getStep(gameId)
412412 if ((gameId == 0))
413413 then throw("You don't have an active game")
414414 else if ((2 > gameStep))
415415 then throw("Commit is not started")
416416 else if (if ((gameStep == 2))
417417 then (playerRole != "taker")
418418 else false)
419419 then throw("It is the taker's turn to pick now")
420420 else if (if ((gameStep == 3))
421421 then (playerRole != "maker")
422422 else false)
423423 then throw("It is the maker's turn to pick now")
424424 else if ((gameStep > 3))
425425 then throw("Commit is finished")
426426 else [StringEntry(getCommitKey(gameId, playerRole), hash), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
427427 }
428428
429429
430430
431431 @Callable(i)
432432 func reveal (duckOrder,salt) = {
433433 let callerAddress = toBase58String(i.caller.bytes)
434434 let gameId = getPlayerCurrentGame(callerAddress)
435435 let playerRole = getPlayerRole(gameId, callerAddress)
436436 let gameStep = getStep(gameId)
437437 if ((gameId == 0))
438438 then throw("You don't have an active game")
439439 else if ((4 > gameStep))
440440 then throw("Reveal is not started")
441441 else if (if ((gameStep == 4))
442442 then (playerRole != "taker")
443443 else false)
444444 then throw("It is the taker's turn to pick now")
445445 else if (if ((gameStep == 5))
446446 then (playerRole != "maker")
447447 else false)
448448 then throw("It is the maker's turn to pick now")
449449 else if ((gameStep > 5))
450450 then throw("Reveal is finished")
451451 else if (if (if (if (if (if ((duckOrder != "worst,medium,best"))
452452 then (duckOrder != "worst,best,medium")
453453 else false)
454454 then (duckOrder != "medium,worst,best")
455455 else false)
456456 then (duckOrder != "medium,best,worst")
457457 else false)
458458 then (duckOrder != "best,worst,medium")
459459 else false)
460460 then (duckOrder != "best,medium,worst")
461461 else false)
462462 then throw("Reveal data is not valid")
463463 else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, playerRole)))
464464 then throw("Reveal doesn't match commit")
465465 else [StringEntry(getDuckOrderKey(gameId, playerRole), duckOrder), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
466466 }
467467
468468
469469
470470 @Callable(i)
471471 func getPrize () = {
472472 let callerAddress = toBase58String(i.caller.bytes)
473473 let gameId = getPlayerCurrentGame(callerAddress)
474474 let playerRole = getPlayerRole(gameId, callerAddress)
475475 let anotherPlayerAddress = if ((playerRole == "maker"))
476476 then getTaker(gameId)
477477 else getMaker(gameId)
478478 let winner = getWinner(gameId)
479479 if ((gameId == 0))
480480 then throw("You don't have an active game")
481481 else if ((winner == playerRole))
482482 then {
483483 let bet = getBetEggs(gameId)
484484 [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerCurrentGameKey(anotherPlayerAddress), 0), IntegerEntry(getPlayerWinsKey(callerAddress), (getPlayerWins(callerAddress) + 1)), IntegerEntry(getPlayerLosesKey(anotherPlayerAddress), (getPlayerLoses(anotherPlayerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "win"), StringEntry(getGameResultKey(gameId, anotherPlayerAddress), "lose"), IntegerEntry(getGamePrizeKey(gameId, callerAddress), bet), IntegerEntry(getGamePrizeKey(gameId, anotherPlayerAddress), -(bet)), ScriptTransfer(i.caller, (getBetEggs(gameId) * 2), eggsAssetId)]
485485 }
486486 else if ((winner == "draw"))
487487 then [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerDrawsKey(callerAddress), (getPlayerDraws(callerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "draw"), IntegerEntry(getGamePrizeKey(gameId, callerAddress), 0), ScriptTransfer(i.caller, getBetEggs(gameId), eggsAssetId)]
488488 else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0)]
489489 }
490490
491491
492492 @Verifier(tx)
493493 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
494494

github/deemru/w8io/026f985 
60.74 ms