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