tx · H2fTLM9P35wY43cExTQZCbMM65JfYq4Z65DpgL8fVcGY 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd: -0.10000100 Waves 2021.12.03 00:30 [1817198] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves
{ "type": 13, "id": "H2fTLM9P35wY43cExTQZCbMM65JfYq4Z65DpgL8fVcGY", "fee": 10000100, "feeAssetId": null, "timestamp": 1638480666674, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "269WYSG6nQKZhj2BTtoEkZDmavgZx5C1GbB4bFdCdnopKRoy3J5yyZ79JKS9zZnoJHfQzT5oV5XHdVdVsBWYGEZ9" ], "script": "base64:AAIFAAAAAAAAAU8IAhIDCgEIEgMKAQgaDAoCYTESBmNhc2lubxoLCgJhMhIFV0FWRVMaDAoCYTMSBm1heEJldBoPCgJhNBIJc2VwYXJhdG9yGhAKAmE1EgpnZXRQYXltZW50GgkKAmE2EgNwbXQaFQoCYTcSD2dldEFtb3VudE9yWmVybxoKCgJhOBIEdGhpcxoJCgJhORIDa2V5Gg0KAmIxEgckbWF0Y2gwGgsKAmIyEgVyb3VuZBoTCgJiMxINY2FsbGVyQWRkcmVzcxoQCgJiNBIKY3VyU3VtQmV0cxoSCgJiNRIMY3VycmVudERyYXdzGhMKAmI2Eg1jdXJyZW50UGxheWVyGhAKAmI3Egppbml0aWFsQmV0GhMKAmI4Eg1hdmFpbGFibGVQcm9wGhAKAmI5EgpuZXdTdW1CZXRzGgkKAmMxEgNhYWEaDAoCYzISBnZlcmlmeQAAAAYAAAAAAmExAgAAACMzTXRhQ0w0djFialRhYlVxczdvVTRvZlM4ZmJhaTM0V00xaQAAAAACYTIAAAAAADuaygAAAAAAAmEzCQAAaAAAAAIAAAAAAAAAAGQFAAAAAmE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AAtfaW5pdGlhbEJldAMJAAABAAAAAgUAAAACYjECAAAAA0ludAQAAAABYQUAAAACYjEFAAAAAWEFAAAAAXAEAAAAAmI4CQABLAAAAAIFAAAAAmIyAgAAAApfYXZhaWxhYmxlBAAAAAJiOQkAAGQAAAACBQAAAAJiNAUAAAABcAQAAAACYzEJAAQbAAAAAgUAAAACYTgJAAEsAAAAAgUAAAACYjICAAAABV9zdG9wAwkBAAAACWlzRGVmaW5lZAAAAAEFAAAAAmMxCQAAAgAAAAECAAAAHFRoaXMgcm91bmQgaXMgYWxyZWFkeSBwbGF5ZWQJAAACAAAAAQIAAAAUYmV0MiBmaW5pc2hlZCBhbGwgb2sAAAABaQEAAAAJd2l0aGRyYXcyAAAAAQAAAAJiMgQAAAACYjMJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkAAAIAAAABAgAAAAZjYWxsZWQAAAABAAAAAnR4AQAAAAJjMgAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V50bxBTQ==", "height": 1817198, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gwx4WSvK5kXsufYyFuroieKqk8SRAAoTmUXtJVpTN1MG Next: GYANRNewjqYbRqneCv5JP2M9k25WsTYKxu9hjb7HeCa8 Diff:
Old | New | Differences | |
---|---|---|---|
52 | 52 | } | |
53 | 53 | let availableProp = (round + "_available") | |
54 | 54 | let newSumBets = (curSumBets + p) | |
55 | - | if (isDefined(getBoolean(a8, (round + "_stop")))) | |
55 | + | let aaa = getBoolean(a8, (round + "_stop")) | |
56 | + | if (isDefined(aaa)) | |
56 | 57 | then throw("This round is already played") | |
57 | 58 | else throw("bet2 finished all ok") | |
58 | 59 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let casino = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i" | |
5 | 5 | ||
6 | 6 | let WAVES = 1000000000 | |
7 | 7 | ||
8 | 8 | let maxBet = (100 * WAVES) | |
9 | 9 | ||
10 | 10 | let separator = "," | |
11 | 11 | ||
12 | 12 | func getPayment (i) = if ((size(i.payments) == 0)) | |
13 | 13 | then throw("Payment must be attached") | |
14 | 14 | else { | |
15 | 15 | let pmt = i.payments[0] | |
16 | 16 | if (isDefined(pmt.assetId)) | |
17 | 17 | then throw("This function accepts WAVES tokens only") | |
18 | 18 | else pmt.amount | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getAmountOrZero (this,key) = match getInteger(this, key) { | |
23 | 23 | case a: Int => | |
24 | 24 | a | |
25 | 25 | case _ => | |
26 | 26 | 0 | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func bet2 (round) = { | |
32 | 32 | let callerAddress = toBase58String(i.caller.bytes) | |
33 | 33 | let p = getPayment(i) | |
34 | 34 | let curSumBets = getAmountOrZero(a8, (round + "_sumBets")) | |
35 | 35 | let currentDraws = match getInteger(a8, (round + "_drawSequence")) { | |
36 | 36 | case a: Int => | |
37 | 37 | (a + 1) | |
38 | 38 | case _ => | |
39 | 39 | 0 | |
40 | 40 | } | |
41 | 41 | let currentPlayer = match getString(a8, (round + "_player")) { | |
42 | 42 | case a: String => | |
43 | 43 | a | |
44 | 44 | case _ => | |
45 | 45 | unit | |
46 | 46 | } | |
47 | 47 | let initialBet = match getInteger(a8, (round + "_initialBet")) { | |
48 | 48 | case a: Int => | |
49 | 49 | a | |
50 | 50 | case _ => | |
51 | 51 | p | |
52 | 52 | } | |
53 | 53 | let availableProp = (round + "_available") | |
54 | 54 | let newSumBets = (curSumBets + p) | |
55 | - | if (isDefined(getBoolean(a8, (round + "_stop")))) | |
55 | + | let aaa = getBoolean(a8, (round + "_stop")) | |
56 | + | if (isDefined(aaa)) | |
56 | 57 | then throw("This round is already played") | |
57 | 58 | else throw("bet2 finished all ok") | |
58 | 59 | } | |
59 | 60 | ||
60 | 61 | ||
61 | 62 | ||
62 | 63 | @Callable(i) | |
63 | 64 | func withdraw2 (round) = { | |
64 | 65 | let callerAddress = toBase58String(i.caller.bytes) | |
65 | 66 | throw("called") | |
66 | 67 | } | |
67 | 68 | ||
68 | 69 | ||
69 | 70 | @Verifier(tx) | |
70 | 71 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
71 | 72 |
github/deemru/w8io/026f985 21.76 ms ◑