tx · CidM7rFsnzzgXsPWFgTryr6VwMGBqtDhPTvy8iwvhyr

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10020000 Waves

2021.12.03 05:07 [1817475] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "CidM7rFsnzzgXsPWFgTryr6VwMGBqtDhPTvy8iwvhyr", "fee": 10020000, "feeAssetId": null, "timestamp": 1638497274475, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "5HzvuMakyHtGYhtAtoaqra6T6wCu2QHBs57XD51HpL4aVQfL5nUs44L9zm9ZPEP3ZdT8Ee4D9szQVh6ve1ZkxWAf" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQESAwoBAQAAAA8AAAAABmNhc2lubwIAAAAjM010YUNMNHYxYmpUYWJVcXM3b1U0b2ZTOGZiYWkzNFdNMWkAAAAABVdBVkVTAAAAAAA7msoAAAAAAAZtYXhCZXQJAABoAAAAAgAAAAAAAAAAZAUAAAAFV0FWRVMAAAAACXNlcGFyYXRvcgIAAAABLAEAAAAKZ2V0TmV3RGVjawAAAAAJAARMAAAAAgIAAAADMDFDCQAETAAAAAICAAAAAzAyQwkABEwAAAACAgAAAAMwM0MJAARMAAAAAgIAAAADMDRDCQAETAAAAAICAAAAAzA1QwkABEwAAAACAgAAAAMwNkMJAARMAAAAAgIAAAADMDdDCQAETAAAAAICAAAAAzA4QwkABEwAAAACAgAAAAMwOUMJAARMAAAAAgIAAAADMTBDCQAETAAAAAICAAAAAzExQwkABEwAAAACAgAAAAMxMkMJAARMAAAAAgIAAAADMTNDCQAETAAAAAICAAAAAzAxRAkABEwAAAACAgAAAAMwMkQJAARMAAAAAgIAAAADMDNECQAETAAAAAICAAAAAzA0RAkABEwAAAACAgAAAAMwNUQJAARMAAAAAgIAAAADMDZECQAETAAAAAICAAAAAzA3RAkABEwAAAACAgAAAAMwOEQJAARMAAAAAgIAAAADMDlECQAETAAAAAICAAAAAzEwRAkABEwAAAACAgAAAAMxMUQJAARMAAAAAgIAAAADMTJECQAETAAAAAICAAAAAzEzRAkABEwAAAACAgAAAAMwMUgJAARMAAAAAgIAAAADMDJICQAETAAAAAICAAAAAzAzSAkABEwAAAACAgAAAAMwNEgJAARMAAAAAgIAAAADMDVICQAETAAAAAICAAAAAzA2SAkABEwAAAACAgAAAAMwN0gJAARMAAAAAgIAAAADMDhICQAETAAAAAICAAAAAzA5SAkABEwAAAACAgAAAAMxMEgJAARMAAAAAgIAAAADMTFICQAETAAAAAICAAAAAzEySAkABEwAAAACAgAAAAMxM0gJAARMAAAAAgIAAAADMDFTCQAETAAAAAICAAAAAzAyUwkABEwAAAACAgAAAAMwM1MJAARMAAAAAgIAAAADMDRTCQAETAAAAAICAAAAAzA1UwkABEwAAAACAgAAAAMwNlMJAARMAAAAAgIAAAADMDdTCQAETAAAAAICAAAAAzA4UwkABEwAAAACAgAAAAMwOVMJAARMAAAAAgIAAAADMTBTCQAETAAAAAICAAAAAzExUwkABEwAAAACAgAAAAMxMlMJAARMAAAAAgIAAAADMTNTBQAAAANuaWwBAAAADmdldFNpeE5ld0RlY2tzAAAAAAkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAABAAAAB2dldERlY2sAAAABAAAABGRlY2sDCQAAZwAAAAIAAAAAAAAAAAAJAAGQAAAAAQUAAAAEZGVjawkBAAAADmdldFNpeE5ld0RlY2tzAAAAAAUAAAAEZGVjawEAAAAPZ2V0UmFuZG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AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5eZEclQ==", "height": 1817475, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3GzD2Kzydqm13Kxv3TQSPxhyBRjxLgbLHCg1tGG75xjQ Next: 6pczZxYRahQXyoDHAsn8MAcpCGYxrF7wTUSeJXovjerv Diff:
OldNewDifferences
9393 }
9494
9595
96+func getCurrentRound (customRound,callerAddress) = if ((customRound == 0))
97+ then {
98+ let currentRound = match getInteger(this, (callerAddress + "_round")) {
99+ case a: Int =>
100+ a
101+ case _ =>
102+ throw("Unable to find the round")
103+ }
104+ currentRound
105+ }
106+ else customRound
107+
108+
96109 @Callable(i)
97110 func bet () = {
98111 let callerAddress = toBase58String(i.caller.bytes)
99- let $t029833009 = getPayments(i)
100- let p = $t029833009._1
101- let t = $t029833009._2
112+ let $t032983324 = getPayments(i)
113+ let p = $t032983324._1
114+ let t = $t032983324._2
102115 let currentRound = match getInteger(this, (callerAddress + "_round")) {
103116 case a: Int =>
104117 (a + 1)
113126 else {
114127 let availableProp = (round + "_deck")
115128 let avDeck = getAvailableDeck(this, availableProp)
116- let $t034893596 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
117- let cardPlayer = $t034893596._1
118- let cardPositionPlayer = $t034893596._2
119- let avDeck1 = $t034893596._3
120- let $t036013720 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
121- let cardCasino = $t036013720._1
122- let cardPositionCasino = $t036013720._2
123- let avDeck2 = $t036013720._3
129+ let $t038043911 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
130+ let cardPlayer = $t038043911._1
131+ let cardPositionPlayer = $t038043911._2
132+ let avDeck1 = $t038043911._3
133+ let $t039164035 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
134+ let cardCasino = $t039164035._1
135+ let cardPositionCasino = $t039164035._2
136+ let avDeck2 = $t039164035._3
124137 if ((1 == 1))
125138 then {
126139 let currentDraws = 1
127140 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"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, (t * 10)=") + toString(((t * 10) + t))) + ", unit)")), ScriptTransfer(i.caller, ((t * 10) + t), unit)]
129- 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)]
141+ 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"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, (t * 10)=") + toString(((t * 10) + t))) + ", unit)")), ScriptTransfer(i.caller, ((t * 10) + t), unit)]
142+ 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"), p)]
130143 }
131144 else if (isPlayerWinner(cardPlayer, cardCasino))
132- 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"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
133- 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)]
145+ 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"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
146+ 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"), p), BooleanEntry((round + "_stop"), true)]
134147 }
135148 }
136149
137150
138151
139152 @Callable(i)
140-func surrender () = {
153+func surrender (customRound) = {
141154 let callerAddress = toBase58String(i.caller.bytes)
142- let currentRound = match getInteger(this, (callerAddress + "_round")) {
143- case a: Int =>
144- toString(a)
145- case _ =>
146- throw("Unable to find the round")
147- }
148- let round = ((callerAddress + "_") + currentRound)
149- if (isDefined(getBoolean(this, (round + "_stop"))))
150- then throw("This round is already played")
151- else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
152- then throw("This game is not on war")
153- else {
154- let betAmount = match getInteger(this, (round + "_betAmount")) {
155- case a: Int =>
156- a
157- case _ =>
158- throw("Unable to find original bet amount")
159- }
155+ let roundToUse = getCurrentRound(customRound, callerAddress)
156+ let round = ((callerAddress + "_") + toString(roundToUse))
157+ if (!(isDefined(getBoolean(this, round))))
158+ then throw("This round is not played")
159+ else if (isDefined(getBoolean(this, (round + "_stop"))))
160+ then throw("This round is already played")
161+ else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
162+ then throw("This game is not on war")
163+ else {
164+ let betAmount = match getInteger(this, (round + "_betAmount")) {
165+ case a: Int =>
166+ a
167+ case _ =>
168+ throw("Unable to find original bet amount")
169+ }
160170 [StringEntry(((round + toString(betAmount)) + " _debug"), (("ScriptTransfer(i.caller, betAmount / 2=" + toString((betAmount / 2))) + ", unit)")), ScriptTransfer(i.caller, (betAmount / 2), unit), BooleanEntry((round + "_stop"), true)]
161- }
171+ }
162172 }
163173
164174
166176 @Callable(i)
167177 func goToWar (customRound) = {
168178 let callerAddress = toBase58String(i.caller.bytes)
169- let currentRound = match getInteger(this, (callerAddress + "_round")) {
170- case a: Int =>
171- a
172- case _ =>
173- throw("Unable to find the round")
174- }
175- let round = ((callerAddress + "_") + toString(currentRound))
176- if (isDefined(getBoolean(this, (round + "_stop"))))
177- then throw("This round is already played")
178- else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
179- then throw("This game is not on war")
180- else {
181- let betAmount = match getInteger(this, (round + "_betAmount")) {
182- case a: Int =>
183- a
184- case _ =>
185- throw("Unable to find original bet amount")
186- }
187- let $t080488074 = getPayments(i)
188- let p = $t080488074._1
189- let t = $t080488074._2
190- if ((p != betAmount))
191- then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
192- else {
193- let availableProp = (round + "_deck")
194- let avDeck = getAvailableDeck(this, availableProp)
195- let $t083648464 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
196- let burned1 = $t083648464._1
197- let burnedPos1 = $t083648464._2
198- let burnedDeck1 = $t083648464._3
199- let $t084778590 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1)
200- let burned2 = $t084778590._1
201- let burnedPos2 = $t084778590._2
202- let burnedDeck2 = $t084778590._3
203- let $t086038716 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2)
204- let burned3 = $t086038716._1
205- let burnedPos3 = $t086038716._2
206- let burnedDeck3 = $t086038716._3
207- let $t087298849 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3)
208- let cardPlayer = $t087298849._1
209- let cardPositionPlayer = $t087298849._2
210- let avDeck1 = $t087298849._3
211- let $t088628981 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
212- let cardCasino = $t088628981._1
213- let cardPositionCasino = $t088628981._2
214- let avDeck2 = $t088628981._3
215- if (((cardPositionCasino % 2) == 0))
216- then {
217- let currentDraws = match getInteger(this, (round + "_drawSequence")) {
218- case a: Int =>
219- (a + 1)
220- case _ =>
221- 0
222- }
223-[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)]
224- }
225- else if (isPlayerWinner(cardPlayer, cardCasino))
226- 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"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
227- 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)]
228- }
229- }
179+ let roundToUse = getCurrentRound(customRound, callerAddress)
180+ let round = ((callerAddress + "_") + toString(roundToUse))
181+ if (!(isDefined(getBoolean(this, round))))
182+ then throw("This round is not played")
183+ else if (isDefined(getBoolean(this, (round + "_stop"))))
184+ then throw("This round is already played")
185+ else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
186+ then throw("This game is not on war")
187+ else {
188+ let betAmount = match getInteger(this, (round + "_betAmount")) {
189+ case a: Int =>
190+ a
191+ case _ =>
192+ throw("Unable to find original bet amount")
193+ }
194+ let $t085598585 = getPayments(i)
195+ let p = $t085598585._1
196+ let t = $t085598585._2
197+ if ((p != betAmount))
198+ then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
199+ else {
200+ let availableProp = (round + "_deck")
201+ let avDeck = getAvailableDeck(this, availableProp)
202+ let $t088758975 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
203+ let burned1 = $t088758975._1
204+ let burnedPos1 = $t088758975._2
205+ let burnedDeck1 = $t088758975._3
206+ let $t089889101 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1)
207+ let burned2 = $t089889101._1
208+ let burnedPos2 = $t089889101._2
209+ let burnedDeck2 = $t089889101._3
210+ let $t091149227 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2)
211+ let burned3 = $t091149227._1
212+ let burnedPos3 = $t091149227._2
213+ let burnedDeck3 = $t091149227._3
214+ let $t092409360 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3)
215+ let cardPlayer = $t092409360._1
216+ let cardPositionPlayer = $t092409360._2
217+ let avDeck1 = $t092409360._3
218+ let $t093739492 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
219+ let cardCasino = $t093739492._1
220+ let cardPositionCasino = $t093739492._2
221+ let avDeck2 = $t093739492._3
222+ if (((cardPositionCasino % 2) == 0))
223+ then {
224+ let currentDraws = match getInteger(this, (round + "_drawSequence")) {
225+ case a: Int =>
226+ (a + 1)
227+ case _ =>
228+ 0
229+ }
230+[StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p)]
231+ }
232+ else if (isPlayerWinner(cardPlayer, cardCasino))
233+ then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
234+ 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)]
235+ }
236+ }
230237 }
231238
232239
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
96+func getCurrentRound (customRound,callerAddress) = if ((customRound == 0))
97+ then {
98+ let currentRound = match getInteger(this, (callerAddress + "_round")) {
99+ case a: Int =>
100+ a
101+ case _ =>
102+ throw("Unable to find the round")
103+ }
104+ currentRound
105+ }
106+ else customRound
107+
108+
96109 @Callable(i)
97110 func bet () = {
98111 let callerAddress = toBase58String(i.caller.bytes)
99- let $t029833009 = getPayments(i)
100- let p = $t029833009._1
101- let t = $t029833009._2
112+ let $t032983324 = getPayments(i)
113+ let p = $t032983324._1
114+ let t = $t032983324._2
102115 let currentRound = match getInteger(this, (callerAddress + "_round")) {
103116 case a: Int =>
104117 (a + 1)
105118 case _ =>
106119 1
107120 }
108121 let round = ((callerAddress + "_") + toString(currentRound))
109122 if (isDefined(getBoolean(this, (round + "_stop"))))
110123 then throw("This round is already played")
111124 else if (isDefined(getString(this, round)))
112125 then throw("You cannot bet on this game")
113126 else {
114127 let availableProp = (round + "_deck")
115128 let avDeck = getAvailableDeck(this, availableProp)
116- let $t034893596 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
117- let cardPlayer = $t034893596._1
118- let cardPositionPlayer = $t034893596._2
119- let avDeck1 = $t034893596._3
120- let $t036013720 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
121- let cardCasino = $t036013720._1
122- let cardPositionCasino = $t036013720._2
123- let avDeck2 = $t036013720._3
129+ let $t038043911 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
130+ let cardPlayer = $t038043911._1
131+ let cardPositionPlayer = $t038043911._2
132+ let avDeck1 = $t038043911._3
133+ let $t039164035 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
134+ let cardCasino = $t039164035._1
135+ let cardPositionCasino = $t039164035._2
136+ let avDeck2 = $t039164035._3
124137 if ((1 == 1))
125138 then {
126139 let currentDraws = 1
127140 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"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, (t * 10)=") + toString(((t * 10) + t))) + ", unit)")), ScriptTransfer(i.caller, ((t * 10) + t), unit)]
129- 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)]
141+ 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"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, (t * 10)=") + toString(((t * 10) + t))) + ", unit)")), ScriptTransfer(i.caller, ((t * 10) + t), unit)]
142+ 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"), p)]
130143 }
131144 else if (isPlayerWinner(cardPlayer, cardCasino))
132- 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"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
133- 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)]
145+ 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"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
146+ 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"), p), BooleanEntry((round + "_stop"), true)]
134147 }
135148 }
136149
137150
138151
139152 @Callable(i)
140-func surrender () = {
153+func surrender (customRound) = {
141154 let callerAddress = toBase58String(i.caller.bytes)
142- let currentRound = match getInteger(this, (callerAddress + "_round")) {
143- case a: Int =>
144- toString(a)
145- case _ =>
146- throw("Unable to find the round")
147- }
148- let round = ((callerAddress + "_") + currentRound)
149- if (isDefined(getBoolean(this, (round + "_stop"))))
150- then throw("This round is already played")
151- else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
152- then throw("This game is not on war")
153- else {
154- let betAmount = match getInteger(this, (round + "_betAmount")) {
155- case a: Int =>
156- a
157- case _ =>
158- throw("Unable to find original bet amount")
159- }
155+ let roundToUse = getCurrentRound(customRound, callerAddress)
156+ let round = ((callerAddress + "_") + toString(roundToUse))
157+ if (!(isDefined(getBoolean(this, round))))
158+ then throw("This round is not played")
159+ else if (isDefined(getBoolean(this, (round + "_stop"))))
160+ then throw("This round is already played")
161+ else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
162+ then throw("This game is not on war")
163+ else {
164+ let betAmount = match getInteger(this, (round + "_betAmount")) {
165+ case a: Int =>
166+ a
167+ case _ =>
168+ throw("Unable to find original bet amount")
169+ }
160170 [StringEntry(((round + toString(betAmount)) + " _debug"), (("ScriptTransfer(i.caller, betAmount / 2=" + toString((betAmount / 2))) + ", unit)")), ScriptTransfer(i.caller, (betAmount / 2), unit), BooleanEntry((round + "_stop"), true)]
161- }
171+ }
162172 }
163173
164174
165175
166176 @Callable(i)
167177 func goToWar (customRound) = {
168178 let callerAddress = toBase58String(i.caller.bytes)
169- let currentRound = match getInteger(this, (callerAddress + "_round")) {
170- case a: Int =>
171- a
172- case _ =>
173- throw("Unable to find the round")
174- }
175- let round = ((callerAddress + "_") + toString(currentRound))
176- if (isDefined(getBoolean(this, (round + "_stop"))))
177- then throw("This round is already played")
178- else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
179- then throw("This game is not on war")
180- else {
181- let betAmount = match getInteger(this, (round + "_betAmount")) {
182- case a: Int =>
183- a
184- case _ =>
185- throw("Unable to find original bet amount")
186- }
187- let $t080488074 = getPayments(i)
188- let p = $t080488074._1
189- let t = $t080488074._2
190- if ((p != betAmount))
191- then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
192- else {
193- let availableProp = (round + "_deck")
194- let avDeck = getAvailableDeck(this, availableProp)
195- let $t083648464 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
196- let burned1 = $t083648464._1
197- let burnedPos1 = $t083648464._2
198- let burnedDeck1 = $t083648464._3
199- let $t084778590 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1)
200- let burned2 = $t084778590._1
201- let burnedPos2 = $t084778590._2
202- let burnedDeck2 = $t084778590._3
203- let $t086038716 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2)
204- let burned3 = $t086038716._1
205- let burnedPos3 = $t086038716._2
206- let burnedDeck3 = $t086038716._3
207- let $t087298849 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3)
208- let cardPlayer = $t087298849._1
209- let cardPositionPlayer = $t087298849._2
210- let avDeck1 = $t087298849._3
211- let $t088628981 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
212- let cardCasino = $t088628981._1
213- let cardPositionCasino = $t088628981._2
214- let avDeck2 = $t088628981._3
215- if (((cardPositionCasino % 2) == 0))
216- then {
217- let currentDraws = match getInteger(this, (round + "_drawSequence")) {
218- case a: Int =>
219- (a + 1)
220- case _ =>
221- 0
222- }
223-[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)]
224- }
225- else if (isPlayerWinner(cardPlayer, cardCasino))
226- 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"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
227- 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)]
228- }
229- }
179+ let roundToUse = getCurrentRound(customRound, callerAddress)
180+ let round = ((callerAddress + "_") + toString(roundToUse))
181+ if (!(isDefined(getBoolean(this, round))))
182+ then throw("This round is not played")
183+ else if (isDefined(getBoolean(this, (round + "_stop"))))
184+ then throw("This round is already played")
185+ else if (!(isDefined(getInteger(this, (round + "_drawSequence")))))
186+ then throw("This game is not on war")
187+ else {
188+ let betAmount = match getInteger(this, (round + "_betAmount")) {
189+ case a: Int =>
190+ a
191+ case _ =>
192+ throw("Unable to find original bet amount")
193+ }
194+ let $t085598585 = getPayments(i)
195+ let p = $t085598585._1
196+ let t = $t085598585._2
197+ if ((p != betAmount))
198+ then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")"))
199+ else {
200+ let availableProp = (round + "_deck")
201+ let avDeck = getAvailableDeck(this, availableProp)
202+ let $t088758975 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck)
203+ let burned1 = $t088758975._1
204+ let burnedPos1 = $t088758975._2
205+ let burnedDeck1 = $t088758975._3
206+ let $t089889101 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1)
207+ let burned2 = $t089889101._1
208+ let burnedPos2 = $t089889101._2
209+ let burnedDeck2 = $t089889101._3
210+ let $t091149227 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2)
211+ let burned3 = $t091149227._1
212+ let burnedPos3 = $t091149227._2
213+ let burnedDeck3 = $t091149227._3
214+ let $t092409360 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3)
215+ let cardPlayer = $t092409360._1
216+ let cardPositionPlayer = $t092409360._2
217+ let avDeck1 = $t092409360._3
218+ let $t093739492 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1)
219+ let cardCasino = $t093739492._1
220+ let cardPositionCasino = $t093739492._2
221+ let avDeck2 = $t093739492._3
222+ if (((cardPositionCasino % 2) == 0))
223+ then {
224+ let currentDraws = match getInteger(this, (round + "_drawSequence")) {
225+ case a: Int =>
226+ (a + 1)
227+ case _ =>
228+ 0
229+ }
230+[StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p)]
231+ }
232+ else if (isPlayerWinner(cardPlayer, cardCasino))
233+ then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)]
234+ 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)]
235+ }
236+ }
230237 }
231238
232239
233240 @Verifier(tx)
234241 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
235242

github/deemru/w8io/026f985 
61.99 ms