tx · H1nPwvKr13DbQ5FhmfpeYRGNmSXgdg6SqC68khwh3xrH

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10010000 Waves

2021.12.03 00:25 [1817194] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "H1nPwvKr13DbQ5FhmfpeYRGNmSXgdg6SqC68khwh3xrH", "fee": 10010000, "feeAssetId": null, "timestamp": 1638480388864, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "4T899u4FN3izexzYSiJiUrJnd6Jrwve9ePTHi4DyirmjAbzy7gMQ1NoUceKA8wFmRKgoo7fz8kHwvwva4dtyRZDv" ], "script": "base64:AAIFAAAAAAAAAUQIAhIDCgEIEgMKAQgaDAoCYTESBmNhc2lubxoLCgJhMhIFV0FWRVMaDAoCYTMSBm1heEJldBoPCgJhNBIJc2VwYXJhdG9yGhAKAmE1EgpnZXRQYXltZW50GgkKAmE2EgNwbXQaFQoCYTcSD2dldEFtb3VudE9yWmVybxoKCgJhOBIEdGhpcxoJCgJhORIDa2V5Gg0KAmIxEgckbWF0Y2gwGgsKAmIyEgVyb3VuZBoTCgJiMxINY2FsbGVyQWRkcmVzcxoQCgJiNBIKY3VyU3VtQmV0cxoSCgJiNRIMY3VycmVudERyYXdzGhMKAmI2Eg1jdXJyZW50UGxheWVyGhAKAmI3Egppbml0aWFsQmV0GhMKAmI4Eg1hdmFpbGFibGVQcm9wGhAKAmI5EgpuZXdTdW1CZXRzGgwKAmMxEgZ2ZXJpZnkAAAAGAAAAAAJhMQIAAAAjM010YUNMNHYxYmpUYWJVcXM3b1U0b2ZTOGZiYWkzNFdNMWkAAAAAAmEyAAAAAAA7msoAAAAAAAJhMwkAAGgAAAACAAAAAAAAAABkBQAAAAJhMgAAAA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DCQAAAQAAAAIFAAAAAmIxAgAAAANJbnQEAAAAAWEFAAAAAmIxBQAAAAFhBQAAAAFwBAAAAAJiOAkAASwAAAACBQAAAAJiMgIAAAAKX2F2YWlsYWJsZQQAAAACYjkJAABkAAAAAgUAAAACYjQFAAAAAXAJAAACAAAAAQIAAAAUYmV0MiBmaW5pc2hlZCBhbGwgb2sAAAABaQEAAAAJd2l0aGRyYXcyAAAAAQAAAAJiMgQAAAACYjMJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkAAAIAAAABAgAAAAZjYWxsZWQAAAABAAAAAnR4AQAAAAJjMQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5cjlz7g==", "height": 1817194, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CxoUnntbHqJfnqFY3w3PR6UuLKhy5pMmQdmRHcmRTvEY Next: 7URwNnjhakBQA1UtNnWDjpqNPekot6sahuc1ABXJdqu9 Diff:
OldNewDifferences
5252 }
5353 let availableProp = (round + "_available")
5454 let newSumBets = (curSumBets + p)
55- if (if (isDefined(getBoolean(a8, (round + "_stop"))))
56- then true
57- else isDefined(getString(a8, round)))
58- then throw("This round is already played")
59- else if (if (isDefined(getString(a8, (round + "_player"))))
60- then (currentPlayer != callerAddress)
61- else false)
62- then throw("This is not your game")
63- else if ((newSumBets > maxBet))
64- then throw(((("Maximum amount of bets for round " + toString(maxBet)) + ". With your bet it's ") + toString(newSumBets)))
65- else if ((initialBet != p))
66- then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p)))
67- else throw("bet2 finished all ok")
55+ throw("bet2 finished all ok")
6856 }
6957
7058
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let casino = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i"
55
66 let WAVES = 1000000000
77
88 let maxBet = (100 * WAVES)
99
1010 let separator = ","
1111
1212 func getPayment (i) = if ((size(i.payments) == 0))
1313 then throw("Payment must be attached")
1414 else {
1515 let pmt = i.payments[0]
1616 if (isDefined(pmt.assetId))
1717 then throw("This function accepts WAVES tokens only")
1818 else pmt.amount
1919 }
2020
2121
2222 func getAmountOrZero (this,key) = match getInteger(this, key) {
2323 case a: Int =>
2424 a
2525 case _ =>
2626 0
2727 }
2828
2929
3030 @Callable(i)
3131 func bet2 (round) = {
3232 let callerAddress = toBase58String(i.caller.bytes)
3333 let p = getPayment(i)
3434 let curSumBets = getAmountOrZero(a8, (round + "_sumBets"))
3535 let currentDraws = match getInteger(a8, (round + "_drawSequence")) {
3636 case a: Int =>
3737 (a + 1)
3838 case _ =>
3939 0
4040 }
4141 let currentPlayer = match getString(a8, (round + "_player")) {
4242 case a: String =>
4343 a
4444 case _ =>
4545 unit
4646 }
4747 let initialBet = match getInteger(a8, (round + "_initialBet")) {
4848 case a: Int =>
4949 a
5050 case _ =>
5151 p
5252 }
5353 let availableProp = (round + "_available")
5454 let newSumBets = (curSumBets + p)
55- if (if (isDefined(getBoolean(a8, (round + "_stop"))))
56- then true
57- else isDefined(getString(a8, round)))
58- then throw("This round is already played")
59- else if (if (isDefined(getString(a8, (round + "_player"))))
60- then (currentPlayer != callerAddress)
61- else false)
62- then throw("This is not your game")
63- else if ((newSumBets > maxBet))
64- then throw(((("Maximum amount of bets for round " + toString(maxBet)) + ". With your bet it's ") + toString(newSumBets)))
65- else if ((initialBet != p))
66- then throw(((("Initial bet not maching original:" + toString(initialBet)) + ", actual:") + toString(p)))
67- else throw("bet2 finished all ok")
55+ throw("bet2 finished all ok")
6856 }
6957
7058
7159
7260 @Callable(i)
7361 func withdraw2 (round) = {
7462 let callerAddress = toBase58String(i.caller.bytes)
7563 throw("called")
7664 }
7765
7866
7967 @Verifier(tx)
8068 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8169

github/deemru/w8io/169f3d6 
70.39 ms