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