tx · FM2W66K2e1dDwMZyixddroUhdrsb9kpHqaJsNKdLmttv

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10010000 Waves

2021.12.03 04:11 [1817415] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "FM2W66K2e1dDwMZyixddroUhdrsb9kpHqaJsNKdLmttv", "fee": 10010000, "feeAssetId": null, "timestamp": 1638493897657, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "4kTjB8QC9Jm45GH1AwcSd4GFXTvAMSrwgmCY8QDcAxBFFSV4DKKDkKmF51doQvenohKYHS8rXZC1AVYRXBV3Ft3P" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgASAwoBCAAAAA4AAAAABmNhc2lubwIAAAAjM010YUNMNHYxYmpUYWJVcXM3b1U0b2ZTOGZiYWkzNFdNMWkAAAAABVdBVkVTAAAAAAA7msoAAAAAAAZtYXhCZXQJAABoAAAAAgAAAAAAAAAAZAUAAAAFV0FWRVMAAAAACXNlcGFyYXRvcgIAAAABLAEAAAAKZ2V0TmV3RGVjawAAAAAJAARMAAAAAgIAAAADMDFDCQAETAAAAAICAAAAAzAyQwkABEwAAAACAgAAAAMwM0MJAARMAAAAAgIAAAADMDRDCQAETAAAAAICAAAAAzA1QwkABEwAAAACAgAAAAMwNkMJAARMAAAAAgIAAAADMDdDCQAETAAAAAICAAAAAzA4QwkABEwAAAACAgAAAAMwOUMJAARMAAAAAgIAAAADMTBDCQAETAAAAAICAAAAAzExQwkABEwAAAACAgAAAAMxMkMJAARMAAAAAgIAAAADMTNDCQAETAAAAAICAAAAAzAxRAkABEwAAAACAgAAAAMwMkQJAARMAAAAAgIAAAADMDNECQAETAAAAAICAAAAAzA0RAkABEwAAAACAgAAAAMwNUQJAARMAAAAAgIAAAADMDZECQAETAAAAAICAAAAAzA3RAkABEwAAAACAgAAAAMwOEQJAARMAAAAAgIAAAADMDlECQAETAAAAAICAAAAAzEwRAkABEwAAAACAgAAAAMxMUQJAARMAAAAAgIAAAADMTJECQAETAAAAAICAAAAAzEzRAkABEwAAAACAgAAAAMwMUgJAARMAAAAAgIAAAADMDJICQAETAAAAAICAAAAAzAzSAkABEwAAAACAgAAAAMwNEgJAARMAAAAAgIAAAADMDVICQAETAAAAAICAAAAAzA2SAkABEwAAAACAgAAAAMwN0gJAARMAAAAAgIAAAADMDhICQAETAAAAAICAAAAAzA5SAkABEwAAAACAgAAAAMxMEgJAARMAAAAAgIAAAADMTFICQAETAAAAAICAAAAAzEySAkABEwAAAACAgAAAAMxM0gJAARMAAAAAgIAAAADMDFTCQAETAAAAAICAAAAAzAyUwkABEwAAAACAgAAAAMwM1MJAARMAAAAAgIAAAADMDRTCQAETAAAAAICAAAAAzA1UwkABEwAAAACAgAAAAMwNlMJAARMAAAAAgIAAAADMDdTCQAETAAAAAICAAAAAzA4UwkABEwAAAACAgAAAAMwOVMJAARMAAAAAgIAAAADMTBTCQAETAAAAAICAAAAAzExUwkABEwAAAACAgAAAAMxMlMJAARMAAAAAgIAAAADMTNTBQAAAANuaWwBAAAADmdldFNpeE5ld0RlY2tzAAAAAAkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAABAAAAB2dldERlY2sAAAABAAAABGRlY2sDCQAAZwAAAAIAAAAAAAAAAAAJAAGQAAAAAQUAAAAEZGVjawkBAAAADmdldFNpeE5ld0RlY2tzAAAAAAUAAAAEZGVjawEAAAAPZ2V0UmFuZG9tTnVtYmV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gkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgUAAAAFcm91bmQCAAAAEV9MYXN0UmFuZG9uTnVtYmVyBQAAABJjYXJkUG9zaXRpb25DYXNpbm8JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAALX3BsYXllckNhcmQFAAAACmNhcmRQbGF5ZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAALX2Nhc2lub0NhcmQFAAAACmNhcmRDYXNpbm8JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgUAAAAFcm91bmQCAAAACl9iZXRBbW91bnQFAAAAAXAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIJAAEsAAAAAgUAAAAFcm91bmQCAAAABV9zdG9wBgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkXp4A7", "height": 1817415, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BeVqpKpN2rW8e81Dz2B4RzuSXG5GNdUag5MkywQv7pyx Next: 6kxwcZsfp29LASAjjBZJrNsoNi7Xd1bxzy2XdEb3bs5u Diff:
OldNewDifferences
125125 then {
126126 let currentDraws = 1
127127 if ((t != 0))
128- then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (("ScriptTransfer(i.caller, (t * 10)=" + toString((t * 10))) + ", unit)")), ScriptTransfer(i.caller, (t * 10), unit)]
128+ then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (("ScriptTransfer(i.caller, (t * 10)=" + toString(((t * 10) + t))) + ", unit)")), ScriptTransfer(i.caller, ((t * 10) + t), unit)]
129129 else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p)]
130130 }
131131 else if (isPlayerWinner(cardPlayer, cardCasino))
184184 case _ =>
185185 throw("Unable to find original bet amount")
186186 }
187- let $t079898015 = getPayments(i)
188- let p = $t079898015._1
189- let t = $t079898015._2
187+ let $t080018027 = getPayments(i)
188+ let p = $t080018027._1
189+ let t = $t080018027._2
190190 if ((p != betAmount))
191191 then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
192192 else {
193193 let availableProp = (round + "_deck")
194194 let avDeck = getAvailableDeck(this, availableProp)
195- let $t083058413 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
196- let burned1 = $t083058413._1
197- let burnedPos1 = $t083058413._2
198- let burnedDeck1 = $t083058413._3
199- let $t084268547 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), callerAddress, burnedDeck1)
200- let burned2 = $t084268547._1
201- let burnedPos2 = $t084268547._2
202- let burnedDeck2 = $t084268547._3
203- let $t085608681 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), callerAddress, burnedDeck2)
204- let burned3 = $t085608681._1
205- let burnedPos3 = $t085608681._2
206- let burnedDeck3 = $t085608681._3
207- let $t086948822 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), callerAddress, burnedDeck3)
208- let cardPlayer = $t086948822._1
209- let cardPositionPlayer = $t086948822._2
210- let avDeck1 = $t086948822._3
211- let $t088358962 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), callerAddress, avDeck1)
212- let cardCasino = $t088358962._1
213- let cardPositionCasino = $t088358962._2
214- let avDeck2 = $t088358962._3
195+ let $t083178425 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
196+ let burned1 = $t083178425._1
197+ let burnedPos1 = $t083178425._2
198+ let burnedDeck1 = $t083178425._3
199+ let $t084388559 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), callerAddress, burnedDeck1)
200+ let burned2 = $t084388559._1
201+ let burnedPos2 = $t084388559._2
202+ let burnedDeck2 = $t084388559._3
203+ let $t085728693 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), callerAddress, burnedDeck2)
204+ let burned3 = $t085728693._1
205+ let burnedPos3 = $t085728693._2
206+ let burnedDeck3 = $t085728693._3
207+ let $t087068834 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), callerAddress, burnedDeck3)
208+ let cardPlayer = $t087068834._1
209+ let cardPositionPlayer = $t087068834._2
210+ let avDeck1 = $t087068834._3
211+ let $t088478974 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), callerAddress, avDeck1)
212+ let cardCasino = $t088478974._1
213+ let cardPositionCasino = $t088478974._2
214+ let avDeck2 = $t088478974._3
215215 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
216216 then {
217217 let currentDraws = match getInteger(this, (round + "_drawSequence")) {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let casino = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i"
55
66 let WAVES = 1000000000
77
88 let maxBet = (100 * WAVES)
99
1010 let separator = ","
1111
1212 func getNewDeck () = ["01C", "02C", "03C", "04C", "05C", "06C", "07C", "08C", "09C", "10C", "11C", "12C", "13C", "01D", "02D", "03D", "04D", "05D", "06D", "07D", "08D", "09D", "10D", "11D", "12D", "13D", "01H", "02H", "03H", "04H", "05H", "06H", "07H", "08H", "09H", "10H", "11H", "12H", "13H", "01S", "02S", "03S", "04S", "05S", "06S", "07S", "08S", "09S", "10S", "11S", "12S", "13S"]
1313
1414
1515 func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck())
1616
1717
1818 func getDeck (deck) = if ((0 >= size(deck)))
1919 then getSixNewDecks()
2020 else deck
2121
2222
2323 func getRandomNumber (salt1,salt2,answersCount) = {
2424 let hash = sha256(toBytes((salt1 + salt2)))
2525 let index = toInt(hash)
2626 let rand = (index % answersCount)
2727 if ((0 > rand))
2828 then ((-1 * rand) + 1)
2929 else (rand + 1)
3030 }
3131
3232
3333 func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) {
3434 case n: Int =>
3535 toString(n)
3636 case _ =>
3737 address
3838 }
3939
4040
4141 func getPayments (i) = if ((size(i.payments) == 0))
4242 then throw("Payment must be attached")
4343 else if ((size(i.payments) == 1))
4444 then {
4545 let pmt = i.payments[0]
4646 if (isDefined(pmt.assetId))
4747 then throw("This function accepts WAVES tokens only (0)")
4848 else $Tuple2(pmt.amount, 0)
4949 }
5050 else {
5151 let pmt = i.payments[0]
5252 if (isDefined(pmt.assetId))
5353 then throw("This function accepts WAVES tokens only (10)")
5454 else {
5555 let pmt2 = i.payments[1]
5656 if (isDefined(pmt2.assetId))
5757 then throw("This function accepts WAVES tokens only (11)")
5858 else $Tuple2(pmt.amount, pmt2.amount)
5959 }
6060 }
6161
6262
6363 func getCardValue (stringCard) = {
6464 let p = parseIntValue(take(stringCard, 2))
6565 if ((p == 1))
6666 then 20
6767 else p
6868 }
6969
7070
7171 func isPlayerWinner (cardPlayer,cardCasino) = {
7272 let p = getCardValue(cardPlayer)
7373 let o = getCardValue(cardCasino)
7474 (p > o)
7575 }
7676
7777
7878 func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp)))
7979 then {
8080 let stringDeck = getStringValue(this, availableProp)
8181 let deck = split(stringDeck, separator)
8282 getDeck(deck)
8383 }
8484 else getSixNewDecks()
8585
8686
8787 func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = {
8888 let avDeck2 = getDeck(deck)
8989 let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2))
9090 let card = avDeck2[(cardPosition % size(avDeck2))]
9191 let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2)))
9292 $Tuple3(card, cardPosition, avDeck3)
9393 }
9494
9595
9696 @Callable(i)
9797 func bet () = {
9898 let callerAddress = toBase58String(i.caller.bytes)
9999 let $t029833009 = getPayments(i)
100100 let p = $t029833009._1
101101 let t = $t029833009._2
102102 let currentRound = match getInteger(this, (callerAddress + "_round")) {
103103 case a: Int =>
104104 (a + 1)
105105 case _ =>
106106 1
107107 }
108108 let round = ((callerAddress + "_") + toString(currentRound))
109109 if (isDefined(getBoolean(this, (round + "_stop"))))
110110 then throw("This round is already played")
111111 else if (isDefined(getString(this, round)))
112112 then throw("You cannot bet on this game")
113113 else {
114114 let availableProp = (round + "_deck")
115115 let avDeck = getAvailableDeck(this, availableProp)
116116 let $t034893604 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
117117 let cardPlayer = $t034893604._1
118118 let cardPositionPlayer = $t034893604._2
119119 let avDeck1 = $t034893604._3
120120 let $t036093736 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), callerAddress, avDeck1)
121121 let cardCasino = $t036093736._1
122122 let cardPositionCasino = $t036093736._2
123123 let avDeck2 = $t036093736._3
124124 if ((1 == 1))
125125 then {
126126 let currentDraws = 1
127127 if ((t != 0))
128- then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (("ScriptTransfer(i.caller, (t * 10)=" + toString((t * 10))) + ", unit)")), ScriptTransfer(i.caller, (t * 10), unit)]
128+ then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (("ScriptTransfer(i.caller, (t * 10)=" + toString(((t * 10) + t))) + ", unit)")), ScriptTransfer(i.caller, ((t * 10) + t), unit)]
129129 else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p)]
130130 }
131131 else if (isPlayerWinner(cardPlayer, cardCasino))
132132 then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (("ScriptTransfer(i.caller, p=" + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
133133 else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), BooleanEntry((round + "_stop"), true)]
134134 }
135135 }
136136
137137
138138
139139 @Callable(i)
140140 func surrender () = {
141141 let callerAddress = toBase58String(i.caller.bytes)
142142 let currentRound = match getInteger(this, (callerAddress + "_round")) {
143143 case a: Int =>
144144 toString(a)
145145 case _ =>
146146 throw("Unable to find the round")
147147 }
148148 let round = ((callerAddress + "_") + currentRound)
149149 if (isDefined(getBoolean(this, (round + "_stop"))))
150150 then throw("This round is already played")
151151 else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
152152 then throw("This game is not on war")
153153 else {
154154 let betAmount = match getInteger(this, (callerAddress + "_betAmount")) {
155155 case a: Int =>
156156 a
157157 case _ =>
158158 throw("Unable to find original bet amount")
159159 }
160160 [StringEntry((round + "_debug"), (("ScriptTransfer(i.caller, betAmount / 2=" + toString((betAmount / 2))) + ", unit)")), ScriptTransfer(i.caller, (betAmount / 2), unit), BooleanEntry((round + "_stop"), true)]
161161 }
162162 }
163163
164164
165165
166166 @Callable(i)
167167 func goToWar (customRound) = {
168168 let callerAddress = toBase58String(i.caller.bytes)
169169 let currentRound = match getInteger(this, (callerAddress + "_round")) {
170170 case a: Int =>
171171 a
172172 case _ =>
173173 throw("Unable to find the round")
174174 }
175175 let round = ((callerAddress + "_") + toString(currentRound))
176176 if (isDefined(getBoolean(this, (round + "_stop"))))
177177 then throw("This round is already played")
178178 else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
179179 then throw("This game is not on war")
180180 else {
181181 let betAmount = match getInteger(this, (callerAddress + "_betAmount")) {
182182 case a: Int =>
183183 a
184184 case _ =>
185185 throw("Unable to find original bet amount")
186186 }
187- let $t079898015 = getPayments(i)
188- let p = $t079898015._1
189- let t = $t079898015._2
187+ let $t080018027 = getPayments(i)
188+ let p = $t080018027._1
189+ let t = $t080018027._2
190190 if ((p != betAmount))
191191 then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
192192 else {
193193 let availableProp = (round + "_deck")
194194 let avDeck = getAvailableDeck(this, availableProp)
195- let $t083058413 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
196- let burned1 = $t083058413._1
197- let burnedPos1 = $t083058413._2
198- let burnedDeck1 = $t083058413._3
199- let $t084268547 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), callerAddress, burnedDeck1)
200- let burned2 = $t084268547._1
201- let burnedPos2 = $t084268547._2
202- let burnedDeck2 = $t084268547._3
203- let $t085608681 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), callerAddress, burnedDeck2)
204- let burned3 = $t085608681._1
205- let burnedPos3 = $t085608681._2
206- let burnedDeck3 = $t085608681._3
207- let $t086948822 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), callerAddress, burnedDeck3)
208- let cardPlayer = $t086948822._1
209- let cardPositionPlayer = $t086948822._2
210- let avDeck1 = $t086948822._3
211- let $t088358962 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), callerAddress, avDeck1)
212- let cardCasino = $t088358962._1
213- let cardPositionCasino = $t088358962._2
214- let avDeck2 = $t088358962._3
195+ let $t083178425 = getPlayerCardAndPositionAndUpdateDeck(round, callerAddress, avDeck)
196+ let burned1 = $t083178425._1
197+ let burnedPos1 = $t083178425._2
198+ let burnedDeck1 = $t083178425._3
199+ let $t084388559 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), callerAddress, burnedDeck1)
200+ let burned2 = $t084388559._1
201+ let burnedPos2 = $t084388559._2
202+ let burnedDeck2 = $t084388559._3
203+ let $t085728693 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), callerAddress, burnedDeck2)
204+ let burned3 = $t085728693._1
205+ let burnedPos3 = $t085728693._2
206+ let burnedDeck3 = $t085728693._3
207+ let $t087068834 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), callerAddress, burnedDeck3)
208+ let cardPlayer = $t087068834._1
209+ let cardPositionPlayer = $t087068834._2
210+ let avDeck1 = $t087068834._3
211+ let $t088478974 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), callerAddress, avDeck1)
212+ let cardCasino = $t088478974._1
213+ let cardPositionCasino = $t088478974._2
214+ let avDeck2 = $t088478974._3
215215 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
216216 then {
217217 let currentDraws = match getInteger(this, (round + "_drawSequence")) {
218218 case a: Int =>
219219 (a + 1)
220220 case _ =>
221221 0
222222 }
223223 [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p)]
224224 }
225225 else if (isPlayerWinner(cardPlayer, cardCasino))
226226 then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (("ScriptTransfer(i.caller, p=" + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
227227 else [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_round"), round), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), BooleanEntry((round + "_stop"), true)]
228228 }
229229 }
230230 }
231231
232232
233233 @Verifier(tx)
234234 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
235235

github/deemru/w8io/169f3d6 
59.30 ms