tx · EZxJScqqseu3gGmUZqAvVdXcQ2PTXkaZx68qAXLsdpsB 3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL: -0.01400000 Waves 2021.02.13 13:06 [1396245] smart account 3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL > SELF 0.00000000 Waves
{ "type": 13, "id": "EZxJScqqseu3gGmUZqAvVdXcQ2PTXkaZx68qAXLsdpsB", "fee": 1400000, "feeAssetId": null, "timestamp": 1613210781727, "version": 2, "chainId": 84, "sender": "3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL", "senderPublicKey": "AwmS57W97dpK3Bs6tsewG3YaYgJukDtmEZFbG1oQTV4T", "proofs": [ "xoWZXwuyu8kAJq5eNqo3Rb2UrcjToDmbcZyuDvRtamyMPRXCfmEQgXgyVb3fYuojvsEnGGBxiDNVxi6MGFEQrdQ" ], "script": "base64:AAIDAAAAAAAAAA4IARIDCgEIEgASAwoBAQAAAAkAAAAAB1JVTk5JTkcCAAAAB1JVTk5JTkcAAAAABkNMT1NFRAIAAAAGQ0xPU0VEAAAAAAhDQU5DRUxFRAIAAAAIQ0FOQ0VMRUQAAAAACURBUFBPV05FUgIAAAAjM05CRWJGVTZkS3BvQWNzYmFFSzJhQzYyVVFNallGVzR4aUwAAAAABVdBVkVTAgAAAAVXQVZFUwAAAAAETk9ORQIAAAAETk9ORQAAAAADRkVFAAAAAAAADbugAQAAAAtnZXROdW1CeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIA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CAxIGJldC4JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABGJldF8JAAGkAAAAAQUAAAARY29udGVzdEN1cnJOdW1iZXICAAAAAV8JAAGkAAAAAQUAAAANY3VycmVuY3lWYWx1ZQUAAAAHYWNjb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAhjb250ZXN0XwkAAaQAAAABBQAAABFjb250ZXN0Q3Vyck51bWJlcgIAAAABXwUAAAAHYWNjb3VudAIAAAAFX2JldHMJAABkAAAAAgUAAAARYWNjb3VudEJldHNOdW1iZXIAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBgbxjBw8", "height": 1396245, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9eNbgoHtgZe7fbVb3k3pi5Bw1PZDtn5oh7oXcF8uJLi9 Next: ArekSYd3TjA3cAGzHFvyWjxWG8bFGLhcUgT3psaVZ9WJ Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = "CANCELED" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL" | |
11 | 11 | ||
12 | 12 | let e = "WAVES" | |
13 | 13 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "RUNNING" | |
5 | 5 | ||
6 | 6 | let b = "CLOSED" | |
7 | 7 | ||
8 | 8 | let c = "CANCELED" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL" | |
11 | 11 | ||
12 | 12 | let e = "WAVES" | |
13 | 13 | ||
14 | 14 | let f = "NONE" | |
15 | 15 | ||
16 | 16 | let g = 900000 | |
17 | 17 | ||
18 | 18 | func h (i) = { | |
19 | 19 | let j = { | |
20 | 20 | let k = getInteger(this, i) | |
21 | 21 | if ($isInstanceOf(k, "Int")) | |
22 | 22 | then { | |
23 | 23 | let l = k | |
24 | 24 | l | |
25 | 25 | } | |
26 | 26 | else 0 | |
27 | 27 | } | |
28 | 28 | j | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func m (i) = { | |
33 | 33 | let n = { | |
34 | 34 | let k = getString(this, i) | |
35 | 35 | if ($isInstanceOf(k, "String")) | |
36 | 36 | then { | |
37 | 37 | let l = k | |
38 | 38 | l | |
39 | 39 | } | |
40 | 40 | else f | |
41 | 41 | } | |
42 | 42 | n | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(o) | |
47 | 47 | func setContestStatus (p) = { | |
48 | 48 | let q = toBase58String(o.caller.bytes) | |
49 | 49 | let r = h("contest_currentnumber") | |
50 | 50 | if ((q != d)) | |
51 | 51 | then throw("Only dAPP Owner can set Contest Status.") | |
52 | 52 | else if (if ((p != c)) | |
53 | 53 | then (p != b) | |
54 | 54 | else false) | |
55 | 55 | then throw(("Invalid status: " + p)) | |
56 | 56 | else WriteSet([DataEntry((("contest_" + toString(r)) + "_status"), p)]) | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Callable(o) | |
62 | 62 | func setContestConfiguration () = { | |
63 | 63 | let q = toBase58String(o.caller.bytes) | |
64 | 64 | let r = h("contest_currentnumber") | |
65 | 65 | let s = m((("contest_" + toString(r)) + "_status")) | |
66 | 66 | let t = (r + 1) | |
67 | 67 | let u = wavesBalance(this) | |
68 | 68 | if ((q != d)) | |
69 | 69 | then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + q) + " dapp owner: ") + d)) | |
70 | 70 | else if ((s == a)) | |
71 | 71 | then throw(("You cannot configure a new Contest while old Contest status is: " + s)) | |
72 | 72 | else { | |
73 | 73 | let v = (height + (6 * 1440)) | |
74 | 74 | WriteSet([DataEntry("contest_currentnumber", t), DataEntry((("contest_" + toString(t)) + "_finishheight"), v), DataEntry((("contest_" + toString(t)) + "_status"), a), DataEntry((("contest_" + toString(t)) + "_betcounter"), 0)]) | |
75 | 75 | } | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | 80 | @Callable(o) | |
81 | 81 | func bet (w) = { | |
82 | 82 | let q = toBase58String(o.caller.bytes) | |
83 | 83 | let x = extract(o.payment) | |
84 | 84 | let r = h("contest_currentnumber") | |
85 | 85 | let y = h((("contest_" + toString(r)) + "_startheight")) | |
86 | 86 | let v = h((("contest_" + toString(r)) + "_finishheight")) | |
87 | 87 | let s = m((("contest_" + toString(r)) + "_status")) | |
88 | 88 | let p = m((("contest_" + toString(r)) + "_status")) | |
89 | 89 | let z = h((((("contest_" + toString(r)) + "_") + q) + "_bets")) | |
90 | 90 | let A = m(((("bet_" + toString(r)) + "_") + toString(w))) | |
91 | 91 | if ((height > (v - (2 * 1440)))) | |
92 | 92 | then throw("You cannot bet anymore at this height.") | |
93 | 93 | else if ((s != a)) | |
94 | 94 | then throw(("Invalid status: you cannot bet now, contest status is: " + s)) | |
95 | 95 | else if (if ((A != f)) | |
96 | 96 | then (A != q) | |
97 | 97 | else false) | |
98 | 98 | then throw((("Another user: " + A) + " did bet already on this rate.")) | |
99 | 99 | else if ((z >= 1)) | |
100 | 100 | then throw("You can do at most 1 bet.") | |
101 | 101 | else WriteSet([DataEntry(((("bet_" + toString(r)) + "_") + toString(w)), q), DataEntry((((("contest_" + toString(r)) + "_") + q) + "_bets"), (z + 1))]) | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Verifier(B) | |
106 | 106 | func C () = { | |
107 | 107 | let k = B | |
108 | 108 | if (if ($isInstanceOf(k, "SetScriptTransaction")) | |
109 | 109 | then true | |
110 | 110 | else $isInstanceOf(k, "DataTransaction")) | |
111 | 111 | then sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey) | |
112 | 112 | else if ($isInstanceOf(k, "InvokeScriptTransaction")) | |
113 | 113 | then true | |
114 | 114 | else true | |
115 | 115 | } | |
116 | 116 |
github/deemru/w8io/169f3d6 39.40 ms ◑