tx · HZxnprgrbm15qZr5xP3z4uzPQYRSNquExtP9Zm8XJHTZ

3Mu8FKNn2fEuxsE5mVhCwDQ275Ygi3ejweU:  -0.01400000 Waves

2019.10.26 01:15 [736228] smart account 3Mu8FKNn2fEuxsE5mVhCwDQ275Ygi3ejweU > SELF 0.00000000 Waves

{ "type": 13, "id": "HZxnprgrbm15qZr5xP3z4uzPQYRSNquExtP9Zm8XJHTZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1572041785121, "version": 1, "sender": "3Mu8FKNn2fEuxsE5mVhCwDQ275Ygi3ejweU", "senderPublicKey": "6EzysHLfsAMmtxy8XtuFoQrCNTEkUdPSEzHYEwqpqSs3", "proofs": [ "3PpDM77aYdWMnkdXuX2qCZ5D1rYLNv7NBwfsWGmuJss8YFwi8ZdiJb7c4d5ane5eqiPJ4b9qaQ7qZGpXGkU336rf" ], "script": "base64:AAIDAAAAAAAAAA4IARIECgIICBIECgIIAgAAACgAAAAACVJTQVBVQkxJQwkAAlsAAAABAgAAAY9iYXNlNjQ6TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFtT2xSQlRZRU8zSDdZOXJCbW9GUUZuNDM5MlB4MFF3MTNEc2RFaG56TUgyY2o2WTV5bVB1Q09MTU5lNXFyVXpRbDhvUkx6SUJ6RlZNWmx3VVlsMmJvc3JPSXhRYllGN1dWUVd2b1Z4RVQxWUlnRG0zTnp6T0xBNXVIN0NLTzBzbnNobU1GQ0RPWkVldzQxR2pLaDNQZ3grbmJBZ3VQOVpRUGZxU2FmRW1DM0NOLzR5RHNKcktyaVJuaVpKbzlqUy80TExzUkt3QjdIQVpIem9GOUxMN3RTWkgzaHRhTkd0YmRUa3haMVR6U1QzTWIyVlBTenNadlFEb2NYVVZPbUpPdTBvMjlhT1krR2tHL0c0UkNLMEZCV1FIRVV2QzUxVFJEUzVrOGphZDBPMU1vYmpRYzZiMThkK2Z1b1ZGZE5mWndHSCt1RnVkdF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AAAAMcGxheWVyQ2hvaWNlBQAAAAhyb2xsVHlwZQUAAAAOcGxheWVyUHViS2V5NTgFAAAABndpbkFtdAUAAAAHcmFuZFN0cgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAGZ2FtZUlkBQAAAA5uZXdHYW1lRGF0YVN0cgUAAAADbmlsAAAAAIWkHeE=", "chainId": 84, "height": 736228, "spentComplexity": 0 } View: original | compacted Prev: BcNExhjv9PepDaZPYvcQcJn9UaT3RSX1dr3MVZcSedxG Next: none Diff:
OldNewDifferences
77
88 let RESERVATIONKEY = "$RESERVED_AMOUNT"
99
10+let WBET = base58'WAVES'
11+
12+let WALLETWAVESBET = Address(base58'3N2tusqAtDctK8iSTXS6F9rimmftmSuwLUX')
13+
14+let WALLETMCAFFE = Address(base58'')
15+
16+let WAVELET = ((100 * 1000) * 1000)
17+
18+let FEEWAVESBET = 4
19+
20+let FEEMCAFEE = 2
21+
1022 let STATESUBMITTED = "SUBMITTED"
1123
1224 let STATEWON = "WON"
1325
1426 let STATELOST = "LOST"
27+
28+let ROLLUNDER = "UNDER"
29+
30+let ROLLOVER = "OVER"
31+
32+let BETMIN = (100 * WAVELET)
33+
34+let BETMAX = ((1000 * 100) * WAVELET)
35+
36+let PREDICTIONMIN = 4
37+
38+let PREDICTIONMAX = 100
1539
1640 let IdxGameState = 0
1741
2145
2246 let IdxPlayerPubKey58 = 3
2347
24-let IdxStartedHeight = 4
48+let IdxWinAmt = 4
2549
26-let IdxWinAmt = 5
27-
28-let IdxRandOrEmpty = 6
50+let IdxRandOrEmpty = 5
2951
3052 func IncrementGameNum () = {
3153 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
4870
4971 func ValidateAndIncreaseReservedAmt (winAmt) = {
5072 let newReservedAmount = (ExtractReservedAmt() + winAmt)
51- let balance = wavesBalance(this)
73+ let balance = assetBalance(this, WBET)
5274 if ((newReservedAmount > balance))
5375 then throw("Insufficient funds on Waves Rider account. Transaction was rejected for your safety.")
5476 else newReservedAmount
6789 }
6890
6991
70-func FormatGameDataStr (gameState,playerChoice,playerType,playerPubKey58,startedHeight,winAmt,randOrEmpty) = {
71- let fullStateStr = ((((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerType)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(startedHeight))) + "_") + FormatGameDataParam(toString(winAmt)))
92+func FormatGameDataStr (gameState,playerChoice,playerType,playerPubKey58,winAmt,randOrEmpty) = {
93+ let fullStateStr = ((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerType)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(winAmt)))
7294 if ((randOrEmpty == ""))
7395 then fullStateStr
7496 else ((fullStateStr + "_") + FormatGameDataParam(randOrEmpty))
97119 func ParseGameRawDataStr (rawStateStr) = {
98120 let gameState = ParseNextAttribute(rawStateStr)
99121 let playerChoice = ParseNextAttribute(gameState[1])
100- let type = ParseNextAttribute(playerChoice[1])
101- let playerPubKey58 = ParseNextAttribute(type[1])
102- let startedHeight = ParseNextAttribute(playerPubKey58[1])
103- let winAmt = ParseNextAttribute(startedHeight[1])
104-[gameState[0], playerChoice[0], type[0], playerPubKey58[0], startedHeight[0], winAmt[0]]
122+ let rollType = ParseNextAttribute(playerChoice[1])
123+ let playerPubKey58 = ParseNextAttribute(rollType[1])
124+ let winAmt = ParseNextAttribute(playerPubKey58[1])
125+[gameState[0], playerChoice[0], rollType[0], playerPubKey58[0], winAmt[0]]
105126 }
106127
107128
151172 }
152173
153174
154-func getMultiplier (type,playerPrediction) = {
155- let prediction = 50
156- if ((type == "Under"))
157- then if ((prediction == 1))
158- then 9850000
159- else if ((prediction == 2))
160- then 4925000
161- else if ((prediction == 3))
162- then 3283330
163- else if ((prediction == 4))
164- then 2462500
165- else if ((prediction == 5))
166- then 1970000
167- else if ((prediction == 6))
168- then 1641660
169- else if ((prediction == 7))
170- then 1407140
171- else if ((prediction == 8))
172- then 1231250
173- else if ((prediction == 9))
174- then 1094440
175- else if ((prediction == 10))
176- then 985000
177- else if ((prediction == 11))
178- then 895450
179- else if ((prediction == 12))
180- then 820830
181- else if ((prediction == 13))
182- then 757690
183- else if ((prediction == 14))
184- then 703570
185- else if ((prediction == 15))
186- then 656660
187- else if ((prediction == 16))
188- then 615620
189- else if ((prediction == 17))
190- then 579410
191- else if ((prediction == 18))
192- then 547220
193- else if ((prediction == 19))
194- then 518420
195- else if ((prediction == 20))
196- then 492500
197- else if ((prediction == 21))
198- then 469040
199- else if ((prediction == 22))
200- then 447720
201- else if ((prediction == 23))
202- then 428260
203- else if ((prediction == 24))
204- then 410410
205- else if ((prediction == 25))
206- then 394000
207- else if ((prediction == 26))
208- then 378840
209- else if ((prediction == 27))
210- then 364810
211- else if ((prediction == 28))
212- then 351780
213- else if ((prediction == 29))
214- then 339650
215- else if ((prediction == 30))
216- then 328330
217- else if ((prediction == 31))
218- then 317740
219- else if ((prediction == 32))
220- then 307810
221- else if ((prediction == 33))
222- then 298480
223- else if ((prediction == 34))
224- then 289700
225- else if ((prediction == 35))
226- then 281420
227- else if ((prediction == 36))
228- then 273610
229- else if ((prediction == 37))
175+func Multiplier (prediction,rollType) = if ((rollType == ROLLUNDER))
176+ then if ((prediction == 1))
177+ then 9850000
178+ else if ((prediction == 2))
179+ then 4925000
180+ else if ((prediction == 3))
181+ then 3283330
182+ else if ((prediction == 4))
183+ then 2462500
184+ else if ((prediction == 5))
185+ then 1970000
186+ else if ((prediction == 6))
187+ then 1641660
188+ else if ((prediction == 7))
189+ then 1407140
190+ else if ((prediction == 8))
191+ then 1231250
192+ else if ((prediction == 9))
193+ then 1094440
194+ else if ((prediction == 10))
195+ then 985000
196+ else if ((prediction == 11))
197+ then 895450
198+ else if ((prediction == 12))
199+ then 820830
200+ else if ((prediction == 13))
201+ then 757690
202+ else if ((prediction == 14))
203+ then 703570
204+ else if ((prediction == 15))
205+ then 656660
206+ else if ((prediction == 16))
207+ then 615620
208+ else if ((prediction == 17))
209+ then 579410
210+ else if ((prediction == 18))
211+ then 547220
212+ else if ((prediction == 19))
213+ then 518420
214+ else if ((prediction == 20))
215+ then 492500
216+ else if ((prediction == 21))
217+ then 469040
218+ else if ((prediction == 22))
219+ then 447720
220+ else if ((prediction == 23))
221+ then 428260
222+ else if ((prediction == 24))
223+ then 410410
224+ else if ((prediction == 25))
225+ then 394000
226+ else if ((prediction == 26))
227+ then 378840
228+ else if ((prediction == 27))
229+ then 364810
230+ else if ((prediction == 28))
231+ then 351780
232+ else if ((prediction == 29))
233+ then 339650
234+ else if ((prediction == 30))
235+ then 328330
236+ else if ((prediction == 31))
237+ then 317740
238+ else if ((prediction == 32))
239+ then 307810
240+ else if ((prediction == 33))
241+ then 298480
242+ else if ((prediction == 34))
243+ then 289700
244+ else if ((prediction == 35))
245+ then 281420
246+ else if ((prediction == 36))
247+ then 273610
248+ else if ((prediction == 37))
249+ then 259210
250+ else if ((prediction == 38))
230251 then 259210
231- else if ((prediction == 38))
232- then 259210
233- else if ((prediction == 39))
234- then 252560
235- else if ((prediction == 40))
236- then 246250
237- else if ((prediction == 41))
238- then 240240
239- else if ((prediction == 42))
240- then 234520
241- else if ((prediction == 43))
242- then 229060
243- else if ((prediction == 44))
244- then 223860
245- else if ((prediction == 45))
246- then 218880
247- else if ((prediction == 46))
248- then 214130
249- else if ((prediction == 47))
250- then 209570
251- else if ((prediction == 48))
252- then 205200
253- else if ((prediction == 49))
254- then 201020
255- else if ((prediction == 50))
256- then 197000
257- else if ((prediction == 51))
258- then 193130
259- else if ((prediction == 52))
260- then 189420
261- else if ((prediction == 53))
262- then 185840
263- else if ((prediction == 54))
264- then 182400
265- else if ((prediction == 55))
266- then 179090
267- else if ((prediction == 56))
268- then 175890
269- else if ((prediction == 57))
270- then 172800
271- else if ((prediction == 58))
272- then 169820
273- else if ((prediction == 59))
274- then 166940
275- else if ((prediction == 60))
276- then 164160
277- else if ((prediction == 61))
278- then 161470
279- else if ((prediction == 62))
280- then 158870
281- else if ((prediction == 63))
282- then 156340
283- else if ((prediction == 64))
284- then 153900
285- else if ((prediction == 65))
286- then 151530
287- else if ((prediction == 66))
288- then 149240
289- else if ((prediction == 67))
290- then 147010
291- else if ((prediction == 68))
292- then 144850
293- else if ((prediction == 69))
294- then 142750
295- else if ((prediction == 70))
296- then 140710
297- else if ((prediction == 71))
298- then 138730
299- else if ((prediction == 72))
300- then 136800
301- else if ((prediction == 73))
302- then 134930
303- else if ((prediction == 74))
304- then 133100
305- else if ((prediction == 75))
306- then 131330
307- else if ((prediction == 76))
308- then 129600
309- else if ((prediction == 77))
310- then 127920
311- else if ((prediction == 78))
312- then 126280
313- else if ((prediction == 79))
314- then 124680
315- else if ((prediction == 80))
316- then 123120
317- else if ((prediction == 81))
318- then 121600
319- else if ((prediction == 82))
320- then 120120
321- else if ((prediction == 83))
322- then 118670
323- else if ((prediction == 84))
324- then 117260
325- else if ((prediction == 85))
326- then 115880
327- else if ((prediction == 86))
328- then 114530
329- else if ((prediction == 87))
330- then 113210
331- else if ((prediction == 88))
332- then 111930
333- else if ((prediction == 89))
334- then 110670
335- else if ((prediction == 90))
336- then 109440
337- else if ((prediction == 91))
338- then 108240
339- else if ((prediction == 92))
340- then 107060
341- else if ((prediction == 93))
342- then 105910
343- else if ((prediction == 94))
344- then 104780
345- else if ((prediction == 95))
252+ else if ((prediction == 39))
253+ then 252560
254+ else if ((prediction == 40))
255+ then 246250
256+ else if ((prediction == 41))
257+ then 240240
258+ else if ((prediction == 42))
259+ then 234520
260+ else if ((prediction == 43))
261+ then 229060
262+ else if ((prediction == 44))
263+ then 223860
264+ else if ((prediction == 45))
265+ then 218880
266+ else if ((prediction == 46))
267+ then 214130
268+ else if ((prediction == 47))
269+ then 209570
270+ else if ((prediction == 48))
271+ then 205200
272+ else if ((prediction == 49))
273+ then 201020
274+ else if ((prediction == 50))
275+ then 197000
276+ else if ((prediction == 51))
277+ then 193130
278+ else if ((prediction == 52))
279+ then 189420
280+ else if ((prediction == 53))
281+ then 185840
282+ else if ((prediction == 54))
283+ then 182400
284+ else if ((prediction == 55))
285+ then 179090
286+ else if ((prediction == 56))
287+ then 175890
288+ else if ((prediction == 57))
289+ then 172800
290+ else if ((prediction == 58))
291+ then 169820
292+ else if ((prediction == 59))
293+ then 166940
294+ else if ((prediction == 60))
295+ then 164160
296+ else if ((prediction == 61))
297+ then 161470
298+ else if ((prediction == 62))
299+ then 158870
300+ else if ((prediction == 63))
301+ then 156340
302+ else if ((prediction == 64))
303+ then 153900
304+ else if ((prediction == 65))
305+ then 151530
306+ else if ((prediction == 66))
307+ then 149240
308+ else if ((prediction == 67))
309+ then 147010
310+ else if ((prediction == 68))
311+ then 144850
312+ else if ((prediction == 69))
313+ then 142750
314+ else if ((prediction == 70))
315+ then 140710
316+ else if ((prediction == 71))
317+ then 138730
318+ else if ((prediction == 72))
319+ then 136800
320+ else if ((prediction == 73))
321+ then 134930
322+ else if ((prediction == 74))
323+ then 133100
324+ else if ((prediction == 75))
325+ then 131330
326+ else if ((prediction == 76))
327+ then 129600
328+ else if ((prediction == 77))
329+ then 127920
330+ else if ((prediction == 78))
331+ then 126280
332+ else if ((prediction == 79))
333+ then 124680
334+ else if ((prediction == 80))
335+ then 123120
336+ else if ((prediction == 81))
337+ then 121600
338+ else if ((prediction == 82))
339+ then 120120
340+ else if ((prediction == 83))
341+ then 118670
342+ else if ((prediction == 84))
343+ then 117260
344+ else if ((prediction == 85))
345+ then 115880
346+ else if ((prediction == 86))
347+ then 114530
348+ else if ((prediction == 87))
349+ then 113210
350+ else if ((prediction == 88))
351+ then 111930
352+ else if ((prediction == 89))
353+ then 110670
354+ else if ((prediction == 90))
355+ then 109440
356+ else if ((prediction == 91))
357+ then 108240
358+ else if ((prediction == 92))
359+ then 107060
360+ else if ((prediction == 93))
361+ then 105910
362+ else if ((prediction == 94))
363+ then 104780
364+ else if ((prediction == 95))
365+ then 103680
366+ else if ((prediction == 96))
346367 then 103680
347- else if ((prediction == 96))
348- then 103680
368+ else 100000
369+ else if ((rollType == ROLLOVER))
370+ then if ((prediction == 4))
371+ then 103680
372+ else if ((prediction == 5))
373+ then 103680
374+ else if ((prediction == 6))
375+ then 104780
376+ else if ((prediction == 7))
377+ then 105910
378+ else if ((prediction == 8))
379+ then 107060
380+ else if ((prediction == 9))
381+ then 108240
382+ else if ((prediction == 10))
383+ then 109440
384+ else if ((prediction == 11))
385+ then 110670
386+ else if ((prediction == 12))
387+ then 111930
388+ else if ((prediction == 13))
389+ then 113210
390+ else if ((prediction == 14))
391+ then 114530
392+ else if ((prediction == 15))
393+ then 115880
394+ else if ((prediction == 16))
395+ then 117260
396+ else if ((prediction == 17))
397+ then 118670
398+ else if ((prediction == 18))
399+ then 120120
400+ else if ((prediction == 19))
401+ then 121600
402+ else if ((prediction == 20))
403+ then 123120
404+ else if ((prediction == 21))
405+ then 124680
406+ else if ((prediction == 22))
407+ then 126280
408+ else if ((prediction == 23))
409+ then 127920
410+ else if ((prediction == 24))
411+ then 129600
412+ else if ((prediction == 25))
413+ then 131330
414+ else if ((prediction == 26))
415+ then 133100
416+ else if ((prediction == 27))
417+ then 134930
418+ else if ((prediction == 28))
419+ then 136800
420+ else if ((prediction == 29))
421+ then 138730
422+ else if ((prediction == 30))
423+ then 140710
424+ else if ((prediction == 31))
425+ then 142750
426+ else if ((prediction == 32))
427+ then 144850
428+ else if ((prediction == 33))
429+ then 147010
430+ else if ((prediction == 34))
431+ then 149240
432+ else if ((prediction == 35))
433+ then 151530
434+ else if ((prediction == 36))
435+ then 153900
436+ else if ((prediction == 37))
437+ then 156340
438+ else if ((prediction == 38))
439+ then 158870
440+ else if ((prediction == 39))
441+ then 161470
442+ else if ((prediction == 40))
443+ then 164160
444+ else if ((prediction == 41))
445+ then 166940
446+ else if ((prediction == 42))
447+ then 169820
448+ else if ((prediction == 43))
449+ then 172800
450+ else if ((prediction == 44))
451+ then 175890
452+ else if ((prediction == 45))
453+ then 179090
454+ else if ((prediction == 46))
455+ then 185840
456+ else if ((prediction == 47))
457+ then 185840
458+ else if ((prediction == 48))
459+ then 189420
460+ else if ((prediction == 49))
461+ then 193130
462+ else if ((prediction == 50))
463+ then 197000
464+ else if ((prediction == 51))
465+ then 201020
466+ else if ((prediction == 52))
467+ then 205200
468+ else if ((prediction == 53))
469+ then 209570
470+ else if ((prediction == 54))
471+ then 214130
472+ else if ((prediction == 55))
473+ then 218880
474+ else if ((prediction == 56))
475+ then 223860
476+ else if ((prediction == 57))
477+ then 229060
478+ else if ((prediction == 58))
479+ then 234520
480+ else if ((prediction == 59))
481+ then 240240
482+ else if ((prediction == 60))
483+ then 246250
484+ else if ((prediction == 61))
485+ then 252560
486+ else if ((prediction == 62))
487+ then 259210
488+ else if ((prediction == 63))
489+ then 259210
490+ else if ((prediction == 64))
491+ then 273610
492+ else if ((prediction == 65))
493+ then 281420
494+ else if ((prediction == 66))
495+ then 289700
496+ else if ((prediction == 67))
497+ then 298480
498+ else if ((prediction == 68))
499+ then 307810
500+ else if ((prediction == 69))
501+ then 317740
502+ else if ((prediction == 70))
503+ then 328330
504+ else if ((prediction == 71))
505+ then 339650
506+ else if ((prediction == 72))
507+ then 351780
508+ else if ((prediction == 73))
509+ then 364810
510+ else if ((prediction == 74))
511+ then 378840
512+ else if ((prediction == 75))
513+ then 394000
514+ else if ((prediction == 76))
515+ then 410410
516+ else if ((prediction == 77))
517+ then 428260
518+ else if ((prediction == 78))
519+ then 447720
520+ else if ((prediction == 79))
521+ then 469040
522+ else if ((prediction == 80))
523+ then 492500
524+ else if ((prediction == 81))
525+ then 518420
526+ else if ((prediction == 82))
527+ then 547220
528+ else if ((prediction == 83))
529+ then 579410
530+ else if ((prediction == 84))
531+ then 615620
532+ else if ((prediction == 85))
533+ then 656660
534+ else if ((prediction == 86))
535+ then 703570
536+ else if ((prediction == 87))
537+ then 757690
538+ else if ((prediction == 88))
539+ then 820830
540+ else if ((prediction == 89))
541+ then 895450
542+ else if ((prediction == 90))
543+ then 985000
544+ else if ((prediction == 91))
545+ then 1094440
546+ else if ((prediction == 92))
547+ then 1231250
548+ else if ((prediction == 93))
549+ then 1407140
550+ else if ((prediction == 94))
551+ then 1641660
552+ else if ((prediction == 95))
553+ then 1970000
554+ else if ((prediction == 96))
555+ then 2462500
556+ else if ((prediction == 97))
557+ then 3283330
558+ else if ((prediction == 98))
559+ then 4925000
560+ else if ((prediction == 99))
561+ then 9850000
349562 else 100000
350- else if ((type == "Over"))
351- then if ((prediction == 4))
352- then 103680
353- else if ((prediction == 5))
354- then 103680
355- else if ((prediction == 6))
356- then 104780
357- else if ((prediction == 7))
358- then 105910
359- else if ((prediction == 8))
360- then 107060
361- else if ((prediction == 9))
362- then 108240
363- else if ((prediction == 10))
364- then 109440
365- else if ((prediction == 11))
366- then 110670
367- else if ((prediction == 12))
368- then 111930
369- else if ((prediction == 13))
370- then 113210
371- else if ((prediction == 14))
372- then 114530
373- else if ((prediction == 15))
374- then 115880
375- else if ((prediction == 16))
376- then 117260
377- else if ((prediction == 17))
378- then 118670
379- else if ((prediction == 18))
380- then 120120
381- else if ((prediction == 19))
382- then 121600
383- else if ((prediction == 20))
384- then 123120
385- else if ((prediction == 21))
386- then 124680
387- else if ((prediction == 22))
388- then 126280
389- else if ((prediction == 23))
390- then 127920
391- else if ((prediction == 24))
392- then 129600
393- else if ((prediction == 25))
394- then 131330
395- else if ((prediction == 26))
396- then 133100
397- else if ((prediction == 27))
398- then 134930
399- else if ((prediction == 28))
400- then 136800
401- else if ((prediction == 29))
402- then 138730
403- else if ((prediction == 30))
404- then 140710
405- else if ((prediction == 31))
406- then 142750
407- else if ((prediction == 32))
408- then 144850
409- else if ((prediction == 33))
410- then 147010
411- else if ((prediction == 34))
412- then 149240
413- else if ((prediction == 35))
414- then 151530
415- else if ((prediction == 36))
416- then 153900
417- else if ((prediction == 37))
418- then 156340
419- else if ((prediction == 38))
420- then 158870
421- else if ((prediction == 39))
422- then 161470
423- else if ((prediction == 40))
424- then 164160
425- else if ((prediction == 41))
426- then 166940
427- else if ((prediction == 42))
428- then 169820
429- else if ((prediction == 43))
430- then 172800
431- else if ((prediction == 44))
432- then 175890
433- else if ((prediction == 45))
434- then 179090
435- else if ((prediction == 46))
436- then 185840
437- else if ((prediction == 47))
438- then 185840
439- else if ((prediction == 48))
440- then 189420
441- else if ((prediction == 49))
442- then 193130
443- else if ((prediction == 50))
444- then 197000
445- else if ((prediction == 51))
446- then 201020
447- else if ((prediction == 52))
448- then 205200
449- else if ((prediction == 53))
450- then 209570
451- else if ((prediction == 54))
452- then 214130
453- else if ((prediction == 55))
454- then 218880
455- else if ((prediction == 56))
456- then 223860
457- else if ((prediction == 57))
458- then 229060
459- else if ((prediction == 58))
460- then 234520
461- else if ((prediction == 59))
462- then 240240
463- else if ((prediction == 60))
464- then 246250
465- else if ((prediction == 61))
466- then 252560
467- else if ((prediction == 62))
468- then 259210
469- else if ((prediction == 63))
470- then 259210
471- else if ((prediction == 64))
472- then 273610
473- else if ((prediction == 65))
474- then 281420
475- else if ((prediction == 66))
476- then 289700
477- else if ((prediction == 67))
478- then 298480
479- else if ((prediction == 68))
480- then 307810
481- else if ((prediction == 69))
482- then 317740
483- else if ((prediction == 70))
484- then 328330
485- else if ((prediction == 71))
486- then 339650
487- else if ((prediction == 72))
488- then 351780
489- else if ((prediction == 73))
490- then 364810
491- else if ((prediction == 74))
492- then 378840
493- else if ((prediction == 75))
494- then 394000
495- else if ((prediction == 76))
496- then 410410
497- else if ((prediction == 77))
498- then 428260
499- else if ((prediction == 78))
500- then 447720
501- else if ((prediction == 79))
502- then 469040
503- else if ((prediction == 80))
504- then 492500
505- else if ((prediction == 81))
506- then 518420
507- else if ((prediction == 82))
508- then 547220
509- else if ((prediction == 83))
510- then 579410
511- else if ((prediction == 84))
512- then 615620
513- else if ((prediction == 85))
514- then 656660
515- else if ((prediction == 86))
516- then 703570
517- else if ((prediction == 87))
518- then 757690
519- else if ((prediction == 88))
520- then 820830
521- else if ((prediction == 89))
522- then 895450
523- else if ((prediction == 90))
524- then 985000
525- else if ((prediction == 91))
526- then 1094440
527- else if ((prediction == 92))
528- then 1231250
529- else if ((prediction == 93))
530- then 1407140
531- else if ((prediction == 94))
532- then 1641660
533- else if ((prediction == 95))
534- then 1970000
535- else if ((prediction == 96))
536- then 2462500
537- else if ((prediction == 97))
538- then 3283330
539- else if ((prediction == 98))
540- then 4925000
541- else if ((prediction == 99))
542- then 9850000
543- else 100000
544- else 100000
545- }
563+ else 100000
546564
547565
548-func diceWin (type,prediction,number) = if ((type == "Under"))
566+func diceWin (type,prediction,number) = if ((type == ROLLUNDER))
549567 then if ((prediction >= number))
550568 then true
551569 else false
552- else if ((type == "Over"))
570+ else if ((type == ROLLOVER))
553571 then if ((number >= prediction))
554572 then true
555573 else false
556574 else false
557575
558576
577+func ValidateBetAndDefineWinAmt (amount,prediction,rollType) = if (if ((BETMIN > amount))
578+ then true
579+ else (amount > BETMAX))
580+ then throw(((("Bet amount is not in range: minBet=" + toString((BETMIN / 100000000))) + " maxBet=") + toString((BETMAX / 100000000))))
581+ else if (if ((rollType != ROLLUNDER))
582+ then (rollType != ROLLOVER)
583+ else false)
584+ then throw("Invalid Roll type, try with OVER or UNDER")
585+ else if (if ((PREDICTIONMIN > prediction))
586+ then true
587+ else (prediction > PREDICTIONMAX))
588+ then throw(((("Prediction is out of the condition: " + toString(PREDICTIONMIN)) + " <= predction <= ") + toString(PREDICTIONMAX)))
589+ else {
590+ let multi = Multiplier(prediction, rollType)
591+ ((((amount * multi) / 100000) * (100 - (FEEWAVESBET + FEEMCAFEE))) / 100)
592+ }
593+
594+
559595 @Callable(i)
560-func playDice (type,prediction) = {
561- let newGameNum = IncrementGameNum()
596+func playDice (rollType,prediction) = {
597+ let predInt = parseIntValue(prediction)
562598 let gameId = toBase58String(i.transactionId)
563599 let payment = extract(i.payment)
564- let multi = getMultiplier(type, prediction)
565- let winAmt = (((payment.amount * multi) / 100000) * (95 / 100))
566- let txIdUsed = isDefined(getString(this, gameId))
567- if (false)
600+ let feeAssetId = isDefined(i.feeAssetId)
601+ let multi = Multiplier(predInt, rollType)
602+ let winAmt = ValidateBetAndDefineWinAmt(payment.amount, predInt, rollType)
603+ let playerBalance = wavesBalance(i.caller)
604+ let gameIdUsed = isDefined(getString(this, gameId))
605+ if ((payment.assetId != WBET))
568606 then throw("Payment should be in Wavesbet")
569- else if (txIdUsed)
570- then throw("Passed txId had been used before. Game aborted.")
571- else {
572- let playerPubKey58 = toBase58String(i.callerPublicKey)
573- let gameDataStr = FormatGameDataStr(STATESUBMITTED, prediction, type, playerPubKey58, height, winAmt, "")
574- ScriptResult(WriteSet([DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet(nil))
575- }
607+ else if ((100000 > playerBalance))
608+ then throw("There are not enough waves, it takes 0.01 Waves to bet. Game aborted.")
609+ else if (feeAssetId)
610+ then throw("Transaction's fee must be in Waves. Game aborted.")
611+ else if (gameIdUsed)
612+ then throw("Passed gameId had been used before. Game aborted.")
613+ else {
614+ let newGameNum = IncrementGameNum()
615+ let playerPubKey58 = toBase58String(i.callerPublicKey)
616+ let gameDataStr = FormatGameDataStr(STATESUBMITTED, prediction, rollType, playerPubKey58, winAmt, "")
617+ ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(WALLETWAVESBET, ((payment.amount * FEEWAVESBET) / 100), WBET), ScriptTransfer(this, 500000, unit)]))
618+ }
576619 }
577620
578621
582625 let gameDataList = ExtractGameDataList(gameId)
583626 let gameState = gameDataList[IdxGameState]
584627 let playerChoice = gameDataList[IdxPlayerChoice]
585- let type = gameDataList[IdxType]
586- let startedHeight = parseIntValue(gameDataList[IdxStartedHeight])
628+ let rollType = gameDataList[IdxType]
587629 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
588630 let playerPubKey58 = gameDataList[IdxPlayerPubKey58]
589631 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
632+ let decreasedReserves = DecreaseReservedAmt(gameId, winAmt)
590633 if ((gameState != STATESUBMITTED))
591634 then throw("Invalid game state for passed gameId")
592635 else {
593636 let rand = GenerateRandInt(gameId, rsaSig)
594637 let randStr = RandToStr(rand)
595- if (diceWin(type, parseIntValue(playerChoice), rand))
638+ if (diceWin(rollType, parseIntValue(playerChoice), rand))
596639 then {
597- let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, type, playerPubKey58, startedHeight, winAmt, randStr)
640+ let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, rollType, playerPubKey58, winAmt, randStr)
598641 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr)
599642 }
600643 else {
601- let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, type, playerPubKey58, startedHeight, winAmt, randStr)
644+ let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, rollType, playerPubKey58, winAmt, randStr)
602645 WriteSet([DataEntry(gameId, newGameDataStr)])
603646 }
604647 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmOlRBTYEO3H7Y9rBmoFQFn4392Px0Qw13DsdEhnzMH2cj6Y5ymPuCOLMNe5qrUzQl8oRLzIBzFVMZlwUYl2bosrOIxQbYF7WVQWvoVxET1YIgDm3NzzOLA5uH7CKO0snshmMFCDOZEew41GjKh3Pgx+nbAguP9ZQPfqSafEmC3CN/4yDsJrKriRniZJo9jS/4LLsRKwB7HAZHzoF9LL7tSZH3htaNGtbdTkxZ1TzST3Mb2VPSzsZvQDocXUVOmJOu0o29aOY+GkG/G4RCK0FBWQHEUvC51TRDS5k8jad0O1MobjQc6b18d+fuoVFdNfZwGH+uFudtPG3UJTf2mkzZQIDAQAB")
55
66 let GAMESCOUNTERKEY = "$GAME_NUM"
77
88 let RESERVATIONKEY = "$RESERVED_AMOUNT"
99
10+let WBET = base58'WAVES'
11+
12+let WALLETWAVESBET = Address(base58'3N2tusqAtDctK8iSTXS6F9rimmftmSuwLUX')
13+
14+let WALLETMCAFFE = Address(base58'')
15+
16+let WAVELET = ((100 * 1000) * 1000)
17+
18+let FEEWAVESBET = 4
19+
20+let FEEMCAFEE = 2
21+
1022 let STATESUBMITTED = "SUBMITTED"
1123
1224 let STATEWON = "WON"
1325
1426 let STATELOST = "LOST"
27+
28+let ROLLUNDER = "UNDER"
29+
30+let ROLLOVER = "OVER"
31+
32+let BETMIN = (100 * WAVELET)
33+
34+let BETMAX = ((1000 * 100) * WAVELET)
35+
36+let PREDICTIONMIN = 4
37+
38+let PREDICTIONMAX = 100
1539
1640 let IdxGameState = 0
1741
1842 let IdxPlayerChoice = 1
1943
2044 let IdxType = 2
2145
2246 let IdxPlayerPubKey58 = 3
2347
24-let IdxStartedHeight = 4
48+let IdxWinAmt = 4
2549
26-let IdxWinAmt = 5
27-
28-let IdxRandOrEmpty = 6
50+let IdxRandOrEmpty = 5
2951
3052 func IncrementGameNum () = {
3153 let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
3254 case num: Int =>
3355 num
3456 case _ =>
3557 0
3658 }
3759 (gameNum + 1)
3860 }
3961
4062
4163 func ExtractReservedAmt () = match getInteger(this, RESERVATIONKEY) {
4264 case a: Int =>
4365 a
4466 case _ =>
4567 0
4668 }
4769
4870
4971 func ValidateAndIncreaseReservedAmt (winAmt) = {
5072 let newReservedAmount = (ExtractReservedAmt() + winAmt)
51- let balance = wavesBalance(this)
73+ let balance = assetBalance(this, WBET)
5274 if ((newReservedAmount > balance))
5375 then throw("Insufficient funds on Waves Rider account. Transaction was rejected for your safety.")
5476 else newReservedAmount
5577 }
5678
5779
5880 func FormatGameDataParam (p) = {
5981 let s = size(p)
6082 if ((s == 0))
6183 then throw("Parameter size must be greater then 0")
6284 else if ((s > 99))
6385 then throw("Parameter size must be less then 100")
6486 else if ((10 > s))
6587 then (("0" + toString(s)) + p)
6688 else (toString(s) + p)
6789 }
6890
6991
70-func FormatGameDataStr (gameState,playerChoice,playerType,playerPubKey58,startedHeight,winAmt,randOrEmpty) = {
71- let fullStateStr = ((((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerType)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(startedHeight))) + "_") + FormatGameDataParam(toString(winAmt)))
92+func FormatGameDataStr (gameState,playerChoice,playerType,playerPubKey58,winAmt,randOrEmpty) = {
93+ let fullStateStr = ((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerType)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(winAmt)))
7294 if ((randOrEmpty == ""))
7395 then fullStateStr
7496 else ((fullStateStr + "_") + FormatGameDataParam(randOrEmpty))
7597 }
7698
7799
78100 func RemoveUnderscoreIfPresent (remaining) = if ((size(remaining) > 0))
79101 then drop(remaining, 1)
80102 else remaining
81103
82104
83105 func ParseNextAttribute (remaining) = {
84106 let s = size(remaining)
85107 if ((s > 0))
86108 then {
87109 let nn = parseIntValue(take(remaining, 2))
88110 let v = take(drop(remaining, 2), nn)
89111 let tmpRemaining = drop(remaining, (nn + 2))
90112 let remainingState = RemoveUnderscoreIfPresent(tmpRemaining)
91113 [v, remainingState]
92114 }
93115 else throw("Empty string was passed into parseNextAttribute func")
94116 }
95117
96118
97119 func ParseGameRawDataStr (rawStateStr) = {
98120 let gameState = ParseNextAttribute(rawStateStr)
99121 let playerChoice = ParseNextAttribute(gameState[1])
100- let type = ParseNextAttribute(playerChoice[1])
101- let playerPubKey58 = ParseNextAttribute(type[1])
102- let startedHeight = ParseNextAttribute(playerPubKey58[1])
103- let winAmt = ParseNextAttribute(startedHeight[1])
104-[gameState[0], playerChoice[0], type[0], playerPubKey58[0], startedHeight[0], winAmt[0]]
122+ let rollType = ParseNextAttribute(playerChoice[1])
123+ let playerPubKey58 = ParseNextAttribute(rollType[1])
124+ let winAmt = ParseNextAttribute(playerPubKey58[1])
125+[gameState[0], playerChoice[0], rollType[0], playerPubKey58[0], winAmt[0]]
105126 }
106127
107128
108129 func ExtractGameDataList (gameId) = {
109130 let rawDataStr = match getString(this, gameId) {
110131 case str: String =>
111132 str
112133 case _ =>
113134 throw(("Couldn't find game by " + gameId))
114135 }
115136 ParseGameRawDataStr(rawDataStr)
116137 }
117138
118139
119140 func DecreaseReservedAmt (gameId,winAmt) = {
120141 let newReservedAmount = (ExtractReservedAmt() - winAmt)
121142 if ((0 > newReservedAmount))
122143 then throw("Invalid Dice Roller account state - reserved amount is less than 0")
123144 else DataEntry(RESERVATIONKEY, newReservedAmount)
124145 }
125146
126147
127148 func GenerateRandInt (gameId,rsaSign) = {
128149 let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
129150 if (rsaSigValid)
130151 then {
131152 let rand = (toInt(sha256(rsaSign)) % 100)
132153 if ((0 > rand))
133154 then ((-1 * rand) + 1)
134155 else (rand + 1)
135156 }
136157 else throw("Invalid RSA signature")
137158 }
138159
139160
140161 func RandToStr (r) = if (if ((r >= 1))
141162 then (100 >= r)
142163 else false)
143164 then toString(r)
144165 else throw(("Unsupported r parameter passed: expected=[1,...,100] actual=" + toString(r)))
145166
146167
147168 func WinScriptSet (gameId,playerAddress,winAmt,newGameDataStr) = {
148169 let tSetCommonData = [ScriptTransfer(playerAddress, winAmt, base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4')]
149170 let writeDicePlay = WriteSet([DataEntry("Game Id", gameId), DataEntry("Player Address", toString(playerAddress))])
150171 ScriptResult(writeDicePlay, TransferSet(tSetCommonData))
151172 }
152173
153174
154-func getMultiplier (type,playerPrediction) = {
155- let prediction = 50
156- if ((type == "Under"))
157- then if ((prediction == 1))
158- then 9850000
159- else if ((prediction == 2))
160- then 4925000
161- else if ((prediction == 3))
162- then 3283330
163- else if ((prediction == 4))
164- then 2462500
165- else if ((prediction == 5))
166- then 1970000
167- else if ((prediction == 6))
168- then 1641660
169- else if ((prediction == 7))
170- then 1407140
171- else if ((prediction == 8))
172- then 1231250
173- else if ((prediction == 9))
174- then 1094440
175- else if ((prediction == 10))
176- then 985000
177- else if ((prediction == 11))
178- then 895450
179- else if ((prediction == 12))
180- then 820830
181- else if ((prediction == 13))
182- then 757690
183- else if ((prediction == 14))
184- then 703570
185- else if ((prediction == 15))
186- then 656660
187- else if ((prediction == 16))
188- then 615620
189- else if ((prediction == 17))
190- then 579410
191- else if ((prediction == 18))
192- then 547220
193- else if ((prediction == 19))
194- then 518420
195- else if ((prediction == 20))
196- then 492500
197- else if ((prediction == 21))
198- then 469040
199- else if ((prediction == 22))
200- then 447720
201- else if ((prediction == 23))
202- then 428260
203- else if ((prediction == 24))
204- then 410410
205- else if ((prediction == 25))
206- then 394000
207- else if ((prediction == 26))
208- then 378840
209- else if ((prediction == 27))
210- then 364810
211- else if ((prediction == 28))
212- then 351780
213- else if ((prediction == 29))
214- then 339650
215- else if ((prediction == 30))
216- then 328330
217- else if ((prediction == 31))
218- then 317740
219- else if ((prediction == 32))
220- then 307810
221- else if ((prediction == 33))
222- then 298480
223- else if ((prediction == 34))
224- then 289700
225- else if ((prediction == 35))
226- then 281420
227- else if ((prediction == 36))
228- then 273610
229- else if ((prediction == 37))
175+func Multiplier (prediction,rollType) = if ((rollType == ROLLUNDER))
176+ then if ((prediction == 1))
177+ then 9850000
178+ else if ((prediction == 2))
179+ then 4925000
180+ else if ((prediction == 3))
181+ then 3283330
182+ else if ((prediction == 4))
183+ then 2462500
184+ else if ((prediction == 5))
185+ then 1970000
186+ else if ((prediction == 6))
187+ then 1641660
188+ else if ((prediction == 7))
189+ then 1407140
190+ else if ((prediction == 8))
191+ then 1231250
192+ else if ((prediction == 9))
193+ then 1094440
194+ else if ((prediction == 10))
195+ then 985000
196+ else if ((prediction == 11))
197+ then 895450
198+ else if ((prediction == 12))
199+ then 820830
200+ else if ((prediction == 13))
201+ then 757690
202+ else if ((prediction == 14))
203+ then 703570
204+ else if ((prediction == 15))
205+ then 656660
206+ else if ((prediction == 16))
207+ then 615620
208+ else if ((prediction == 17))
209+ then 579410
210+ else if ((prediction == 18))
211+ then 547220
212+ else if ((prediction == 19))
213+ then 518420
214+ else if ((prediction == 20))
215+ then 492500
216+ else if ((prediction == 21))
217+ then 469040
218+ else if ((prediction == 22))
219+ then 447720
220+ else if ((prediction == 23))
221+ then 428260
222+ else if ((prediction == 24))
223+ then 410410
224+ else if ((prediction == 25))
225+ then 394000
226+ else if ((prediction == 26))
227+ then 378840
228+ else if ((prediction == 27))
229+ then 364810
230+ else if ((prediction == 28))
231+ then 351780
232+ else if ((prediction == 29))
233+ then 339650
234+ else if ((prediction == 30))
235+ then 328330
236+ else if ((prediction == 31))
237+ then 317740
238+ else if ((prediction == 32))
239+ then 307810
240+ else if ((prediction == 33))
241+ then 298480
242+ else if ((prediction == 34))
243+ then 289700
244+ else if ((prediction == 35))
245+ then 281420
246+ else if ((prediction == 36))
247+ then 273610
248+ else if ((prediction == 37))
249+ then 259210
250+ else if ((prediction == 38))
230251 then 259210
231- else if ((prediction == 38))
232- then 259210
233- else if ((prediction == 39))
234- then 252560
235- else if ((prediction == 40))
236- then 246250
237- else if ((prediction == 41))
238- then 240240
239- else if ((prediction == 42))
240- then 234520
241- else if ((prediction == 43))
242- then 229060
243- else if ((prediction == 44))
244- then 223860
245- else if ((prediction == 45))
246- then 218880
247- else if ((prediction == 46))
248- then 214130
249- else if ((prediction == 47))
250- then 209570
251- else if ((prediction == 48))
252- then 205200
253- else if ((prediction == 49))
254- then 201020
255- else if ((prediction == 50))
256- then 197000
257- else if ((prediction == 51))
258- then 193130
259- else if ((prediction == 52))
260- then 189420
261- else if ((prediction == 53))
262- then 185840
263- else if ((prediction == 54))
264- then 182400
265- else if ((prediction == 55))
266- then 179090
267- else if ((prediction == 56))
268- then 175890
269- else if ((prediction == 57))
270- then 172800
271- else if ((prediction == 58))
272- then 169820
273- else if ((prediction == 59))
274- then 166940
275- else if ((prediction == 60))
276- then 164160
277- else if ((prediction == 61))
278- then 161470
279- else if ((prediction == 62))
280- then 158870
281- else if ((prediction == 63))
282- then 156340
283- else if ((prediction == 64))
284- then 153900
285- else if ((prediction == 65))
286- then 151530
287- else if ((prediction == 66))
288- then 149240
289- else if ((prediction == 67))
290- then 147010
291- else if ((prediction == 68))
292- then 144850
293- else if ((prediction == 69))
294- then 142750
295- else if ((prediction == 70))
296- then 140710
297- else if ((prediction == 71))
298- then 138730
299- else if ((prediction == 72))
300- then 136800
301- else if ((prediction == 73))
302- then 134930
303- else if ((prediction == 74))
304- then 133100
305- else if ((prediction == 75))
306- then 131330
307- else if ((prediction == 76))
308- then 129600
309- else if ((prediction == 77))
310- then 127920
311- else if ((prediction == 78))
312- then 126280
313- else if ((prediction == 79))
314- then 124680
315- else if ((prediction == 80))
316- then 123120
317- else if ((prediction == 81))
318- then 121600
319- else if ((prediction == 82))
320- then 120120
321- else if ((prediction == 83))
322- then 118670
323- else if ((prediction == 84))
324- then 117260
325- else if ((prediction == 85))
326- then 115880
327- else if ((prediction == 86))
328- then 114530
329- else if ((prediction == 87))
330- then 113210
331- else if ((prediction == 88))
332- then 111930
333- else if ((prediction == 89))
334- then 110670
335- else if ((prediction == 90))
336- then 109440
337- else if ((prediction == 91))
338- then 108240
339- else if ((prediction == 92))
340- then 107060
341- else if ((prediction == 93))
342- then 105910
343- else if ((prediction == 94))
344- then 104780
345- else if ((prediction == 95))
252+ else if ((prediction == 39))
253+ then 252560
254+ else if ((prediction == 40))
255+ then 246250
256+ else if ((prediction == 41))
257+ then 240240
258+ else if ((prediction == 42))
259+ then 234520
260+ else if ((prediction == 43))
261+ then 229060
262+ else if ((prediction == 44))
263+ then 223860
264+ else if ((prediction == 45))
265+ then 218880
266+ else if ((prediction == 46))
267+ then 214130
268+ else if ((prediction == 47))
269+ then 209570
270+ else if ((prediction == 48))
271+ then 205200
272+ else if ((prediction == 49))
273+ then 201020
274+ else if ((prediction == 50))
275+ then 197000
276+ else if ((prediction == 51))
277+ then 193130
278+ else if ((prediction == 52))
279+ then 189420
280+ else if ((prediction == 53))
281+ then 185840
282+ else if ((prediction == 54))
283+ then 182400
284+ else if ((prediction == 55))
285+ then 179090
286+ else if ((prediction == 56))
287+ then 175890
288+ else if ((prediction == 57))
289+ then 172800
290+ else if ((prediction == 58))
291+ then 169820
292+ else if ((prediction == 59))
293+ then 166940
294+ else if ((prediction == 60))
295+ then 164160
296+ else if ((prediction == 61))
297+ then 161470
298+ else if ((prediction == 62))
299+ then 158870
300+ else if ((prediction == 63))
301+ then 156340
302+ else if ((prediction == 64))
303+ then 153900
304+ else if ((prediction == 65))
305+ then 151530
306+ else if ((prediction == 66))
307+ then 149240
308+ else if ((prediction == 67))
309+ then 147010
310+ else if ((prediction == 68))
311+ then 144850
312+ else if ((prediction == 69))
313+ then 142750
314+ else if ((prediction == 70))
315+ then 140710
316+ else if ((prediction == 71))
317+ then 138730
318+ else if ((prediction == 72))
319+ then 136800
320+ else if ((prediction == 73))
321+ then 134930
322+ else if ((prediction == 74))
323+ then 133100
324+ else if ((prediction == 75))
325+ then 131330
326+ else if ((prediction == 76))
327+ then 129600
328+ else if ((prediction == 77))
329+ then 127920
330+ else if ((prediction == 78))
331+ then 126280
332+ else if ((prediction == 79))
333+ then 124680
334+ else if ((prediction == 80))
335+ then 123120
336+ else if ((prediction == 81))
337+ then 121600
338+ else if ((prediction == 82))
339+ then 120120
340+ else if ((prediction == 83))
341+ then 118670
342+ else if ((prediction == 84))
343+ then 117260
344+ else if ((prediction == 85))
345+ then 115880
346+ else if ((prediction == 86))
347+ then 114530
348+ else if ((prediction == 87))
349+ then 113210
350+ else if ((prediction == 88))
351+ then 111930
352+ else if ((prediction == 89))
353+ then 110670
354+ else if ((prediction == 90))
355+ then 109440
356+ else if ((prediction == 91))
357+ then 108240
358+ else if ((prediction == 92))
359+ then 107060
360+ else if ((prediction == 93))
361+ then 105910
362+ else if ((prediction == 94))
363+ then 104780
364+ else if ((prediction == 95))
365+ then 103680
366+ else if ((prediction == 96))
346367 then 103680
347- else if ((prediction == 96))
348- then 103680
368+ else 100000
369+ else if ((rollType == ROLLOVER))
370+ then if ((prediction == 4))
371+ then 103680
372+ else if ((prediction == 5))
373+ then 103680
374+ else if ((prediction == 6))
375+ then 104780
376+ else if ((prediction == 7))
377+ then 105910
378+ else if ((prediction == 8))
379+ then 107060
380+ else if ((prediction == 9))
381+ then 108240
382+ else if ((prediction == 10))
383+ then 109440
384+ else if ((prediction == 11))
385+ then 110670
386+ else if ((prediction == 12))
387+ then 111930
388+ else if ((prediction == 13))
389+ then 113210
390+ else if ((prediction == 14))
391+ then 114530
392+ else if ((prediction == 15))
393+ then 115880
394+ else if ((prediction == 16))
395+ then 117260
396+ else if ((prediction == 17))
397+ then 118670
398+ else if ((prediction == 18))
399+ then 120120
400+ else if ((prediction == 19))
401+ then 121600
402+ else if ((prediction == 20))
403+ then 123120
404+ else if ((prediction == 21))
405+ then 124680
406+ else if ((prediction == 22))
407+ then 126280
408+ else if ((prediction == 23))
409+ then 127920
410+ else if ((prediction == 24))
411+ then 129600
412+ else if ((prediction == 25))
413+ then 131330
414+ else if ((prediction == 26))
415+ then 133100
416+ else if ((prediction == 27))
417+ then 134930
418+ else if ((prediction == 28))
419+ then 136800
420+ else if ((prediction == 29))
421+ then 138730
422+ else if ((prediction == 30))
423+ then 140710
424+ else if ((prediction == 31))
425+ then 142750
426+ else if ((prediction == 32))
427+ then 144850
428+ else if ((prediction == 33))
429+ then 147010
430+ else if ((prediction == 34))
431+ then 149240
432+ else if ((prediction == 35))
433+ then 151530
434+ else if ((prediction == 36))
435+ then 153900
436+ else if ((prediction == 37))
437+ then 156340
438+ else if ((prediction == 38))
439+ then 158870
440+ else if ((prediction == 39))
441+ then 161470
442+ else if ((prediction == 40))
443+ then 164160
444+ else if ((prediction == 41))
445+ then 166940
446+ else if ((prediction == 42))
447+ then 169820
448+ else if ((prediction == 43))
449+ then 172800
450+ else if ((prediction == 44))
451+ then 175890
452+ else if ((prediction == 45))
453+ then 179090
454+ else if ((prediction == 46))
455+ then 185840
456+ else if ((prediction == 47))
457+ then 185840
458+ else if ((prediction == 48))
459+ then 189420
460+ else if ((prediction == 49))
461+ then 193130
462+ else if ((prediction == 50))
463+ then 197000
464+ else if ((prediction == 51))
465+ then 201020
466+ else if ((prediction == 52))
467+ then 205200
468+ else if ((prediction == 53))
469+ then 209570
470+ else if ((prediction == 54))
471+ then 214130
472+ else if ((prediction == 55))
473+ then 218880
474+ else if ((prediction == 56))
475+ then 223860
476+ else if ((prediction == 57))
477+ then 229060
478+ else if ((prediction == 58))
479+ then 234520
480+ else if ((prediction == 59))
481+ then 240240
482+ else if ((prediction == 60))
483+ then 246250
484+ else if ((prediction == 61))
485+ then 252560
486+ else if ((prediction == 62))
487+ then 259210
488+ else if ((prediction == 63))
489+ then 259210
490+ else if ((prediction == 64))
491+ then 273610
492+ else if ((prediction == 65))
493+ then 281420
494+ else if ((prediction == 66))
495+ then 289700
496+ else if ((prediction == 67))
497+ then 298480
498+ else if ((prediction == 68))
499+ then 307810
500+ else if ((prediction == 69))
501+ then 317740
502+ else if ((prediction == 70))
503+ then 328330
504+ else if ((prediction == 71))
505+ then 339650
506+ else if ((prediction == 72))
507+ then 351780
508+ else if ((prediction == 73))
509+ then 364810
510+ else if ((prediction == 74))
511+ then 378840
512+ else if ((prediction == 75))
513+ then 394000
514+ else if ((prediction == 76))
515+ then 410410
516+ else if ((prediction == 77))
517+ then 428260
518+ else if ((prediction == 78))
519+ then 447720
520+ else if ((prediction == 79))
521+ then 469040
522+ else if ((prediction == 80))
523+ then 492500
524+ else if ((prediction == 81))
525+ then 518420
526+ else if ((prediction == 82))
527+ then 547220
528+ else if ((prediction == 83))
529+ then 579410
530+ else if ((prediction == 84))
531+ then 615620
532+ else if ((prediction == 85))
533+ then 656660
534+ else if ((prediction == 86))
535+ then 703570
536+ else if ((prediction == 87))
537+ then 757690
538+ else if ((prediction == 88))
539+ then 820830
540+ else if ((prediction == 89))
541+ then 895450
542+ else if ((prediction == 90))
543+ then 985000
544+ else if ((prediction == 91))
545+ then 1094440
546+ else if ((prediction == 92))
547+ then 1231250
548+ else if ((prediction == 93))
549+ then 1407140
550+ else if ((prediction == 94))
551+ then 1641660
552+ else if ((prediction == 95))
553+ then 1970000
554+ else if ((prediction == 96))
555+ then 2462500
556+ else if ((prediction == 97))
557+ then 3283330
558+ else if ((prediction == 98))
559+ then 4925000
560+ else if ((prediction == 99))
561+ then 9850000
349562 else 100000
350- else if ((type == "Over"))
351- then if ((prediction == 4))
352- then 103680
353- else if ((prediction == 5))
354- then 103680
355- else if ((prediction == 6))
356- then 104780
357- else if ((prediction == 7))
358- then 105910
359- else if ((prediction == 8))
360- then 107060
361- else if ((prediction == 9))
362- then 108240
363- else if ((prediction == 10))
364- then 109440
365- else if ((prediction == 11))
366- then 110670
367- else if ((prediction == 12))
368- then 111930
369- else if ((prediction == 13))
370- then 113210
371- else if ((prediction == 14))
372- then 114530
373- else if ((prediction == 15))
374- then 115880
375- else if ((prediction == 16))
376- then 117260
377- else if ((prediction == 17))
378- then 118670
379- else if ((prediction == 18))
380- then 120120
381- else if ((prediction == 19))
382- then 121600
383- else if ((prediction == 20))
384- then 123120
385- else if ((prediction == 21))
386- then 124680
387- else if ((prediction == 22))
388- then 126280
389- else if ((prediction == 23))
390- then 127920
391- else if ((prediction == 24))
392- then 129600
393- else if ((prediction == 25))
394- then 131330
395- else if ((prediction == 26))
396- then 133100
397- else if ((prediction == 27))
398- then 134930
399- else if ((prediction == 28))
400- then 136800
401- else if ((prediction == 29))
402- then 138730
403- else if ((prediction == 30))
404- then 140710
405- else if ((prediction == 31))
406- then 142750
407- else if ((prediction == 32))
408- then 144850
409- else if ((prediction == 33))
410- then 147010
411- else if ((prediction == 34))
412- then 149240
413- else if ((prediction == 35))
414- then 151530
415- else if ((prediction == 36))
416- then 153900
417- else if ((prediction == 37))
418- then 156340
419- else if ((prediction == 38))
420- then 158870
421- else if ((prediction == 39))
422- then 161470
423- else if ((prediction == 40))
424- then 164160
425- else if ((prediction == 41))
426- then 166940
427- else if ((prediction == 42))
428- then 169820
429- else if ((prediction == 43))
430- then 172800
431- else if ((prediction == 44))
432- then 175890
433- else if ((prediction == 45))
434- then 179090
435- else if ((prediction == 46))
436- then 185840
437- else if ((prediction == 47))
438- then 185840
439- else if ((prediction == 48))
440- then 189420
441- else if ((prediction == 49))
442- then 193130
443- else if ((prediction == 50))
444- then 197000
445- else if ((prediction == 51))
446- then 201020
447- else if ((prediction == 52))
448- then 205200
449- else if ((prediction == 53))
450- then 209570
451- else if ((prediction == 54))
452- then 214130
453- else if ((prediction == 55))
454- then 218880
455- else if ((prediction == 56))
456- then 223860
457- else if ((prediction == 57))
458- then 229060
459- else if ((prediction == 58))
460- then 234520
461- else if ((prediction == 59))
462- then 240240
463- else if ((prediction == 60))
464- then 246250
465- else if ((prediction == 61))
466- then 252560
467- else if ((prediction == 62))
468- then 259210
469- else if ((prediction == 63))
470- then 259210
471- else if ((prediction == 64))
472- then 273610
473- else if ((prediction == 65))
474- then 281420
475- else if ((prediction == 66))
476- then 289700
477- else if ((prediction == 67))
478- then 298480
479- else if ((prediction == 68))
480- then 307810
481- else if ((prediction == 69))
482- then 317740
483- else if ((prediction == 70))
484- then 328330
485- else if ((prediction == 71))
486- then 339650
487- else if ((prediction == 72))
488- then 351780
489- else if ((prediction == 73))
490- then 364810
491- else if ((prediction == 74))
492- then 378840
493- else if ((prediction == 75))
494- then 394000
495- else if ((prediction == 76))
496- then 410410
497- else if ((prediction == 77))
498- then 428260
499- else if ((prediction == 78))
500- then 447720
501- else if ((prediction == 79))
502- then 469040
503- else if ((prediction == 80))
504- then 492500
505- else if ((prediction == 81))
506- then 518420
507- else if ((prediction == 82))
508- then 547220
509- else if ((prediction == 83))
510- then 579410
511- else if ((prediction == 84))
512- then 615620
513- else if ((prediction == 85))
514- then 656660
515- else if ((prediction == 86))
516- then 703570
517- else if ((prediction == 87))
518- then 757690
519- else if ((prediction == 88))
520- then 820830
521- else if ((prediction == 89))
522- then 895450
523- else if ((prediction == 90))
524- then 985000
525- else if ((prediction == 91))
526- then 1094440
527- else if ((prediction == 92))
528- then 1231250
529- else if ((prediction == 93))
530- then 1407140
531- else if ((prediction == 94))
532- then 1641660
533- else if ((prediction == 95))
534- then 1970000
535- else if ((prediction == 96))
536- then 2462500
537- else if ((prediction == 97))
538- then 3283330
539- else if ((prediction == 98))
540- then 4925000
541- else if ((prediction == 99))
542- then 9850000
543- else 100000
544- else 100000
545- }
563+ else 100000
546564
547565
548-func diceWin (type,prediction,number) = if ((type == "Under"))
566+func diceWin (type,prediction,number) = if ((type == ROLLUNDER))
549567 then if ((prediction >= number))
550568 then true
551569 else false
552- else if ((type == "Over"))
570+ else if ((type == ROLLOVER))
553571 then if ((number >= prediction))
554572 then true
555573 else false
556574 else false
557575
558576
577+func ValidateBetAndDefineWinAmt (amount,prediction,rollType) = if (if ((BETMIN > amount))
578+ then true
579+ else (amount > BETMAX))
580+ then throw(((("Bet amount is not in range: minBet=" + toString((BETMIN / 100000000))) + " maxBet=") + toString((BETMAX / 100000000))))
581+ else if (if ((rollType != ROLLUNDER))
582+ then (rollType != ROLLOVER)
583+ else false)
584+ then throw("Invalid Roll type, try with OVER or UNDER")
585+ else if (if ((PREDICTIONMIN > prediction))
586+ then true
587+ else (prediction > PREDICTIONMAX))
588+ then throw(((("Prediction is out of the condition: " + toString(PREDICTIONMIN)) + " <= predction <= ") + toString(PREDICTIONMAX)))
589+ else {
590+ let multi = Multiplier(prediction, rollType)
591+ ((((amount * multi) / 100000) * (100 - (FEEWAVESBET + FEEMCAFEE))) / 100)
592+ }
593+
594+
559595 @Callable(i)
560-func playDice (type,prediction) = {
561- let newGameNum = IncrementGameNum()
596+func playDice (rollType,prediction) = {
597+ let predInt = parseIntValue(prediction)
562598 let gameId = toBase58String(i.transactionId)
563599 let payment = extract(i.payment)
564- let multi = getMultiplier(type, prediction)
565- let winAmt = (((payment.amount * multi) / 100000) * (95 / 100))
566- let txIdUsed = isDefined(getString(this, gameId))
567- if (false)
600+ let feeAssetId = isDefined(i.feeAssetId)
601+ let multi = Multiplier(predInt, rollType)
602+ let winAmt = ValidateBetAndDefineWinAmt(payment.amount, predInt, rollType)
603+ let playerBalance = wavesBalance(i.caller)
604+ let gameIdUsed = isDefined(getString(this, gameId))
605+ if ((payment.assetId != WBET))
568606 then throw("Payment should be in Wavesbet")
569- else if (txIdUsed)
570- then throw("Passed txId had been used before. Game aborted.")
571- else {
572- let playerPubKey58 = toBase58String(i.callerPublicKey)
573- let gameDataStr = FormatGameDataStr(STATESUBMITTED, prediction, type, playerPubKey58, height, winAmt, "")
574- ScriptResult(WriteSet([DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet(nil))
575- }
607+ else if ((100000 > playerBalance))
608+ then throw("There are not enough waves, it takes 0.01 Waves to bet. Game aborted.")
609+ else if (feeAssetId)
610+ then throw("Transaction's fee must be in Waves. Game aborted.")
611+ else if (gameIdUsed)
612+ then throw("Passed gameId had been used before. Game aborted.")
613+ else {
614+ let newGameNum = IncrementGameNum()
615+ let playerPubKey58 = toBase58String(i.callerPublicKey)
616+ let gameDataStr = FormatGameDataStr(STATESUBMITTED, prediction, rollType, playerPubKey58, winAmt, "")
617+ ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(WALLETWAVESBET, ((payment.amount * FEEWAVESBET) / 100), WBET), ScriptTransfer(this, 500000, unit)]))
618+ }
576619 }
577620
578621
579622
580623 @Callable(i)
581624 func withdraw (gameId,rsaSig) = {
582625 let gameDataList = ExtractGameDataList(gameId)
583626 let gameState = gameDataList[IdxGameState]
584627 let playerChoice = gameDataList[IdxPlayerChoice]
585- let type = gameDataList[IdxType]
586- let startedHeight = parseIntValue(gameDataList[IdxStartedHeight])
628+ let rollType = gameDataList[IdxType]
587629 let winAmt = parseIntValue(gameDataList[IdxWinAmt])
588630 let playerPubKey58 = gameDataList[IdxPlayerPubKey58]
589631 let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
632+ let decreasedReserves = DecreaseReservedAmt(gameId, winAmt)
590633 if ((gameState != STATESUBMITTED))
591634 then throw("Invalid game state for passed gameId")
592635 else {
593636 let rand = GenerateRandInt(gameId, rsaSig)
594637 let randStr = RandToStr(rand)
595- if (diceWin(type, parseIntValue(playerChoice), rand))
638+ if (diceWin(rollType, parseIntValue(playerChoice), rand))
596639 then {
597- let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, type, playerPubKey58, startedHeight, winAmt, randStr)
640+ let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, rollType, playerPubKey58, winAmt, randStr)
598641 WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr)
599642 }
600643 else {
601- let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, type, playerPubKey58, startedHeight, winAmt, randStr)
644+ let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, rollType, playerPubKey58, winAmt, randStr)
602645 WriteSet([DataEntry(gameId, newGameDataStr)])
603646 }
604647 }
605648 }
606649
607650

github/deemru/w8io/c3f4982 
1865.07 ms