tx · 2LouZuo7GwERSnjGuJxuD3Dff1jw6HpgvLUTSqs6EJ5G 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd: -0.10100000 Waves 2021.12.03 05:24 [1817493] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves
{ "type": 13, "id": "2LouZuo7GwERSnjGuJxuD3Dff1jw6HpgvLUTSqs6EJ5G", "fee": 10100000, "feeAssetId": null, "timestamp": 1638498262470, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "5sg5bMt1vCpaQiyvWKGPbh8GFEhjkqENcedvdAE72owJHHjxnYqfD6uxKxJNTpXErkniH38QeaKgrWjk43efeicF" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQESAwoBAQAAAAwAAAAACXNlcGFyYXRvcgIAAAABLAEAAAAKZ2V0TmV3RGVjawAAAAAJAARMAAAAAgIAAAADMDFDCQAETAAAAAICAAAAAzAyQwkABEwAAAACAgAAAAMwM0MJAARMAAAAAgIAAAADMDRDCQAETAAAAAICAAAAAzA1QwkABEwAAAACAgAAAAMwNkMJAARMAAAAAgIAAAADMDdDCQAETAAAAAICAAAAAzA4QwkABEwAAAACAgAAAAMwOUMJAARMAAAAAgIAAAADMTBDCQAETAAAAAICAAAAAzExQwkABEwAAAACAgAAAAMxMkMJAARMAAAAAgIAAAADMTNDCQAETAAAAAICAAAAAzAxRAkABEwAAAACAgAAAAMwMkQJAARMAAAAAgIAAAADMDNECQAETAAAAAICAAAAAzA0RAkABEwAAAACAgAAAAMwNUQJAARMAAAAAgIAAAADMDZECQAETAAAAAICAAAAAzA3RAkABEwAAAACAgAAAAMwOEQJAARMAAAAAgIAAAADMDlECQAETAAAAAICAAAAAzEwRAkABEwAAAACAgAAAAMxMUQJAARMAAAAAgIAAAADMTJ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VzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkwgZys", "height": 1817493, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3PUdTEN6Vzg4KtYyUqpLu7DJDXZsY5a545Q3F1hbj34o Next: BfYdezzdzLy4uDFu2pHoJB9EDmGqM81MWcEyxhEEbPXg Diff:
Old | New | Differences | |
---|---|---|---|
103 | 103 | @Callable(i) | |
104 | 104 | func bet () = { | |
105 | 105 | let callerAddress = toBase58String(i.caller.bytes) | |
106 | - | let $ | |
107 | - | let p = $ | |
108 | - | let t = $ | |
106 | + | let $t031983224 = getPayments(i) | |
107 | + | let p = $t031983224._1 | |
108 | + | let t = $t031983224._2 | |
109 | 109 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
110 | 110 | case a: Int => | |
111 | 111 | (a + 1) | |
120 | 120 | else { | |
121 | 121 | let availableProp = (round + "_deck") | |
122 | 122 | let avDeck = getAvailableDeck(this, availableProp) | |
123 | - | let $ | |
124 | - | let cardPlayer = $ | |
125 | - | let cardPositionPlayer = $ | |
126 | - | let avDeck1 = $ | |
127 | - | let $ | |
128 | - | let cardCasino = $ | |
129 | - | let cardPositionCasino = $ | |
130 | - | let avDeck2 = $ | |
123 | + | let $t037043811 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
124 | + | let cardPlayer = $t037043811._1 | |
125 | + | let cardPositionPlayer = $t037043811._2 | |
126 | + | let avDeck1 = $t037043811._3 | |
127 | + | let $t038163935 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
128 | + | let cardCasino = $t038163935._1 | |
129 | + | let cardPositionCasino = $t038163935._2 | |
130 | + | let avDeck2 = $t038163935._3 | |
131 | 131 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
132 | 132 | then { | |
133 | 133 | let currentDraws = 1 | |
185 | 185 | case _ => | |
186 | 186 | throw("Unable to find original bet amount") | |
187 | 187 | } | |
188 | - | let $ | |
189 | - | let p = $ | |
190 | - | let t = $ | |
188 | + | let $t085108536 = getPayments(i) | |
189 | + | let p = $t085108536._1 | |
190 | + | let t = $t085108536._2 | |
191 | 191 | if ((p != betAmount)) | |
192 | 192 | then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")")) | |
193 | 193 | else { | |
194 | 194 | let availableProp = (round + "_deck") | |
195 | 195 | let avDeck = getAvailableDeck(this, availableProp) | |
196 | - | let $ | |
197 | - | let burned1 = $ | |
198 | - | let burnedPos1 = $ | |
199 | - | let burnedDeck1 = $ | |
200 | - | let $ | |
201 | - | let burned2 = $ | |
202 | - | let burnedPos2 = $ | |
203 | - | let burnedDeck2 = $ | |
204 | - | let $ | |
205 | - | let burned3 = $ | |
206 | - | let burnedPos3 = $ | |
207 | - | let burnedDeck3 = $ | |
208 | - | let $ | |
209 | - | let cardPlayer = $ | |
210 | - | let cardPositionPlayer = $ | |
211 | - | let avDeck1 = $ | |
212 | - | let $ | |
213 | - | let cardCasino = $ | |
214 | - | let cardPositionCasino = $ | |
215 | - | let avDeck2 = $ | |
196 | + | let $t088268926 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
197 | + | let burned1 = $t088268926._1 | |
198 | + | let burnedPos1 = $t088268926._2 | |
199 | + | let burnedDeck1 = $t088268926._3 | |
200 | + | let $t089399052 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1) | |
201 | + | let burned2 = $t089399052._1 | |
202 | + | let burnedPos2 = $t089399052._2 | |
203 | + | let burnedDeck2 = $t089399052._3 | |
204 | + | let $t090659178 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2) | |
205 | + | let burned3 = $t090659178._1 | |
206 | + | let burnedPos3 = $t090659178._2 | |
207 | + | let burnedDeck3 = $t090659178._3 | |
208 | + | let $t091919311 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3) | |
209 | + | let cardPlayer = $t091919311._1 | |
210 | + | let cardPositionPlayer = $t091919311._2 | |
211 | + | let avDeck1 = $t091919311._3 | |
212 | + | let $t093249443 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
213 | + | let cardCasino = $t093249443._1 | |
214 | + | let cardPositionCasino = $t093249443._2 | |
215 | + | let avDeck2 = $t093249443._3 | |
216 | 216 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
217 | 217 | then { | |
218 | 218 | let currentDraws = match getInteger(this, (round + "_drawSequence")) { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "," | |
5 | 5 | ||
6 | 6 | 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"] | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getDeck (deck) = if ((0 >= size(deck))) | |
13 | 13 | then getSixNewDecks() | |
14 | 14 | else deck | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func getRandomNumber (salt1,salt2,answersCount) = { | |
18 | 18 | let hash = sha256(toBytes((salt1 + salt2))) | |
19 | 19 | let index = toInt(hash) | |
20 | 20 | let rand = (index % answersCount) | |
21 | 21 | if ((0 > rand)) | |
22 | 22 | then ((-1 * rand) + 1) | |
23 | 23 | else (rand + 1) | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) { | |
28 | 28 | case n: Int => | |
29 | 29 | toString(n) | |
30 | 30 | case _ => | |
31 | 31 | address | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func getPayments (i) = if ((size(i.payments) == 0)) | |
36 | 36 | then throw("Payment must be attached") | |
37 | 37 | else if ((size(i.payments) == 1)) | |
38 | 38 | then { | |
39 | 39 | let pmt = i.payments[0] | |
40 | 40 | if (isDefined(pmt.assetId)) | |
41 | 41 | then throw("This function accepts WAVES tokens only (0)") | |
42 | 42 | else $Tuple2(pmt.amount, 0) | |
43 | 43 | } | |
44 | 44 | else { | |
45 | 45 | let pmt = i.payments[0] | |
46 | 46 | if (isDefined(pmt.assetId)) | |
47 | 47 | then throw("This function accepts WAVES tokens only (10)") | |
48 | 48 | else { | |
49 | 49 | let pmt2 = i.payments[1] | |
50 | 50 | if (isDefined(pmt2.assetId)) | |
51 | 51 | then throw("This function accepts WAVES tokens only (11)") | |
52 | 52 | else $Tuple2(pmt.amount, pmt2.amount) | |
53 | 53 | } | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getCardValue (stringCard) = { | |
58 | 58 | let p = parseIntValue(take(stringCard, 2)) | |
59 | 59 | if ((p == 1)) | |
60 | 60 | then 20 | |
61 | 61 | else p | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func isPlayerWinner (cardPlayer,cardCasino) = { | |
66 | 66 | let p = getCardValue(cardPlayer) | |
67 | 67 | let o = getCardValue(cardCasino) | |
68 | 68 | (p > o) | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp))) | |
73 | 73 | then { | |
74 | 74 | let stringDeck = getStringValue(this, availableProp) | |
75 | 75 | let deck = split(stringDeck, separator) | |
76 | 76 | getDeck(deck) | |
77 | 77 | } | |
78 | 78 | else getSixNewDecks() | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = { | |
82 | 82 | let avDeck2 = getDeck(deck) | |
83 | 83 | let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2)) | |
84 | 84 | let card = avDeck2[(cardPosition % size(avDeck2))] | |
85 | 85 | let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2))) | |
86 | 86 | $Tuple3(card, cardPosition, avDeck3) | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getCurrentRound (customRound,callerAddress) = if ((customRound == 0)) | |
91 | 91 | then { | |
92 | 92 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
93 | 93 | case a: Int => | |
94 | 94 | a | |
95 | 95 | case _ => | |
96 | 96 | throw("Unable to find the round") | |
97 | 97 | } | |
98 | 98 | currentRound | |
99 | 99 | } | |
100 | 100 | else customRound | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | @Callable(i) | |
104 | 104 | func bet () = { | |
105 | 105 | let callerAddress = toBase58String(i.caller.bytes) | |
106 | - | let $ | |
107 | - | let p = $ | |
108 | - | let t = $ | |
106 | + | let $t031983224 = getPayments(i) | |
107 | + | let p = $t031983224._1 | |
108 | + | let t = $t031983224._2 | |
109 | 109 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
110 | 110 | case a: Int => | |
111 | 111 | (a + 1) | |
112 | 112 | case _ => | |
113 | 113 | 1 | |
114 | 114 | } | |
115 | 115 | let round = ((callerAddress + "_") + toString(currentRound)) | |
116 | 116 | if (isDefined(getBoolean(this, (round + "_stop")))) | |
117 | 117 | then throw("This round is already played") | |
118 | 118 | else if (isDefined(getString(this, round))) | |
119 | 119 | then throw("You cannot bet on this game") | |
120 | 120 | else { | |
121 | 121 | let availableProp = (round + "_deck") | |
122 | 122 | let avDeck = getAvailableDeck(this, availableProp) | |
123 | - | let $ | |
124 | - | let cardPlayer = $ | |
125 | - | let cardPositionPlayer = $ | |
126 | - | let avDeck1 = $ | |
127 | - | let $ | |
128 | - | let cardCasino = $ | |
129 | - | let cardPositionCasino = $ | |
130 | - | let avDeck2 = $ | |
123 | + | let $t037043811 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
124 | + | let cardPlayer = $t037043811._1 | |
125 | + | let cardPositionPlayer = $t037043811._2 | |
126 | + | let avDeck1 = $t037043811._3 | |
127 | + | let $t038163935 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
128 | + | let cardCasino = $t038163935._1 | |
129 | + | let cardPositionCasino = $t038163935._2 | |
130 | + | let avDeck2 = $t038163935._3 | |
131 | 131 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
132 | 132 | then { | |
133 | 133 | let currentDraws = 1 | |
134 | 134 | if ((t != 0)) | |
135 | 135 | 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), ScriptTransfer(i.caller, ((t * 10) + t), unit)] | |
136 | 136 | 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)] | |
137 | 137 | } | |
138 | 138 | else if (isPlayerWinner(cardPlayer, cardCasino)) | |
139 | 139 | 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), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)] | |
140 | 140 | 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)] | |
141 | 141 | } | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | ||
146 | 146 | @Callable(i) | |
147 | 147 | func surrender (customRound) = { | |
148 | 148 | let callerAddress = toBase58String(i.caller.bytes) | |
149 | 149 | let roundToUse = getCurrentRound(customRound, callerAddress) | |
150 | 150 | let round = ((callerAddress + "_") + toString(roundToUse)) | |
151 | 151 | if (!(isDefined(getBoolean(this, round)))) | |
152 | 152 | then throw("This round is not played") | |
153 | 153 | else if (isDefined(getBoolean(this, (round + "_stop")))) | |
154 | 154 | then throw("This round is already played") | |
155 | 155 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
156 | 156 | then throw("This game is not on war") | |
157 | 157 | else { | |
158 | 158 | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
159 | 159 | case a: Int => | |
160 | 160 | a | |
161 | 161 | case _ => | |
162 | 162 | throw("Unable to find original bet amount") | |
163 | 163 | } | |
164 | 164 | [ScriptTransfer(i.caller, (betAmount / 2), unit), BooleanEntry((round + "_stop"), true)] | |
165 | 165 | } | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | ||
170 | 170 | @Callable(i) | |
171 | 171 | func goToWar (customRound) = { | |
172 | 172 | let callerAddress = toBase58String(i.caller.bytes) | |
173 | 173 | let roundToUse = getCurrentRound(customRound, callerAddress) | |
174 | 174 | let round = ((callerAddress + "_") + toString(roundToUse)) | |
175 | 175 | if (!(isDefined(getBoolean(this, round)))) | |
176 | 176 | then throw("This round is not played") | |
177 | 177 | else if (isDefined(getBoolean(this, (round + "_stop")))) | |
178 | 178 | then throw("This round is already played") | |
179 | 179 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
180 | 180 | then throw("This game is not on war") | |
181 | 181 | else { | |
182 | 182 | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
183 | 183 | case a: Int => | |
184 | 184 | a | |
185 | 185 | case _ => | |
186 | 186 | throw("Unable to find original bet amount") | |
187 | 187 | } | |
188 | - | let $ | |
189 | - | let p = $ | |
190 | - | let t = $ | |
188 | + | let $t085108536 = getPayments(i) | |
189 | + | let p = $t085108536._1 | |
190 | + | let t = $t085108536._2 | |
191 | 191 | if ((p != betAmount)) | |
192 | 192 | then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")")) | |
193 | 193 | else { | |
194 | 194 | let availableProp = (round + "_deck") | |
195 | 195 | let avDeck = getAvailableDeck(this, availableProp) | |
196 | - | let $ | |
197 | - | let burned1 = $ | |
198 | - | let burnedPos1 = $ | |
199 | - | let burnedDeck1 = $ | |
200 | - | let $ | |
201 | - | let burned2 = $ | |
202 | - | let burnedPos2 = $ | |
203 | - | let burnedDeck2 = $ | |
204 | - | let $ | |
205 | - | let burned3 = $ | |
206 | - | let burnedPos3 = $ | |
207 | - | let burnedDeck3 = $ | |
208 | - | let $ | |
209 | - | let cardPlayer = $ | |
210 | - | let cardPositionPlayer = $ | |
211 | - | let avDeck1 = $ | |
212 | - | let $ | |
213 | - | let cardCasino = $ | |
214 | - | let cardPositionCasino = $ | |
215 | - | let avDeck2 = $ | |
196 | + | let $t088268926 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
197 | + | let burned1 = $t088268926._1 | |
198 | + | let burnedPos1 = $t088268926._2 | |
199 | + | let burnedDeck1 = $t088268926._3 | |
200 | + | let $t089399052 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1) | |
201 | + | let burned2 = $t089399052._1 | |
202 | + | let burnedPos2 = $t089399052._2 | |
203 | + | let burnedDeck2 = $t089399052._3 | |
204 | + | let $t090659178 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2) | |
205 | + | let burned3 = $t090659178._1 | |
206 | + | let burnedPos3 = $t090659178._2 | |
207 | + | let burnedDeck3 = $t090659178._3 | |
208 | + | let $t091919311 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3) | |
209 | + | let cardPlayer = $t091919311._1 | |
210 | + | let cardPositionPlayer = $t091919311._2 | |
211 | + | let avDeck1 = $t091919311._3 | |
212 | + | let $t093249443 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
213 | + | let cardCasino = $t093249443._1 | |
214 | + | let cardPositionCasino = $t093249443._2 | |
215 | + | let avDeck2 = $t093249443._3 | |
216 | 216 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
217 | 217 | then { | |
218 | 218 | let currentDraws = match getInteger(this, (round + "_drawSequence")) { | |
219 | 219 | case a: Int => | |
220 | 220 | (a + 1) | |
221 | 221 | case _ => | |
222 | 222 | 0 | |
223 | 223 | } | |
224 | 224 | [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)] | |
225 | 225 | } | |
226 | 226 | else if (isPlayerWinner(cardPlayer, cardCasino)) | |
227 | 227 | then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)] | |
228 | 228 | 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)] | |
229 | 229 | } | |
230 | 230 | } | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | @Verifier(tx) | |
235 | 235 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
236 | 236 |
github/deemru/w8io/169f3d6 105.57 ms ◑