tx · GWwep4LEsHGmJ82eUcWSYa9eaYvo8tha3otThADEkfpv 3N6yPEN3qNbKESnUewrj3EYVr6eLAd9AYBB: -0.01400000 Waves 2022.10.25 12:55 [2287762] smart account 3N6yPEN3qNbKESnUewrj3EYVr6eLAd9AYBB > SELF 0.00000000 Waves
{ "type": 13, "id": "GWwep4LEsHGmJ82eUcWSYa9eaYvo8tha3otThADEkfpv", "fee": 1400000, "feeAssetId": null, "timestamp": 1666691732542, "version": 2, "chainId": 84, "sender": "3N6yPEN3qNbKESnUewrj3EYVr6eLAd9AYBB", "senderPublicKey": "9RjLrGXy4wnGfNiZRhKSUh5wDnj5rLGPzbCE75KaVemg", "proofs": [ "2fmRfeD2QZvgwUYrSPD8XWeWmy8vAkT2f3sDaVpxaHq1sxS99CyZjjVuZviAhYh5SvfwQZ7JBGW8AeLSyYaL1Jcd" ], "script": "base64:BgJOCAISBAoCCAgSCQoHCAgICAgICBIKCggICAgICAgICBIGCgQICAgIEgcKBQgICAEBEggKBggICAgBARIFCgMIAQQSBQoDCAgIEgQKAggIKgAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3J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R0MDE1MjgzMTUzMTkCXzIDCQEBIQEJAQlpc0RlZmluZWQBCAUHcGF5bWVudAdhc3NldElkCQACAQIUV3JvbmcgYXNzZXQgYXR0YWNoZWQECHRpY2tldElkCQDYBAEJAQV2YWx1ZQEIBQdwYXltZW50B2Fzc2V0SWQECWFzc2V0TmFtZQQHJG1hdGNoMAkA7AcBCQEFdmFsdWUBCAUHcGF5bWVudAdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAVhc3NldAUHJG1hdGNoMAgFBWFzc2V0BG5hbWUJAAIBAhBDYW4ndCBmaW5kIGFzc2V0BAt0aWNrZXRFeGlzdAkBDmdldFN0cmluZ0J5S2V5AQkBDWtleVRpY2tldE5hbWUDBQZpc3N1ZXIFB2V2ZW50SWQFCHRpY2tldElkAwkAAAIJALECAQULdGlja2V0RXhpc3QAAAkAAgECEFRpY2tldCBub3QgZm91bmQJAMwIAgkBDEJvb2xlYW5FbnRyeQIJAKwCAgUJYXNzZXROYW1lAgVfdXNlZAYJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFBmNhbGxlcgABCAUHcGF5bWVudAdhc3NldElkBQNuaWwAiBdp9w==", "height": 2287762, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B8kSasrY3ieF7gbkMCo5bGiDtCvshSwkw1p1tmrSHe6h Next: 5QjGsxzgUYaRbMnTXRU9hZ2SjQUQoQpYNsYKdPNtWwAG Diff:
Old | New | Differences | |
---|---|---|---|
399 | 399 | let bb = ((((((((("ticket_sold_" + toString(aV)) + "_of_") + toString(aS)) + "_") + t) + "_") + aJ) + "_") + F) | |
400 | 400 | let bc = ((((((((toString(ba) + "_") + toString(aa)) + "_") + aA) + "_") + toString(aj)) + "_") + toBase58String(aY)) | |
401 | 401 | let bd = StringEntry(bb, bc) | |
402 | - | let be = [IntegerEntry(J(aJ, t, F), aV), StringEntry(("nft_" + toBase58String(aY)), bb), IntegerEntry("total_nft_issued", (aL + 1)), BooleanEntry(K(aJ, t, F), aZ), aX, ScriptTransfer(Address(fromBase58String(aJ)), aU, ao), ScriptTransfer(ba, 1, aY), ScriptTransfer(Address(fromBase58String(e)), aT, ao)] | |
402 | + | let be = [IntegerEntry(J(aJ, t, F), aV), StringEntry(("nft_" + toBase58String(aY)), bb), IntegerEntry("total_nft_issued", (aL + 1)), BooleanEntry((("ST_" + toString((aL + 1))) + "_used"), false), BooleanEntry(K(aJ, t, F), aZ), aX, ScriptTransfer(Address(fromBase58String(aJ)), aU, ao), ScriptTransfer(ba, 1, aY), ScriptTransfer(Address(fromBase58String(e)), aT, ao)] | |
403 | 403 | bd :: be | |
404 | 404 | } | |
405 | 405 | } | |
408 | 408 | } | |
409 | 409 | ||
410 | 410 | ||
411 | + | ||
412 | + | @Callable(ag) | |
413 | + | func useTicket (t,aJ) = { | |
414 | + | let bf = af(ag) | |
415 | + | let aA = bf._1 | |
416 | + | let r = bf._2 | |
417 | + | let aa = bf._3 | |
418 | + | let bg = ah(ag) | |
419 | + | let ai = bg._1 | |
420 | + | let aj = bg._2 | |
421 | + | if (!(isDefined(ai.assetId))) | |
422 | + | then throw("Wrong asset attached") | |
423 | + | else { | |
424 | + | let F = toBase58String(value(ai.assetId)) | |
425 | + | let bh = { | |
426 | + | let bi = assetInfo(value(ai.assetId)) | |
427 | + | if ($isInstanceOf(bi, "Asset")) | |
428 | + | then { | |
429 | + | let bj = bi | |
430 | + | bj.name | |
431 | + | } | |
432 | + | else throw("Can't find asset") | |
433 | + | } | |
434 | + | let aF = b(E(aJ, t, F)) | |
435 | + | if ((size(aF) == 0)) | |
436 | + | then throw("Ticket not found") | |
437 | + | else [BooleanEntry((bh + "_used"), true), ScriptTransfer(Address(fromBase58String(r)), 1, ai.assetId)] | |
438 | + | } | |
439 | + | } | |
440 | + | ||
441 | + |
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) = ("get_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,aa) = { | |
123 | 123 | let ab = R(r) | |
124 | 124 | if ((ab != "")) | |
125 | 125 | then throw(ab) | |
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 (!(L(aa, 1000))) | |
137 | 137 | then throw("1000 Char. max date") | |
138 | 138 | else if ((size(split(Z, ",")) > 5)) | |
139 | 139 | then throw("5 tags max.") | |
140 | 140 | else "" | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func ac (t,r,X,Y,ad,ae) = { | |
145 | 145 | let ab = R(r) | |
146 | 146 | if ((ab != "")) | |
147 | 147 | then throw(ab) | |
148 | 148 | else if (!(L(X, 200))) | |
149 | 149 | then throw("100 Char. max name") | |
150 | 150 | else if (!(L(Y, 1000))) | |
151 | 151 | then throw("1000 Char. max description") | |
152 | 152 | else if (if (!(O(ad))) | |
153 | 153 | then true | |
154 | 154 | else !(O(ae))) | |
155 | 155 | then throw("Positive amount only") | |
156 | 156 | else if (!(L(Y, 1000))) | |
157 | 157 | then throw("1000 Char. max description") | |
158 | 158 | else "" | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func af (ag) = if (!(j)) | |
163 | 163 | then throw(k) | |
164 | 164 | else $Tuple3(toBase58String(ag.transactionId), toBase58String(ag.caller.bytes), lastBlock.timestamp) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func ah (ag) = if ((size(ag.payments) == 0)) | |
168 | 168 | then throw("No payment attached") | |
169 | 169 | else { | |
170 | 170 | let ai = value(ag.payments[0]) | |
171 | 171 | let aj = value(ai.amount) | |
172 | 172 | $Tuple2(ai, aj) | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func ak (ag,al,am) = { | |
177 | 177 | let an = ah(ag) | |
178 | 178 | let ai = an._1 | |
179 | 179 | let aj = an._2 | |
180 | 180 | if (!(isDefined(ai.assetId))) | |
181 | 181 | then throw("Wrong asset attached") | |
182 | 182 | else { | |
183 | 183 | let ao = if (if ((size(al) > 0)) | |
184 | 184 | then (toBase58String(value(ai.assetId)) == al) | |
185 | 185 | else false) | |
186 | 186 | then ai.assetId | |
187 | 187 | else throw("Wrong asset attached") | |
188 | 188 | if ((am != aj)) | |
189 | 189 | then throw("Payment amount don't match") | |
190 | 190 | else $Tuple2(aj, ao) | |
191 | 191 | } | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(ap) | |
196 | 196 | func setConf (c,aq) = { | |
197 | 197 | let r = toString(ap.caller) | |
198 | 198 | if (containsElement([g, toString(this)], r)) | |
199 | 199 | then if (contains(c, "conf_")) | |
200 | 200 | then [StringEntry(c, aq)] | |
201 | 201 | else throw("Entries starting with conf_ only") | |
202 | 202 | else throw("You are not allowed to change this") | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | ||
207 | 207 | @Callable(ag) | |
208 | 208 | func addEvent (X,Y,Z,W,ar,U,aa) = { | |
209 | 209 | let as = af(ag) | |
210 | 210 | let t = as._1 | |
211 | 211 | let r = as._2 | |
212 | 212 | let at = as._3 | |
213 | 213 | let ab = R(r) | |
214 | 214 | if ((ab != "")) | |
215 | 215 | then throw(ab) | |
216 | 216 | else { | |
217 | 217 | let au = V(r, W, X, Y, Z, U, aa) | |
218 | 218 | if ((au != "")) | |
219 | 219 | then throw("Something went wrong!") | |
220 | 220 | else [IntegerEntry(u(r, t), at), StringEntry(v(r, t), aa), StringEntry(w(r, t), X), StringEntry(x(r, t), Y), StringEntry(y(r, t), W), StringEntry(z(r, t), Z), StringEntry(C(r, t), ar), StringEntry(D(r, t), U), StringEntry(s(t), r)] | |
221 | 221 | } | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | ||
226 | 226 | @Callable(ag) | |
227 | 227 | func editEvent (t,X,Y,Z,W,ar,U,aa) = if (!(j)) | |
228 | 228 | then throw(k) | |
229 | 229 | else { | |
230 | 230 | let r = toBase58String(ag.caller.bytes) | |
231 | 231 | let ab = R(r) | |
232 | 232 | if ((ab != "")) | |
233 | 233 | then throw(ab) | |
234 | 234 | else { | |
235 | 235 | let au = V(r, W, X, Y, Z, U, aa) | |
236 | 236 | if ((au != "")) | |
237 | 237 | then throw("Something went wrong!") | |
238 | 238 | else { | |
239 | 239 | let av = b(w(r, t)) | |
240 | 240 | if ((av == "")) | |
241 | 241 | then throw("Entry not found") | |
242 | 242 | else { | |
243 | 243 | let aw = b(A(r, t)) | |
244 | 244 | if ((aw == "ILLEGAL")) | |
245 | 245 | then throw("Cannot update ILLEGAL Event") | |
246 | 246 | else [StringEntry(w(r, t), X), StringEntry(v(r, t), aa), StringEntry(x(r, t), Y), StringEntry(z(r, t), Z), StringEntry(D(r, t), U), StringEntry(C(r, t), ar)] | |
247 | 247 | } | |
248 | 248 | } | |
249 | 249 | } | |
250 | 250 | } | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | ||
254 | 254 | @Callable(ag) | |
255 | 255 | func flagEvent (t,ax,aw,ay) = { | |
256 | 256 | let az = af(ag) | |
257 | 257 | let aA = az._1 | |
258 | 258 | let r = az._2 | |
259 | 259 | if (containsElement([g, toString(this)], r)) | |
260 | 260 | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], aw)) | |
261 | 261 | then [StringEntry(A(ax, t), aw), StringEntry(B(ax, t), ay)] | |
262 | 262 | else throw(("Unknow status " + aw)) | |
263 | 263 | else throw("You are not allowed") | |
264 | 264 | } | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | ||
268 | 268 | @Callable(ag) | |
269 | 269 | func addTicket (t,X,Y,ad,ae) = { | |
270 | 270 | let aB = af(ag) | |
271 | 271 | let aA = aB._1 | |
272 | 272 | let r = aB._2 | |
273 | 273 | let aa = aB._3 | |
274 | 274 | let ab = R(r) | |
275 | 275 | if ((ab != "")) | |
276 | 276 | then throw(ab) | |
277 | 277 | else { | |
278 | 278 | let aC = Q(t) | |
279 | 279 | if ((aC == "")) | |
280 | 280 | then throw("Event not found") | |
281 | 281 | else if ((aC != r)) | |
282 | 282 | then throw("You are not the owner of this event") | |
283 | 283 | else { | |
284 | 284 | let aD = ac(t, r, X, Y, ad, ae) | |
285 | 285 | if ((aD != "")) | |
286 | 286 | then throw("Something went wrong!") | |
287 | 287 | else [StringEntry(E(r, t, aA), X), StringEntry(G(r, t, aA), Y), IntegerEntry(H(r, t, aA), ad), IntegerEntry(I(r, t, aA), ae), BooleanEntry(K(r, t, aA), true)] | |
288 | 288 | } | |
289 | 289 | } | |
290 | 290 | } | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | ||
294 | 294 | @Callable(ag) | |
295 | 295 | func editTicket (F,t,X,Y,ad,ae) = { | |
296 | 296 | let aE = af(ag) | |
297 | 297 | let aA = aE._1 | |
298 | 298 | let r = aE._2 | |
299 | 299 | let aa = aE._3 | |
300 | 300 | let ab = R(r) | |
301 | 301 | if ((ab != "")) | |
302 | 302 | then throw(ab) | |
303 | 303 | else { | |
304 | 304 | let aC = Q(t) | |
305 | 305 | if ((aC == "")) | |
306 | 306 | then throw("Event not found") | |
307 | 307 | else if ((aC != r)) | |
308 | 308 | then throw("You are not the owner of this event") | |
309 | 309 | else { | |
310 | 310 | let aF = b(E(r, t, F)) | |
311 | 311 | if ((size(aF) == 0)) | |
312 | 312 | then throw("Ticket not found") | |
313 | 313 | else { | |
314 | 314 | let aD = ac(t, r, X, Y, ad, ae) | |
315 | 315 | if ((aD != "")) | |
316 | 316 | then throw("Something went wrong!") | |
317 | 317 | else { | |
318 | 318 | let aG = valueOrElse(getInteger(J(r, t, F)), 0) | |
319 | 319 | if ((aG > ae)) | |
320 | 320 | then throw("Max tickets available cannot be lower than amount already sold") | |
321 | 321 | else [StringEntry(E(r, t, F), X), StringEntry(G(r, t, F), Y), IntegerEntry(H(r, t, F), ad), IntegerEntry(I(r, t, F), ae)] | |
322 | 322 | } | |
323 | 323 | } | |
324 | 324 | } | |
325 | 325 | } | |
326 | 326 | } | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | ||
330 | 330 | @Callable(ag) | |
331 | 331 | func pauseTicket (t,F,aH) = { | |
332 | 332 | let aI = af(ag) | |
333 | 333 | let aA = aI._1 | |
334 | 334 | let r = aI._2 | |
335 | 335 | let aa = aI._3 | |
336 | 336 | let ab = R(r) | |
337 | 337 | if ((ab != "")) | |
338 | 338 | then throw(ab) | |
339 | 339 | else { | |
340 | 340 | let aC = Q(t) | |
341 | 341 | if ((aC == "")) | |
342 | 342 | then throw("Event not found") | |
343 | 343 | else if ((aC != r)) | |
344 | 344 | then throw("You are not the owner of this event") | |
345 | 345 | else [BooleanEntry(K(r, t, aA), aH)] | |
346 | 346 | } | |
347 | 347 | } | |
348 | 348 | ||
349 | 349 | ||
350 | 350 | ||
351 | 351 | @Callable(ag) | |
352 | 352 | func buyTicket (F,t,aJ) = { | |
353 | 353 | let aK = af(ag) | |
354 | 354 | let aA = aK._1 | |
355 | 355 | let r = aK._2 | |
356 | 356 | let aa = aK._3 | |
357 | 357 | let aL = valueOrElse(h("total_tickets_issued"), 0) | |
358 | 358 | let aM = Q(t) | |
359 | 359 | if ((aM == "")) | |
360 | 360 | then throw("Event not found") | |
361 | 361 | else if ((aM != aJ)) | |
362 | 362 | then throw("You are not the owner of this event") | |
363 | 363 | else { | |
364 | 364 | let aF = b(E(aJ, t, F)) | |
365 | 365 | if ((size(aF) == 0)) | |
366 | 366 | then throw("Ticket not found") | |
367 | 367 | else { | |
368 | 368 | let aN = b(w(aJ, t)) | |
369 | 369 | if ((aN == "")) | |
370 | 370 | then throw("Art doesn't exist") | |
371 | 371 | else { | |
372 | 372 | let aO = i(K(aJ, t, F)) | |
373 | 373 | let aP = h(J(aJ, t, F)) | |
374 | 374 | let aQ = h(H(aJ, t, F)) | |
375 | 375 | let al = toBase58String(f) | |
376 | 376 | let aR = ak(ag, al, aQ) | |
377 | 377 | let aj = aR._1 | |
378 | 378 | let ao = aR._2 | |
379 | 379 | let aS = h(I(aJ, t, F)) | |
380 | 380 | let aT = fraction(aj, p, 100) | |
381 | 381 | let aU = (aj - aT) | |
382 | 382 | if ((aP == aS)) | |
383 | 383 | then throw("Art sold out") | |
384 | 384 | else { | |
385 | 385 | let aV = (aP + 1) | |
386 | 386 | let aW = ((((((((((("Organizer: " + aJ) + ", | |
387 | 387 | EventID: ") + t) + ", | |
388 | 388 | TicketID: ") + F) + ", | |
389 | 389 | EventName: ") + aN) + ", | |
390 | 390 | Issue: ") + toString(aV)) + "/") + toString(aS)) | |
391 | 391 | let aX = Issue(("ST_" + toString((aL + 1))), aW, 1, 0, false) | |
392 | 392 | let aY = calculateAssetId(aX) | |
393 | 393 | let aZ = if (if ((aV == aS)) | |
394 | 394 | then true | |
395 | 395 | else !(aO)) | |
396 | 396 | then false | |
397 | 397 | else true | |
398 | 398 | let ba = ag.caller | |
399 | 399 | let bb = ((((((((("ticket_sold_" + toString(aV)) + "_of_") + toString(aS)) + "_") + t) + "_") + aJ) + "_") + F) | |
400 | 400 | let bc = ((((((((toString(ba) + "_") + toString(aa)) + "_") + aA) + "_") + toString(aj)) + "_") + toBase58String(aY)) | |
401 | 401 | let bd = StringEntry(bb, bc) | |
402 | - | let be = [IntegerEntry(J(aJ, t, F), aV), StringEntry(("nft_" + toBase58String(aY)), bb), IntegerEntry("total_nft_issued", (aL + 1)), BooleanEntry(K(aJ, t, F), aZ), aX, ScriptTransfer(Address(fromBase58String(aJ)), aU, ao), ScriptTransfer(ba, 1, aY), ScriptTransfer(Address(fromBase58String(e)), aT, ao)] | |
402 | + | let be = [IntegerEntry(J(aJ, t, F), aV), StringEntry(("nft_" + toBase58String(aY)), bb), IntegerEntry("total_nft_issued", (aL + 1)), BooleanEntry((("ST_" + toString((aL + 1))) + "_used"), false), BooleanEntry(K(aJ, t, F), aZ), aX, ScriptTransfer(Address(fromBase58String(aJ)), aU, ao), ScriptTransfer(ba, 1, aY), ScriptTransfer(Address(fromBase58String(e)), aT, ao)] | |
403 | 403 | bd :: be | |
404 | 404 | } | |
405 | 405 | } | |
406 | 406 | } | |
407 | 407 | } | |
408 | 408 | } | |
409 | 409 | ||
410 | 410 | ||
411 | + | ||
412 | + | @Callable(ag) | |
413 | + | func useTicket (t,aJ) = { | |
414 | + | let bf = af(ag) | |
415 | + | let aA = bf._1 | |
416 | + | let r = bf._2 | |
417 | + | let aa = bf._3 | |
418 | + | let bg = ah(ag) | |
419 | + | let ai = bg._1 | |
420 | + | let aj = bg._2 | |
421 | + | if (!(isDefined(ai.assetId))) | |
422 | + | then throw("Wrong asset attached") | |
423 | + | else { | |
424 | + | let F = toBase58String(value(ai.assetId)) | |
425 | + | let bh = { | |
426 | + | let bi = assetInfo(value(ai.assetId)) | |
427 | + | if ($isInstanceOf(bi, "Asset")) | |
428 | + | then { | |
429 | + | let bj = bi | |
430 | + | bj.name | |
431 | + | } | |
432 | + | else throw("Can't find asset") | |
433 | + | } | |
434 | + | let aF = b(E(aJ, t, F)) | |
435 | + | if ((size(aF) == 0)) | |
436 | + | then throw("Ticket not found") | |
437 | + | else [BooleanEntry((bh + "_used"), true), ScriptTransfer(Address(fromBase58String(r)), 1, ai.assetId)] | |
438 | + | } | |
439 | + | } | |
440 | + | ||
441 | + |
github/deemru/w8io/169f3d6 114.84 ms ◑