tx · 36mz51n2TdDLiidgd9yAoxygkhgXpmHgjoNUcbbR4QkC

3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito:  -0.05000000 Waves

2021.09.09 18:11 [1695672] smart account 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
88.81 ms