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:BgJOCAISBAoCCAgSCQoHCAgICAgICBIKCggICAgICAgICBIGCgQICAgIEgcKBQgICAEBEggKBggICAgBARIFCgMIAQQSBQoDCAgIEgQKAggIKgAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3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SR0MDE1MjgzMTUzMTkCXzIDCQEBIQEJAQlpc0RlZmluZWQBCAUHcGF5bWVudAdhc3NldElkCQACAQIUV3JvbmcgYXNzZXQgYXR0YWNoZWQECHRpY2tldElkCQDYBAEJAQV2YWx1ZQEIBQdwYXltZW50B2Fzc2V0SWQECWFzc2V0TmFtZQQHJG1hdGNoMAkA7AcBCQEFdmFsdWUBCAUHcGF5bWVudAdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAVhc3NldAUHJG1hdGNoMAgFBWFzc2V0BG5hbWUJAAIBAhBDYW4ndCBmaW5kIGFzc2V0BAt0aWNrZXRFeGlzdAkBDmdldFN0cmluZ0J5S2V5AQkBDWtleVRpY2tldE5hbWUDBQZpc3N1ZXIFB2V2ZW50SWQFCHRpY2tldElkAwkAAAIJALECAQULdGlja2V0RXhpc3QAAAkAAgECEFRpY2tldCBub3QgZm91bmQJAMwIAgkBDEJvb2xlYW5FbnRyeQIJAKwCAgUJYXNzZXROYW1lAgVfdXNlZAYJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFBmNhbGxlcgABCAUHcGF5bWVudAdhc3NldElkBQNuaWwAiBdp9w==", "height": 2287762, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B8kSasrY3ieF7gbkMCo5bGiDtCvshSwkw1p1tmrSHe6h Next: 5QjGsxzgUYaRbMnTXRU9hZ2SjQUQoQpYNsYKdPNtWwAG Diff:
OldNewDifferences
399399 let bb = ((((((((("ticket_sold_" + toString(aV)) + "_of_") + toString(aS)) + "_") + t) + "_") + aJ) + "_") + F)
400400 let bc = ((((((((toString(ba) + "_") + toString(aa)) + "_") + aA) + "_") + toString(aj)) + "_") + toBase58String(aY))
401401 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)]
403403 bd :: be
404404 }
405405 }
408408 }
409409
410410
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+
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) = ("get_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,aa) = {
123123 let ab = R(r)
124124 if ((ab != ""))
125125 then throw(ab)
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 (!(L(aa, 1000)))
137137 then throw("1000 Char. max date")
138138 else if ((size(split(Z, ",")) > 5))
139139 then throw("5 tags max.")
140140 else ""
141141 }
142142
143143
144144 func ac (t,r,X,Y,ad,ae) = {
145145 let ab = R(r)
146146 if ((ab != ""))
147147 then throw(ab)
148148 else if (!(L(X, 200)))
149149 then throw("100 Char. max name")
150150 else if (!(L(Y, 1000)))
151151 then throw("1000 Char. max description")
152152 else if (if (!(O(ad)))
153153 then true
154154 else !(O(ae)))
155155 then throw("Positive amount only")
156156 else if (!(L(Y, 1000)))
157157 then throw("1000 Char. max description")
158158 else ""
159159 }
160160
161161
162162 func af (ag) = if (!(j))
163163 then throw(k)
164164 else $Tuple3(toBase58String(ag.transactionId), toBase58String(ag.caller.bytes), lastBlock.timestamp)
165165
166166
167167 func ah (ag) = if ((size(ag.payments) == 0))
168168 then throw("No payment attached")
169169 else {
170170 let ai = value(ag.payments[0])
171171 let aj = value(ai.amount)
172172 $Tuple2(ai, aj)
173173 }
174174
175175
176176 func ak (ag,al,am) = {
177177 let an = ah(ag)
178178 let ai = an._1
179179 let aj = an._2
180180 if (!(isDefined(ai.assetId)))
181181 then throw("Wrong asset attached")
182182 else {
183183 let ao = if (if ((size(al) > 0))
184184 then (toBase58String(value(ai.assetId)) == al)
185185 else false)
186186 then ai.assetId
187187 else throw("Wrong asset attached")
188188 if ((am != aj))
189189 then throw("Payment amount don't match")
190190 else $Tuple2(aj, ao)
191191 }
192192 }
193193
194194
195195 @Callable(ap)
196196 func setConf (c,aq) = {
197197 let r = toString(ap.caller)
198198 if (containsElement([g, toString(this)], r))
199199 then if (contains(c, "conf_"))
200200 then [StringEntry(c, aq)]
201201 else throw("Entries starting with conf_ only")
202202 else throw("You are not allowed to change this")
203203 }
204204
205205
206206
207207 @Callable(ag)
208208 func addEvent (X,Y,Z,W,ar,U,aa) = {
209209 let as = af(ag)
210210 let t = as._1
211211 let r = as._2
212212 let at = as._3
213213 let ab = R(r)
214214 if ((ab != ""))
215215 then throw(ab)
216216 else {
217217 let au = V(r, W, X, Y, Z, U, aa)
218218 if ((au != ""))
219219 then throw("Something went wrong!")
220220 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)]
221221 }
222222 }
223223
224224
225225
226226 @Callable(ag)
227227 func editEvent (t,X,Y,Z,W,ar,U,aa) = if (!(j))
228228 then throw(k)
229229 else {
230230 let r = toBase58String(ag.caller.bytes)
231231 let ab = R(r)
232232 if ((ab != ""))
233233 then throw(ab)
234234 else {
235235 let au = V(r, W, X, Y, Z, U, aa)
236236 if ((au != ""))
237237 then throw("Something went wrong!")
238238 else {
239239 let av = b(w(r, t))
240240 if ((av == ""))
241241 then throw("Entry not found")
242242 else {
243243 let aw = b(A(r, t))
244244 if ((aw == "ILLEGAL"))
245245 then throw("Cannot update ILLEGAL Event")
246246 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)]
247247 }
248248 }
249249 }
250250 }
251251
252252
253253
254254 @Callable(ag)
255255 func flagEvent (t,ax,aw,ay) = {
256256 let az = af(ag)
257257 let aA = az._1
258258 let r = az._2
259259 if (containsElement([g, toString(this)], r))
260260 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], aw))
261261 then [StringEntry(A(ax, t), aw), StringEntry(B(ax, t), ay)]
262262 else throw(("Unknow status " + aw))
263263 else throw("You are not allowed")
264264 }
265265
266266
267267
268268 @Callable(ag)
269269 func addTicket (t,X,Y,ad,ae) = {
270270 let aB = af(ag)
271271 let aA = aB._1
272272 let r = aB._2
273273 let aa = aB._3
274274 let ab = R(r)
275275 if ((ab != ""))
276276 then throw(ab)
277277 else {
278278 let aC = Q(t)
279279 if ((aC == ""))
280280 then throw("Event not found")
281281 else if ((aC != r))
282282 then throw("You are not the owner of this event")
283283 else {
284284 let aD = ac(t, r, X, Y, ad, ae)
285285 if ((aD != ""))
286286 then throw("Something went wrong!")
287287 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)]
288288 }
289289 }
290290 }
291291
292292
293293
294294 @Callable(ag)
295295 func editTicket (F,t,X,Y,ad,ae) = {
296296 let aE = af(ag)
297297 let aA = aE._1
298298 let r = aE._2
299299 let aa = aE._3
300300 let ab = R(r)
301301 if ((ab != ""))
302302 then throw(ab)
303303 else {
304304 let aC = Q(t)
305305 if ((aC == ""))
306306 then throw("Event not found")
307307 else if ((aC != r))
308308 then throw("You are not the owner of this event")
309309 else {
310310 let aF = b(E(r, t, F))
311311 if ((size(aF) == 0))
312312 then throw("Ticket not found")
313313 else {
314314 let aD = ac(t, r, X, Y, ad, ae)
315315 if ((aD != ""))
316316 then throw("Something went wrong!")
317317 else {
318318 let aG = valueOrElse(getInteger(J(r, t, F)), 0)
319319 if ((aG > ae))
320320 then throw("Max tickets available cannot be lower than amount already sold")
321321 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)]
322322 }
323323 }
324324 }
325325 }
326326 }
327327
328328
329329
330330 @Callable(ag)
331331 func pauseTicket (t,F,aH) = {
332332 let aI = af(ag)
333333 let aA = aI._1
334334 let r = aI._2
335335 let aa = aI._3
336336 let ab = R(r)
337337 if ((ab != ""))
338338 then throw(ab)
339339 else {
340340 let aC = Q(t)
341341 if ((aC == ""))
342342 then throw("Event not found")
343343 else if ((aC != r))
344344 then throw("You are not the owner of this event")
345345 else [BooleanEntry(K(r, t, aA), aH)]
346346 }
347347 }
348348
349349
350350
351351 @Callable(ag)
352352 func buyTicket (F,t,aJ) = {
353353 let aK = af(ag)
354354 let aA = aK._1
355355 let r = aK._2
356356 let aa = aK._3
357357 let aL = valueOrElse(h("total_tickets_issued"), 0)
358358 let aM = Q(t)
359359 if ((aM == ""))
360360 then throw("Event not found")
361361 else if ((aM != aJ))
362362 then throw("You are not the owner of this event")
363363 else {
364364 let aF = b(E(aJ, t, F))
365365 if ((size(aF) == 0))
366366 then throw("Ticket not found")
367367 else {
368368 let aN = b(w(aJ, t))
369369 if ((aN == ""))
370370 then throw("Art doesn't exist")
371371 else {
372372 let aO = i(K(aJ, t, F))
373373 let aP = h(J(aJ, t, F))
374374 let aQ = h(H(aJ, t, F))
375375 let al = toBase58String(f)
376376 let aR = ak(ag, al, aQ)
377377 let aj = aR._1
378378 let ao = aR._2
379379 let aS = h(I(aJ, t, F))
380380 let aT = fraction(aj, p, 100)
381381 let aU = (aj - aT)
382382 if ((aP == aS))
383383 then throw("Art sold out")
384384 else {
385385 let aV = (aP + 1)
386386 let aW = ((((((((((("Organizer: " + aJ) + ",
387387 EventID: ") + t) + ",
388388 TicketID: ") + F) + ",
389389 EventName: ") + aN) + ",
390390 Issue: ") + toString(aV)) + "/") + toString(aS))
391391 let aX = Issue(("ST_" + toString((aL + 1))), aW, 1, 0, false)
392392 let aY = calculateAssetId(aX)
393393 let aZ = if (if ((aV == aS))
394394 then true
395395 else !(aO))
396396 then false
397397 else true
398398 let ba = ag.caller
399399 let bb = ((((((((("ticket_sold_" + toString(aV)) + "_of_") + toString(aS)) + "_") + t) + "_") + aJ) + "_") + F)
400400 let bc = ((((((((toString(ba) + "_") + toString(aa)) + "_") + aA) + "_") + toString(aj)) + "_") + toBase58String(aY))
401401 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)]
403403 bd :: be
404404 }
405405 }
406406 }
407407 }
408408 }
409409
410410
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