tx · 9mbNFtG4rbEvchyR5Mknn7Dwmkgox2xYBR8S8DyJraLM

3NA8CCJEpWACAN7uMTTGiVERNtc4dSSayyE:  -0.01400000 Waves

2019.09.02 19:34 [658565] smart account 3NA8CCJEpWACAN7uMTTGiVERNtc4dSSayyE > SELF 0.00000000 Waves

{ "type": 13, "id": "9mbNFtG4rbEvchyR5Mknn7Dwmkgox2xYBR8S8DyJraLM", "fee": 1400000, "feeAssetId": null, "timestamp": 1567442022403, "version": 1, "sender": "3NA8CCJEpWACAN7uMTTGiVERNtc4dSSayyE", "senderPublicKey": "FgntDUgs7tdnp33MDzzH2k7CjvDsAxhC4r413RdQEF2F", "proofs": [ "4VLArkwZT2kZFpVWJbX4PAQpwcyFE84QjDeQ1DqiDrp9VMTYx98N4PeWAK5pix1Jc9FCYKyXmjtcK9SA2J2535a9" ], "script": "base64:AAIDAAAAAAAAAAAAAAAHAQAAAA5nZW5lcmF0ZU51bWJlcgAAAAMAAAADaW52AAAAA21heAAAAANtaW4EAAAACGxhc3RQbGF5BAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMCAAAACGxhc3RQbGF5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0BAAAAAFhBQAAAAckbWF0Y2gwAQAAAAxXYXZlc0xvdHRvVjIJAQAAAAV0aHJvdwAAAAAEAAAABHJhbmQJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACBQAAAAhsYXN0UGxheQgFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQABmgAAAAEIBQAAAAlsYXN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zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAAD29wcG9uZW50QWRkcmVzcwAAAAAAAAAAAAgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAEY29pbgUAAAAFcmNvaW4JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABnBheW91dAUAAAAGcGF5b3V0CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAZ3aW5uZXIJAAQlAAAAAQgFAAAAA2ludgAAAAZjYWxsZXIFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAADaW52AAAABmNhbGxlcgAAAAAAAAAAAAgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAUAAAADbmlsCQAAAgAAAAECAAAAJlBheW1lbnQgc2hvdWxkIGJlIGluIFdhdmVzYmV0IG9yIFdhdmVzAAAAAgAAAANpbnYBAAAACHBsYXlEaWNlAAAAAgAAAAR0eXBlAAAACnByZWRpY3Rpb24JAQAAAAlzdGFydERpY2UAAAADBQAAAANpbnYFAAAABHR5cGUFAAAACnByZWRpY3Rpb24AAAADaW52AQAAAAxwbGF5Q29pbkZsaXAAAAACAAAAD29wcG9uZW50QWRkcmVzcwAAAAxvcHBvbmVudE1vdmUJAQAAAA1zdGFydENvaW5GbGlwAAAAAwUAAAADaW52BQAAAA9vcHBvbmVudEFkZHJlc3MFAAAADG9wcG9uZW50TW92ZQAAAAChY02O", "chainId": 84, "height": 658565, "spentComplexity": 0 } View: original | compacted Prev: 9SHin9zonnHGwtJQHZf99yLhSKpbEVcJzfw6yEihzYPb Next: 2pQMuTjjK9ezXN38qugg7hDJ38Na7pK2gtVA6eeiMj2p Diff:
OldNewDifferences
1515 }
1616
1717
18-func getMultiplier (type,prediction) = if ((type == 0))
18+func getMultiplier (type,prediction) = if ((type == "Under"))
1919 then if ((prediction == 1))
2020 then 9850000
2121 else if ((prediction == 2))
209209 else if ((prediction == 96))
210210 then 103680
211211 else 100000
212- else if ((type == 1))
212+ else if ((type == "Over"))
213213 then if ((prediction == 4))
214214 then 103680
215215 else if ((prediction == 5))
406406 else 100000
407407
408408
409-func diceWin (type,prediction,number) = if ((type == 0))
409+func diceWin (type,prediction,number) = if ((type == "Under"))
410410 then if ((prediction >= number))
411411 then true
412412 else false
413- else if ((type == 1))
413+ else if ((type == "Over"))
414414 then if ((number >= prediction))
415415 then true
416416 else false
423423
424424
425425 func startDice (inv,type,prediction) = {
426- let playLimit = (wavesBalance(this) / 100)
427- let payment = extract(inv.payment)
428- if ((payment.assetId == assetInfo(base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4')))
429- then throw("Payment should be in Wavesbet")
430- else if ((payment.amount > playLimit))
431- then throw(("Payment should be less than " + toString(playLimit)))
432- else {
433- let random = generateNumber(inv, 99, 1)
434- let multi = getMultiplier(type, prediction)
435- let win = diceWin(type, prediction, random)
436- let payout = ((dicePayout(win, payment.amount, multi) * 95) / 100)
437- let winTransfer = TransferSet([ScriptTransfer(inv.caller, payout, base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4')])
438- let writeDicePlay = WriteSet([DataEntry("random number", random), DataEntry("win", win), DataEntry("payment", payment.amount), DataEntry("payout", payout)])
439- if (win)
440- then ScriptResult(writeDicePlay, winTransfer)
441- else ScriptResult(writeDicePlay, TransferSet(nil))
442- }
426+ let addr = Address(base58'3MvPzCGFduA2MR4RwpGUUCryXQHqXa8H7Ju')
427+ let addr2 = Address(base58'3MvPzCGFduA2MR4RwpGUUCryXQHqXa8H7Ju')
428+ ScriptResult(WriteSet(nil), TransferSet([ScriptTransfer(addr, 1000, unit), ScriptTransfer(addr, 1000, unit)]))
443429 }
444430
445431
446432 func coinFlip (number) = if ((51 > number))
447- then "head"
448- else "tail"
433+ then "red"
434+ else "blue"
449435
450436
451437 func startCoinFlip (inv,opponentAddress,opponentMove) = {
452438 let payment = extract(inv.payment)
453439 if (if ((payment.assetId == assetInfo(base58'WAVES')))
454440 then true
455- else (payment.assetId == assetInfo(base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4')))
441+ else (payment.assetId == base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4'))
456442 then {
457443 let rand = generateNumber(inv, 100, 1)
458444 let rcoin = coinFlip(rand)
459445 let payout = (((payment.amount * 2) * 95) / 100)
460446 if ((rcoin == opponentMove))
461- then ScriptResult(WriteSet([DataEntry("rand", rand), DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", opponentAddress)]), TransferSet([ScriptTransfer(Address(fromBase58String(opponentAddress)), payout, payment.assetId)]))
462- else ScriptResult(WriteSet([DataEntry("rand", rand), DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", toString(inv.caller))]), TransferSet([ScriptTransfer(inv.caller, payout, payment.assetId)]))
447+ then ScriptResult(WriteSet([DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", opponentAddress)]), TransferSet([ScriptTransfer(Address(fromBase58String(opponentAddress)), 0, payment.assetId)]))
448+ else ScriptResult(WriteSet([DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", toString(inv.caller))]), TransferSet([ScriptTransfer(inv.caller, 0, payment.assetId)]))
463449 }
464450 else throw("Payment should be in Wavesbet or Waves")
465451 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func generateNumber (inv,max,min) = {
55 let lastPlay = match getBinary(this, "lastPlay") {
66 case s: ByteVector =>
77 s
88 case a: Unit =>
99 base58'2ee4oFDYriWJ9EMeR'
1010 case _ =>
1111 throw()
1212 }
1313 let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
1414 (((toInt(sha256(rand)) % 1000) % ((max - min) + 1)) + 1)
1515 }
1616
1717
18-func getMultiplier (type,prediction) = if ((type == 0))
18+func getMultiplier (type,prediction) = if ((type == "Under"))
1919 then if ((prediction == 1))
2020 then 9850000
2121 else if ((prediction == 2))
2222 then 4925000
2323 else if ((prediction == 3))
2424 then 3283330
2525 else if ((prediction == 4))
2626 then 2462500
2727 else if ((prediction == 5))
2828 then 1970000
2929 else if ((prediction == 6))
3030 then 1641660
3131 else if ((prediction == 7))
3232 then 1407140
3333 else if ((prediction == 8))
3434 then 1231250
3535 else if ((prediction == 9))
3636 then 1094440
3737 else if ((prediction == 10))
3838 then 985000
3939 else if ((prediction == 11))
4040 then 895450
4141 else if ((prediction == 12))
4242 then 820830
4343 else if ((prediction == 13))
4444 then 757690
4545 else if ((prediction == 14))
4646 then 703570
4747 else if ((prediction == 15))
4848 then 656660
4949 else if ((prediction == 16))
5050 then 615620
5151 else if ((prediction == 17))
5252 then 579410
5353 else if ((prediction == 18))
5454 then 547220
5555 else if ((prediction == 19))
5656 then 518420
5757 else if ((prediction == 20))
5858 then 492500
5959 else if ((prediction == 21))
6060 then 469040
6161 else if ((prediction == 22))
6262 then 447720
6363 else if ((prediction == 23))
6464 then 428260
6565 else if ((prediction == 24))
6666 then 410410
6767 else if ((prediction == 25))
6868 then 394000
6969 else if ((prediction == 26))
7070 then 378840
7171 else if ((prediction == 27))
7272 then 364810
7373 else if ((prediction == 28))
7474 then 351780
7575 else if ((prediction == 29))
7676 then 339650
7777 else if ((prediction == 30))
7878 then 328330
7979 else if ((prediction == 31))
8080 then 317740
8181 else if ((prediction == 32))
8282 then 307810
8383 else if ((prediction == 33))
8484 then 298480
8585 else if ((prediction == 34))
8686 then 289700
8787 else if ((prediction == 35))
8888 then 281420
8989 else if ((prediction == 36))
9090 then 273610
9191 else if ((prediction == 37))
9292 then 259210
9393 else if ((prediction == 38))
9494 then 259210
9595 else if ((prediction == 39))
9696 then 252560
9797 else if ((prediction == 40))
9898 then 246250
9999 else if ((prediction == 41))
100100 then 240240
101101 else if ((prediction == 42))
102102 then 234520
103103 else if ((prediction == 43))
104104 then 229060
105105 else if ((prediction == 44))
106106 then 223860
107107 else if ((prediction == 45))
108108 then 218880
109109 else if ((prediction == 46))
110110 then 214130
111111 else if ((prediction == 47))
112112 then 209570
113113 else if ((prediction == 48))
114114 then 205200
115115 else if ((prediction == 49))
116116 then 201020
117117 else if ((prediction == 50))
118118 then 197000
119119 else if ((prediction == 51))
120120 then 193130
121121 else if ((prediction == 52))
122122 then 189420
123123 else if ((prediction == 53))
124124 then 185840
125125 else if ((prediction == 54))
126126 then 182400
127127 else if ((prediction == 55))
128128 then 179090
129129 else if ((prediction == 56))
130130 then 175890
131131 else if ((prediction == 57))
132132 then 172800
133133 else if ((prediction == 58))
134134 then 169820
135135 else if ((prediction == 59))
136136 then 166940
137137 else if ((prediction == 60))
138138 then 164160
139139 else if ((prediction == 61))
140140 then 161470
141141 else if ((prediction == 62))
142142 then 158870
143143 else if ((prediction == 63))
144144 then 156340
145145 else if ((prediction == 64))
146146 then 153900
147147 else if ((prediction == 65))
148148 then 151530
149149 else if ((prediction == 66))
150150 then 149240
151151 else if ((prediction == 67))
152152 then 147010
153153 else if ((prediction == 68))
154154 then 144850
155155 else if ((prediction == 69))
156156 then 142750
157157 else if ((prediction == 70))
158158 then 140710
159159 else if ((prediction == 71))
160160 then 138730
161161 else if ((prediction == 72))
162162 then 136800
163163 else if ((prediction == 73))
164164 then 134930
165165 else if ((prediction == 74))
166166 then 133100
167167 else if ((prediction == 75))
168168 then 131330
169169 else if ((prediction == 76))
170170 then 129600
171171 else if ((prediction == 77))
172172 then 127920
173173 else if ((prediction == 78))
174174 then 126280
175175 else if ((prediction == 79))
176176 then 124680
177177 else if ((prediction == 80))
178178 then 123120
179179 else if ((prediction == 81))
180180 then 121600
181181 else if ((prediction == 82))
182182 then 120120
183183 else if ((prediction == 83))
184184 then 118670
185185 else if ((prediction == 84))
186186 then 117260
187187 else if ((prediction == 85))
188188 then 115880
189189 else if ((prediction == 86))
190190 then 114530
191191 else if ((prediction == 87))
192192 then 113210
193193 else if ((prediction == 88))
194194 then 111930
195195 else if ((prediction == 89))
196196 then 110670
197197 else if ((prediction == 90))
198198 then 109440
199199 else if ((prediction == 91))
200200 then 108240
201201 else if ((prediction == 92))
202202 then 107060
203203 else if ((prediction == 93))
204204 then 105910
205205 else if ((prediction == 94))
206206 then 104780
207207 else if ((prediction == 95))
208208 then 103680
209209 else if ((prediction == 96))
210210 then 103680
211211 else 100000
212- else if ((type == 1))
212+ else if ((type == "Over"))
213213 then if ((prediction == 4))
214214 then 103680
215215 else if ((prediction == 5))
216216 then 103680
217217 else if ((prediction == 6))
218218 then 104780
219219 else if ((prediction == 7))
220220 then 105910
221221 else if ((prediction == 8))
222222 then 107060
223223 else if ((prediction == 9))
224224 then 108240
225225 else if ((prediction == 10))
226226 then 109440
227227 else if ((prediction == 11))
228228 then 110670
229229 else if ((prediction == 12))
230230 then 111930
231231 else if ((prediction == 13))
232232 then 113210
233233 else if ((prediction == 14))
234234 then 114530
235235 else if ((prediction == 15))
236236 then 115880
237237 else if ((prediction == 16))
238238 then 117260
239239 else if ((prediction == 17))
240240 then 118670
241241 else if ((prediction == 18))
242242 then 120120
243243 else if ((prediction == 19))
244244 then 121600
245245 else if ((prediction == 20))
246246 then 123120
247247 else if ((prediction == 21))
248248 then 124680
249249 else if ((prediction == 22))
250250 then 126280
251251 else if ((prediction == 23))
252252 then 127920
253253 else if ((prediction == 24))
254254 then 129600
255255 else if ((prediction == 25))
256256 then 131330
257257 else if ((prediction == 26))
258258 then 133100
259259 else if ((prediction == 27))
260260 then 134930
261261 else if ((prediction == 28))
262262 then 136800
263263 else if ((prediction == 29))
264264 then 138730
265265 else if ((prediction == 30))
266266 then 140710
267267 else if ((prediction == 31))
268268 then 142750
269269 else if ((prediction == 32))
270270 then 144850
271271 else if ((prediction == 33))
272272 then 147010
273273 else if ((prediction == 34))
274274 then 149240
275275 else if ((prediction == 35))
276276 then 151530
277277 else if ((prediction == 36))
278278 then 153900
279279 else if ((prediction == 37))
280280 then 156340
281281 else if ((prediction == 38))
282282 then 158870
283283 else if ((prediction == 39))
284284 then 161470
285285 else if ((prediction == 40))
286286 then 164160
287287 else if ((prediction == 41))
288288 then 166940
289289 else if ((prediction == 42))
290290 then 169820
291291 else if ((prediction == 43))
292292 then 172800
293293 else if ((prediction == 44))
294294 then 175890
295295 else if ((prediction == 45))
296296 then 179090
297297 else if ((prediction == 46))
298298 then 185840
299299 else if ((prediction == 47))
300300 then 185840
301301 else if ((prediction == 48))
302302 then 189420
303303 else if ((prediction == 49))
304304 then 193130
305305 else if ((prediction == 50))
306306 then 197000
307307 else if ((prediction == 51))
308308 then 201020
309309 else if ((prediction == 52))
310310 then 205200
311311 else if ((prediction == 53))
312312 then 209570
313313 else if ((prediction == 54))
314314 then 214130
315315 else if ((prediction == 55))
316316 then 218880
317317 else if ((prediction == 56))
318318 then 223860
319319 else if ((prediction == 57))
320320 then 229060
321321 else if ((prediction == 58))
322322 then 234520
323323 else if ((prediction == 59))
324324 then 240240
325325 else if ((prediction == 60))
326326 then 246250
327327 else if ((prediction == 61))
328328 then 252560
329329 else if ((prediction == 62))
330330 then 259210
331331 else if ((prediction == 63))
332332 then 259210
333333 else if ((prediction == 64))
334334 then 273610
335335 else if ((prediction == 65))
336336 then 281420
337337 else if ((prediction == 66))
338338 then 289700
339339 else if ((prediction == 67))
340340 then 298480
341341 else if ((prediction == 68))
342342 then 307810
343343 else if ((prediction == 69))
344344 then 317740
345345 else if ((prediction == 70))
346346 then 328330
347347 else if ((prediction == 71))
348348 then 339650
349349 else if ((prediction == 72))
350350 then 351780
351351 else if ((prediction == 73))
352352 then 364810
353353 else if ((prediction == 74))
354354 then 378840
355355 else if ((prediction == 75))
356356 then 394000
357357 else if ((prediction == 76))
358358 then 410410
359359 else if ((prediction == 77))
360360 then 428260
361361 else if ((prediction == 78))
362362 then 447720
363363 else if ((prediction == 79))
364364 then 469040
365365 else if ((prediction == 80))
366366 then 492500
367367 else if ((prediction == 81))
368368 then 518420
369369 else if ((prediction == 82))
370370 then 547220
371371 else if ((prediction == 83))
372372 then 579410
373373 else if ((prediction == 84))
374374 then 615620
375375 else if ((prediction == 85))
376376 then 656660
377377 else if ((prediction == 86))
378378 then 703570
379379 else if ((prediction == 87))
380380 then 757690
381381 else if ((prediction == 88))
382382 then 820830
383383 else if ((prediction == 89))
384384 then 895450
385385 else if ((prediction == 90))
386386 then 985000
387387 else if ((prediction == 91))
388388 then 1094440
389389 else if ((prediction == 92))
390390 then 1231250
391391 else if ((prediction == 93))
392392 then 1407140
393393 else if ((prediction == 94))
394394 then 1641660
395395 else if ((prediction == 95))
396396 then 1970000
397397 else if ((prediction == 96))
398398 then 2462500
399399 else if ((prediction == 97))
400400 then 3283330
401401 else if ((prediction == 98))
402402 then 4925000
403403 else if ((prediction == 99))
404404 then 9850000
405405 else 100000
406406 else 100000
407407
408408
409-func diceWin (type,prediction,number) = if ((type == 0))
409+func diceWin (type,prediction,number) = if ((type == "Under"))
410410 then if ((prediction >= number))
411411 then true
412412 else false
413- else if ((type == 1))
413+ else if ((type == "Over"))
414414 then if ((number >= prediction))
415415 then true
416416 else false
417417 else false
418418
419419
420420 func dicePayout (win,amount,mult) = if (win)
421421 then ((amount * mult) / 100000)
422422 else 0
423423
424424
425425 func startDice (inv,type,prediction) = {
426- let playLimit = (wavesBalance(this) / 100)
427- let payment = extract(inv.payment)
428- if ((payment.assetId == assetInfo(base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4')))
429- then throw("Payment should be in Wavesbet")
430- else if ((payment.amount > playLimit))
431- then throw(("Payment should be less than " + toString(playLimit)))
432- else {
433- let random = generateNumber(inv, 99, 1)
434- let multi = getMultiplier(type, prediction)
435- let win = diceWin(type, prediction, random)
436- let payout = ((dicePayout(win, payment.amount, multi) * 95) / 100)
437- let winTransfer = TransferSet([ScriptTransfer(inv.caller, payout, base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4')])
438- let writeDicePlay = WriteSet([DataEntry("random number", random), DataEntry("win", win), DataEntry("payment", payment.amount), DataEntry("payout", payout)])
439- if (win)
440- then ScriptResult(writeDicePlay, winTransfer)
441- else ScriptResult(writeDicePlay, TransferSet(nil))
442- }
426+ let addr = Address(base58'3MvPzCGFduA2MR4RwpGUUCryXQHqXa8H7Ju')
427+ let addr2 = Address(base58'3MvPzCGFduA2MR4RwpGUUCryXQHqXa8H7Ju')
428+ ScriptResult(WriteSet(nil), TransferSet([ScriptTransfer(addr, 1000, unit), ScriptTransfer(addr, 1000, unit)]))
443429 }
444430
445431
446432 func coinFlip (number) = if ((51 > number))
447- then "head"
448- else "tail"
433+ then "red"
434+ else "blue"
449435
450436
451437 func startCoinFlip (inv,opponentAddress,opponentMove) = {
452438 let payment = extract(inv.payment)
453439 if (if ((payment.assetId == assetInfo(base58'WAVES')))
454440 then true
455- else (payment.assetId == assetInfo(base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4')))
441+ else (payment.assetId == base58'4vPcbA5yiwpWBVPALPGXus6fNdGEuYTpe4hAeSxM9Kj4'))
456442 then {
457443 let rand = generateNumber(inv, 100, 1)
458444 let rcoin = coinFlip(rand)
459445 let payout = (((payment.amount * 2) * 95) / 100)
460446 if ((rcoin == opponentMove))
461- then ScriptResult(WriteSet([DataEntry("rand", rand), DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", opponentAddress)]), TransferSet([ScriptTransfer(Address(fromBase58String(opponentAddress)), payout, payment.assetId)]))
462- else ScriptResult(WriteSet([DataEntry("rand", rand), DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", toString(inv.caller))]), TransferSet([ScriptTransfer(inv.caller, payout, payment.assetId)]))
447+ then ScriptResult(WriteSet([DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", opponentAddress)]), TransferSet([ScriptTransfer(Address(fromBase58String(opponentAddress)), 0, payment.assetId)]))
448+ else ScriptResult(WriteSet([DataEntry("coin", rcoin), DataEntry("payout", payout), DataEntry("winner", toString(inv.caller))]), TransferSet([ScriptTransfer(inv.caller, 0, payment.assetId)]))
463449 }
464450 else throw("Payment should be in Wavesbet or Waves")
465451 }
466452
467453
468454 @Callable(inv)
469455 func playDice (type,prediction) = startDice(inv, type, prediction)
470456
471457
472458
473459 @Callable(inv)
474460 func playCoinFlip (opponentAddress,opponentMove) = startCoinFlip(inv, opponentAddress, opponentMove)
475461
476462

github/deemru/w8io/169f3d6 
162.44 ms