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
133133
134134
135135 func getGameResult (gameId,playerAddress) = tryGetString(getGameResultKey(gameId, playerAddress))
136+
137+
138+func getGamePrizeKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_prize")
139+
140+
141+func getGamePrize (gameId,playerAddress) = tryGetString(getGamePrizeKey(gameId, playerAddress))
136142
137143
138144 func getPlayerWinsKey (playerAddress) = (playerAddress + "_wins")
473479 if ((gameId == 0))
474480 then throw("You don't have an active game")
475481 else if ((winner == playerRole))
476- 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)]
482+ then {
483+ let bet = getBetEggs(gameId)
484+[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)]
485+ }
477486 else if ((winner == "draw"))
478- then [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerDrawsKey(callerAddress), (getPlayerDraws(callerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "draw"), ScriptTransfer(i.caller, getBetEggs(gameId), eggsAssetId)]
487+ 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)]
479488 else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0)]
480489 }
481490
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))
136+
137+
138+func getGamePrizeKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_prize")
139+
140+
141+func getGamePrize (gameId,playerAddress) = tryGetString(getGamePrizeKey(gameId, playerAddress))
136142
137143
138144 func getPlayerWinsKey (playerAddress) = (playerAddress + "_wins")
139145
140146
141147 func getPlayerWins (playerAddress) = tryGetInteger(getPlayerWinsKey(playerAddress))
142148
143149
144150 func getPlayerLosesKey (playerAddress) = (playerAddress + "_loses")
145151
146152
147153 func getPlayerLoses (playerAddress) = tryGetInteger(getPlayerLosesKey(playerAddress))
148154
149155
150156 func getPlayerDrawsKey (playerAddress) = (playerAddress + "_draws")
151157
152158
153159 func getPlayerDraws (playerAddress) = tryGetInteger(getPlayerDrawsKey(playerAddress))
154160
155161
156162 func getGamesPlayedKey () = "gamesPlayed"
157163
158164
159165 func getGamesPlayed () = tryGetInteger(getGamesPlayedKey())
160166
161167
162168 func getFarmingPower (address,assetId) = match getInteger(Address(farmingAddress), (((("address_" + address) + "_asset_") + assetId) + "_farmingPower")) {
163169 case fp: Int =>
164170 fp
165171 case _ =>
166172 0
167173 }
168174
169175
170176 func checkDuckOwner (ownerAddress,assetId) = if ((assetBalance(ownerAddress, assetId) > 0))
171177 then true
172178 else (getFarmingPower(toBase58String(ownerAddress.bytes), toBase58String(assetId)) > 0)
173179
174180
175181 func getScore (a,b) = if ((a > b))
176182 then 1
177183 else if ((b > a))
178184 then -1
179185 else 0
180186
181187
182188 func getWinner (gameId) = {
183189 let gameStep = getStep(gameId)
184190 if ((6 > gameStep))
185191 then {
186192 let expirationHeight = getExpirationHeight(gameId)
187193 if ((expirationHeight == 0))
188194 then throw("Game is not started")
189195 else if ((expirationHeight > height))
190196 then throw("Game is not finished or expired")
191197 else if (((getStep(gameId) % 2) == 0))
192198 then "maker"
193199 else "taker"
194200 }
195201 else {
196202 let makerDuckOrder = split(getDuckOrder(gameId, "maker"), ",")
197203 let takerDuckOrder = split(getDuckOrder(gameId, "taker"), ",")
198204 let makerRarity1 = getRarity(gameId, "maker", makerDuckOrder[0])
199205 let makerRarity2 = getRarity(gameId, "maker", makerDuckOrder[1])
200206 let makerRarity3 = getRarity(gameId, "maker", makerDuckOrder[2])
201207 let takerRarity1 = getRarity(gameId, "taker", takerDuckOrder[0])
202208 let takerRarity2 = getRarity(gameId, "taker", takerDuckOrder[1])
203209 let takerRarity3 = getRarity(gameId, "taker", takerDuckOrder[2])
204210 let makerScore = ((getScore(makerRarity1, takerRarity1) + getScore(makerRarity2, takerRarity2)) + getScore(makerRarity3, takerRarity3))
205211 if ((makerScore > 0))
206212 then "maker"
207213 else if ((0 > makerScore))
208214 then "taker"
209215 else "draw"
210216 }
211217 }
212218
213219
214220 @Callable(i)
215221 func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = {
216222 let callerAddress = toBase58String(i.caller.bytes)
217223 let slotGameId = getSlot(slot)
218224 let payment = value(i.payments[0])
219225 let eggs = payment.amount
220226 let gameId = getNextGameId()
221227 if ((getPlayerCurrentGame(callerAddress) != 0))
222228 then throw("You already have an active game")
223229 else if (if ((0 > slot))
224230 then true
225231 else (slot >= SLOTS))
226232 then throw("Invalid slot")
227233 else if ((slotGameId != 0))
228234 then throw("This slot is busy")
229235 else if ((payment.assetId != eggsAssetId))
230236 then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId)))
231237 else if ((eggs != 1))
232238 then throw("Bet must be 0.01 EGG during beta test")
233239 else if (if ((1 > rarityRangeWorst))
234240 then true
235241 else (rarityRangeWorst > 5))
236242 then throw("Invalid rarity range for the worst duck")
237243 else if (if ((1 > rarityRangeMedium))
238244 then true
239245 else (rarityRangeMedium > 5))
240246 then throw("Invalid rarity range for the medium duck")
241247 else if (if ((1 > rarityRangeBest))
242248 then true
243249 else (rarityRangeBest > 5))
244250 then throw("Invalid rarity range for the best duck")
245251 else if ((rarityRangeWorst > rarityRangeMedium))
246252 then throw("The medium range can't be less than the worst one")
247253 else if ((rarityRangeMedium > rarityRangeBest))
248254 then throw("The best range can't be worse than the medium one")
249255 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))]
250256 }
251257
252258
253259
254260 @Callable(i)
255261 func takeGame (slot) = {
256262 let callerAddress = toBase58String(i.caller.bytes)
257263 let gameId = getSlot(slot)
258264 let payment = value(i.payments[0])
259265 if ((getPlayerCurrentGame(callerAddress) != 0))
260266 then throw("You already have an active game")
261267 else if (if ((0 > slot))
262268 then true
263269 else (slot >= SLOTS))
264270 then throw("Invalid slot")
265271 else if ((getSlot(slot) == 0))
266272 then throw("This slot is empty")
267273 else if ((payment.assetId != eggsAssetId))
268274 then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId)))
269275 else if ((payment.amount != getBetEggs(gameId)))
270276 then throw("Insufficient eggs amount")
271277 else if ((height >= getWaitingExpirationHeight(gameId)))
272278 then throw("This game is expired")
273279 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))]
274280 }
275281
276282
277283
278284 @Callable(i)
279285 func kickGame (slot) = {
280286 let gameId = getSlot(slot)
281287 if (if ((0 > slot))
282288 then true
283289 else (slot >= SLOTS))
284290 then throw("Invalid slot")
285291 else if ((gameId == 0))
286292 then throw("Slot is empty")
287293 else if ((getWaitingExpirationHeight(gameId) > height))
288294 then throw("Waiting is not finished yet")
289295 else {
290296 let maker = getMaker(gameId)
291297 [IntegerEntry(getPlayerCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(fromBase58String(maker)), getBetEggs(gameId), eggsAssetId)]
292298 }
293299 }
294300
295301
296302
297303 @Callable(i)
298304 func pickDucks (worstDuckId,mediumDuckId,bestDuckId) = {
299305 let callerAddress = toBase58String(i.caller.bytes)
300306 let gameId = getPlayerCurrentGame(callerAddress)
301307 let playerRole = getPlayerRole(gameId, callerAddress)
302308 let gameStep = getStep(gameId)
303309 let worstRarityRange = getRarityRange(gameId, "worst")
304310 let mediumRarityRange = getRarityRange(gameId, "medium")
305311 let bestRarityRange = getRarityRange(gameId, "best")
306312 let invokeWorstRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [worstDuckId], nil)
307313 if ((invokeWorstRes == invokeWorstRes))
308314 then {
309315 let worstRarity = match invokeWorstRes {
310316 case r: Int =>
311317 r
312318 case _ =>
313319 throw("Incorrect invoke result")
314320 }
315321 let invokeMediumRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [mediumDuckId], nil)
316322 if ((invokeMediumRes == invokeMediumRes))
317323 then {
318324 let mediumRarity = match invokeMediumRes {
319325 case r: Int =>
320326 r
321327 case _ =>
322328 throw("Incorrect invoke result")
323329 }
324330 let invokeBestRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [bestDuckId], nil)
325331 if ((invokeBestRes == invokeBestRes))
326332 then {
327333 let bestRarity = match invokeBestRes {
328334 case r: Int =>
329335 r
330336 case _ =>
331337 throw("Incorrect invoke result")
332338 }
333339 if ((gameId == 0))
334340 then throw("You don't have an active game")
335341 else if ((getExpirationHeight(gameId) == 0))
336342 then throw("Game is not started")
337343 else if (if ((gameStep == 0))
338344 then (playerRole != "taker")
339345 else false)
340346 then throw("It is the taker's turn to pick now")
341347 else if (if ((gameStep == 1))
342348 then (playerRole != "maker")
343349 else false)
344350 then throw("It is the maker's turn to pick now")
345351 else if ((gameStep > 1))
346352 then throw("Ducks have already been picked")
347353 else if (!(checkDuckOwner(i.caller, fromBase58String(worstDuckId))))
348354 then throw((("Asset " + worstDuckId) + " doesn't belong to you"))
349355 else if (!(checkDuckOwner(i.caller, fromBase58String(mediumDuckId))))
350356 then throw((("Asset " + mediumDuckId) + " doesn't belong to you"))
351357 else if (!(checkDuckOwner(i.caller, fromBase58String(bestDuckId))))
352358 then throw((("Asset " + bestDuckId) + " doesn't belong to you"))
353359 else if (if ((5 > worstRarityRange))
354360 then if ((worstRarity > (worstRarityRange * 10)))
355361 then true
356362 else (((worstRarityRange - 1) * 10) >= worstRarity)
357363 else false)
358364 then throw("Worst duck doesn't fit rarity range")
359365 else if (if ((5 > mediumRarityRange))
360366 then if ((mediumRarity > (mediumRarityRange * 10)))
361367 then true
362368 else (((mediumRarityRange - 1) * 10) >= mediumRarity)
363369 else false)
364370 then throw("Medium duck doesn't fit rarity range")
365371 else if (if ((5 > bestRarityRange))
366372 then if ((bestRarity > (bestRarityRange * 10)))
367373 then true
368374 else (((bestRarityRange - 1) * 10) >= bestRarity)
369375 else false)
370376 then throw("Best duck doesn't fit rarity range")
371377 else if (if ((worstRarityRange == 5))
372378 then (40 >= worstRarity)
373379 else false)
374380 then throw("Worst duck doesn't fit rarity range")
375381 else if (if ((mediumRarityRange == 5))
376382 then (40 >= mediumRarity)
377383 else false)
378384 then throw("Medium duck doesn't fit rarity range")
379385 else if (if ((bestRarityRange == 5))
380386 then (40 >= bestRarity)
381387 else false)
382388 then throw("Best duck doesn't fit rarity range")
383389 else if (if (if ((worstRarity == mediumRarity))
384390 then true
385391 else (worstRarity == bestRarity))
386392 then true
387393 else (mediumRarity == bestRarity))
388394 then throw("Ducks must have different rarities")
389395 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))]
390396 }
391397 else throw("Strict value is not equal to itself.")
392398 }
393399 else throw("Strict value is not equal to itself.")
394400 }
395401 else throw("Strict value is not equal to itself.")
396402 }
397403
398404
399405
400406 @Callable(i)
401407 func commit (hash) = {
402408 let callerAddress = toBase58String(i.caller.bytes)
403409 let gameId = getPlayerCurrentGame(callerAddress)
404410 let playerRole = getPlayerRole(gameId, callerAddress)
405411 let gameStep = getStep(gameId)
406412 if ((gameId == 0))
407413 then throw("You don't have an active game")
408414 else if ((2 > gameStep))
409415 then throw("Commit is not started")
410416 else if (if ((gameStep == 2))
411417 then (playerRole != "taker")
412418 else false)
413419 then throw("It is the taker's turn to pick now")
414420 else if (if ((gameStep == 3))
415421 then (playerRole != "maker")
416422 else false)
417423 then throw("It is the maker's turn to pick now")
418424 else if ((gameStep > 3))
419425 then throw("Commit is finished")
420426 else [StringEntry(getCommitKey(gameId, playerRole), hash), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
421427 }
422428
423429
424430
425431 @Callable(i)
426432 func reveal (duckOrder,salt) = {
427433 let callerAddress = toBase58String(i.caller.bytes)
428434 let gameId = getPlayerCurrentGame(callerAddress)
429435 let playerRole = getPlayerRole(gameId, callerAddress)
430436 let gameStep = getStep(gameId)
431437 if ((gameId == 0))
432438 then throw("You don't have an active game")
433439 else if ((4 > gameStep))
434440 then throw("Reveal is not started")
435441 else if (if ((gameStep == 4))
436442 then (playerRole != "taker")
437443 else false)
438444 then throw("It is the taker's turn to pick now")
439445 else if (if ((gameStep == 5))
440446 then (playerRole != "maker")
441447 else false)
442448 then throw("It is the maker's turn to pick now")
443449 else if ((gameStep > 5))
444450 then throw("Reveal is finished")
445451 else if (if (if (if (if (if ((duckOrder != "worst,medium,best"))
446452 then (duckOrder != "worst,best,medium")
447453 else false)
448454 then (duckOrder != "medium,worst,best")
449455 else false)
450456 then (duckOrder != "medium,best,worst")
451457 else false)
452458 then (duckOrder != "best,worst,medium")
453459 else false)
454460 then (duckOrder != "best,medium,worst")
455461 else false)
456462 then throw("Reveal data is not valid")
457463 else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, playerRole)))
458464 then throw("Reveal doesn't match commit")
459465 else [StringEntry(getDuckOrderKey(gameId, playerRole), duckOrder), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
460466 }
461467
462468
463469
464470 @Callable(i)
465471 func getPrize () = {
466472 let callerAddress = toBase58String(i.caller.bytes)
467473 let gameId = getPlayerCurrentGame(callerAddress)
468474 let playerRole = getPlayerRole(gameId, callerAddress)
469475 let anotherPlayerAddress = if ((playerRole == "maker"))
470476 then getTaker(gameId)
471477 else getMaker(gameId)
472478 let winner = getWinner(gameId)
473479 if ((gameId == 0))
474480 then throw("You don't have an active game")
475481 else if ((winner == playerRole))
476- 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)]
482+ then {
483+ let bet = getBetEggs(gameId)
484+[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)]
485+ }
477486 else if ((winner == "draw"))
478- then [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerDrawsKey(callerAddress), (getPlayerDraws(callerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "draw"), ScriptTransfer(i.caller, getBetEggs(gameId), eggsAssetId)]
487+ 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)]
479488 else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0)]
480489 }
481490
482491
483492 @Verifier(tx)
484493 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
485494

github/deemru/w8io/026f985 
57.50 ms