tx · CBwC6AtuALBkQ92ondLn5A3mtvhJ5UGhbJwNHYZ29pDv

3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB:  -0.01000000 Waves

2021.08.19 15:09 [1665219] smart account 3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB > SELF 0.00000000 Waves

{ "type": 13, "id": "CBwC6AtuALBkQ92ondLn5A3mtvhJ5UGhbJwNHYZ29pDv", "fee": 1000000, "feeAssetId": null, "timestamp": 1629374976983, "version": 2, "chainId": 84, "sender": "3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB", "senderPublicKey": "9Vbnf3b9hhuCerzPXf38mLo8mUGTPNVW3jtQRbymjaSw", "proofs": [ "5WMHfjDTPPCruKDmshGoAVvxgsNiXr5HdoQT3JPrfg15j3FYmpDC2iZL1TU2ZmRGowLaBLhvdrbTgHP8fn3uo6Dd" ], "script": "base64:AAIFAAAAAAAAADoIAhIGCgQBAQEBEgMKAQESAwoBARIDCgEBEgMKAQESAwoBARIECgIBCBIFCgMBCAgSAwoBARIDCgEBAAAALAAAAAAQaW5jdWJhdG9yQWRkcmVzcwEAAAAaAVeMtUiffp4V1RiXjht3+wl/Z2La4W1jJUkAAAAADmJyZWVkZXJBZGRyZXNzAQAAABoBV37nuflxxEx4XH14e4ZxgkMVpnlqD7YfHgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAAAAAAAALZWdnc0Fzc2V0SWQBAAAAIP95R1BUUNh9HFX0EUDspUcxpBhcbNeBV9CDaUzAvZfwAAAAAAhtYWtlckZlZQAAAAAAAAAAAQAAAAAIdGFrZXJGZWUAAAAAAAAAAAEAAAAABVNMT1RTAAAAAAAAAAAKAAAAAAdXQUlUSU5HAAAAAAAAAAAFAAAAAAxzdGVwRHVyYXRpb24AAAAAAAAAAAMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXR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AAAABW1ha2VyCQEAAAAQZ2V0V2lubmVyRXhwaXJlZAAAAAEFAAAACGdhbWVTdGVwAwkAAAAAAAACBQAAAA1jYWxsZXJBZGRyZXNzCQEAAAAMZ2V0R2FtZVRha2VyAAAAAQUAAAAGZ2FtZUlkCQEAAAAJc2VuZFByaXplAAAABAUAAAAGZ2FtZUlkCAUAAAABaQAAAAZjYWxsZXICAAAABXRha2VyCQEAAAAQZ2V0V2lubmVyRXhwaXJlZAAAAAEFAAAACGdhbWVTdGVwCQAAAgAAAAECAAAAFkludmFsaWQgY2FsbGVyIGFkZHJlc3MAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefL3SgM=", "height": 1665219, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: Y4n6CNaHLGhmgic5CfGH5Ux1MEDL2j2swvX64QS4odX Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let incubatorAddress = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv'
5+
6+let breederAddress = base58'3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb'
7+
8+let farmingAddress = base58''
9+
10+let eggsAssetId = base58'JCGDtrVy64cCJ1wCKfCaiNQMnyYwii71TbE5QeAHfxgF'
11+
12+let makerFee = 1
13+
14+let takerFee = 1
15+
16+let SLOTS = 10
17+
18+let WAITING = 5
19+
20+let stepDuration = 3
21+
22+func tryGetInteger (key) = match getInteger(this, key) {
23+ case b: Int =>
24+ b
25+ case _ =>
26+ 0
27+}
28+
29+
30+func tryGetString (key) = match getString(this, key) {
31+ case a: String =>
32+ a
33+ case _ =>
34+ ""
35+}
36+
37+
38+func tryGetBoolean (key) = match getBoolean(this, key) {
39+ case b: Boolean =>
40+ b
41+ case _ =>
42+ false
43+}
44+
45+
46+func getNextGameId () = {
47+ let nextId = tryGetInteger("next_game_id")
48+ if ((nextId == 0))
49+ then 1
50+ else nextId
51+ }
52+
53+
54+func getUserCurrentGameKey (address) = ("current_game_" + address)
55+
56+
57+func getUserCurrentGame (address) = tryGetInteger(getUserCurrentGameKey(address))
58+
59+
60+func getSlotKey (slot) = ("slot_" + toString(slot))
61+
62+
63+func getSlot (slot) = tryGetInteger(getSlotKey(slot))
64+
65+
66+func getGameMakerKey (gameId) = (("game_" + toString(gameId)) + "_maker")
67+
68+
69+func getGameMaker (gameId) = tryGetString(getGameMakerKey(gameId))
70+
71+
72+func getGameTakerKey (gameId) = (("game_" + toString(gameId)) + "_taker")
73+
74+
75+func getGameTaker (gameId) = tryGetString(getGameTakerKey(gameId))
76+
77+
78+func getBetEggsKey (gameId) = (("game_" + toString(gameId)) + "_bet_eggs")
79+
80+
81+func getBetEggs (gameId) = tryGetInteger(getBetEggsKey(gameId))
82+
83+
84+func getGameWaitingEndHeightKey (gameId) = (("game_" + toString(gameId)) + "_waiting_end_height")
85+
86+
87+func getGameWaitingEndHeight (gameId) = tryGetInteger(getGameWaitingEndHeightKey(gameId))
88+
89+
90+func getGameOverHeightKey (gameId) = (("game_" + toString(gameId)) + "_over_height")
91+
92+
93+func getGameOverHeight (gameId) = tryGetInteger(getGameWaitingEndHeightKey(gameId))
94+
95+
96+func getGameRarityRangeKey (gameId,rangePosition) = ((("game_" + toString(gameId)) + "_rarityRange_") + rangePosition)
97+
98+
99+func getGameRarityRange (gameId,rangePosition) = tryGetInteger(getGameRarityRangeKey(gameId, rangePosition))
100+
101+
102+func getGameStepKey (gameId) = (("game_" + toString(gameId)) + "_step")
103+
104+
105+func getGameStep (gameId) = tryGetInteger(getGameStepKey(gameId))
106+
107+
108+func getRarityKey (gameId,player,rangePosition) = (((((("game_" + toString(gameId)) + "_") + player) + "_") + rangePosition) + "Rarity")
109+
110+
111+func getRarity (gameId,player,rangePosition) = tryGetInteger(getRarityKey(gameId, player, rangePosition))
112+
113+
114+func getCommitKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_commit")
115+
116+
117+func getCommit (gameId,player) = tryGetString(getCommitKey(gameId, player))
118+
119+
120+func getDuckOrderKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_duckOrder")
121+
122+
123+func getDuckOrder (gameId,player) = tryGetString(getDuckOrderKey(gameId, player))
124+
125+
126+func getPrizeSentKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_withdrawStatus")
127+
128+
129+func getPrizeSent (gameId,player) = tryGetBoolean(getPrizeSentKey(gameId, player))
130+
131+
132+func pickDuck (gameId,playerRole,playerAddress,assetId,rarity,rangePosition,step) = {
133+ let rarityRange = getGameRarityRange(gameId, rangePosition)
134+ if (if (if (if ((rarityRange == 5))
135+ then (40 > rarity)
136+ else false)
137+ then true
138+ else (rarity >= (rarityRange * 10)))
139+ then true
140+ else (((rarityRange - 1) * 10) > rarity))
141+ then throw("This duck doesn't fit the rarity range")
142+ else [IntegerEntry(getRarityKey(gameId, playerRole, rangePosition), rarity), IntegerEntry(getGameStepKey(gameId), (step + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration)), ScriptTransfer(playerAddress, 1, assetId)]
143+ }
144+
145+
146+func getScore (a,b) = if ((a > b))
147+ then 1
148+ else if ((b > a))
149+ then -1
150+ else 0
151+
152+
153+func getWinner (gameId) = {
154+ let makerDuckOrder = split(getDuckOrder(gameId, "maker"), ",")
155+ let takerDuckOrder = split(getDuckOrder(gameId, "taker"), ",")
156+ let makerRarity1 = getRarity(gameId, "maker", makerDuckOrder[0])
157+ let makerRarity2 = getRarity(gameId, "maker", makerDuckOrder[1])
158+ let makerRarity3 = getRarity(gameId, "maker", makerDuckOrder[2])
159+ let takerRarity1 = getRarity(gameId, "taker", makerDuckOrder[0])
160+ let takerRarity2 = getRarity(gameId, "taker", makerDuckOrder[1])
161+ let takerRarity3 = getRarity(gameId, "taker", makerDuckOrder[2])
162+ let makerScore = ((getScore(makerRarity1, takerRarity1) + getScore(makerRarity2, takerRarity2)) + getScore(makerRarity3, takerRarity3))
163+ if ((makerScore > 0))
164+ then "maker"
165+ else if ((0 > makerScore))
166+ then "taker"
167+ else "draw"
168+ }
169+
170+
171+func getWinnerExpired (gameStep) = if (if (if (if (if ((gameStep == 0))
172+ then true
173+ else (gameStep == 3))
174+ then true
175+ else (gameStep == 4))
176+ then true
177+ else (gameStep == 7))
178+ then true
179+ else (gameStep == 9))
180+ then "maker"
181+ else if (if (if (if (if ((gameStep == 1))
182+ then true
183+ else (gameStep == 2))
184+ then true
185+ else (gameStep == 5))
186+ then true
187+ else (gameStep == 6))
188+ then true
189+ else (gameStep == 8))
190+ then "taker"
191+ else "draw"
192+
193+
194+func sendPrize (gameId,playerAddress,playerRole,winner) = if (getPrizeSent(gameId, playerRole))
195+ then throw("You have already got the prize")
196+ else if ((winner == playerRole))
197+ then [BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, (getBetEggs(gameId) * 2), eggsAssetId)]
198+ else if ((winner == "draw"))
199+ then [BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, getBetEggs(gameId), eggsAssetId)]
200+ else throw("You lose and don't have any prize")
201+
202+
203+@Callable(i)
204+func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = {
205+ let callerAddress = toBase58String(i.caller.bytes)
206+ let slotGameId = getSlot(slot)
207+ let payment = value(i.payments[0])
208+ let eggs = (payment.amount - makerFee)
209+ let gameId = getNextGameId()
210+ if ((payment.assetId != eggsAssetId))
211+ then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId)))
212+ else if ((0 > eggs))
213+ then throw("Not enough EGGs")
214+ else if ((eggs == 0))
215+ then throw("You can't bet 0 EGGs")
216+ else if ((getUserCurrentGame(callerAddress) != 0))
217+ then throw("You already have an active game")
218+ else if (if ((0 > slot))
219+ then true
220+ else (slot >= SLOTS))
221+ then throw("Invalid slot")
222+ else if ((slotGameId != 0))
223+ then throw("This slot is busy")
224+ else if (if ((1 > rarityRangeWorst))
225+ then true
226+ else (rarityRangeWorst > 5))
227+ then throw("Insufficient rarity range for the worst duck")
228+ else if (if ((1 > rarityRangeMedium))
229+ then true
230+ else (rarityRangeMedium > 5))
231+ then throw("Insufficient rarity range for the medium duck")
232+ else if (if ((1 > rarityRangeBest))
233+ then true
234+ else (rarityRangeBest > 5))
235+ then throw("Insufficient rarity range for the best duck")
236+ else if ((rarityRangeWorst >= rarityRangeMedium))
237+ then throw("The medium duck must be better than the worst one")
238+ else if ((rarityRangeMedium >= rarityRangeBest))
239+ then throw("The best duck must be better than the medium one")
240+ else [IntegerEntry(getUserCurrentGameKey(callerAddress), gameId), StringEntry(getGameMakerKey(gameId), callerAddress), IntegerEntry(getBetEggsKey(gameId), eggs), IntegerEntry(getGameRarityRangeKey(gameId, "worst"), rarityRangeWorst), IntegerEntry(getGameRarityRangeKey(gameId, "medium"), rarityRangeMedium), IntegerEntry(getGameRarityRangeKey(gameId, "best"), rarityRangeBest), IntegerEntry(getGameWaitingEndHeightKey(gameId), (height + WAITING)), IntegerEntry(getSlotKey(slot), gameId), IntegerEntry("next_game_id", (gameId + 1))]
241+ }
242+
243+
244+
245+@Callable(i)
246+func takeGame (slot) = {
247+ let callerAddress = toBase58String(i.caller.bytes)
248+ let gameId = getSlot(slot)
249+ let payment = value(i.payments[0])
250+ if ((getSlot(slot) == 0))
251+ then throw("This slot is empty")
252+ else if ((payment.assetId != eggsAssetId))
253+ then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId)))
254+ else if ((payment.amount != (getBetEggs(gameId) + takerFee)))
255+ then throw("Insufficient eggs amount")
256+ else if ((getGameTaker(gameId) != ""))
257+ then throw("This game is already taken")
258+ else if ((height >= getGameWaitingEndHeight(gameId)))
259+ then throw("This game is expired")
260+ else [IntegerEntry(getUserCurrentGameKey(callerAddress), gameId), StringEntry(getGameTakerKey(gameId), callerAddress), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration)), IntegerEntry(getSlotKey(slot), 0)]
261+ }
262+
263+
264+
265+@Callable(i)
266+func kickGame (slot) = {
267+ let gameId = getSlot(slot)
268+ if (if ((0 > slot))
269+ then true
270+ else (slot >= SLOTS))
271+ then throw("Invalid slot")
272+ else if ((gameId == 0))
273+ then throw("Slot is empty")
274+ else if ((getGameWaitingEndHeight(gameId) > height))
275+ then throw("Waiting is not finished yet")
276+ else if ((getGameTaker(gameId) != ""))
277+ then throw("This game is started")
278+ else {
279+ let maker = getGameMaker(gameId)
280+[IntegerEntry(getUserCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(toBytes(maker)), (getBetEggs(gameId) + makerFee), eggsAssetId)]
281+ }
282+ }
283+
284+
285+
286+@Callable(i)
287+func pickWorstDuck (gameId) = {
288+ let callerAddress = toBase58String(i.caller.bytes)
289+ let assetId = value(value(i.payments[0]).assetId)
290+ let gameStep = getGameStep(gameId)
291+ if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
292+ then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
293+ else false)
294+ then throw("Invalid NFT")
295+ else if ((gameStep == 0))
296+ then if ((callerAddress != getGameTaker(gameId)))
297+ then throw("It is the taker's turn to pick now")
298+ else {
299+ let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
300+ if ((invokeRes == invokeRes))
301+ then {
302+ let rarity = match invokeRes {
303+ case r: Int =>
304+ r
305+ case _ =>
306+ throw("Incorrect invoke result")
307+ }
308+ pickDuck(gameId, "taker", i.caller, assetId, rarity, "worst", 0)
309+ }
310+ else throw("Strict value is not equal to itself.")
311+ }
312+ else if ((gameStep == 1))
313+ then if ((callerAddress != getGameMaker(gameId)))
314+ then throw("It is the maker's turn to pick now")
315+ else {
316+ let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
317+ if ((invokeRes == invokeRes))
318+ then {
319+ let rarity = match invokeRes {
320+ case r: Int =>
321+ r
322+ case _ =>
323+ throw("Incorrect invoke result")
324+ }
325+ pickDuck(gameId, "maker", i.caller, assetId, rarity, "worst", 1)
326+ }
327+ else throw("Strict value is not equal to itself.")
328+ }
329+ else throw("The worst duck has already been picked")
330+ }
331+
332+
333+
334+@Callable(i)
335+func pickMediumtDuck (gameId) = {
336+ let callerAddress = toBase58String(i.caller.bytes)
337+ let assetId = value(value(i.payments[0]).assetId)
338+ let gameStep = getGameStep(gameId)
339+ if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
340+ then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
341+ else false)
342+ then throw("Invalid NFT")
343+ else if ((2 > gameStep))
344+ then throw("The medium duck must be picked after the worst one")
345+ else if ((gameStep == 2))
346+ then if ((callerAddress != getGameMaker(gameId)))
347+ then throw("It is the maker's turn to pick now")
348+ else {
349+ let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
350+ if ((invokeRes == invokeRes))
351+ then {
352+ let rarity = match invokeRes {
353+ case r: Int =>
354+ r
355+ case _ =>
356+ throw("Incorrect invoke result")
357+ }
358+ pickDuck(gameId, "maker", i.caller, assetId, rarity, "medium", 2)
359+ }
360+ else throw("Strict value is not equal to itself.")
361+ }
362+ else if ((gameStep == 3))
363+ then if ((callerAddress != getGameTaker(gameId)))
364+ then throw("It is the taker's turn to pick now")
365+ else {
366+ let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
367+ if ((invokeRes == invokeRes))
368+ then {
369+ let rarity = match invokeRes {
370+ case r: Int =>
371+ r
372+ case _ =>
373+ throw("Incorrect invoke result")
374+ }
375+ pickDuck(gameId, "taker", i.caller, assetId, rarity, "medium", 3)
376+ }
377+ else throw("Strict value is not equal to itself.")
378+ }
379+ else throw("The medium duck has already been picked")
380+ }
381+
382+
383+
384+@Callable(i)
385+func pickBestDuck (gameId) = {
386+ let callerAddress = toBase58String(i.caller.bytes)
387+ let assetId = value(value(i.payments[0]).assetId)
388+ let gameStep = getGameStep(gameId)
389+ if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
390+ then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
391+ else false)
392+ then throw("Invalid NFT")
393+ else if ((4 > gameStep))
394+ then throw("The best duck must be picked after the worst and the medium ones")
395+ else if ((gameStep == 4))
396+ then if ((callerAddress != getGameTaker(gameId)))
397+ then throw("It is the taker's turn to pick now")
398+ else {
399+ let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
400+ if ((invokeRes == invokeRes))
401+ then {
402+ let rarity = match invokeRes {
403+ case r: Int =>
404+ r
405+ case _ =>
406+ throw("Incorrect invoke result")
407+ }
408+ pickDuck(gameId, "taker", i.caller, assetId, rarity, "best", 4)
409+ }
410+ else throw("Strict value is not equal to itself.")
411+ }
412+ else if ((gameStep == 5))
413+ then if ((callerAddress != getGameMaker(gameId)))
414+ then throw("It is the maker's turn to pick now")
415+ else {
416+ let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
417+ if ((invokeRes == invokeRes))
418+ then {
419+ let rarity = match invokeRes {
420+ case r: Int =>
421+ r
422+ case _ =>
423+ throw("Incorrect invoke result")
424+ }
425+ pickDuck(gameId, "maker", i.caller, assetId, rarity, "best", 5)
426+ }
427+ else throw("Strict value is not equal to itself.")
428+ }
429+ else throw("The best duck has already been picked")
430+ }
431+
432+
433+
434+@Callable(i)
435+func commit (gameId,hash) = {
436+ let callerAddress = toBase58String(i.caller.bytes)
437+ let gameStep = getGameStep(gameId)
438+ if ((6 > gameStep))
439+ then throw("Ducks hasn't been picked yet")
440+ else if ((gameStep == 6))
441+ then if ((callerAddress != getGameMaker(gameId)))
442+ then throw("It is the maker's turn to commit now")
443+ else [StringEntry(getCommitKey(gameId, "maker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
444+ else if ((gameStep == 7))
445+ then if ((callerAddress != getGameTaker(gameId)))
446+ then throw("It is the taker's turn to commit now")
447+ else [StringEntry(getCommitKey(gameId, "taker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
448+ else throw("Commit is finished")
449+ }
450+
451+
452+
453+@Callable(i)
454+func reveal (gameId,duckOrder,salt) = {
455+ let callerAddress = toBase58String(i.caller.bytes)
456+ let gameStep = getGameStep(gameId)
457+ if ((8 > gameStep))
458+ then throw("Reveal is not started")
459+ else if (if (if (if (if (if ((duckOrder != "worst,medium,best"))
460+ then true
461+ else (duckOrder != "worst,best,medium"))
462+ then true
463+ else (duckOrder != "medium,worst,best"))
464+ then true
465+ else (duckOrder != "medium,best,worst"))
466+ then true
467+ else (duckOrder != "best,worst,medium"))
468+ then true
469+ else (duckOrder != "best,medium,worst"))
470+ then throw("Invalid duckOrder")
471+ else if ((gameStep == 8))
472+ then if ((callerAddress != getGameMaker(gameId)))
473+ then throw("It is the maker's turn to reveal now")
474+ else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "maker")))
475+ then throw("reveal data is not valid")
476+ else [StringEntry(getDuckOrderKey(gameId, "maker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
477+ else if ((gameStep == 9))
478+ then if ((callerAddress != getGameTaker(gameId)))
479+ then throw("It is the taker's turn to reveal now")
480+ else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "taker")))
481+ then throw("reveal data is not valid")
482+ else [StringEntry(getDuckOrderKey(gameId, "taker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
483+ else throw("Reveal is finished")
484+ }
485+
486+
487+
488+@Callable(i)
489+func getPrize (gameId) = {
490+ let callerAddress = toBase58String(i.caller.bytes)
491+ let gameStep = getGameStep(gameId)
492+ if ((gameStep != 10))
493+ then throw("Game is not finished")
494+ else if ((callerAddress == getGameMaker(gameId)))
495+ then sendPrize(gameId, i.caller, "maker", getWinner(gameId))
496+ else if ((callerAddress == getGameTaker(gameId)))
497+ then sendPrize(gameId, i.caller, "taker", getWinner(gameId))
498+ else throw("Invalid caller address")
499+ }
500+
501+
502+
503+@Callable(i)
504+func getPrizeExpired (gameId) = {
505+ let callerAddress = toBase58String(i.caller.bytes)
506+ let gameStep = getGameStep(gameId)
507+ if ((gameStep == 10))
508+ then throw("Game is finished, call getPrize instead")
509+ else if ((getGameOverHeight(gameId) > height))
510+ then throw("Game is not expired")
511+ else if ((callerAddress == getGameMaker(gameId)))
512+ then sendPrize(gameId, i.caller, "maker", getWinnerExpired(gameStep))
513+ else if ((callerAddress == getGameTaker(gameId)))
514+ then sendPrize(gameId, i.caller, "taker", getWinnerExpired(gameStep))
515+ else throw("Invalid caller address")
516+ }
517+
518+
519+@Verifier(tx)
520+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
521+

github/deemru/w8io/026f985 
32.57 ms