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:BgJGCAISBAoCCAgSCAoGCAgICAgIEgkKBwgICAgICAgSBgoECAgICBIHCgUICAgBARIICgYICAgIAQESBQoDCAEEEgUKAwgICCoAB1ZFUlNJT04CBTEuMC4wAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAAh1c2VyRGFwcAkBBXZhbHVlAQkApggBCQEOZ2V0U3RyaW5nQnlLZXkBAg9jb25mX3VzZXJzX2RhcHAAC2ZlZVJlY2VpdmVyCQEOZ2V0U3RyaW5nQnlLZXkBAhFjb25mX2ZlZV9yZWNlaXZlcgALc2lnbkFzc2V0SWQJANkEAQkBDmdldFN0cmluZ0J5S2V5AQIYY29uZl9hY2NlcHRlZF9hc3NldF9TSUdOAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAQ9nZXRJbnRlZ2VyQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBQNrZXkAAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJs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c3N1ZXIFB2V2ZW50SWQFCHRpY2tldElkBQpzZWxsU3RhdHVzCQDMCAIFCGlzc3VlTkZUCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBBQZpc3N1ZXIFEmFtb3VudEZvck9yZ2FuaXplcgUHYXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQpyZWNlaXZlTkZUAAEFBWlkTkZUCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBBQtmZWVSZWNlaXZlcgUNYW1vdW50Rm9yU2lnbgUHYXNzZXRJZAUDbmlsCQDMCAIFCHNvbGREYXRhBQZidXlSZXMAlnkgGg==", "height": 2286013, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3i1VawnMfgAgY9TxnX3DNhrExGy6pGT1fBa8zSWVD6kH Next: DbnLvyzjUCECjSN7H8FQjGRMSqg7bqoZcWWnaxTbBMCR Diff:
OldNewDifferences
282282 let aC = ab(t, r, X, Y, ac, ad)
283283 if ((aC != ""))
284284 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)]
286286 }
287287 }
288288 }
326326
327327
328328 @Callable(af)
329-func buyTicket (F,t,aG) = {
329+func pauseTicket (t,F,aG) = {
330330 let aH = ae(af)
331331 let az = aH._1
332332 let r = aH._2
333333 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 == ""))
337358 then throw("Event not found")
338- else if ((aJ != aG))
359+ else if ((aL != aI))
339360 then throw("You are not the owner of this event")
340361 else {
341- let aE = b(E(aG, t, F))
362+ let aE = b(E(aI, t, F))
342363 if ((size(aE) == 0))
343364 then throw("Ticket not found")
344365 else {
345- let aK = b(w(aG, t))
346- if ((aK == ""))
366+ let aM = b(w(aI, t))
367+ if ((aM == ""))
347368 then throw("Art doesn't exist")
348369 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))
370+ let aN = i(K(aI, t, F))
371+ let aO = h(J(aI, t, F))
372+ let aP = h(H(aI, t, F))
352373 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))
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))
360381 then throw("Art sold out")
361382 else {
362- let aS = (aM + 1)
363- let aT = ((((((((((("Organizer: " + aG) + ",
383+ let aU = (aO + 1)
384+ let aV = ((((((((((("Organizer: " + aI) + ",
364385 EventID: ") + t) + ",
365386 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))
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))
371392 then true
372- else !(aL))
393+ else !(aN))
373394 then false
374395 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
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
381402 }
382403 }
383404 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "1.0.0"
55
66 func b (c) = valueOrElse(getString(this, c), "")
77
88
99 let d = value(addressFromString(b("conf_users_dapp")))
1010
1111 let e = b("conf_fee_receiver")
1212
1313 let f = fromBase58String(b("conf_accepted_asset_SIGN"))
1414
1515 let g = b("conf_admin_1")
1616
1717 func h (c) = valueOrElse(getInteger(this, c), 0)
1818
1919
2020 func i (c) = valueOrElse(getBoolean(this, c), false)
2121
2222
2323 let j = valueOrElse(getBoolean(d, "conf_dapp_is_running"), true)
2424
2525 let k = valueOrElse(getString(d, "conf_maintenance_msg"), "")
2626
2727 let l = "SUSPENDED"
2828
2929 let m = "UNREGISTERED"
3030
3131 func n (o) = if (contains(o, "/"))
3232 then if (if ((76 > size(o)))
3333 then (size(split(o, "/")[0]) == 59)
3434 else false)
3535 then (16 > size(split(o, "/")[1]))
3636 else false
3737 else false
3838
3939
4040 let p = 2
4141
4242 func q (r) = ("user_status_" + r)
4343
4444
4545 func s (t) = ("event_owner_" + t)
4646
4747
4848 func u (r,t) = ((("event_added_date_" + t) + "_") + r)
4949
5050
5151 func v (r,t) = ((("event_date_" + t) + "_") + r)
5252
5353
5454 func w (r,t) = ((("event_name_" + t) + "_") + r)
5555
5656
5757 func x (r,t) = ((("event_desc_" + t) + "_") + r)
5858
5959
6060 func y (r,t) = ((("event_display_cid_" + t) + "_") + r)
6161
6262
6363 func z (r,t) = ((("event_tags_" + t) + "_") + r)
6464
6565
6666 func A (r,t) = ((("event_flag_" + t) + "_") + r)
6767
6868
6969 func B (r,t) = ((("event_note_" + t) + "_") + r)
7070
7171
7272 func C (r,t) = ((("event_crawler_cid_" + t) + "_") + r)
7373
7474
7575 func D (r,t) = ((("event_type_" + t) + "_") + r)
7676
7777
7878 func E (r,t,F) = ((((("ticket_name_" + t) + "_") + r) + "_") + F)
7979
8080
8181 func G (r,t,F) = ((((("ticket_desc_" + t) + "_") + r) + "_") + F)
8282
8383
8484 func H (r,t,F) = ((((("ticket_price_" + t) + "_") + r) + "_") + F)
8585
8686
8787 func I (r,t,F) = ((((("ticket_maxAvailable_" + t) + "_") + r) + "_") + F)
8888
8989
9090 func J (r,t,F) = ((((("ticket_sold_" + t) + "_") + r) + "_") + F)
9191
9292
9393 func K (r,t,F) = ((((("ticket_sold_" + t) + "_") + r) + "_") + F)
9494
9595
9696 func L (M,N) = if ((size(M) == 0))
9797 then throw("Field cannot be is empty")
9898 else if ((size(M) > N))
9999 then throw((M + " is too long"))
100100 else true
101101
102102
103103 func O (P) = (0 > P)
104104
105105
106106 func Q (t) = valueOrElse(getString(this, s(t)), "")
107107
108108
109109 func R (r) = {
110110 let S = valueOrElse(getString(d, q(r)), m)
111111 if ((S == m))
112112 then "Register this account first with \"Account\" tab"
113113 else if ((S == l))
114114 then "Account suspended"
115115 else ""
116116 }
117117
118118
119119 func T (U) = containsElement(["online", "offline", "both"], U)
120120
121121
122122 func V (r,W,X,Y,Z,U) = {
123123 let aa = R(r)
124124 if ((aa != ""))
125125 then throw(aa)
126126 else if ((size(W) == 0))
127127 then throw("Display CID cannot be empty")
128128 else if (!(n(W)))
129129 then throw("Problem with CID")
130130 else if (!(L(X, 200)))
131131 then throw("100 Char. max name")
132132 else if (!(T(U)))
133133 then throw("Wrong event type")
134134 else if (!(L(Y, 1000)))
135135 then throw("1000 Char. max description")
136136 else if ((size(split(Z, ",")) > 5))
137137 then throw("5 tags max.")
138138 else ""
139139 }
140140
141141
142142 func ab (t,r,X,Y,ac,ad) = {
143143 let aa = R(r)
144144 if ((aa != ""))
145145 then throw(aa)
146146 else if (!(L(X, 200)))
147147 then throw("100 Char. max name")
148148 else if (!(L(Y, 1000)))
149149 then throw("1000 Char. max description")
150150 else if (if (!(O(ac)))
151151 then true
152152 else !(O(ad)))
153153 then throw("Positive amount only")
154154 else if (!(L(Y, 1000)))
155155 then throw("1000 Char. max description")
156156 else ""
157157 }
158158
159159
160160 func ae (af) = if (!(j))
161161 then throw(k)
162162 else $Tuple3(toBase58String(af.transactionId), toBase58String(af.caller.bytes), lastBlock.timestamp)
163163
164164
165165 func ag (af) = if ((size(af.payments) == 0))
166166 then throw("No payment attached")
167167 else {
168168 let ah = value(af.payments[0])
169169 let ai = value(ah.amount)
170170 $Tuple2(ah, ai)
171171 }
172172
173173
174174 func aj (af,ak,al) = {
175175 let am = ag(af)
176176 let ah = am._1
177177 let ai = am._2
178178 if (!(isDefined(ah.assetId)))
179179 then throw("Wrong asset attached")
180180 else {
181181 let an = if (if ((size(ak) > 0))
182182 then (toBase58String(value(ah.assetId)) == ak)
183183 else false)
184184 then ah.assetId
185185 else throw("Wrong asset attached")
186186 if ((al != ai))
187187 then throw("Payment amount don't match")
188188 else $Tuple2(ai, an)
189189 }
190190 }
191191
192192
193193 @Callable(ao)
194194 func setConf (c,ap) = {
195195 let r = toString(ao.caller)
196196 if (containsElement([g, toString(this)], r))
197197 then if (contains(c, "conf_"))
198198 then [StringEntry(c, ap)]
199199 else throw("Entries starting with conf_ only")
200200 else throw("You are not allowed to change this")
201201 }
202202
203203
204204
205205 @Callable(af)
206206 func addEvent (X,Y,Z,W,aq,U) = {
207207 let ar = ae(af)
208208 let t = ar._1
209209 let r = ar._2
210210 let as = ar._3
211211 let aa = R(r)
212212 if ((aa != ""))
213213 then throw(aa)
214214 else {
215215 let at = V(r, W, X, Y, Z, U)
216216 if ((at != ""))
217217 then throw("Something went wrong!")
218218 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)]
219219 }
220220 }
221221
222222
223223
224224 @Callable(af)
225225 func editEvent (t,X,Y,Z,W,aq,U) = if (!(j))
226226 then throw(k)
227227 else {
228228 let r = toBase58String(af.caller.bytes)
229229 let aa = R(r)
230230 if ((aa != ""))
231231 then throw(aa)
232232 else {
233233 let at = V(r, W, X, Y, Z, U)
234234 if ((at != ""))
235235 then throw("Something went wrong!")
236236 else {
237237 let au = b(w(r, t))
238238 if ((au == ""))
239239 then throw("Entry not found")
240240 else {
241241 let av = b(A(r, t))
242242 if ((av == "ILLEGAL"))
243243 then throw("Cannot update ILLEGAL Event")
244244 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)]
245245 }
246246 }
247247 }
248248 }
249249
250250
251251
252252 @Callable(af)
253253 func flagEvent (t,aw,av,ax) = {
254254 let ay = ae(af)
255255 let az = ay._1
256256 let r = ay._2
257257 if (containsElement([g, toString(this)], r))
258258 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], av))
259259 then [StringEntry(A(aw, t), av), StringEntry(B(aw, t), ax)]
260260 else throw(("Unknow status " + av))
261261 else throw("You are not allowed")
262262 }
263263
264264
265265
266266 @Callable(af)
267267 func addTicket (t,X,Y,ac,ad) = {
268268 let aA = ae(af)
269269 let az = aA._1
270270 let r = aA._2
271271 let as = aA._3
272272 let aa = R(r)
273273 if ((aa != ""))
274274 then throw(aa)
275275 else {
276276 let aB = Q(t)
277277 if ((aB == ""))
278278 then throw("Event not found")
279279 else if ((aB != r))
280280 then throw("You are not the owner of this event")
281281 else {
282282 let aC = ab(t, r, X, Y, ac, ad)
283283 if ((aC != ""))
284284 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)]
286286 }
287287 }
288288 }
289289
290290
291291
292292 @Callable(af)
293293 func editTicket (F,t,X,Y,ac,ad) = {
294294 let aD = ae(af)
295295 let az = aD._1
296296 let r = aD._2
297297 let as = aD._3
298298 let aa = R(r)
299299 if ((aa != ""))
300300 then throw(aa)
301301 else {
302302 let aB = Q(t)
303303 if ((aB == ""))
304304 then throw("Event not found")
305305 else if ((aB != r))
306306 then throw("You are not the owner of this event")
307307 else {
308308 let aE = b(E(r, t, F))
309309 if ((size(aE) == 0))
310310 then throw("Ticket not found")
311311 else {
312312 let aC = ab(t, r, X, Y, ac, ad)
313313 if ((aC != ""))
314314 then throw("Something went wrong!")
315315 else {
316316 let aF = valueOrElse(getInteger(J(r, t, F)), 0)
317317 if ((aF > ad))
318318 then throw("Max tickets available cannot be lower than amount already sold")
319319 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)]
320320 }
321321 }
322322 }
323323 }
324324 }
325325
326326
327327
328328 @Callable(af)
329-func buyTicket (F,t,aG) = {
329+func pauseTicket (t,F,aG) = {
330330 let aH = ae(af)
331331 let az = aH._1
332332 let r = aH._2
333333 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 == ""))
337358 then throw("Event not found")
338- else if ((aJ != aG))
359+ else if ((aL != aI))
339360 then throw("You are not the owner of this event")
340361 else {
341- let aE = b(E(aG, t, F))
362+ let aE = b(E(aI, t, F))
342363 if ((size(aE) == 0))
343364 then throw("Ticket not found")
344365 else {
345- let aK = b(w(aG, t))
346- if ((aK == ""))
366+ let aM = b(w(aI, t))
367+ if ((aM == ""))
347368 then throw("Art doesn't exist")
348369 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))
370+ let aN = i(K(aI, t, F))
371+ let aO = h(J(aI, t, F))
372+ let aP = h(H(aI, t, F))
352373 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))
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))
360381 then throw("Art sold out")
361382 else {
362- let aS = (aM + 1)
363- let aT = ((((((((((("Organizer: " + aG) + ",
383+ let aU = (aO + 1)
384+ let aV = ((((((((((("Organizer: " + aI) + ",
364385 EventID: ") + t) + ",
365386 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))
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))
371392 then true
372- else !(aL))
393+ else !(aN))
373394 then false
374395 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
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
381402 }
382403 }
383404 }
384405 }
385406 }
386407
387408

github/deemru/w8io/026f985 
92.60 ms