tx · 2dsrLXLvfa6Ztr83PaAxRce7DXdvtsNHsgjvYdBrRkB3

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10000000 Waves

2021.12.17 01:46 [1837447] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "2dsrLXLvfa6Ztr83PaAxRce7DXdvtsNHsgjvYdBrRkB3", "fee": 10000000, "feeAssetId": null, "timestamp": 1639694799786, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "PNLgSTyKH5i7cXWK96K5oqF8DiQsk3gFUZqDDwzvt2NWYpgzbGh7D4He5tXejMhN7sBNxyn2vDzcBT3EfME421Z" ], "script": "base64:AAIFAAAAAAAAABIIAhIECgIBARIDCgEBEgMKAQEAAAANAAAAAAlzZXBhcmF0b3ICAAAAASwAAAAABm1heEJldAAAAAAABfXhAAEAAAAGZ2V0RmVlAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAW4FAAAAByRtYXRjaDAFAAAAAW4JAAACAAAAAQIAAAAbSW5pdGlhbCBmZWUgY2Fubm90IGJlIGZvdW5kAQAAAApnZXROZXdEZWNrAAAAAAkABEwAAAACAgAAAAMwMUMJAARMAAAAAgIAAAADMDJDCQAETAAAAAICAAAAAzAzQwkABEwAAAACAgAAAAMwNEMJAARMAAAAAgIAAAADMDVDCQAETAAAAAICAAAAAzA2QwkABEwAAAACAgAAAAMwN0MJAARMAAAAAgIAAAADMDhDCQAETAAAAAICAAAAAzA5QwkABEwAAAACAgAAAAMxMEMJAARMAAAAAgIAAAADMTFDCQAETAAAAAICAAAAAzEyQwkABEwAAAACAgAAAAMxM0MJAARMAAAAAgIAAAADMDFECQAETAAAAAICAAAAAzAyRAkABEwAAAACAgAAAAMwM0QJAARMAAAAAgIAAAADMDRECQAETAAAAAICAAAAAzA1RAkABEwAAAACAgAAAAMwNkQJAARMAAAAAgIAAAADMDdECQAETAAAAAICAAAAAzA4RAkABEwAAAACAgAAAAMwOUQJAARMAAAAAgIAAAADMTBECQAETAAAAAICAAAAAzExRAkABEwAAAACAgAAAAMxMkQJAARMAAAAAgIAAAADMTNECQAETAAAAAICAAAAAzAxSAkABEwAAAACAgAAAAMwMkgJAARMAAAAAgIAAAADMDNICQAETAAAAAICAAAAAzA0SAkABEwAAAACAgAAAAMwNUgJAARMAAAAAgIAAAADMDZICQAETAAAAAICAAAAAzA3SAkABEwAAAACAgAAAAMwOEgJAARMAAAAAgIAAAADMDlICQAETAAAAAICAAAAAzEwSAkABEwAAAACAgAAAAMxMUgJAARMAAAAAgIAAAADMTJICQAETAAAAAICAAAAAzEzSAkABEwAAAACAgAAAAMwMVMJAARMAAAAAgIAAAADMDJTCQAETAAAAAICAAAAAzAzUwkABEwAAAACAgAAAAMwNFMJAARMAAAAAgIAAAADMDVTCQAETAAAAAICAAAAAzA2UwkABEwAAAACAgAAAAMwN1MJAARMAAAAAgIAAAADMDhTCQAETAAAAAICAAAAAzA5UwkABEwAAAACAgAAAAMxMFMJAARMAAAAAgIAAAADMTFTCQAETAAAAAICAAAAAzEyUwkABEwAAAACAgAAAAMxM1MFAAAAA25pbAEAAAAOZ2V0U2l4TmV3RGVja3MAAAAACQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAEAAAAHZ2V0RGVjawAAAAEAAAAEZGVjawMJAABnAAAAAgAAA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AAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAAFX3N0b3AGBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAANYXZhaWxhYmxlUHJvcAkABLkAAAACBQAAAAdhdkRlY2syBQAAAAlzZXBhcmF0b3IJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAALX3BsYXllckNhcmQFAAAACmNhcmRQbGF5ZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAALX2Nhc2lub0NhcmQFAAAACmNhcmRDYXNpbm8JAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIJAAEsAAAAAgUAAAAFcm91bmQCAAAABV9zdG9wBgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlfJXEV", "height": 1837447, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: YCFKSAQy9xJwrcb625v9642tFQqdPnG3P2xQBf5wg8s Next: BiKxp9cmsmQmAt7pwPhmn6XEs2SoXNVzEdCtpPHMGTpp Diff:
OldNewDifferences
114114 else {
115115 let availableProp = (round + "_deck")
116116 let avDeck = getAvailableDeck(this, availableProp)
117- let $t040034123 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck)
118- let cardPlayer = $t040034123._1
119- let cardPositionPlayer = $t040034123._2
120- let avDeck1 = $t040034123._3
121- let $t041284249 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1)
122- let cardCasino = $t041284249._1
123- let cardPositionCasino = $t041284249._2
124- let avDeck2 = $t041284249._3
117+ let $t037843904 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck)
118+ let cardPlayer = $t037843904._1
119+ let cardPositionPlayer = $t037843904._2
120+ let avDeck1 = $t037843904._3
121+ let $t039094030 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1)
122+ let cardCasino = $t039094030._1
123+ let cardPositionCasino = $t039094030._2
124+ let avDeck2 = $t039094030._3
125125 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
126126 then {
127127 let currentDraws = 1
187187 else {
188188 let availableProp = (round + "_deck")
189189 let avDeck = getAvailableDeck(this, availableProp)
190- let $t092229333 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck)
191- let burned1 = $t092229333._1
192- let burnedPos1 = $t092229333._2
193- let burnedDeck1 = $t092229333._3
194- let $t093469472 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1)
195- let burned2 = $t093469472._1
196- let burnedPos2 = $t093469472._2
197- let burnedDeck2 = $t093469472._3
198- let $t094859611 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2)
199- let burned3 = $t094859611._1
200- let burnedPos3 = $t094859611._2
201- let burnedDeck3 = $t094859611._3
202- let $t096249757 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3)
203- let cardPlayer = $t096249757._1
204- let cardPositionPlayer = $t096249757._2
205- let avDeck1 = $t096249757._3
206- let $t097709902 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1)
207- let cardCasino = $t097709902._1
208- let cardPositionCasino = $t097709902._2
209- let avDeck2 = $t097709902._3
190+ let $t090039114 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck)
191+ let burned1 = $t090039114._1
192+ let burnedPos1 = $t090039114._2
193+ let burnedDeck1 = $t090039114._3
194+ let $t091279253 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1)
195+ let burned2 = $t091279253._1
196+ let burnedPos2 = $t091279253._2
197+ let burnedDeck2 = $t091279253._3
198+ let $t092669392 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2)
199+ let burned3 = $t092669392._1
200+ let burnedPos3 = $t092669392._2
201+ let burnedDeck3 = $t092669392._3
202+ let $t094059538 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3)
203+ let cardPlayer = $t094059538._1
204+ let cardPositionPlayer = $t094059538._2
205+ let avDeck1 = $t094059538._3
206+ let $t095519683 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1)
207+ let cardCasino = $t095519683._1
208+ let cardPositionCasino = $t095519683._2
209+ let avDeck2 = $t095519683._3
210210 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
211211 then {
212212 let currentDraws = match getInteger(this, (round + "_drawSequence")) {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = ","
55
66 let maxBet = 100000000
77
88 func getFee (key) = match getInteger(this, key) {
99 case n: Int =>
1010 n
1111 case _ =>
1212 throw("Initial fee cannot be found")
1313 }
1414
1515
1616 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"]
1717
1818
1919 func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck())
2020
2121
2222 func getDeck (deck) = if ((0 >= size(deck)))
2323 then getSixNewDecks()
2424 else deck
2525
2626
2727 func getRandomNumber (i,salt1,salt2,answersCount) = {
2828 let generator = (toInt(sha256(((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)) + toBytes(salt1)))) % 17728)
2929 let index = (toInt(toBytes(pow(generator, 0, 2, 0, 0, HALFUP))) + toInt(toBytes(salt2)))
3030 let r = (index % answersCount)
3131 if ((0 > r))
3232 then ((-1 * r) + 1)
3333 else (r + 1)
3434 }
3535
3636
3737 func getPayments (i) = if ((size(i.payments) == 0))
3838 then throw("Payment must be attached")
3939 else if ((size(i.payments) == 1))
4040 then {
4141 let pmt = i.payments[0]
4242 if (isDefined(pmt.assetId))
4343 then throw("This function accepts WAVES tokens only (0)")
4444 else pmt.amount
4545 }
4646 else throw("There should be only one payment")
4747
4848
4949 func getCardValue (stringCard) = {
5050 let p = parseIntValue(take(stringCard, 2))
5151 if ((p == 1))
5252 then 20
5353 else p
5454 }
5555
5656
5757 func isPlayerWinner (cardPlayer,cardCasino) = {
5858 let p = getCardValue(cardPlayer)
5959 let o = getCardValue(cardCasino)
6060 (p > o)
6161 }
6262
6363
6464 func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp)))
6565 then {
6666 let stringDeck = getStringValue(this, availableProp)
6767 let deck = split(stringDeck, separator)
6868 getDeck(deck)
6969 }
7070 else getSixNewDecks()
7171
7272
7373 func getPlayerCardAndPositionAndUpdateDeck (i,salt1,deck) = {
7474 let avDeck2 = getDeck(deck)
7575 let cardPosition = getRandomNumber(i, salt1, makeString(avDeck2, separator), size(avDeck2))
7676 let card = avDeck2[(cardPosition % size(avDeck2))]
7777 let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2)))
7878 $Tuple3(card, cardPosition, avDeck3)
7979 }
8080
8181
8282 func getCurrentRound (customRound,callerAddress) = if ((customRound == 0))
8383 then {
8484 let currentRound = match getInteger(this, (callerAddress + "_round")) {
8585 case a: Int =>
8686 a
8787 case _ =>
8888 throw("Unable to find the round")
8989 }
9090 currentRound
9191 }
9292 else customRound
9393
9494
9595 @Callable(i)
9696 func bet (normalBet,tieBet) = {
9797 let callerAddress = toBase58String(i.caller.bytes)
9898 let p = getPayments(i)
9999 let currentRound = match getInteger(this, (callerAddress + "_round")) {
100100 case a: Int =>
101101 (a + 1)
102102 case _ =>
103103 1
104104 }
105105 let round = ((callerAddress + "_") + toString(currentRound))
106106 if (isDefined(getBoolean(this, (round + "_stop"))))
107107 then throw("This round is already played")
108108 else if (isDefined(getString(this, round)))
109109 then throw("You cannot bet on this game")
110110 else if ((p != (normalBet + tieBet)))
111111 then throw("normal bet + tie bet should be equal to the payment")
112112 else if ((p > maxBet))
113113 then throw(("The bet needs to be lower or equal than " + toString(maxBet)))
114114 else {
115115 let availableProp = (round + "_deck")
116116 let avDeck = getAvailableDeck(this, availableProp)
117- let $t040034123 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck)
118- let cardPlayer = $t040034123._1
119- let cardPositionPlayer = $t040034123._2
120- let avDeck1 = $t040034123._3
121- let $t041284249 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1)
122- let cardCasino = $t041284249._1
123- let cardPositionCasino = $t041284249._2
124- let avDeck2 = $t041284249._3
117+ let $t037843904 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck)
118+ let cardPlayer = $t037843904._1
119+ let cardPositionPlayer = $t037843904._2
120+ let avDeck1 = $t037843904._3
121+ let $t039094030 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1)
122+ let cardCasino = $t039094030._1
123+ let cardPositionCasino = $t039094030._2
124+ let avDeck2 = $t039094030._3
125125 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
126126 then {
127127 let currentDraws = 1
128128 if ((tieBet != 0))
129129 then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), BooleanEntry(round, true), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), normalBet), ScriptTransfer(i.caller, (((tieBet * 10) + tieBet) + i.fee), unit), IntegerEntry((round + "_initialFee"), i.fee)]
130130 else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), BooleanEntry(round, true), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee)]
131131 }
132132 else if (isPlayerWinner(cardPlayer, cardCasino))
133133 then [StringEntry(availableProp, makeString(avDeck2, separator)), BooleanEntry(round, true), IntegerEntry((callerAddress + "_round"), currentRound), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee), ScriptTransfer(i.caller, (normalBet + i.fee), unit), BooleanEntry((round + "_stop"), true)]
134134 else [StringEntry(availableProp, makeString(avDeck2, separator)), BooleanEntry(round, true), IntegerEntry((callerAddress + "_round"), currentRound), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee), BooleanEntry((round + "_stop"), true)]
135135 }
136136 }
137137
138138
139139
140140 @Callable(i)
141141 func surrender (customRound) = {
142142 let callerAddress = toBase58String(i.caller.bytes)
143143 let roundToUse = getCurrentRound(customRound, callerAddress)
144144 let round = ((callerAddress + "_") + toString(roundToUse))
145145 if (!(isDefined(getBoolean(this, round))))
146146 then throw("This round is not played")
147147 else if (isDefined(getBoolean(this, (round + "_stop"))))
148148 then throw("This round is already played")
149149 else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
150150 then throw("This game is not on war")
151151 else {
152152 let betAmount = match getInteger(this, (round + "_betAmount")) {
153153 case a: Int =>
154154 a
155155 case _ =>
156156 throw("Unable to find original bet amount")
157157 }
158158 let f = getFee((round + "_initialFee"))
159159 [ScriptTransfer(i.caller, ((betAmount / 2) + f), unit), BooleanEntry((round + "_stop"), true)]
160160 }
161161 }
162162
163163
164164
165165 @Callable(i)
166166 func goToWar (customRound) = {
167167 let callerAddress = toBase58String(i.caller.bytes)
168168 let roundToUse = getCurrentRound(customRound, callerAddress)
169169 let round = ((callerAddress + "_") + toString(roundToUse))
170170 if (!(isDefined(getBoolean(this, round))))
171171 then throw("This round is not played")
172172 else if (isDefined(getBoolean(this, (round + "_stop"))))
173173 then throw("This round is already played")
174174 else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
175175 then throw("This game is not on war")
176176 else {
177177 let betAmount = match getInteger(this, (round + "_betAmount")) {
178178 case a: Int =>
179179 a
180180 case _ =>
181181 throw("Unable to find original bet amount")
182182 }
183183 let p = getPayments(i)
184184 let f = getFee((round + "_initialFee"))
185185 if ((p != betAmount))
186186 then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
187187 else {
188188 let availableProp = (round + "_deck")
189189 let avDeck = getAvailableDeck(this, availableProp)
190- let $t092229333 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck)
191- let burned1 = $t092229333._1
192- let burnedPos1 = $t092229333._2
193- let burnedDeck1 = $t092229333._3
194- let $t093469472 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1)
195- let burned2 = $t093469472._1
196- let burnedPos2 = $t093469472._2
197- let burnedDeck2 = $t093469472._3
198- let $t094859611 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2)
199- let burned3 = $t094859611._1
200- let burnedPos3 = $t094859611._2
201- let burnedDeck3 = $t094859611._3
202- let $t096249757 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3)
203- let cardPlayer = $t096249757._1
204- let cardPositionPlayer = $t096249757._2
205- let avDeck1 = $t096249757._3
206- let $t097709902 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1)
207- let cardCasino = $t097709902._1
208- let cardPositionCasino = $t097709902._2
209- let avDeck2 = $t097709902._3
190+ let $t090039114 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck)
191+ let burned1 = $t090039114._1
192+ let burnedPos1 = $t090039114._2
193+ let burnedDeck1 = $t090039114._3
194+ let $t091279253 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1)
195+ let burned2 = $t091279253._1
196+ let burnedPos2 = $t091279253._2
197+ let burnedDeck2 = $t091279253._3
198+ let $t092669392 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2)
199+ let burned3 = $t092669392._1
200+ let burnedPos3 = $t092669392._2
201+ let burnedDeck3 = $t092669392._3
202+ let $t094059538 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3)
203+ let cardPlayer = $t094059538._1
204+ let cardPositionPlayer = $t094059538._2
205+ let avDeck1 = $t094059538._3
206+ let $t095519683 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1)
207+ let cardCasino = $t095519683._1
208+ let cardPositionCasino = $t095519683._2
209+ let avDeck2 = $t095519683._3
210210 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
211211 then {
212212 let currentDraws = match getInteger(this, (round + "_drawSequence")) {
213213 case a: Int =>
214214 (a + 1)
215215 case _ =>
216216 0
217217 }
218218 [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws)]
219219 }
220220 else if (isPlayerWinner(cardPlayer, cardCasino))
221221 then [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), ScriptTransfer(i.caller, (p + f), unit), BooleanEntry((round + "_stop"), true)]
222222 else [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), BooleanEntry((round + "_stop"), true)]
223223 }
224224 }
225225 }
226226
227227
228228 @Verifier(tx)
229229 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
230230

github/deemru/w8io/026f985 
51.48 ms