tx · C42FHXJicaJQgtvAG9KEiMSyirEZAXevrVo1jCgUhRmY

3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB:  -0.05000000 Waves

2021.08.21 17:59 [1668247] smart account 3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB > SELF 0.00000000 Waves

{ "type": 13, "id": "C42FHXJicaJQgtvAG9KEiMSyirEZAXevrVo1jCgUhRmY", "fee": 5000000, "feeAssetId": null, "timestamp": 1629558007229, "version": 2, "chainId": 84, "sender": "3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB", "senderPublicKey": "9Vbnf3b9hhuCerzPXf38mLo8mUGTPNVW3jtQRbymjaSw", "proofs": [ "2pw8fND6XDFF3vHH1LEreMwhP1ydoByagxs1yB78qF9e4t4vWavLfgboqcXQ1hk3XaKGEUtnvGbtuQkFc7J8jnsy" ], "script": "base64:AAIFAAAAAAAAADoIAhIGCgQBAQEBEgMKAQESAwoBARIDCgEBEgMKAQESAwoBARIECgIBCBIFCgMBCAgSAwoBARIDCgEBAAAALAAAAAAQaW5jdWJhdG9yQWRkcmVzcwEAAAAaAVQu1YzRxAHn1ekAzs1AJJ6xFAc06V7PK6oAAAAADmJyZWVkZXJBZGRyZXNzAQAAABoBVC7VjNHEAefV6QDOzUAknrEUBzTpXs8rqgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAGgFU8jY5wCvKx9IdZ1jq9byeNi+peiAgajPTAAAAAAtlZ2dzQXNzZXRJZAEAAAAgJQJlzPcEaMi+AVmReOVYWjhmFBOtSkxKt/4FF0gXFoMAAAAACG1ha2VyRmVlAAAAAAAAAAABAAAAAAh0YWtlckZlZQAAAAAAAAAAAgAAAAAFU0xPVFMAAAAAAAAAAAoAAAAAB1dBSVRJTkcAAAAAAAAAAAUAAAAADHN0ZXBEdXJhdGlvbgAAAAAAAAAAAwEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXM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Y2FsbGVyIGFkZHJlc3MAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVNWHX8=", "height": 1668247, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ae39177fymDncqfQLMk3ihgcN2fJaKWWCXHhfkfuM9v8 Next: 78VqMN4bfTre6Qnrz2yWLSqxa1wqDEFDJGwigdqWMgVn Diff:
OldNewDifferences
1111
1212 let makerFee = 1
1313
14-let takerFee = 1
14+let takerFee = 2
1515
1616 let SLOTS = 10
1717
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let incubatorAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh'
55
66 let breederAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh'
77
88 let farmingAddress = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC'
99
1010 let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN'
1111
1212 let makerFee = 1
1313
14-let takerFee = 1
14+let takerFee = 2
1515
1616 let SLOTS = 10
1717
1818 let WAITING = 5
1919
2020 let stepDuration = 3
2121
2222 func tryGetInteger (key) = match getInteger(this, key) {
2323 case b: Int =>
2424 b
2525 case _ =>
2626 0
2727 }
2828
2929
3030 func tryGetString (key) = match getString(this, key) {
3131 case a: String =>
3232 a
3333 case _ =>
3434 ""
3535 }
3636
3737
3838 func tryGetBoolean (key) = match getBoolean(this, key) {
3939 case b: Boolean =>
4040 b
4141 case _ =>
4242 false
4343 }
4444
4545
4646 func getNextGameId () = {
4747 let nextId = tryGetInteger("nextGameId")
4848 if ((nextId == 0))
4949 then 1
5050 else nextId
5151 }
5252
5353
5454 func getPlayerCurrentGameKey (address) = ("currentGame_" + address)
5555
5656
5757 func getPlayerCurrentGame (address) = tryGetInteger(getPlayerCurrentGameKey(address))
5858
5959
6060 func getSlotKey (slot) = ("slot_" + toString(slot))
6161
6262
6363 func getSlot (slot) = tryGetInteger(getSlotKey(slot))
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 getCommitKey (gameId,playerRole) = (((("game_" + toString(gameId)) + "_") + playerRole) + "_commit")
115115
116116
117117 func getCommit (gameId,playerRole) = tryGetString(getCommitKey(gameId, playerRole))
118118
119119
120120 func getDuckOrderKey (gameId,playerRole) = (((("game_" + toString(gameId)) + "_") + playerRole) + "_duckOrder")
121121
122122
123123 func getDuckOrder (gameId,playerRole) = tryGetString(getDuckOrderKey(gameId, playerRole))
124124
125125
126126 func getPrizeSentKey (gameId,playerRole) = (((("game_" + toString(gameId)) + "_") + playerRole) + "_prizeSent")
127127
128128
129129 func getPrizeSent (gameId,playerRole) = tryGetBoolean(getPrizeSentKey(gameId, playerRole))
130130
131131
132132 func pickDuck (gameId,playerRole,playerAddress,assetId,rarity,rangePosition,step) = {
133133 let rarityRange = getRarityRange(gameId, rangePosition)
134134 if (if (if (if ((rarityRange == 5))
135135 then (40 > rarity)
136136 else false)
137137 then true
138138 else (rarity >= (rarityRange * 10)))
139139 then true
140140 else (((rarityRange - 1) * 10) > rarity))
141141 then throw("This duck doesn't fit the rarity range")
142142 else [IntegerEntry(getRarityKey(gameId, playerRole, rangePosition), rarity), IntegerEntry(getStepKey(gameId), (step + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration)), ScriptTransfer(playerAddress, 1, assetId)]
143143 }
144144
145145
146146 func getScore (a,b) = if ((a > b))
147147 then 1
148148 else if ((b > a))
149149 then -1
150150 else 0
151151
152152
153153 func getWinner (gameId) = {
154154 let makerDuckOrder = split(getDuckOrder(gameId, "maker"), ",")
155155 let takerDuckOrder = split(getDuckOrder(gameId, "taker"), ",")
156156 let makerRarity1 = getRarity(gameId, "maker", makerDuckOrder[0])
157157 let makerRarity2 = getRarity(gameId, "maker", makerDuckOrder[1])
158158 let makerRarity3 = getRarity(gameId, "maker", makerDuckOrder[2])
159159 let takerRarity1 = getRarity(gameId, "taker", makerDuckOrder[0])
160160 let takerRarity2 = getRarity(gameId, "taker", makerDuckOrder[1])
161161 let takerRarity3 = getRarity(gameId, "taker", makerDuckOrder[2])
162162 let makerScore = ((getScore(makerRarity1, takerRarity1) + getScore(makerRarity2, takerRarity2)) + getScore(makerRarity3, takerRarity3))
163163 if ((makerScore > 0))
164164 then "maker"
165165 else if ((0 > makerScore))
166166 then "taker"
167167 else "draw"
168168 }
169169
170170
171171 func getWinnerExpired (gameStep) = if (if (if (if (if ((gameStep == 0))
172172 then true
173173 else (gameStep == 3))
174174 then true
175175 else (gameStep == 4))
176176 then true
177177 else (gameStep == 7))
178178 then true
179179 else (gameStep == 9))
180180 then "maker"
181181 else if (if (if (if (if ((gameStep == 1))
182182 then true
183183 else (gameStep == 2))
184184 then true
185185 else (gameStep == 5))
186186 then true
187187 else (gameStep == 6))
188188 then true
189189 else (gameStep == 8))
190190 then "taker"
191191 else "draw"
192192
193193
194194 func sendPrize (gameId,playerAddress,playerRole,winner) = {
195195 let makerAddress = getMaker(gameId)
196196 let takerAddress = getTaker(gameId)
197197 if (getPrizeSent(gameId, playerRole))
198198 then throw("You have already got the prize")
199199 else if ((winner == playerRole))
200200 then [IntegerEntry(getPlayerCurrentGameKey(makerAddress), 0), IntegerEntry(getPlayerCurrentGameKey(takerAddress), 0), BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, (getBetEggs(gameId) * 2), eggsAssetId)]
201201 else if ((winner == "draw"))
202202 then if ((playerRole == "maker"))
203203 then [IntegerEntry(getPlayerCurrentGameKey(makerAddress), 0), BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, getBetEggs(gameId), eggsAssetId)]
204204 else [IntegerEntry(getPlayerCurrentGameKey(takerAddress), 0), BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, getBetEggs(gameId), eggsAssetId)]
205205 else throw("You lose and don't have any prize")
206206 }
207207
208208
209209 @Callable(i)
210210 func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = {
211211 let callerAddress = toBase58String(i.caller.bytes)
212212 let slotGameId = getSlot(slot)
213213 let payment = value(i.payments[0])
214214 let eggs = (payment.amount - makerFee)
215215 let gameId = getNextGameId()
216216 if ((payment.assetId != eggsAssetId))
217217 then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId)))
218218 else if ((0 >= eggs))
219219 then throw("Not enough EGGs")
220220 else if ((getPlayerCurrentGame(callerAddress) != 0))
221221 then throw("You already have an active game")
222222 else if (if ((0 > slot))
223223 then true
224224 else (slot >= SLOTS))
225225 then throw("Invalid slot")
226226 else if ((slotGameId != 0))
227227 then throw("This slot is busy")
228228 else if (if ((1 > rarityRangeWorst))
229229 then true
230230 else (rarityRangeWorst > 5))
231231 then throw("Invalid rarity range for the worst duck")
232232 else if (if ((1 > rarityRangeMedium))
233233 then true
234234 else (rarityRangeMedium > 5))
235235 then throw("Invalid rarity range for the medium duck")
236236 else if (if ((1 > rarityRangeBest))
237237 then true
238238 else (rarityRangeBest > 5))
239239 then throw("Invalid rarity range for the best duck")
240240 else if ((rarityRangeWorst >= rarityRangeMedium))
241241 then throw("The medium duck must be better than the worst one")
242242 else if ((rarityRangeMedium >= rarityRangeBest))
243243 then throw("The best duck must be better than the medium one")
244244 else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), gameId), StringEntry(getMakerKey(gameId), callerAddress), 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("next_game_id", (gameId + 1))]
245245 }
246246
247247
248248
249249 @Callable(i)
250250 func takeGame (slot) = {
251251 let callerAddress = toBase58String(i.caller.bytes)
252252 let gameId = getSlot(slot)
253253 let payment = value(i.payments[0])
254254 if ((getSlot(slot) == 0))
255255 then throw("This slot is empty")
256256 else if ((payment.assetId != eggsAssetId))
257257 then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId)))
258258 else if ((payment.amount != (getBetEggs(gameId) + takerFee)))
259259 then throw("Insufficient eggs amount")
260260 else if ((getTaker(gameId) != ""))
261261 then throw("This game is already taken")
262262 else if ((height >= getWaitingExpirationHeight(gameId)))
263263 then throw("This game is expired")
264264 else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), gameId), StringEntry(getTakerKey(gameId), callerAddress), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration)), IntegerEntry(getSlotKey(slot), 0)]
265265 }
266266
267267
268268
269269 @Callable(i)
270270 func kickGame (slot) = {
271271 let gameId = getSlot(slot)
272272 if (if ((0 > slot))
273273 then true
274274 else (slot >= SLOTS))
275275 then throw("Invalid slot")
276276 else if ((gameId == 0))
277277 then throw("Slot is empty")
278278 else if ((getWaitingExpirationHeight(gameId) > height))
279279 then throw("Waiting is not finished yet")
280280 else if ((getTaker(gameId) != ""))
281281 then throw("This game is started")
282282 else {
283283 let maker = getMaker(gameId)
284284 [IntegerEntry(getPlayerCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(fromBase58String(maker)), (getBetEggs(gameId) + makerFee), eggsAssetId)]
285285 }
286286 }
287287
288288
289289
290290 @Callable(i)
291291 func pickWorstDuck (gameId) = {
292292 let callerAddress = toBase58String(i.caller.bytes)
293293 let assetId = value(value(i.payments[0]).assetId)
294294 let gameStep = getStep(gameId)
295295 if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
296296 then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
297297 else false)
298298 then throw("Invalid NFT")
299299 else if ((gameStep == 0))
300300 then if ((callerAddress != getTaker(gameId)))
301301 then throw("It is the taker's turn to pick now")
302302 else {
303303 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
304304 if ((invokeRes == invokeRes))
305305 then {
306306 let rarity = match invokeRes {
307307 case r: Int =>
308308 r
309309 case _ =>
310310 throw("Incorrect invoke result")
311311 }
312312 pickDuck(gameId, "taker", i.caller, assetId, rarity, "worst", 0)
313313 }
314314 else throw("Strict value is not equal to itself.")
315315 }
316316 else if ((gameStep == 1))
317317 then if ((callerAddress != getMaker(gameId)))
318318 then throw("It is the maker's turn to pick now")
319319 else {
320320 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
321321 if ((invokeRes == invokeRes))
322322 then {
323323 let rarity = match invokeRes {
324324 case r: Int =>
325325 r
326326 case _ =>
327327 throw("Incorrect invoke result")
328328 }
329329 pickDuck(gameId, "maker", i.caller, assetId, rarity, "worst", 1)
330330 }
331331 else throw("Strict value is not equal to itself.")
332332 }
333333 else throw("The worst duck has already been picked")
334334 }
335335
336336
337337
338338 @Callable(i)
339339 func pickMediumtDuck (gameId) = {
340340 let callerAddress = toBase58String(i.caller.bytes)
341341 let assetId = value(value(i.payments[0]).assetId)
342342 let gameStep = getStep(gameId)
343343 if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
344344 then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
345345 else false)
346346 then throw("Invalid NFT")
347347 else if ((2 > gameStep))
348348 then throw("The medium duck must be picked after the worst one")
349349 else if ((gameStep == 2))
350350 then if ((callerAddress != getMaker(gameId)))
351351 then throw("It is the maker's turn to pick now")
352352 else {
353353 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
354354 if ((invokeRes == invokeRes))
355355 then {
356356 let rarity = match invokeRes {
357357 case r: Int =>
358358 r
359359 case _ =>
360360 throw("Incorrect invoke result")
361361 }
362362 pickDuck(gameId, "maker", i.caller, assetId, rarity, "medium", 2)
363363 }
364364 else throw("Strict value is not equal to itself.")
365365 }
366366 else if ((gameStep == 3))
367367 then if ((callerAddress != getTaker(gameId)))
368368 then throw("It is the taker's turn to pick now")
369369 else {
370370 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
371371 if ((invokeRes == invokeRes))
372372 then {
373373 let rarity = match invokeRes {
374374 case r: Int =>
375375 r
376376 case _ =>
377377 throw("Incorrect invoke result")
378378 }
379379 pickDuck(gameId, "taker", i.caller, assetId, rarity, "medium", 3)
380380 }
381381 else throw("Strict value is not equal to itself.")
382382 }
383383 else throw("The medium duck has already been picked")
384384 }
385385
386386
387387
388388 @Callable(i)
389389 func pickBestDuck (gameId) = {
390390 let callerAddress = toBase58String(i.caller.bytes)
391391 let assetId = value(value(i.payments[0]).assetId)
392392 let gameStep = getStep(gameId)
393393 if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
394394 then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
395395 else false)
396396 then throw("Invalid NFT")
397397 else if ((4 > gameStep))
398398 then throw("The best duck must be picked after the worst and the medium ones")
399399 else if ((gameStep == 4))
400400 then if ((callerAddress != getTaker(gameId)))
401401 then throw("It is the taker's turn to pick now")
402402 else {
403403 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
404404 if ((invokeRes == invokeRes))
405405 then {
406406 let rarity = match invokeRes {
407407 case r: Int =>
408408 r
409409 case _ =>
410410 throw("Incorrect invoke result")
411411 }
412412 pickDuck(gameId, "taker", i.caller, assetId, rarity, "best", 4)
413413 }
414414 else throw("Strict value is not equal to itself.")
415415 }
416416 else if ((gameStep == 5))
417417 then if ((callerAddress != getMaker(gameId)))
418418 then throw("It is the maker's turn to pick now")
419419 else {
420420 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
421421 if ((invokeRes == invokeRes))
422422 then {
423423 let rarity = match invokeRes {
424424 case r: Int =>
425425 r
426426 case _ =>
427427 throw("Incorrect invoke result")
428428 }
429429 pickDuck(gameId, "maker", i.caller, assetId, rarity, "best", 5)
430430 }
431431 else throw("Strict value is not equal to itself.")
432432 }
433433 else throw("The best duck has already been picked")
434434 }
435435
436436
437437
438438 @Callable(i)
439439 func commit (gameId,hash) = {
440440 let callerAddress = toBase58String(i.caller.bytes)
441441 let gameStep = getStep(gameId)
442442 if ((6 > gameStep))
443443 then throw("Ducks hasn't been picked yet")
444444 else if ((gameStep == 6))
445445 then if ((callerAddress != getMaker(gameId)))
446446 then throw("It is the maker's turn to commit now")
447447 else [StringEntry(getCommitKey(gameId, "maker"), hash), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
448448 else if ((gameStep == 7))
449449 then if ((callerAddress != getTaker(gameId)))
450450 then throw("It is the taker's turn to commit now")
451451 else [StringEntry(getCommitKey(gameId, "taker"), hash), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
452452 else throw("Commit is finished")
453453 }
454454
455455
456456
457457 @Callable(i)
458458 func reveal (gameId,duckOrder,salt) = {
459459 let callerAddress = toBase58String(i.caller.bytes)
460460 let gameStep = getStep(gameId)
461461 if ((8 > gameStep))
462462 then throw("Reveal is not started")
463463 else if (if (if (if (if (if ((duckOrder != "worst,medium,best"))
464464 then true
465465 else (duckOrder != "worst,best,medium"))
466466 then true
467467 else (duckOrder != "medium,worst,best"))
468468 then true
469469 else (duckOrder != "medium,best,worst"))
470470 then true
471471 else (duckOrder != "best,worst,medium"))
472472 then true
473473 else (duckOrder != "best,medium,worst"))
474474 then throw("Invalid duckOrder")
475475 else if ((gameStep == 8))
476476 then if ((callerAddress != getMaker(gameId)))
477477 then throw("It is the maker's turn to reveal now")
478478 else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "maker")))
479479 then throw("reveal data is not valid")
480480 else [StringEntry(getDuckOrderKey(gameId, "maker"), duckOrder), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
481481 else if ((gameStep == 9))
482482 then if ((callerAddress != getTaker(gameId)))
483483 then throw("It is the taker's turn to reveal now")
484484 else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "taker")))
485485 then throw("reveal data is not valid")
486486 else [StringEntry(getDuckOrderKey(gameId, "taker"), duckOrder), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))]
487487 else throw("Reveal is finished")
488488 }
489489
490490
491491
492492 @Callable(i)
493493 func getPrize (gameId) = {
494494 let callerAddress = toBase58String(i.caller.bytes)
495495 let gameStep = getStep(gameId)
496496 if ((gameStep != 10))
497497 then throw("Game is not finished")
498498 else if ((callerAddress == getMaker(gameId)))
499499 then sendPrize(gameId, i.caller, "maker", getWinner(gameId))
500500 else if ((callerAddress == getTaker(gameId)))
501501 then sendPrize(gameId, i.caller, "taker", getWinner(gameId))
502502 else throw("Invalid caller address")
503503 }
504504
505505
506506
507507 @Callable(i)
508508 func getPrizeExpired (gameId) = {
509509 let callerAddress = toBase58String(i.caller.bytes)
510510 let gameStep = getStep(gameId)
511511 if ((gameStep == 10))
512512 then throw("Game is finished, call getPrize instead")
513513 else if ((getExpirationHeight(gameId) > height))
514514 then throw("Game is not expired")
515515 else if ((callerAddress == getMaker(gameId)))
516516 then sendPrize(gameId, i.caller, "maker", getWinnerExpired(gameStep))
517517 else if ((callerAddress == getTaker(gameId)))
518518 then sendPrize(gameId, i.caller, "taker", getWinnerExpired(gameStep))
519519 else throw("Invalid caller address")
520520 }
521521
522522
523523 @Verifier(tx)
524524 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
525525

github/deemru/w8io/169f3d6 
75.68 ms