tx · 3i1VawnMfgAgY9TxnX3DNhrExGy6pGT1fBa8zSWVD6kH 3N1PhK7vobC3HzVcYu1HEysKMvJDS8u9w99: -0.01400000 Waves 2022.10.22 11:48 [2283382] smart account 3N1PhK7vobC3HzVcYu1HEysKMvJDS8u9w99 > SELF 0.00000000 Waves
{ "type": 13, "id": "3i1VawnMfgAgY9TxnX3DNhrExGy6pGT1fBa8zSWVD6kH", "fee": 1400000, "feeAssetId": null, "timestamp": 1666428564790, "version": 2, "chainId": 84, "sender": "3N1PhK7vobC3HzVcYu1HEysKMvJDS8u9w99", "senderPublicKey": "HXPToVX68cRVQojFPvq2UHkNvBcMWbQXfTZtjim9UrfE", "proofs": [ "4JxuMUcRGkgCAUJBmwkx5g6ciZV6cfRnDpWWAi6FBjmH7TxaWh1KuX9Y1kBz9m6Bce1Sfciaubw4z7tjqBxRth1B" ], "script": "base64:BgI/CAISBAoCCAgSCAoGCAgICAgIEgkKBwgICAgICAgSBgoECAgICBIHCgUICAgBARIICgYICAgIAQESBQoDCAgIKgAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmwgCBQ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IFB3NvbGRLZXkFCXNvbGRWYWx1ZQQGYnV5UmVzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQENa2V5VGlja2V0U29sZAMFBmlzc3VlcgUHZXZlbnRJZAUIdGlja2V0SWQFDW5ld0Ftb3VudFNvbGQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICAgRuZnRfCQDYBAEFBWlkTkZUBQdzb2xkS2V5CQDMCAIJAQxJbnRlZ2VyRW50cnkCAhB0b3RhbF9uZnRfaXNzdWVkCQBkAgUIdG90YWxORlQAAQkAzAgCCQEMQm9vbGVhbkVudHJ5AgkBD2tleVRpY2tldE9uU2FsZQMFBmlzc3VlcgUHZXZlbnRJZAUIdGlja2V0SWQFCnNlbGxTdGF0dXMJAMwIAgUIaXNzdWVORlQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFBmlzc3VlcgUSYW1vdW50Rm9yT3JnYW5pemVyBQdhc3NldElkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCnJlY2VpdmVORlQAAQUFaWRORlQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFC2ZlZVJlY2VpdmVyBQ1hbW91bnRGb3JTaWduBQdhc3NldElkBQNuaWwJAMwIAgUIc29sZERhdGEFBmJ1eVJlcwAf+IsQ", "height": 2283382, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 26ARptrS4i5TD8twt1BvpgX9JeNjbqzexfzupwPwuRLN Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "1.0.0" | |
5 | + | ||
6 | + | func b (c) = valueOrElse(getString(this, c), "") | |
7 | + | ||
8 | + | ||
9 | + | let d = value(addressFromString(b("conf_users_dapp"))) | |
10 | + | ||
11 | + | let e = b("conf_fee_receiver") | |
12 | + | ||
13 | + | let f = fromBase58String(b("conf_accepted_asset_SIGN")) | |
14 | + | ||
15 | + | let g = b("conf_admin_1") | |
16 | + | ||
17 | + | func h (c) = valueOrElse(getInteger(this, c), 0) | |
18 | + | ||
19 | + | ||
20 | + | func i (c) = valueOrElse(getBoolean(this, c), false) | |
21 | + | ||
22 | + | ||
23 | + | let j = valueOrElse(getBoolean(d, "conf_dapp_is_running"), true) | |
24 | + | ||
25 | + | let k = valueOrElse(getString(d, "conf_maintenance_msg"), "") | |
26 | + | ||
27 | + | let l = "SUSPENDED" | |
28 | + | ||
29 | + | let m = "UNREGISTERED" | |
30 | + | ||
31 | + | func n (o) = if (contains(o, "/")) | |
32 | + | then if (if ((76 > size(o))) | |
33 | + | then (size(split(o, "/")[0]) == 59) | |
34 | + | else false) | |
35 | + | then (16 > size(split(o, "/")[1])) | |
36 | + | else false | |
37 | + | else false | |
38 | + | ||
39 | + | ||
40 | + | let p = 2 | |
41 | + | ||
42 | + | func q (r) = ("user_status_" + r) | |
43 | + | ||
44 | + | ||
45 | + | func s (t) = ("event_owner_" + t) | |
46 | + | ||
47 | + | ||
48 | + | func u (r,t) = ((("event_added_date_" + t) + "_") + r) | |
49 | + | ||
50 | + | ||
51 | + | func v (r,t) = ((("event_date_" + t) + "_") + r) | |
52 | + | ||
53 | + | ||
54 | + | func w (r,t) = ((("event_name_" + t) + "_") + r) | |
55 | + | ||
56 | + | ||
57 | + | func x (r,t) = ((("event_desc_" + t) + "_") + r) | |
58 | + | ||
59 | + | ||
60 | + | func y (r,t) = ((("event_display_cid_" + t) + "_") + r) | |
61 | + | ||
62 | + | ||
63 | + | func z (r,t) = ((("event_tags_" + t) + "_") + r) | |
64 | + | ||
65 | + | ||
66 | + | func A (r,t) = ((("event_flag_" + t) + "_") + r) | |
67 | + | ||
68 | + | ||
69 | + | func B (r,t) = ((("event_note_" + t) + "_") + r) | |
70 | + | ||
71 | + | ||
72 | + | func C (r,t) = ((("event_crawler_cid_" + t) + "_") + r) | |
73 | + | ||
74 | + | ||
75 | + | func D (r,t) = ((("event_type_" + t) + "_") + r) | |
76 | + | ||
77 | + | ||
78 | + | func E (r,t,F) = ((((("ticket_name_" + t) + "_") + r) + "_") + F) | |
79 | + | ||
80 | + | ||
81 | + | func G (r,t,F) = ((((("ticket_desc_" + t) + "_") + r) + "_") + F) | |
82 | + | ||
83 | + | ||
84 | + | func H (r,t,F) = ((((("ticket_price_" + t) + "_") + r) + "_") + F) | |
85 | + | ||
86 | + | ||
87 | + | func I (r,t,F) = ((((("ticket_maxAvailable_" + t) + "_") + r) + "_") + F) | |
88 | + | ||
89 | + | ||
90 | + | func J (r,t,F) = ((((("ticket_sold_" + t) + "_") + r) + "_") + F) | |
91 | + | ||
92 | + | ||
93 | + | func K (r,t,F) = ((((("ticket_sold_" + t) + "_") + r) + "_") + F) | |
94 | + | ||
95 | + | ||
96 | + | func L (M,N) = if ((size(M) == 0)) | |
97 | + | then throw("Field cannot be is empty") | |
98 | + | else if ((size(M) > N)) | |
99 | + | then throw((M + " is too long")) | |
100 | + | else true | |
101 | + | ||
102 | + | ||
103 | + | func O (P) = (0 > P) | |
104 | + | ||
105 | + | ||
106 | + | func Q (t) = valueOrElse(getString(this, s(t)), "") | |
107 | + | ||
108 | + | ||
109 | + | func R (r) = { | |
110 | + | let S = valueOrElse(getString(d, q(r)), m) | |
111 | + | if ((S == m)) | |
112 | + | then "Register this account first with \"Account\" tab" | |
113 | + | else if ((S == l)) | |
114 | + | then "Account suspended" | |
115 | + | else "" | |
116 | + | } | |
117 | + | ||
118 | + | ||
119 | + | func T (U) = containsElement(["online", "offline", "both"], U) | |
120 | + | ||
121 | + | ||
122 | + | func V (r,W,X,Y,Z,U) = { | |
123 | + | let aa = R(r) | |
124 | + | if ((aa != "")) | |
125 | + | then throw(aa) | |
126 | + | else if ((size(W) == 0)) | |
127 | + | then throw("Display CID cannot be empty") | |
128 | + | else if (!(n(W))) | |
129 | + | then throw("Problem with CID") | |
130 | + | else if (!(L(X, 200))) | |
131 | + | then throw("100 Char. max name") | |
132 | + | else if (!(T(U))) | |
133 | + | then throw("Wrong event type") | |
134 | + | else if (!(L(Y, 1000))) | |
135 | + | then throw("1000 Char. max description") | |
136 | + | else if ((size(split(Z, ",")) > 5)) | |
137 | + | then throw("5 tags max.") | |
138 | + | else "" | |
139 | + | } | |
140 | + | ||
141 | + | ||
142 | + | func ab (t,r,X,Y,ac,ad) = { | |
143 | + | let aa = R(r) | |
144 | + | if ((aa != "")) | |
145 | + | then throw(aa) | |
146 | + | else if (!(L(X, 200))) | |
147 | + | then throw("100 Char. max name") | |
148 | + | else if (!(L(Y, 1000))) | |
149 | + | then throw("1000 Char. max description") | |
150 | + | else if (if (!(O(ac))) | |
151 | + | then true | |
152 | + | else !(O(ad))) | |
153 | + | then throw("Positive amount only") | |
154 | + | else if (!(L(Y, 1000))) | |
155 | + | then throw("1000 Char. max description") | |
156 | + | else "" | |
157 | + | } | |
158 | + | ||
159 | + | ||
160 | + | func ae (af) = if (!(j)) | |
161 | + | then throw(k) | |
162 | + | else $Tuple3(toBase58String(af.transactionId), toBase58String(af.caller.bytes), lastBlock.timestamp) | |
163 | + | ||
164 | + | ||
165 | + | func ag (af) = if ((size(af.payments) == 0)) | |
166 | + | then throw("No payment attached") | |
167 | + | else { | |
168 | + | let ah = value(af.payments[0]) | |
169 | + | let ai = value(ah.amount) | |
170 | + | $Tuple2(ah, ai) | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | func aj (af,ak,al) = { | |
175 | + | let am = ag(af) | |
176 | + | let ah = am._1 | |
177 | + | let ai = am._2 | |
178 | + | if (!(isDefined(ah.assetId))) | |
179 | + | then throw("Wrong asset attached") | |
180 | + | else { | |
181 | + | let an = if (if ((size(ak) > 0)) | |
182 | + | then (toBase58String(value(ah.assetId)) == ak) | |
183 | + | else false) | |
184 | + | then ah.assetId | |
185 | + | else throw("Wrong asset attached") | |
186 | + | if ((al != ai)) | |
187 | + | then throw("Payment amount don't match") | |
188 | + | else $Tuple2(ai, an) | |
189 | + | } | |
190 | + | } | |
191 | + | ||
192 | + | ||
193 | + | @Callable(ao) | |
194 | + | func setConf (c,ap) = { | |
195 | + | let r = toString(ao.caller) | |
196 | + | if (containsElement([g, toString(this)], r)) | |
197 | + | then if (contains(c, "conf_")) | |
198 | + | then [StringEntry(c, ap)] | |
199 | + | else throw("Entries starting with conf_ only") | |
200 | + | else throw("You are not allowed to change this") | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | ||
205 | + | @Callable(af) | |
206 | + | func addEvent (X,Y,Z,W,aq,U) = { | |
207 | + | let ar = ae(af) | |
208 | + | let t = ar._1 | |
209 | + | let r = ar._2 | |
210 | + | let as = ar._3 | |
211 | + | let aa = R(r) | |
212 | + | if ((aa != "")) | |
213 | + | then throw(aa) | |
214 | + | else { | |
215 | + | let at = V(r, W, X, Y, Z, U) | |
216 | + | if ((at != "")) | |
217 | + | then throw("Something went wrong!") | |
218 | + | else [IntegerEntry(v(r, t), as), StringEntry(w(r, t), X), StringEntry(x(r, t), Y), StringEntry(y(r, t), W), StringEntry(z(r, t), Z), StringEntry(C(r, t), aq), StringEntry(D(r, t), U), StringEntry(s(t), r)] | |
219 | + | } | |
220 | + | } | |
221 | + | ||
222 | + | ||
223 | + | ||
224 | + | @Callable(af) | |
225 | + | func editEvent (t,X,Y,Z,W,aq,U) = if (!(j)) | |
226 | + | then throw(k) | |
227 | + | else { | |
228 | + | let r = toBase58String(af.caller.bytes) | |
229 | + | let aa = R(r) | |
230 | + | if ((aa != "")) | |
231 | + | then throw(aa) | |
232 | + | else { | |
233 | + | let at = V(r, W, X, Y, Z, U) | |
234 | + | if ((at != "")) | |
235 | + | then throw("Something went wrong!") | |
236 | + | else { | |
237 | + | let au = b(w(r, t)) | |
238 | + | if ((au == "")) | |
239 | + | then throw("Entry not found") | |
240 | + | else { | |
241 | + | let av = b(A(r, t)) | |
242 | + | if ((av == "ILLEGAL")) | |
243 | + | then throw("Cannot update ILLEGAL Event") | |
244 | + | else [StringEntry(w(r, t), X), StringEntry(x(r, t), Y), StringEntry(z(r, t), Z), StringEntry(D(r, t), U), StringEntry(C(r, t), aq)] | |
245 | + | } | |
246 | + | } | |
247 | + | } | |
248 | + | } | |
249 | + | ||
250 | + | ||
251 | + | ||
252 | + | @Callable(af) | |
253 | + | func flagEvent (t,aw,av,ax) = { | |
254 | + | let ay = ae(af) | |
255 | + | let az = ay._1 | |
256 | + | let r = ay._2 | |
257 | + | if (containsElement([g, toString(this)], r)) | |
258 | + | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], av)) | |
259 | + | then [StringEntry(A(aw, t), av), StringEntry(B(aw, t), ax)] | |
260 | + | else throw(("Unknow status " + av)) | |
261 | + | else throw("You are not allowed") | |
262 | + | } | |
263 | + | ||
264 | + | ||
265 | + | ||
266 | + | @Callable(af) | |
267 | + | func addTicket (t,X,Y,ac,ad) = { | |
268 | + | let aA = ae(af) | |
269 | + | let az = aA._1 | |
270 | + | let r = aA._2 | |
271 | + | let as = aA._3 | |
272 | + | let aa = R(r) | |
273 | + | if ((aa != "")) | |
274 | + | then throw(aa) | |
275 | + | else { | |
276 | + | let aB = Q(t) | |
277 | + | if ((aB == "")) | |
278 | + | then throw("Event not found") | |
279 | + | else if ((aB != r)) | |
280 | + | then throw("You are not the owner of this event") | |
281 | + | else { | |
282 | + | let aC = ab(t, r, X, Y, ac, ad) | |
283 | + | if ((aC != "")) | |
284 | + | then throw("Something went wrong!") | |
285 | + | else [StringEntry(E(r, t, az), X), StringEntry(G(r, t, az), Y), IntegerEntry(H(r, t, az), ac), IntegerEntry(I(r, t, az), ad)] | |
286 | + | } | |
287 | + | } | |
288 | + | } | |
289 | + | ||
290 | + | ||
291 | + | ||
292 | + | @Callable(af) | |
293 | + | func editTicket (F,t,X,Y,ac,ad) = { | |
294 | + | let aD = ae(af) | |
295 | + | let az = aD._1 | |
296 | + | let r = aD._2 | |
297 | + | let as = aD._3 | |
298 | + | let aa = R(r) | |
299 | + | if ((aa != "")) | |
300 | + | then throw(aa) | |
301 | + | else { | |
302 | + | let aB = Q(t) | |
303 | + | if ((aB == "")) | |
304 | + | then throw("Event not found") | |
305 | + | else if ((aB != r)) | |
306 | + | then throw("You are not the owner of this event") | |
307 | + | else { | |
308 | + | let aE = b(E(r, t, F)) | |
309 | + | if ((size(aE) == 0)) | |
310 | + | then throw("Ticket not found") | |
311 | + | else { | |
312 | + | let aC = ab(t, r, X, Y, ac, ad) | |
313 | + | if ((aC != "")) | |
314 | + | then throw("Something went wrong!") | |
315 | + | else { | |
316 | + | let aF = valueOrElse(getInteger(J(r, t, F)), 0) | |
317 | + | if ((aF > ad)) | |
318 | + | then throw("Max tickets available cannot be lower than amount already sold") | |
319 | + | else [StringEntry(E(r, t, F), X), StringEntry(G(r, t, F), Y), IntegerEntry(H(r, t, F), ac), IntegerEntry(I(r, t, F), ad)] | |
320 | + | } | |
321 | + | } | |
322 | + | } | |
323 | + | } | |
324 | + | } | |
325 | + | ||
326 | + | ||
327 | + | ||
328 | + | @Callable(af) | |
329 | + | func buyTicket (F,t,aG) = { | |
330 | + | let aH = ae(af) | |
331 | + | let az = aH._1 | |
332 | + | let r = aH._2 | |
333 | + | let as = aH._3 | |
334 | + | let aI = valueOrElse(h("total_tickets_issued"), 0) | |
335 | + | let aJ = Q(t) | |
336 | + | if ((aJ == "")) | |
337 | + | then throw("Event not found") | |
338 | + | else if ((aJ != aG)) | |
339 | + | then throw("You are not the owner of this event") | |
340 | + | else { | |
341 | + | let aE = b(E(aG, t, F)) | |
342 | + | if ((size(aE) == 0)) | |
343 | + | then throw("Ticket not found") | |
344 | + | else { | |
345 | + | let aK = b(w(aG, t)) | |
346 | + | if ((aK == "")) | |
347 | + | then throw("Art doesn't exist") | |
348 | + | else { | |
349 | + | let aL = i(K(aG, t, F)) | |
350 | + | let aM = h(J(aG, t, F)) | |
351 | + | let aN = h(H(aG, t, F)) | |
352 | + | let ak = toBase58String(f) | |
353 | + | let aO = aj(af, ak, aN) | |
354 | + | let ai = aO._1 | |
355 | + | let an = aO._2 | |
356 | + | let aP = h(I(aG, t, F)) | |
357 | + | let aQ = fraction(ai, p, 100) | |
358 | + | let aR = (ai - aQ) | |
359 | + | if ((aM == aP)) | |
360 | + | then throw("Art sold out") | |
361 | + | else { | |
362 | + | let aS = (aM + 1) | |
363 | + | let aT = ((((((((((("Organizer: " + aG) + ", | |
364 | + | EventID: ") + t) + ", | |
365 | + | TicketID: ") + F) + ", | |
366 | + | EventName: ") + aK) + ", | |
367 | + | Issue: ") + toString(aS)) + "/") + toString(aP)) | |
368 | + | let aU = Issue(("ST_" + toString((aI + 1))), aT, 1, 0, false) | |
369 | + | let aV = calculateAssetId(aU) | |
370 | + | let aW = if (if ((aS == aP)) | |
371 | + | then true | |
372 | + | else !(aL)) | |
373 | + | then false | |
374 | + | else true | |
375 | + | let aX = af.caller | |
376 | + | let aY = ((((((((("ticket_sold_" + toString(aS)) + "_of_") + toString(aP)) + "_") + t) + "_") + aG) + "_") + F) | |
377 | + | let aZ = ((((((((toString(aX) + "_") + toString(as)) + "_") + az) + "_") + toString(ai)) + "_") + toBase58String(aV)) | |
378 | + | let ba = StringEntry(aY, aZ) | |
379 | + | let bb = [IntegerEntry(J(aG, t, F), aS), StringEntry(("nft_" + toBase58String(aV)), aY), IntegerEntry("total_nft_issued", (aI + 1)), BooleanEntry(K(aG, t, F), aW), aU, ScriptTransfer(Address(fromBase58String(aG)), aR, an), ScriptTransfer(aX, 1, aV), ScriptTransfer(Address(fromBase58String(e)), aQ, an)] | |
380 | + | ba :: bb | |
381 | + | } | |
382 | + | } | |
383 | + | } | |
384 | + | } | |
385 | + | } | |
386 | + | ||
387 | + |
github/deemru/w8io/026f985 33.90 ms ◑