tx · GYW4ctUkrBUmdcoyoM6uiZaZBx36b6r48sjM95DTuRZF 3Mt6NEJ6ZK6TFZs14tvnR5iAgemnomy2m1V: -0.02100000 Waves 2022.09.13 12:11 [2227130] smart account 3Mt6NEJ6ZK6TFZs14tvnR5iAgemnomy2m1V > SELF 0.00000000 Waves
{ "type": 13, "id": "GYW4ctUkrBUmdcoyoM6uiZaZBx36b6r48sjM95DTuRZF", "fee": 2100000, "feeAssetId": null, "timestamp": 1663060357784, "version": 2, "chainId": 84, "sender": "3Mt6NEJ6ZK6TFZs14tvnR5iAgemnomy2m1V", "senderPublicKey": "5f9EawB8nxaLg7KKhyqV2RDBMwRBG6o69D8zc9myAzrY", "proofs": [ "3889XnyXSyrP5hTvmR5Kc23FeaqqstLZd4yA3ETML59RXEhGw9yoEvX3TR3xZDkNEgb7qiCawn17s9g8KL7vHuny" ], "script": "base64:AAIFAAAAAAAAAB0IAhIAEgASBAoCCAESAwoBCBIECgIIARIECgIICAAAACwAAAAABXdoZWVsCQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgAAAAAAAAAAGAkABEwAAAACAAAAAAAAAAAQCQAETAAAAAIAAAAAAAAAACEJAARMAAAAAgAAAAAAAAAAAQkABEwAAAACAAAAAAAAAAAUCQAETAAAAAIAAAAAAAAAAA4JAARMAAAAAgAAAAAAAAAAHwkABEwAAAACAAAAAAAAAAAJCQAETAAAAAIAAAAAAAAAABYJAARMAAAAAgAAAAAAAAAAEgkABEwAAAACAAAAAAAAAAAdCQAETAAAAAIAAAAAAAAAAAcJAARMAAAAAgAAAAAAAAAAHAkABEwAAAACAAAAAAAAAAAMCQAETAAAAAIAAAAAAAAAACMJAARMAAAAAgAAAAAAAAAAAwkABEwAAAACAAAAAAAAAAAaCQAETAAAAAIAAAAAAAAAAAAJAARMAAAAAgAAAAAAAAAAIAkABEwAAAACAAAAAAAAAAAPCQAETAAAAAIAAAAAAAAAABMJAARMAAAAAgAAAAAAAAAABAkABEwAAAACAAAAAAAAAAAV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AByRtYXRjaDEDCQEAAAACIT0AAAACBQAAAAVzdGF0ZQAAAAAAAAAAAQkAAAIAAAABAgAAABhHYW1lIGhhcyB0byBiZSBmaW5pc2hlZC4JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAASZ2FtZVJTQVB1YmxpY0xhYmVsBQAAAA5wYXJhbWV0ZXJWYWx1ZQUAAAADbmlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAEmdhbWVSU0FQdWJsaWNMYWJlbAUAAAAOcGFyYW1ldGVyVmFsdWUFAAAAA25pbAkAAAIAAAABAgAAAB1HYW1lIG5lZWRzIHRvIGJlIGluaXRpYWxpemVkLgkAAAIAAAABAgAAAElTZXR0aW5nIG5vdCBmb3VuZC4gQWxsb3dlZDogY2hhbmdlTWF4LCBjaGFuZ2VNaW4sIGNoYW5nZVJTQSwgY2hhbmdlUHViS2V5AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXn2B5LJ", "height": 2227130, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FCk9jqnhrbfpy4RAE5C7kahBzZGftQw7rKWw6f78ZH27 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | ||
14 | 14 | let col3 = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36] | |
15 | 15 | ||
16 | - | let gameMasterPublicKey = fromBase58String(" | |
16 | + | let gameMasterPublicKey = fromBase58String("5f9EawB8nxaLg7KKhyqV2RDBMwRBG6o69D8zc9myAzrY") | |
17 | 17 | ||
18 | 18 | let gameCounterLabel = "G_GAMESCOUNTER" | |
19 | 19 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let wheel = [5, 24, 16, 33, 1, 20, 14, 31, 9, 22, 18, 29, 7, 28, 12, 35, 3, 26, 0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10] | |
5 | 5 | ||
6 | 6 | let black = [2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35] | |
7 | 7 | ||
8 | 8 | let red = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36] | |
9 | 9 | ||
10 | 10 | let col1 = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34] | |
11 | 11 | ||
12 | 12 | let col2 = [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35] | |
13 | 13 | ||
14 | 14 | let col3 = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36] | |
15 | 15 | ||
16 | - | let gameMasterPublicKey = fromBase58String(" | |
16 | + | let gameMasterPublicKey = fromBase58String("5f9EawB8nxaLg7KKhyqV2RDBMwRBG6o69D8zc9myAzrY") | |
17 | 17 | ||
18 | 18 | let gameCounterLabel = "G_GAMESCOUNTER" | |
19 | 19 | ||
20 | 20 | let gameTotalBetsLabel = "G_TOTALBETS" | |
21 | 21 | ||
22 | 22 | let gameProcessedBetsLabel = "G_PROCESSEDBETS" | |
23 | 23 | ||
24 | 24 | let gameMinBetLabel = "G_MINBET" | |
25 | 25 | ||
26 | 26 | let gameMaxBetLabel = "G_MAXBET" | |
27 | 27 | ||
28 | 28 | let gameRSAPublicLabel = "G_RSAPUBLIC" | |
29 | 29 | ||
30 | 30 | let gameMasterPublicKeyLabel = "G_GAMEMASTER_PUBLIC_KEY" | |
31 | 31 | ||
32 | 32 | let gameTokenLabel = "G_TOKENID" | |
33 | 33 | ||
34 | 34 | func gamesGetCounter () = getInteger(this, gameCounterLabel) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func gamesTotalBets () = getInteger(this, gameTotalBetsLabel) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func gamesProcessedBets () = getInteger(this, gameProcessedBetsLabel) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func gamesMinBet () = getIntegerValue(this, gameMinBetLabel) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func gamesMaxBet () = getIntegerValue(this, gameMaxBetLabel) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func gameRSAPublicString () = getStringValue(this, gameRSAPublicLabel) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func gameRSAPublic () = fromBase64String(gameRSAPublicString()) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func gameToken () = match getString(this, gameTokenLabel) { | |
56 | 56 | case tokenId: String => | |
57 | 57 | if ((tokenId == "")) | |
58 | 58 | then unit | |
59 | 59 | else fromBase58String(tokenId) | |
60 | 60 | case _ => | |
61 | 61 | unit | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func betDetailsLabel (betNumber) = (("B_" + toString(betNumber)) + "_BETDETAILS") | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func betWinStateLabel (betNumber) = (("B_" + toString(betNumber)) + "_WINSTATE") | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func betWinAmountLabel (betNumber) = (("B_" + toString(betNumber)) + "_WINAMOUNT") | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func betGameLabel (betNumber) = (("B_" + toString(betNumber)) + "_GAME") | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func betPayoutLabel (betNumber) = (("B_" + toString(betNumber)) + "_PAYOUT") | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func betDetailsResult (betNumber) = getStringValue(this, betDetailsLabel(betNumber)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func betGameResult (betNumber) = getIntegerValue(this, betGameLabel(betNumber)) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func gameStateLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_STATE") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func gameStartHeightLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_STARTHEIGHT") | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func gameEndHeightLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_ENDHEIGHT") | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func gameSumShaLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_SUMSHA") | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func gameResultLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_RESULT") | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func gameRandomHashLabel (gameNumber) = (("G_" + toString(gameNumber)) + "_RANDOMHASH") | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func gameGetState (gameNumber) = getInteger(this, gameStateLabel(gameNumber)) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func gameGetEndHeight (gameNumber) = getInteger(this, gameEndHeightLabel(gameNumber)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func gameGetSumSha (gameNumber) = getString(this, gameSumShaLabel(gameNumber)) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func gameGetResult (gameNumber) = getIntegerValue(this, gameResultLabel(gameNumber)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func checkPermission (callerPublicKey) = (callerPublicKey != gameMasterPublicKey) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func gameInBaseToken (token) = (token == unit) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getMultiple (numberPlaced) = if ((numberPlaced == 1)) | |
123 | 123 | then 36 | |
124 | 124 | else if ((numberPlaced == 2)) | |
125 | 125 | then 18 | |
126 | 126 | else if ((numberPlaced == 3)) | |
127 | 127 | then 12 | |
128 | 128 | else if ((numberPlaced == 4)) | |
129 | 129 | then 9 | |
130 | 130 | else if ((numberPlaced == 5)) | |
131 | 131 | then 7 | |
132 | 132 | else if ((numberPlaced == 6)) | |
133 | 133 | then 6 | |
134 | 134 | else 0 | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getWinnings (bet,result) = { | |
138 | 138 | let betStringList = split(bet, "-") | |
139 | 139 | let amountBet = value(parseInt(betStringList[1])) | |
140 | 140 | let betType = betStringList[2] | |
141 | 141 | if ((betType == "numbers")) | |
142 | 142 | then { | |
143 | 143 | let allNumberBets = removeByIndex(removeByIndex(removeByIndex(betStringList, 0), 0), 0) | |
144 | 144 | if (containsElement(allNumberBets, toString(result))) | |
145 | 145 | then (amountBet * getMultiple(size(allNumberBets))) | |
146 | 146 | else 0 | |
147 | 147 | } | |
148 | 148 | else if ((betType == "color")) | |
149 | 149 | then if ((betStringList[3] == "red")) | |
150 | 150 | then if (containsElement(red, result)) | |
151 | 151 | then (amountBet * 2) | |
152 | 152 | else 0 | |
153 | 153 | else if (containsElement(black, result)) | |
154 | 154 | then (amountBet * 2) | |
155 | 155 | else 0 | |
156 | 156 | else if ((betType == "column")) | |
157 | 157 | then if ((betStringList[3] == "1")) | |
158 | 158 | then if (containsElement(col1, result)) | |
159 | 159 | then (amountBet * 3) | |
160 | 160 | else 0 | |
161 | 161 | else if ((betStringList[3] == "2")) | |
162 | 162 | then if (containsElement(col2, result)) | |
163 | 163 | then (amountBet * 3) | |
164 | 164 | else 0 | |
165 | 165 | else if ((betStringList[3] == "3")) | |
166 | 166 | then if (containsElement(col3, result)) | |
167 | 167 | then (amountBet * 3) | |
168 | 168 | else 0 | |
169 | 169 | else 0 | |
170 | 170 | else if ((betType == "dozen")) | |
171 | 171 | then if ((betStringList[3] == "1")) | |
172 | 172 | then if (if ((result >= 1)) | |
173 | 173 | then (12 >= result) | |
174 | 174 | else false) | |
175 | 175 | then (amountBet * 3) | |
176 | 176 | else 0 | |
177 | 177 | else if ((betStringList[3] == "2")) | |
178 | 178 | then if (if ((result >= 13)) | |
179 | 179 | then (24 >= result) | |
180 | 180 | else false) | |
181 | 181 | then (amountBet * 3) | |
182 | 182 | else 0 | |
183 | 183 | else if ((betStringList[3] == "3")) | |
184 | 184 | then if (if ((result >= 25)) | |
185 | 185 | then (36 >= result) | |
186 | 186 | else false) | |
187 | 187 | then (amountBet * 3) | |
188 | 188 | else 0 | |
189 | 189 | else 0 | |
190 | 190 | else if ((betType == "oddeven")) | |
191 | 191 | then if ((result == 0)) | |
192 | 192 | then 0 | |
193 | 193 | else if ((betStringList[3] == "even")) | |
194 | 194 | then if (if (((result % 2) == 0)) | |
195 | 195 | then (result != 0) | |
196 | 196 | else false) | |
197 | 197 | then (amountBet * 2) | |
198 | 198 | else 0 | |
199 | 199 | else if (((result % 2) == 1)) | |
200 | 200 | then (amountBet * 2) | |
201 | 201 | else 0 | |
202 | 202 | else if ((betType == "lowhigh")) | |
203 | 203 | then if ((result == 0)) | |
204 | 204 | then 0 | |
205 | 205 | else if ((betStringList[3] == "low")) | |
206 | 206 | then if (if ((result >= 1)) | |
207 | 207 | then (18 >= result) | |
208 | 208 | else false) | |
209 | 209 | then (amountBet * 2) | |
210 | 210 | else 0 | |
211 | 211 | else if (if ((result >= 19)) | |
212 | 212 | then (36 >= result) | |
213 | 213 | else false) | |
214 | 214 | then (amountBet * 2) | |
215 | 215 | else 0 | |
216 | 216 | else 0 | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | @Callable(i) | |
221 | 221 | func processNextBet () = if (checkPermission(i.callerPublicKey)) | |
222 | 222 | then throw("processNextBet_FORBBIDEN") | |
223 | 223 | else match gamesTotalBets() { | |
224 | 224 | case totalBets: Int => | |
225 | 225 | match gamesProcessedBets() { | |
226 | 226 | case lastProcessedBet: Int => | |
227 | 227 | let nextBet = (lastProcessedBet + 1) | |
228 | 228 | if ((nextBet > totalBets)) | |
229 | 229 | then throw("Next bet has not been placed.") | |
230 | 230 | else { | |
231 | 231 | let gameNumber = betGameResult(nextBet) | |
232 | 232 | match gameGetState(gameNumber) { | |
233 | 233 | case state: Int => | |
234 | 234 | if ((state == 1)) | |
235 | 235 | then { | |
236 | 236 | let result = gameGetResult(gameNumber) | |
237 | 237 | let betDetails = betDetailsResult(nextBet) | |
238 | 238 | let betPlacer = split(betDetails, "-")[0] | |
239 | 239 | let address = value(addressFromString(betPlacer)) | |
240 | 240 | let winnings = getWinnings(betDetails, result) | |
241 | 241 | [ScriptTransfer(address, winnings, gameToken()), IntegerEntry(gameProcessedBetsLabel, (lastProcessedBet + 1)), IntegerEntry(betPayoutLabel(nextBet), winnings)] | |
242 | 242 | } | |
243 | 243 | else throw("Game has not finished.") | |
244 | 244 | case _ => | |
245 | 245 | throw("Game does not exist or has already ended.") | |
246 | 246 | } | |
247 | 247 | } | |
248 | 248 | case _ => | |
249 | 249 | throw("Game has not been initialized, next bets not found") | |
250 | 250 | } | |
251 | 251 | case _ => | |
252 | 252 | throw("Game has not been initialized, total bets not found") | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Callable(i) | |
258 | 258 | func initGame () = if (checkPermission(i.callerPublicKey)) | |
259 | 259 | then throw("initGame_FORBBIDEN") | |
260 | 260 | else match gamesGetCounter() { | |
261 | 261 | case GAMESCOUNTER: Int => | |
262 | 262 | throw("INIT_ALREADY_DONE") | |
263 | 263 | case _ => | |
264 | 264 | [IntegerEntry(gameCounterLabel, 0), IntegerEntry(gameTotalBetsLabel, 0), IntegerEntry(gameProcessedBetsLabel, 0), IntegerEntry(gameMinBetLabel, 100000000), IntegerEntry(gameMaxBetLabel, 2500000000), StringEntry(gameRSAPublicLabel, "base64:<gameRSAPublicLabel>"), StringEntry(gameTokenLabel, "")] | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | ||
269 | 269 | @Callable(i) | |
270 | 270 | func startGame (randomHash,blockInRound) = if (checkPermission(i.callerPublicKey)) | |
271 | 271 | then throw("startGame_FORBBIDEN") | |
272 | 272 | else match gamesGetCounter() { | |
273 | 273 | case GAMESCOUNTER: Int => | |
274 | 274 | let newGameCounter = (GAMESCOUNTER + 1) | |
275 | 275 | if ((GAMESCOUNTER > 0)) | |
276 | 276 | then match gameGetState(GAMESCOUNTER) { | |
277 | 277 | case gameState: Int => | |
278 | 278 | if ((gameState == 0)) | |
279 | 279 | then throw("Last game has not finished yet.") | |
280 | 280 | else [IntegerEntry(gameCounterLabel, newGameCounter), IntegerEntry(gameStartHeightLabel(newGameCounter), lastBlock.height), IntegerEntry(gameEndHeightLabel(newGameCounter), (height + blockInRound)), IntegerEntry(gameStateLabel(newGameCounter), 0), StringEntry(gameSumShaLabel(newGameCounter), toBase58String(sha256(fromBase64String(randomHash))))] | |
281 | 281 | case _ => | |
282 | 282 | throw("Game state not found.") | |
283 | 283 | } | |
284 | 284 | else [IntegerEntry(gameCounterLabel, newGameCounter), IntegerEntry(gameStartHeightLabel(newGameCounter), lastBlock.height), IntegerEntry(gameEndHeightLabel(newGameCounter), (height + blockInRound)), IntegerEntry(gameStateLabel(newGameCounter), 0), StringEntry(gameSumShaLabel(newGameCounter), toBase58String(sha256(fromBase64String(randomHash))))] | |
285 | 285 | case _ => | |
286 | 286 | throw("INIT_NEEDED") | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | 291 | @Callable(i) | |
292 | 292 | func placeBet (bet) = { | |
293 | 293 | let assetId = gameToken() | |
294 | 294 | if ((i.feeAssetId != assetId)) | |
295 | 295 | then throw("Fee is not in correct assetId") | |
296 | 296 | else { | |
297 | 297 | let betStringList = split(bet, "-") | |
298 | 298 | let betType = betStringList[0] | |
299 | 299 | if (if (if (if (if (if ((betType != "numbers")) | |
300 | 300 | then (betType != "column") | |
301 | 301 | else false) | |
302 | 302 | then (betType != "color") | |
303 | 303 | else false) | |
304 | 304 | then (betType != "dozen") | |
305 | 305 | else false) | |
306 | 306 | then (betType != "oddeven") | |
307 | 307 | else false) | |
308 | 308 | then (betType != "lowhigh") | |
309 | 309 | else false) | |
310 | 310 | then throw("Bet type is not valid.") | |
311 | 311 | else match gamesGetCounter() { | |
312 | 312 | case GAMESCOUNTER: Int => | |
313 | 313 | match gameGetState(GAMESCOUNTER) { | |
314 | 314 | case state: Int => | |
315 | 315 | if ((state == 1)) | |
316 | 316 | then throw("Game is finished and next game has not started.") | |
317 | 317 | else if ((size(i.payments) != 1)) | |
318 | 318 | then throw("Payment not attached or there is more then one payment") | |
319 | 319 | else { | |
320 | 320 | let p = i.payments[0] | |
321 | 321 | let amount = p.amount | |
322 | 322 | if (if (if ((value(gamesMaxBet()) >= amount)) | |
323 | 323 | then (amount >= value(gamesMinBet())) | |
324 | 324 | else false) | |
325 | 325 | then (i.payments[0].assetId == assetId) | |
326 | 326 | else false) | |
327 | 327 | then match gameGetEndHeight(GAMESCOUNTER) { | |
328 | 328 | case endHeight: Int => | |
329 | 329 | if ((endHeight > height)) | |
330 | 330 | then match gamesTotalBets() { | |
331 | 331 | case totalBets: Int => | |
332 | 332 | let thisBetNumber = (totalBets + 1) | |
333 | 333 | if ((assetId == unit)) | |
334 | 334 | then [IntegerEntry(gameTotalBetsLabel, (totalBets + 1)), StringEntry(betDetailsLabel(thisBetNumber), ((((toBase58String(i.caller.bytes) + "-") + toString(amount)) + "-") + bet)), IntegerEntry(betGameLabel(thisBetNumber), GAMESCOUNTER)] | |
335 | 335 | else [IntegerEntry(gameTotalBetsLabel, (totalBets + 1)), StringEntry(betDetailsLabel(thisBetNumber), ((((toBase58String(i.caller.bytes) + "-") + toString(amount)) + "-") + bet)), IntegerEntry(betGameLabel(thisBetNumber), GAMESCOUNTER)] | |
336 | 336 | case _ => | |
337 | 337 | throw("Game has not been initalized.") | |
338 | 338 | } | |
339 | 339 | else throw("Game has already exceeded betting round") | |
340 | 340 | case _ => | |
341 | 341 | throw("End height has not been defined.") | |
342 | 342 | } | |
343 | 343 | else throw((((((("Bet (" + toString(amount)) + ") is greater than maximum bet (") + toString(gamesMaxBet())) + "), lower than minimum (") + toString(gamesMinBet())) + ") or payment is not in correct assetId.")) | |
344 | 344 | } | |
345 | 345 | case _ => | |
346 | 346 | throw("Game does not exist or has already ended.") | |
347 | 347 | } | |
348 | 348 | case _ => | |
349 | 349 | throw("Game needs to be initialized.") | |
350 | 350 | } | |
351 | 351 | } | |
352 | 352 | } | |
353 | 353 | ||
354 | 354 | ||
355 | 355 | ||
356 | 356 | @Callable(i) | |
357 | 357 | func endGame (rsaSign,gameNumber) = if (checkPermission(i.callerPublicKey)) | |
358 | 358 | then throw("endGame_FORBBIDEN") | |
359 | 359 | else match gameGetState(gameNumber) { | |
360 | 360 | case state: Int => | |
361 | 361 | if ((state == 1)) | |
362 | 362 | then throw("Game is finished") | |
363 | 363 | else match gameGetEndHeight(gameNumber) { | |
364 | 364 | case gameHeight: Int => | |
365 | 365 | if ((gameHeight > height)) | |
366 | 366 | then throw(("Not enough blocks have past since game has started, game ends at block " + toString(gameHeight))) | |
367 | 367 | else match gameGetSumSha(gameNumber) { | |
368 | 368 | case SUMSHA: String => | |
369 | 369 | let sig = fromBase64String(rsaSign) | |
370 | 370 | let rsaSigValid = rsaVerify(SHA256, fromBase58String(SUMSHA), sig, gameRSAPublic()) | |
371 | 371 | match blockInfoByHeight(gameHeight) { | |
372 | 372 | case previousBlock: BlockInfo => | |
373 | 373 | let randomHash = sha256((take(sig, 32) + take(previousBlock.generationSignature, 32))) | |
374 | 374 | if (!(rsaSigValid)) | |
375 | 375 | then throw("INVALID_RSA_SIGN") | |
376 | 376 | else { | |
377 | 377 | let index = wheel[((toInt(randomHash) + value(gameNumber)) % 37)] | |
378 | 378 | [IntegerEntry(gameStateLabel(gameNumber), 1), IntegerEntry(gameResultLabel(gameNumber), index), StringEntry(gameRandomHashLabel(gameNumber), toBase64String(randomHash))] | |
379 | 379 | } | |
380 | 380 | case _ => | |
381 | 381 | throw("Last block does not exist.") | |
382 | 382 | } | |
383 | 383 | case _ => | |
384 | 384 | throw("SHA does not exist") | |
385 | 385 | } | |
386 | 386 | case _ => | |
387 | 387 | throw("Cannot get game height.") | |
388 | 388 | } | |
389 | 389 | case _ => | |
390 | 390 | throw("Game does not exist or has already ended") | |
391 | 391 | } | |
392 | 392 | ||
393 | 393 | ||
394 | 394 | ||
395 | 395 | @Callable(i) | |
396 | 396 | func setParameter (parameterName,parameterValue) = if (checkPermission(i.callerPublicKey)) | |
397 | 397 | then throw("setParameter_FORBBIDEN") | |
398 | 398 | else if ((parameterName == "changeMax")) | |
399 | 399 | then { | |
400 | 400 | let maximumValue = parseIntValue(parameterValue) | |
401 | 401 | let minimumValue = gamesMinBet() | |
402 | 402 | if ((0 > maximumValue)) | |
403 | 403 | then throw("value cannot be lower than 0") | |
404 | 404 | else if ((minimumValue >= maximumValue)) | |
405 | 405 | then throw((("value cannot be lower or equal than min bet (" + toString(minimumValue)) + ")")) | |
406 | 406 | else [IntegerEntry(gameMaxBetLabel, maximumValue)] | |
407 | 407 | } | |
408 | 408 | else if ((parameterName == "changeMin")) | |
409 | 409 | then { | |
410 | 410 | let maximumValue = gamesMaxBet() | |
411 | 411 | let minimumValue = parseIntValue(parameterValue) | |
412 | 412 | if ((0 > minimumValue)) | |
413 | 413 | then throw("value cannot be lower than 0") | |
414 | 414 | else if ((minimumValue >= maximumValue)) | |
415 | 415 | then throw((("value cannot be greater or equal than min bet (" + toString(maximumValue)) + ")")) | |
416 | 416 | else [IntegerEntry(gameMinBetLabel, minimumValue)] | |
417 | 417 | } | |
418 | 418 | else if ((parameterName == "changeRSA")) | |
419 | 419 | then match gamesGetCounter() { | |
420 | 420 | case GAMESCOUNTER: Int => | |
421 | 421 | match gameGetState(GAMESCOUNTER) { | |
422 | 422 | case state: Int => | |
423 | 423 | if ((state != 1)) | |
424 | 424 | then throw("Game has to be finished.") | |
425 | 425 | else [StringEntry(gameRSAPublicLabel, parameterValue)] | |
426 | 426 | case _ => | |
427 | 427 | [StringEntry(gameRSAPublicLabel, parameterValue)] | |
428 | 428 | } | |
429 | 429 | case _ => | |
430 | 430 | throw("Game needs to be initialized.") | |
431 | 431 | } | |
432 | 432 | else throw("Setting not found. Allowed: changeMax, changeMin, changeRSA, changePubKey") | |
433 | 433 | ||
434 | 434 | ||
435 | 435 | @Verifier(tx) | |
436 | 436 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
437 | 437 |
github/deemru/w8io/169f3d6 53.12 ms ◑