tx · 3m6Bc7ohHMZoqk32h7X4u7KgAQRJpKcABXZNzsF8KCTd 3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX: -0.01000000 Waves 2021.12.12 20:15 [1831327] smart account 3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX > SELF 0.00000000 Waves
{ "type": 13, "id": "3m6Bc7ohHMZoqk32h7X4u7KgAQRJpKcABXZNzsF8KCTd", "fee": 1000000, "feeAssetId": null, "timestamp": 1639329360433, "version": 2, "chainId": 84, "sender": "3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX", "senderPublicKey": "HUca7AqRs4Zs9sU1AFcufmBC4XpT4sN79aFScNRT4LxQ", "proofs": [ "idKEwq1nCztQSGMDyAhAtGHRmsTdoWtFrZrXQ15Eprx5VThNUNeZbcKsDM7kwWCeP7kszi6yYTvcJNdzoWmRsFz" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAAQAAAAABXRva2VuAQAAACC3J58vH5VvqrKqhwl3eYjLul0f2q7s7Aut9MtxiOp72AAAAAAGdG9rZW5kAAAAAAAF9eEAAAAAAAdhaXJkcm9wCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUX+pzJtA2DV6Pr0xhS8z4foIVUAfq2c0IAAAAAAp0ZWFtQWRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUACYJT8ivNONGpFPWk1FdqVPAxApBcmLaAAAAAwAAAAFpAQAAAAVyZXNldAAAAAAJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAVidXJudAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAHZHJvcHBlZAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAFc29sZDEA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hdGFyZWNzAAAAAAAAAAAAAgAAAAh8Ym91Z2h0MQMJAAAAAAAAAgUAAAAOY2FsbGVyQnV5bGV2ZWwAAAAAAAAAAAEJAAEsAAAAAgkAAZEAAAACBQAAAAhkYXRhcmVjcwAAAAAAAAAAAAIAAAAQfGJvdWdodDF8Ym91Z2h0MgIAAAAABAAAAARkZWFsAwMDBQAAAAliYWxhbmNlb2sFAAAADGNhbGxlckNhbkJ1eQcFAAAABXBtdG9rBwYHAwUAAAAEZGVhbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAAB25ld2RhdGEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAKdGVhbUFkcmVzcwUAAAALY2FsbGVyUHJpY2UFAAAABHVuaXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAMY2FsbGVyQWRyZXNzBQAAAApzZWxsYW1vdW50BQAAAAV0b2tlbgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAGX2Vycm9yBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABl9lcnJvcgUAAAAEbWVzcwUAAAADbmlsAAAAAHznuGU=", "height": 1831327, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2LuKF4SEHqb22WJMTpQmY2hRja5UDkD2RnyP1iSgRha3 Next: FJDmXpXbiARPnxxjfckzubLMHrKVkdmtQaFFo9GQBUm4 Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = base58' | |
4 | + | let a = base58'DKxej2DXCbLmBdgXLRhDk8XC1eQC7AfYmbHAnhGm9f3m' | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
21 | 21 | let i = fromBase58String(f) | |
22 | 22 | let j = Address(e.caller.bytes) | |
23 | 23 | let k = 1639310400000 | |
24 | - | let l = | |
24 | + | let l = 1639330200000 | |
25 | 25 | let m = { | |
26 | 26 | let n = blockInfoByHeight(height) | |
27 | 27 | if ($isInstanceOf(n, "BlockInfo")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = base58' | |
4 | + | let a = base58'DKxej2DXCbLmBdgXLRhDk8XC1eQC7AfYmbHAnhGm9f3m' | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = Address(base58'3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX') | |
9 | 9 | ||
10 | 10 | let d = Address(base58'3MovsLjXpJr9HD2vBqmAf7Gze6jwuRxX1fX') | |
11 | 11 | ||
12 | 12 | @Callable(e) | |
13 | 13 | func reset () = [DeleteEntry(toBase58String(e.caller.bytes)), IntegerEntry("burnt", 0), IntegerEntry("dropped", 0), IntegerEntry("sold1", 0), IntegerEntry("sold2", 0), IntegerEntry("teamgift", 0), IntegerEntry("issued", (1000000000 * 100000000)), StringEntry("burningstage", "waiting"), DeleteEntry((toBase58String(e.caller.bytes) + "_error"))] | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(e) | |
18 | 18 | func free (f) = { | |
19 | 19 | let g = (1000 * b) | |
20 | 20 | let h = (10 * b) | |
21 | 21 | let i = fromBase58String(f) | |
22 | 22 | let j = Address(e.caller.bytes) | |
23 | 23 | let k = 1639310400000 | |
24 | - | let l = | |
24 | + | let l = 1639330200000 | |
25 | 25 | let m = { | |
26 | 26 | let n = blockInfoByHeight(height) | |
27 | 27 | if ($isInstanceOf(n, "BlockInfo")) | |
28 | 28 | then { | |
29 | 29 | let o = n | |
30 | 30 | o.timestamp | |
31 | 31 | } | |
32 | 32 | else throw("Can't find block") | |
33 | 33 | } | |
34 | 34 | let p = assetBalance(c, a) | |
35 | 35 | let q = if (if ((m > l)) | |
36 | 36 | then (getStringValue("burningstage") == "waiting") | |
37 | 37 | else false) | |
38 | 38 | then ((p - g) - h) | |
39 | 39 | else 0 | |
40 | 40 | let r = if ((p > g)) | |
41 | 41 | then true | |
42 | 42 | else false | |
43 | 43 | if ((r == r)) | |
44 | 44 | then { | |
45 | 45 | let s = { | |
46 | 46 | let n = transferTransactionById(i) | |
47 | 47 | if ($isInstanceOf(n, "TransferTransaction")) | |
48 | 48 | then { | |
49 | 49 | let t = n | |
50 | 50 | true | |
51 | 51 | } | |
52 | 52 | else false | |
53 | 53 | } | |
54 | 54 | let u = { | |
55 | 55 | let n = transferTransactionById(i) | |
56 | 56 | if ($isInstanceOf(n, "TransferTransaction")) | |
57 | 57 | then { | |
58 | 58 | let t = n | |
59 | 59 | t.timestamp | |
60 | 60 | } | |
61 | 61 | else 9999999999999 | |
62 | 62 | } | |
63 | 63 | let v = { | |
64 | 64 | let n = transferTransactionById(i) | |
65 | 65 | if ($isInstanceOf(n, "TransferTransaction")) | |
66 | 66 | then { | |
67 | 67 | let t = n | |
68 | 68 | t.sender | |
69 | 69 | } | |
70 | 70 | else c | |
71 | 71 | } | |
72 | 72 | let w = if ((take(valueOrElse(getString(toBase58String(e.caller.bytes)), ""), 8) == "received")) | |
73 | 73 | then true | |
74 | 74 | else false | |
75 | 75 | let x = if (if (if (if ((u > k)) | |
76 | 76 | then true | |
77 | 77 | else (j != v)) | |
78 | 78 | then true | |
79 | 79 | else w) | |
80 | 80 | then true | |
81 | 81 | else !(r)) | |
82 | 82 | then false | |
83 | 83 | else true | |
84 | 84 | let y = if (s) | |
85 | 85 | then if ((u > k)) | |
86 | 86 | then ("transaction is out of time range: " + toString(u)) | |
87 | 87 | else ("" + (if ((j != v)) | |
88 | 88 | then ((("it is incorrect sender: " + toString(j)) + " / ") + toString(v)) | |
89 | 89 | else ("" + (if (w) | |
90 | 90 | then getStringValue(toBase58String(e.caller.bytes)) | |
91 | 91 | else ("" + (if (x) | |
92 | 92 | then "received" | |
93 | 93 | else ("" + (if (!(r)) | |
94 | 94 | then (("airdrop ended: " + toString(getIntegerValue("burnt"))) + " burnt") | |
95 | 95 | else "")))))))) | |
96 | 96 | else "can`t find transaction" | |
97 | 97 | if ((q > 0)) | |
98 | 98 | then [StringEntry(toBase58String(e.caller.bytes), y), Burn(a, q), StringEntry("burningstage", "them all burnt"), IntegerEntry("burnt", (getIntegerValue("burnt") + q))] | |
99 | 99 | else if (x) | |
100 | 100 | then [ScriptTransfer(j, g, a), ScriptTransfer(d, h, a), StringEntry(toBase58String(e.caller.bytes), y), IntegerEntry("dropped", (getIntegerValue("dropped") + g)), IntegerEntry("teamgift", (getIntegerValue("teamgift") + h)), DeleteEntry((toBase58String(e.caller.bytes) + "_error"))] | |
101 | 101 | else [StringEntry((toBase58String(e.caller.bytes) + "_error"), y)] | |
102 | 102 | } | |
103 | 103 | else throw("Strict value is not equal to itself.") | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | ||
108 | 108 | @Callable(e) | |
109 | 109 | func buy () = { | |
110 | 110 | let m = { | |
111 | 111 | let n = blockInfoByHeight(height) | |
112 | 112 | if ($isInstanceOf(n, "BlockInfo")) | |
113 | 113 | then { | |
114 | 114 | let o = n | |
115 | 115 | o.timestamp | |
116 | 116 | } | |
117 | 117 | else throw("Can't find block") | |
118 | 118 | } | |
119 | 119 | let p = assetBalance(c, a) | |
120 | 120 | let z = (1000 * b) | |
121 | 121 | let A = (1 * 100000000) | |
122 | 122 | let B = (2 * 100000000) | |
123 | 123 | let j = Address(e.caller.bytes) | |
124 | 124 | let C = if ((p >= z)) | |
125 | 125 | then true | |
126 | 126 | else false | |
127 | 127 | let D = valueOrElse(getString(toBase58String(e.caller.bytes)), "") | |
128 | 128 | let E = if ((take(D, 8) == "received")) | |
129 | 129 | then true | |
130 | 130 | else false | |
131 | 131 | let F = if (if (E) | |
132 | 132 | then (size(split(D, "|")) == 1) | |
133 | 133 | else false) | |
134 | 134 | then 0 | |
135 | 135 | else if (if (E) | |
136 | 136 | then (size(split(D, "|")) == 2) | |
137 | 137 | else false) | |
138 | 138 | then 1 | |
139 | 139 | else 99 | |
140 | 140 | let G = if (if (E) | |
141 | 141 | then if ((F == 0)) | |
142 | 142 | then true | |
143 | 143 | else (F == 1) | |
144 | 144 | else false) | |
145 | 145 | then true | |
146 | 146 | else false | |
147 | 147 | let H = if ((F == 0)) | |
148 | 148 | then A | |
149 | 149 | else if ((F == 1)) | |
150 | 150 | then B | |
151 | 151 | else 0 | |
152 | 152 | let I = if ((size(e.payments) == 1)) | |
153 | 153 | then if (if (!(isDefined(e.payments[0].assetId))) | |
154 | 154 | then (e.payments[0].amount >= H) | |
155 | 155 | else false) | |
156 | 156 | then true | |
157 | 157 | else false | |
158 | 158 | else false | |
159 | 159 | let J = if (!(G)) | |
160 | 160 | then "not prooved for buy" | |
161 | 161 | else ("" + (if (!(I)) | |
162 | 162 | then "not enough payment" | |
163 | 163 | else ("" + (if (!(C)) | |
164 | 164 | then "ballance empty " | |
165 | 165 | else "")))) | |
166 | 166 | let K = split(D, "|") | |
167 | 167 | let L = if ((F == 0)) | |
168 | 168 | then (K[0] + "|bought1") | |
169 | 169 | else if ((F == 1)) | |
170 | 170 | then (K[0] + "|bought1|bought2") | |
171 | 171 | else "" | |
172 | 172 | let M = if (if (if (C) | |
173 | 173 | then G | |
174 | 174 | else false) | |
175 | 175 | then I | |
176 | 176 | else false) | |
177 | 177 | then true | |
178 | 178 | else false | |
179 | 179 | if (M) | |
180 | 180 | then [StringEntry(toBase58String(e.caller.bytes), L), ScriptTransfer(d, H, unit), ScriptTransfer(j, z, a), DeleteEntry((toBase58String(e.caller.bytes) + "_error"))] | |
181 | 181 | else [StringEntry((toBase58String(e.caller.bytes) + "_error"), J)] | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 |
github/deemru/w8io/026f985 26.02 ms ◑