tx · Y4n6CNaHLGhmgic5CfGH5Ux1MEDL2j2swvX64QS4odX

3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB:  -0.05000000 Waves

2021.08.19 15:35 [1665244] smart account 3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB > SELF 0.00000000 Waves

{ "type": 13, "id": "Y4n6CNaHLGhmgic5CfGH5Ux1MEDL2j2swvX64QS4odX", "fee": 5000000, "feeAssetId": null, "timestamp": 1629376587097, "version": 2, "chainId": 84, "sender": "3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB", "senderPublicKey": "9Vbnf3b9hhuCerzPXf38mLo8mUGTPNVW3jtQRbymjaSw", "proofs": [ "2BBpkKLBnFJNzF74RhDuhLYFgH9BQG8BRN1oTtCBSHDh1Ti7A7mWLXpNWbppNbh7BNdDzVKF3KtzzAZMhAEmHxrP" ], "script": "base64:AAIFAAAAAAAAADoIAhIGCgQBAQEBEgMKAQESAwoBARIDCgEBEgMKAQESAwoBARIECgIBCBIFCgMBCAgSAwoBARIDCgEBAAAALAAAAAAQaW5jdWJhdG9yQWRkcmVzcwEAAAAaAVQu1YzRxAHn1ekAzs1AJJ6xFAc06V7PK6oAAAAADmJyZWVkZXJBZGRyZXNzAQAAABoBVC7VjNHEAefV6QDOzUAknrEUBzTpXs8rqgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAGgFU8jY5wCvKx9IdZ1jq9byeNi+peiAgajPTAAAAAAtlZ2dzQXNzZXRJZAEAAAAgJQJlzPcEaMi+AVmReOVYWjhmFBOtSkxKt/4FF0gXFoMAAAAACG1ha2VyRmVlAAAAAAAAAAABAAAAAAh0YWtlckZlZQAAAAAAAAAAAQAAAAAFU0xPVFMAAAAAAAAAAAoAAAAAB1dBSVRJTkcAAAAAAAAAAAUAAAAADHN0ZXBEdXJhdGlvbgAAAAAAAAAAAwEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAA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AQAAAAlzZW5kUHJpemUAAAAEBQAAAAZnYW1lSWQIBQAAAAFpAAAABmNhbGxlcgIAAAAFbWFrZXIJAQAAABBnZXRXaW5uZXJFeHBpcmVkAAAAAQUAAAAIZ2FtZVN0ZXADCQAAAAAAAAIFAAAADWNhbGxlckFkZHJlc3MJAQAAAAxnZXRHYW1lVGFrZXIAAAABBQAAAAZnYW1lSWQJAQAAAAlzZW5kUHJpemUAAAAEBQAAAAZnYW1lSWQIBQAAAAFpAAAABmNhbGxlcgIAAAAFdGFrZXIJAQAAABBnZXRXaW5uZXJFeHBpcmVkAAAAAQUAAAAIZ2FtZVN0ZXAJAAACAAAAAQIAAAAWSW52YWxpZCBjYWxsZXIgYWRkcmVzcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5GsaIKA==", "height": 1665244, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CBwC6AtuALBkQ92ondLn5A3mtvhJ5UGhbJwNHYZ29pDv Next: GZimgHcdbPNpBBjH8Pque7HKwwUd7FMekniimPBTyazv Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let incubatorAddress = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv'
4+let incubatorAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh'
55
6-let breederAddress = base58'3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb'
6+let breederAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh'
77
8-let farmingAddress = base58''
8+let farmingAddress = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC'
99
10-let eggsAssetId = base58'JCGDtrVy64cCJ1wCKfCaiNQMnyYwii71TbE5QeAHfxgF'
10+let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN'
1111
1212 let makerFee = 1
1313
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let incubatorAddress = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv'
4+let incubatorAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh'
55
6-let breederAddress = base58'3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb'
6+let breederAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh'
77
8-let farmingAddress = base58''
8+let farmingAddress = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC'
99
10-let eggsAssetId = base58'JCGDtrVy64cCJ1wCKfCaiNQMnyYwii71TbE5QeAHfxgF'
10+let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN'
1111
1212 let makerFee = 1
1313
1414 let takerFee = 1
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("next_game_id")
4848 if ((nextId == 0))
4949 then 1
5050 else nextId
5151 }
5252
5353
5454 func getUserCurrentGameKey (address) = ("current_game_" + address)
5555
5656
5757 func getUserCurrentGame (address) = tryGetInteger(getUserCurrentGameKey(address))
5858
5959
6060 func getSlotKey (slot) = ("slot_" + toString(slot))
6161
6262
6363 func getSlot (slot) = tryGetInteger(getSlotKey(slot))
6464
6565
6666 func getGameMakerKey (gameId) = (("game_" + toString(gameId)) + "_maker")
6767
6868
6969 func getGameMaker (gameId) = tryGetString(getGameMakerKey(gameId))
7070
7171
7272 func getGameTakerKey (gameId) = (("game_" + toString(gameId)) + "_taker")
7373
7474
7575 func getGameTaker (gameId) = tryGetString(getGameTakerKey(gameId))
7676
7777
7878 func getBetEggsKey (gameId) = (("game_" + toString(gameId)) + "_bet_eggs")
7979
8080
8181 func getBetEggs (gameId) = tryGetInteger(getBetEggsKey(gameId))
8282
8383
8484 func getGameWaitingEndHeightKey (gameId) = (("game_" + toString(gameId)) + "_waiting_end_height")
8585
8686
8787 func getGameWaitingEndHeight (gameId) = tryGetInteger(getGameWaitingEndHeightKey(gameId))
8888
8989
9090 func getGameOverHeightKey (gameId) = (("game_" + toString(gameId)) + "_over_height")
9191
9292
9393 func getGameOverHeight (gameId) = tryGetInteger(getGameWaitingEndHeightKey(gameId))
9494
9595
9696 func getGameRarityRangeKey (gameId,rangePosition) = ((("game_" + toString(gameId)) + "_rarityRange_") + rangePosition)
9797
9898
9999 func getGameRarityRange (gameId,rangePosition) = tryGetInteger(getGameRarityRangeKey(gameId, rangePosition))
100100
101101
102102 func getGameStepKey (gameId) = (("game_" + toString(gameId)) + "_step")
103103
104104
105105 func getGameStep (gameId) = tryGetInteger(getGameStepKey(gameId))
106106
107107
108108 func getRarityKey (gameId,player,rangePosition) = (((((("game_" + toString(gameId)) + "_") + player) + "_") + rangePosition) + "Rarity")
109109
110110
111111 func getRarity (gameId,player,rangePosition) = tryGetInteger(getRarityKey(gameId, player, rangePosition))
112112
113113
114114 func getCommitKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_commit")
115115
116116
117117 func getCommit (gameId,player) = tryGetString(getCommitKey(gameId, player))
118118
119119
120120 func getDuckOrderKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_duckOrder")
121121
122122
123123 func getDuckOrder (gameId,player) = tryGetString(getDuckOrderKey(gameId, player))
124124
125125
126126 func getPrizeSentKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_withdrawStatus")
127127
128128
129129 func getPrizeSent (gameId,player) = tryGetBoolean(getPrizeSentKey(gameId, player))
130130
131131
132132 func pickDuck (gameId,playerRole,playerAddress,assetId,rarity,rangePosition,step) = {
133133 let rarityRange = getGameRarityRange(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(getGameStepKey(gameId), (step + 1)), IntegerEntry(getGameOverHeightKey(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) = if (getPrizeSent(gameId, playerRole))
195195 then throw("You have already got the prize")
196196 else if ((winner == playerRole))
197197 then [BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, (getBetEggs(gameId) * 2), eggsAssetId)]
198198 else if ((winner == "draw"))
199199 then [BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, getBetEggs(gameId), eggsAssetId)]
200200 else throw("You lose and don't have any prize")
201201
202202
203203 @Callable(i)
204204 func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = {
205205 let callerAddress = toBase58String(i.caller.bytes)
206206 let slotGameId = getSlot(slot)
207207 let payment = value(i.payments[0])
208208 let eggs = (payment.amount - makerFee)
209209 let gameId = getNextGameId()
210210 if ((payment.assetId != eggsAssetId))
211211 then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId)))
212212 else if ((0 > eggs))
213213 then throw("Not enough EGGs")
214214 else if ((eggs == 0))
215215 then throw("You can't bet 0 EGGs")
216216 else if ((getUserCurrentGame(callerAddress) != 0))
217217 then throw("You already have an active game")
218218 else if (if ((0 > slot))
219219 then true
220220 else (slot >= SLOTS))
221221 then throw("Invalid slot")
222222 else if ((slotGameId != 0))
223223 then throw("This slot is busy")
224224 else if (if ((1 > rarityRangeWorst))
225225 then true
226226 else (rarityRangeWorst > 5))
227227 then throw("Insufficient rarity range for the worst duck")
228228 else if (if ((1 > rarityRangeMedium))
229229 then true
230230 else (rarityRangeMedium > 5))
231231 then throw("Insufficient rarity range for the medium duck")
232232 else if (if ((1 > rarityRangeBest))
233233 then true
234234 else (rarityRangeBest > 5))
235235 then throw("Insufficient rarity range for the best duck")
236236 else if ((rarityRangeWorst >= rarityRangeMedium))
237237 then throw("The medium duck must be better than the worst one")
238238 else if ((rarityRangeMedium >= rarityRangeBest))
239239 then throw("The best duck must be better than the medium one")
240240 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))]
241241 }
242242
243243
244244
245245 @Callable(i)
246246 func takeGame (slot) = {
247247 let callerAddress = toBase58String(i.caller.bytes)
248248 let gameId = getSlot(slot)
249249 let payment = value(i.payments[0])
250250 if ((getSlot(slot) == 0))
251251 then throw("This slot is empty")
252252 else if ((payment.assetId != eggsAssetId))
253253 then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId)))
254254 else if ((payment.amount != (getBetEggs(gameId) + takerFee)))
255255 then throw("Insufficient eggs amount")
256256 else if ((getGameTaker(gameId) != ""))
257257 then throw("This game is already taken")
258258 else if ((height >= getGameWaitingEndHeight(gameId)))
259259 then throw("This game is expired")
260260 else [IntegerEntry(getUserCurrentGameKey(callerAddress), gameId), StringEntry(getGameTakerKey(gameId), callerAddress), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration)), IntegerEntry(getSlotKey(slot), 0)]
261261 }
262262
263263
264264
265265 @Callable(i)
266266 func kickGame (slot) = {
267267 let gameId = getSlot(slot)
268268 if (if ((0 > slot))
269269 then true
270270 else (slot >= SLOTS))
271271 then throw("Invalid slot")
272272 else if ((gameId == 0))
273273 then throw("Slot is empty")
274274 else if ((getGameWaitingEndHeight(gameId) > height))
275275 then throw("Waiting is not finished yet")
276276 else if ((getGameTaker(gameId) != ""))
277277 then throw("This game is started")
278278 else {
279279 let maker = getGameMaker(gameId)
280280 [IntegerEntry(getUserCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(toBytes(maker)), (getBetEggs(gameId) + makerFee), eggsAssetId)]
281281 }
282282 }
283283
284284
285285
286286 @Callable(i)
287287 func pickWorstDuck (gameId) = {
288288 let callerAddress = toBase58String(i.caller.bytes)
289289 let assetId = value(value(i.payments[0]).assetId)
290290 let gameStep = getGameStep(gameId)
291291 if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
292292 then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
293293 else false)
294294 then throw("Invalid NFT")
295295 else if ((gameStep == 0))
296296 then if ((callerAddress != getGameTaker(gameId)))
297297 then throw("It is the taker's turn to pick now")
298298 else {
299299 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
300300 if ((invokeRes == invokeRes))
301301 then {
302302 let rarity = match invokeRes {
303303 case r: Int =>
304304 r
305305 case _ =>
306306 throw("Incorrect invoke result")
307307 }
308308 pickDuck(gameId, "taker", i.caller, assetId, rarity, "worst", 0)
309309 }
310310 else throw("Strict value is not equal to itself.")
311311 }
312312 else if ((gameStep == 1))
313313 then if ((callerAddress != getGameMaker(gameId)))
314314 then throw("It is the maker's turn to pick now")
315315 else {
316316 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
317317 if ((invokeRes == invokeRes))
318318 then {
319319 let rarity = match invokeRes {
320320 case r: Int =>
321321 r
322322 case _ =>
323323 throw("Incorrect invoke result")
324324 }
325325 pickDuck(gameId, "maker", i.caller, assetId, rarity, "worst", 1)
326326 }
327327 else throw("Strict value is not equal to itself.")
328328 }
329329 else throw("The worst duck has already been picked")
330330 }
331331
332332
333333
334334 @Callable(i)
335335 func pickMediumtDuck (gameId) = {
336336 let callerAddress = toBase58String(i.caller.bytes)
337337 let assetId = value(value(i.payments[0]).assetId)
338338 let gameStep = getGameStep(gameId)
339339 if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
340340 then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
341341 else false)
342342 then throw("Invalid NFT")
343343 else if ((2 > gameStep))
344344 then throw("The medium duck must be picked after the worst one")
345345 else if ((gameStep == 2))
346346 then if ((callerAddress != getGameMaker(gameId)))
347347 then throw("It is the maker's turn to pick now")
348348 else {
349349 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
350350 if ((invokeRes == invokeRes))
351351 then {
352352 let rarity = match invokeRes {
353353 case r: Int =>
354354 r
355355 case _ =>
356356 throw("Incorrect invoke result")
357357 }
358358 pickDuck(gameId, "maker", i.caller, assetId, rarity, "medium", 2)
359359 }
360360 else throw("Strict value is not equal to itself.")
361361 }
362362 else if ((gameStep == 3))
363363 then if ((callerAddress != getGameTaker(gameId)))
364364 then throw("It is the taker's turn to pick now")
365365 else {
366366 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
367367 if ((invokeRes == invokeRes))
368368 then {
369369 let rarity = match invokeRes {
370370 case r: Int =>
371371 r
372372 case _ =>
373373 throw("Incorrect invoke result")
374374 }
375375 pickDuck(gameId, "taker", i.caller, assetId, rarity, "medium", 3)
376376 }
377377 else throw("Strict value is not equal to itself.")
378378 }
379379 else throw("The medium duck has already been picked")
380380 }
381381
382382
383383
384384 @Callable(i)
385385 func pickBestDuck (gameId) = {
386386 let callerAddress = toBase58String(i.caller.bytes)
387387 let assetId = value(value(i.payments[0]).assetId)
388388 let gameStep = getGameStep(gameId)
389389 if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress)))
390390 then (value(assetInfo(assetId)).issuer != Address(incubatorAddress))
391391 else false)
392392 then throw("Invalid NFT")
393393 else if ((4 > gameStep))
394394 then throw("The best duck must be picked after the worst and the medium ones")
395395 else if ((gameStep == 4))
396396 then if ((callerAddress != getGameTaker(gameId)))
397397 then throw("It is the taker's turn to pick now")
398398 else {
399399 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
400400 if ((invokeRes == invokeRes))
401401 then {
402402 let rarity = match invokeRes {
403403 case r: Int =>
404404 r
405405 case _ =>
406406 throw("Incorrect invoke result")
407407 }
408408 pickDuck(gameId, "taker", i.caller, assetId, rarity, "best", 4)
409409 }
410410 else throw("Strict value is not equal to itself.")
411411 }
412412 else if ((gameStep == 5))
413413 then if ((callerAddress != getGameMaker(gameId)))
414414 then throw("It is the maker's turn to pick now")
415415 else {
416416 let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil)
417417 if ((invokeRes == invokeRes))
418418 then {
419419 let rarity = match invokeRes {
420420 case r: Int =>
421421 r
422422 case _ =>
423423 throw("Incorrect invoke result")
424424 }
425425 pickDuck(gameId, "maker", i.caller, assetId, rarity, "best", 5)
426426 }
427427 else throw("Strict value is not equal to itself.")
428428 }
429429 else throw("The best duck has already been picked")
430430 }
431431
432432
433433
434434 @Callable(i)
435435 func commit (gameId,hash) = {
436436 let callerAddress = toBase58String(i.caller.bytes)
437437 let gameStep = getGameStep(gameId)
438438 if ((6 > gameStep))
439439 then throw("Ducks hasn't been picked yet")
440440 else if ((gameStep == 6))
441441 then if ((callerAddress != getGameMaker(gameId)))
442442 then throw("It is the maker's turn to commit now")
443443 else [StringEntry(getCommitKey(gameId, "maker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
444444 else if ((gameStep == 7))
445445 then if ((callerAddress != getGameTaker(gameId)))
446446 then throw("It is the taker's turn to commit now")
447447 else [StringEntry(getCommitKey(gameId, "taker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
448448 else throw("Commit is finished")
449449 }
450450
451451
452452
453453 @Callable(i)
454454 func reveal (gameId,duckOrder,salt) = {
455455 let callerAddress = toBase58String(i.caller.bytes)
456456 let gameStep = getGameStep(gameId)
457457 if ((8 > gameStep))
458458 then throw("Reveal is not started")
459459 else if (if (if (if (if (if ((duckOrder != "worst,medium,best"))
460460 then true
461461 else (duckOrder != "worst,best,medium"))
462462 then true
463463 else (duckOrder != "medium,worst,best"))
464464 then true
465465 else (duckOrder != "medium,best,worst"))
466466 then true
467467 else (duckOrder != "best,worst,medium"))
468468 then true
469469 else (duckOrder != "best,medium,worst"))
470470 then throw("Invalid duckOrder")
471471 else if ((gameStep == 8))
472472 then if ((callerAddress != getGameMaker(gameId)))
473473 then throw("It is the maker's turn to reveal now")
474474 else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "maker")))
475475 then throw("reveal data is not valid")
476476 else [StringEntry(getDuckOrderKey(gameId, "maker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
477477 else if ((gameStep == 9))
478478 then if ((callerAddress != getGameTaker(gameId)))
479479 then throw("It is the taker's turn to reveal now")
480480 else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "taker")))
481481 then throw("reveal data is not valid")
482482 else [StringEntry(getDuckOrderKey(gameId, "taker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))]
483483 else throw("Reveal is finished")
484484 }
485485
486486
487487
488488 @Callable(i)
489489 func getPrize (gameId) = {
490490 let callerAddress = toBase58String(i.caller.bytes)
491491 let gameStep = getGameStep(gameId)
492492 if ((gameStep != 10))
493493 then throw("Game is not finished")
494494 else if ((callerAddress == getGameMaker(gameId)))
495495 then sendPrize(gameId, i.caller, "maker", getWinner(gameId))
496496 else if ((callerAddress == getGameTaker(gameId)))
497497 then sendPrize(gameId, i.caller, "taker", getWinner(gameId))
498498 else throw("Invalid caller address")
499499 }
500500
501501
502502
503503 @Callable(i)
504504 func getPrizeExpired (gameId) = {
505505 let callerAddress = toBase58String(i.caller.bytes)
506506 let gameStep = getGameStep(gameId)
507507 if ((gameStep == 10))
508508 then throw("Game is finished, call getPrize instead")
509509 else if ((getGameOverHeight(gameId) > height))
510510 then throw("Game is not expired")
511511 else if ((callerAddress == getGameMaker(gameId)))
512512 then sendPrize(gameId, i.caller, "maker", getWinnerExpired(gameStep))
513513 else if ((callerAddress == getGameTaker(gameId)))
514514 then sendPrize(gameId, i.caller, "taker", getWinnerExpired(gameStep))
515515 else throw("Invalid caller address")
516516 }
517517
518518
519519 @Verifier(tx)
520520 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
521521

github/deemru/w8io/026f985 
54.49 ms