tx · C4ZjhaLPsYA3FW1p2S1EZZnrTCLRdRy3t9kYJMg2LqAK

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10000000 Waves

2021.12.17 01:28 [1837426] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "C4ZjhaLPsYA3FW1p2S1EZZnrTCLRdRy3t9kYJMg2LqAK", "fee": 10000000, "feeAssetId": null, "timestamp": 1639693722538, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "2AmpjZ1Hk9qpMEiSisab8PMQiT3DwtKUEqHZU7YnaHvvo3jdEGpjnaoL8rw6fyUvEAju5grUzM9ac38Eajzo3ri5" ], "script": "base64:AAIFAAAAAAAAABIIAhIECgIBARIDCgEBEgMKAQEAAAANAAAAAAlzZXBhcmF0b3ICAAAAASwAAAAABm1heEJldAAAAAAABfXhAAEAAAAGZ2V0RmVlAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAW4FAAAAByRtYXRjaDAFAAAAAW4JAAACAAAAAQIAAAAbSW5pdGlhbCBmZWUgY2Fubm90IGJlIGZvdW5kAQAAAApnZXROZXdEZWNrAAAAAAkABEwAAAACAgAAAAMwMUMJAARMAAAAAgIAAAADMDJDCQAETAAAAAICAAAAAzAzQwkABEwAAAACAgAAAAMwNEMJAARMAAAAAgIAAAADMDVDCQAETAAAAAICAAAAAzA2QwkABEwAAAACAgAAAAMwN0MJAARMAAAAAgIAAAADMDhDCQAETAAAAAICAAAAAzA5QwkABEwAAAACAgAAAAMxMEMJAARMAAAAAgIAAAADMTFDCQAETAAAAAICAAAAAzEyQwkABEwAAAACAgAAAAMxM0MJAARMAAAAAgIAAAADMDFECQAETAAAAAICAAAAAzAyRAkABEwAAAACAgAAAAMwM0QJAARMAAAAAgIAAAADMDRECQAETAAAAAICAAAAAzA1RAkABEwAAAACAgAAAAMwNkQJAARMAAAAAgIAAAADMDdECQAETAAAAAICAAAAAzA4RAkABEwAAAACAgAAAAMwOUQJAARMAAAAAgIAAAADMTBECQAETAAAAAICAAAAAzExRAkABEwAAAACAgAAAAMxMkQJAARMAAAAAgIAAAADMTNECQAETAAAAAICAAAAAzAxSAkABEwAAAACAgAAAAMwMkgJAARMAAAAAgIAAAADMDNICQAETAAAAAICAAAAAzA0SAkABEwAAAACAgAAAAMwNUgJAARMAAAAAgIAAAADMDZICQAETAAAAAICAAAAAzA3SAkABEwAAAACAgAAAAMwOEgJAARMAAAAAgIAAAADMDlICQAETAAAAAICAAAAAzEwSAkABEwAAAACAgAAAAMxMUgJAARMAAAAAgIAAAADMTJICQAETAAAAAICAAAAAzEzSAkABEwAAAACAgAAAAMwMVMJAARMAAAAAgIAAAADMDJTCQAETAAAAAICAAAAAzAzUwkABEwAAAACAgAAAAMwNFMJAARMAAAAAgIAAAADMDVTCQAETAAAAAICAAAAAzA2UwkABEwAAAACAgAAAAMwN1MJAARMAAAAAgIAAAADMDhTCQAETAAAAAICAAAAAzA5UwkABEwAAAACAgAAAAMxMFMJAARMAAAAAgIAAAADMTFTCQAETAAAAAICAAAAAzEyUwkABEwAAAACAgAAAAMxM1MFAAAAA25pbAEAAAAOZ2V0U2l4TmV3RGVja3MAAAAACQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAEAAAAHZ2V0RGVjawAAAAEAAAAEZGVjawMJAABnAAA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heWVyQ2FyZAUAAAAKY2FyZFBsYXllcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAABXJvdW5kAgAAAAtfY2FzaW5vQ2FyZAUAAAAKY2FyZENhc2lubwkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAAFX3N0b3AGBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRvXsBM=", "height": 1837426, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hgf3NUYYrT5U5WL7PWTqQ4BDUCgEfCGJAXPBWsLhmR2o Next: DtDMobNyFDamZhQstGak6PHq9UA2eV4QuUsFy7HEiM3a Diff:
OldNewDifferences
2424 else deck
2525
2626
27-func getRandomNumber (salt1,salt2,answersCount) = {
28- let hash = sha256(toBytes((salt1 + salt2)))
29- let index = toInt(hash)
30- let rand = (index % answersCount)
31- if ((0 > rand))
32- then ((-1 * rand) + 1)
33- else (rand + 1)
27+func getRandomNumber (i,salt1,salt2,answersCount) = {
28+ let generator = (toInt(sha256(((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)) + toBytes(salt1)))) % 17728)
29+ let index = (toInt(toBytes(pow(generator, 0, 2, 0, 0, HALFUP))) + toInt(toBytes(salt2)))
30+ let r = (index % answersCount)
31+ if ((0 > r))
32+ then ((-1 * r) + 1)
33+ else (r + 1)
3434 }
35-
36-
37-func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) {
38- case n: Int =>
39- toString(n)
40- case _ =>
41- address
42-}
4335
4436
4537 func getPayments (i) = if ((size(i.payments) == 0))
7870 else getSixNewDecks()
7971
8072
81-func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = {
73+func getPlayerCardAndPositionAndUpdateDeck (i,salt1,deck) = {
8274 let avDeck2 = getDeck(deck)
83- let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2))
75+ let cardPosition = getRandomNumber(i, salt1, makeString(avDeck2, separator), size(avDeck2))
8476 let card = avDeck2[(cardPosition % size(avDeck2))]
8577 let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2)))
8678 $Tuple3(card, cardPosition, avDeck3)
122114 else {
123115 let availableProp = (round + "_deck")
124116 let avDeck = getAvailableDeck(this, availableProp)
125- let $t038803987 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
126- let cardPlayer = $t038803987._1
127- let cardPositionPlayer = $t038803987._2
128- let avDeck1 = $t038803987._3
129- let $t039924111 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
130- let cardCasino = $t039924111._1
131- let cardPositionCasino = $t039924111._2
132- let avDeck2 = $t039924111._3
117+ let $t041794299 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck)
118+ let cardPlayer = $t041794299._1
119+ let cardPositionPlayer = $t041794299._2
120+ let avDeck1 = $t041794299._3
121+ let $t043044425 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1)
122+ let cardCasino = $t043044425._1
123+ let cardPositionCasino = $t043044425._2
124+ let avDeck2 = $t043044425._3
133125 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
134126 then {
135127 let currentDraws = 1
195187 else {
196188 let availableProp = (round + "_deck")
197189 let avDeck = getAvailableDeck(this, availableProp)
198- let $t093409440 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
199- let burned1 = $t093409440._1
200- let burnedPos1 = $t093409440._2
201- let burnedDeck1 = $t093409440._3
202- let $t094539566 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1)
203- let burned2 = $t094539566._1
204- let burnedPos2 = $t094539566._2
205- let burnedDeck2 = $t094539566._3
206- let $t095799692 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2)
207- let burned3 = $t095799692._1
208- let burnedPos3 = $t095799692._2
209- let burnedDeck3 = $t095799692._3
210- let $t097059825 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3)
211- let cardPlayer = $t097059825._1
212- let cardPositionPlayer = $t097059825._2
213- let avDeck1 = $t097059825._3
214- let $t098389957 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
215- let cardCasino = $t098389957._1
216- let cardPositionCasino = $t098389957._2
217- let avDeck2 = $t098389957._3
190+ let $t096549765 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck)
191+ let burned1 = $t096549765._1
192+ let burnedPos1 = $t096549765._2
193+ let burnedDeck1 = $t096549765._3
194+ let $t097789904 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1)
195+ let burned2 = $t097789904._1
196+ let burnedPos2 = $t097789904._2
197+ let burnedDeck2 = $t097789904._3
198+ let $t0991710043 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2)
199+ let burned3 = $t0991710043._1
200+ let burnedPos3 = $t0991710043._2
201+ let burnedDeck3 = $t0991710043._3
202+ let $t01005610189 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3)
203+ let cardPlayer = $t01005610189._1
204+ let cardPositionPlayer = $t01005610189._2
205+ let avDeck1 = $t01005610189._3
206+ let $t01020210334 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1)
207+ let cardCasino = $t01020210334._1
208+ let cardPositionCasino = $t01020210334._2
209+ let avDeck2 = $t01020210334._3
218210 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
219211 then {
220212 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
27-func getRandomNumber (salt1,salt2,answersCount) = {
28- let hash = sha256(toBytes((salt1 + salt2)))
29- let index = toInt(hash)
30- let rand = (index % answersCount)
31- if ((0 > rand))
32- then ((-1 * rand) + 1)
33- else (rand + 1)
27+func getRandomNumber (i,salt1,salt2,answersCount) = {
28+ let generator = (toInt(sha256(((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)) + toBytes(salt1)))) % 17728)
29+ let index = (toInt(toBytes(pow(generator, 0, 2, 0, 0, HALFUP))) + toInt(toBytes(salt2)))
30+ let r = (index % answersCount)
31+ if ((0 > r))
32+ then ((-1 * r) + 1)
33+ else (r + 1)
3434 }
35-
36-
37-func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) {
38- case n: Int =>
39- toString(n)
40- case _ =>
41- address
42-}
4335
4436
4537 func getPayments (i) = if ((size(i.payments) == 0))
4638 then throw("Payment must be attached")
4739 else if ((size(i.payments) == 1))
4840 then {
4941 let pmt = i.payments[0]
5042 if (isDefined(pmt.assetId))
5143 then throw("This function accepts WAVES tokens only (0)")
5244 else pmt.amount
5345 }
5446 else throw("There should be only one payment")
5547
5648
5749 func getCardValue (stringCard) = {
5850 let p = parseIntValue(take(stringCard, 2))
5951 if ((p == 1))
6052 then 20
6153 else p
6254 }
6355
6456
6557 func isPlayerWinner (cardPlayer,cardCasino) = {
6658 let p = getCardValue(cardPlayer)
6759 let o = getCardValue(cardCasino)
6860 (p > o)
6961 }
7062
7163
7264 func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp)))
7365 then {
7466 let stringDeck = getStringValue(this, availableProp)
7567 let deck = split(stringDeck, separator)
7668 getDeck(deck)
7769 }
7870 else getSixNewDecks()
7971
8072
81-func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = {
73+func getPlayerCardAndPositionAndUpdateDeck (i,salt1,deck) = {
8274 let avDeck2 = getDeck(deck)
83- let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2))
75+ let cardPosition = getRandomNumber(i, salt1, makeString(avDeck2, separator), size(avDeck2))
8476 let card = avDeck2[(cardPosition % size(avDeck2))]
8577 let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2)))
8678 $Tuple3(card, cardPosition, avDeck3)
8779 }
8880
8981
9082 func getCurrentRound (customRound,callerAddress) = if ((customRound == 0))
9183 then {
9284 let currentRound = match getInteger(this, (callerAddress + "_round")) {
9385 case a: Int =>
9486 a
9587 case _ =>
9688 throw("Unable to find the round")
9789 }
9890 currentRound
9991 }
10092 else customRound
10193
10294
10395 @Callable(i)
10496 func bet (normalBet,tieBet) = {
10597 let callerAddress = toBase58String(i.caller.bytes)
10698 let p = getPayments(i)
10799 let currentRound = match getInteger(this, (callerAddress + "_round")) {
108100 case a: Int =>
109101 (a + 1)
110102 case _ =>
111103 1
112104 }
113105 let round = ((callerAddress + "_") + toString(currentRound))
114106 if (isDefined(getBoolean(this, (round + "_stop"))))
115107 then throw("This round is already played")
116108 else if (isDefined(getString(this, round)))
117109 then throw("You cannot bet on this game")
118110 else if ((p != (normalBet + tieBet)))
119111 then throw("normal bet + tie bet should be equal to the payment")
120112 else if ((p > maxBet))
121113 then throw(("The bet needs to be lower or equal than " + toString(maxBet)))
122114 else {
123115 let availableProp = (round + "_deck")
124116 let avDeck = getAvailableDeck(this, availableProp)
125- let $t038803987 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
126- let cardPlayer = $t038803987._1
127- let cardPositionPlayer = $t038803987._2
128- let avDeck1 = $t038803987._3
129- let $t039924111 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
130- let cardCasino = $t039924111._1
131- let cardPositionCasino = $t039924111._2
132- let avDeck2 = $t039924111._3
117+ let $t041794299 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck)
118+ let cardPlayer = $t041794299._1
119+ let cardPositionPlayer = $t041794299._2
120+ let avDeck1 = $t041794299._3
121+ let $t043044425 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1)
122+ let cardCasino = $t043044425._1
123+ let cardPositionCasino = $t043044425._2
124+ let avDeck2 = $t043044425._3
133125 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
134126 then {
135127 let currentDraws = 1
136128 if ((tieBet != 0))
137129 then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), BooleanEntry(round, true), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), 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)]
138130 else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), BooleanEntry(round, true), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee)]
139131 }
140132 else if (isPlayerWinner(cardPlayer, cardCasino))
141133 then [StringEntry(availableProp, makeString(avDeck2, separator)), BooleanEntry(round, true), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), 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)]
142134 else [StringEntry(availableProp, makeString(avDeck2, separator)), BooleanEntry(round, true), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee), BooleanEntry((round + "_stop"), true)]
143135 }
144136 }
145137
146138
147139
148140 @Callable(i)
149141 func surrender (customRound) = {
150142 let callerAddress = toBase58String(i.caller.bytes)
151143 let roundToUse = getCurrentRound(customRound, callerAddress)
152144 let round = ((callerAddress + "_") + toString(roundToUse))
153145 if (!(isDefined(getBoolean(this, round))))
154146 then throw("This round is not played")
155147 else if (isDefined(getBoolean(this, (round + "_stop"))))
156148 then throw("This round is already played")
157149 else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
158150 then throw("This game is not on war")
159151 else {
160152 let betAmount = match getInteger(this, (round + "_betAmount")) {
161153 case a: Int =>
162154 a
163155 case _ =>
164156 throw("Unable to find original bet amount")
165157 }
166158 let f = getFee((round + "_initialFee"))
167159 [ScriptTransfer(i.caller, ((betAmount / 2) + f), unit), BooleanEntry((round + "_stop"), true)]
168160 }
169161 }
170162
171163
172164
173165 @Callable(i)
174166 func goToWar (customRound) = {
175167 let callerAddress = toBase58String(i.caller.bytes)
176168 let roundToUse = getCurrentRound(customRound, callerAddress)
177169 let round = ((callerAddress + "_") + toString(roundToUse))
178170 if (!(isDefined(getBoolean(this, round))))
179171 then throw("This round is not played")
180172 else if (isDefined(getBoolean(this, (round + "_stop"))))
181173 then throw("This round is already played")
182174 else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
183175 then throw("This game is not on war")
184176 else {
185177 let betAmount = match getInteger(this, (round + "_betAmount")) {
186178 case a: Int =>
187179 a
188180 case _ =>
189181 throw("Unable to find original bet amount")
190182 }
191183 let p = getPayments(i)
192184 let f = getFee((round + "_initialFee"))
193185 if ((p != betAmount))
194186 then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
195187 else {
196188 let availableProp = (round + "_deck")
197189 let avDeck = getAvailableDeck(this, availableProp)
198- let $t093409440 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
199- let burned1 = $t093409440._1
200- let burnedPos1 = $t093409440._2
201- let burnedDeck1 = $t093409440._3
202- let $t094539566 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1)
203- let burned2 = $t094539566._1
204- let burnedPos2 = $t094539566._2
205- let burnedDeck2 = $t094539566._3
206- let $t095799692 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2)
207- let burned3 = $t095799692._1
208- let burnedPos3 = $t095799692._2
209- let burnedDeck3 = $t095799692._3
210- let $t097059825 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3)
211- let cardPlayer = $t097059825._1
212- let cardPositionPlayer = $t097059825._2
213- let avDeck1 = $t097059825._3
214- let $t098389957 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
215- let cardCasino = $t098389957._1
216- let cardPositionCasino = $t098389957._2
217- let avDeck2 = $t098389957._3
190+ let $t096549765 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck)
191+ let burned1 = $t096549765._1
192+ let burnedPos1 = $t096549765._2
193+ let burnedDeck1 = $t096549765._3
194+ let $t097789904 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1)
195+ let burned2 = $t097789904._1
196+ let burnedPos2 = $t097789904._2
197+ let burnedDeck2 = $t097789904._3
198+ let $t0991710043 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2)
199+ let burned3 = $t0991710043._1
200+ let burnedPos3 = $t0991710043._2
201+ let burnedDeck3 = $t0991710043._3
202+ let $t01005610189 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3)
203+ let cardPlayer = $t01005610189._1
204+ let cardPositionPlayer = $t01005610189._2
205+ let avDeck1 = $t01005610189._3
206+ let $t01020210334 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1)
207+ let cardCasino = $t01020210334._1
208+ let cardPositionCasino = $t01020210334._2
209+ let avDeck2 = $t01020210334._3
218210 if ((getCardValue(cardPlayer) == getCardValue(cardCasino)))
219211 then {
220212 let currentDraws = match getInteger(this, (round + "_drawSequence")) {
221213 case a: Int =>
222214 (a + 1)
223215 case _ =>
224216 0
225217 }
226218 [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws)]
227219 }
228220 else if (isPlayerWinner(cardPlayer, cardCasino))
229221 then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), ScriptTransfer(i.caller, (p + f), unit), BooleanEntry((round + "_stop"), true)]
230222 else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), BooleanEntry((round + "_stop"), true)]
231223 }
232224 }
233225 }
234226
235227
236228 @Verifier(tx)
237229 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
238230

github/deemru/w8io/169f3d6 
89.15 ms