tx · 3kCvxDYyA49Xq2wj14yhCeiwReZJS6d64DXoiYfCN5UD

3NBf9paePfCRTe5teHMeQYwBTeXb8w5X8XU:  -0.01800000 Waves

2022.10.26 10:58 [2289123] smart account 3NBf9paePfCRTe5teHMeQYwBTeXb8w5X8XU > SELF 0.00000000 Waves

{ "type": 13, "id": "3kCvxDYyA49Xq2wj14yhCeiwReZJS6d64DXoiYfCN5UD", "fee": 1800000, "feeAssetId": null, "timestamp": 1666771184947, "version": 2, "chainId": 84, "sender": "3NBf9paePfCRTe5teHMeQYwBTeXb8w5X8XU", "senderPublicKey": "DCKh8MYoZuPLjqsqXu8UuTXcxwZPKkDTCdAjpLiRXffa", "proofs": [ "4Sps5fZPRgQMM1eWGgAoKTeJpbtJvRaAVPcVPB2yJdenR4w4taGoWALAfuqrxS5d72L3ibxeYywDt9YjmRuFxaNr" ], "script": "base64:BgJmCAISBAoCCAgSCQoHCAgICAgICBIKCggICAgICAgICBIDCgEIEgQKAggIEgYKBAgICAgSCAoGCAgIAQEBEgkKBwgICAgBAQESBQoDCAEEEgQKAggIEgUKAwgICBIECgIICBIDCgEINAAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZW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1lbnQHYXNzZXRJZAkAAgECFFdyb25nIGFzc2V0IGF0dGFjaGVkBAh0aWNrZXRJZAkA2AQBCQEFdmFsdWUBCAUHcGF5bWVudAdhc3NldElkAwkBASEBCQELdGlja2V0RXhpc3QDBQZpc3N1ZXIFB2V2ZW50SWQFCHRpY2tldElkCQACAQIQVGlja2V0IG5vdCBmb3VuZAQKYW1vdW50VXNlZAkBD2dldEludGVnZXJCeUtleQEJARNrZXlUaWNrZXRBbW91bnRVc2VkAwUGaXNzdWVyBQdldmVudElkBQh0aWNrZXRJZAQMbWF4VXNpbmdUaW1lCQEPZ2V0SW50ZWdlckJ5S2V5AQkBD2tleVRpY2tldE1heFVzZQMFBmlzc3VlcgUHZXZlbnRJZAUIdGlja2V0SWQDCQAAAgUMbWF4VXNpbmdUaW1lBQphbW91bnRVc2VkCQACAQkArAICCQCsAgICDFRpY2tldCB1c2VkIAkApAMBBQphbW91bnRVc2VkAg4gdGltZXMgYWxyZWFkeQkAzAgCCQEMSW50ZWdlckVudHJ5AgkBE2tleVRpY2tldEFtb3VudFVzZWQDBQZpc3N1ZXIFB2V2ZW50SWQFCHRpY2tldElkCQBkAgUKYW1vdW50VXNlZAABCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBBQZjYWxsZXIAAQgFB3BheW1lbnQHYXNzZXRJZAUDbmlsAWkBC2RlbGV0ZUVudHJ5AQVlbnRyeQQGY2FsbGVyCQClCAEIBQFpBmNhbGxlcgMJAAACBQZjYWxsZXIFBWNocmlzCQDMCAIJAQtEZWxldGVFbnRyeQEFBWVudHJ5BQNuaWwJAAIBAgJubwDDmGnQ", "height": 2289123, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: D18xoxbLqTha7wG2fC3Dy8j8638yL4Wd2HvFYLpsBrFZ Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let VERSION = "1.0.0"
5+
6+func getStringByKey (key) = valueOrElse(getString(this, key), "")
7+
8+
9+let userDapp = value(addressFromString(getStringByKey("conf_users_dapp")))
10+
11+let feeReceiver = getStringByKey("conf_fee_receiver")
12+
13+let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN"))
14+
15+let chris = getStringByKey("conf_admin_1")
16+
17+func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
18+
19+
20+func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
21+
22+
23+let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
24+
25+let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
26+
27+let userSuspended = "SUSPENDED"
28+
29+let userUnregistered = "UNREGISTERED"
30+
31+func validateCID (cid) = if (contains(cid, "/"))
32+ then if (if ((76 > size(cid)))
33+ then (size(split(cid, "/")[0]) == 59)
34+ else false)
35+ then (16 > size(split(cid, "/")[1]))
36+ else false
37+ else false
38+
39+
40+let signCut = 2
41+
42+func keyUserStatus (caller) = ("user_status_" + caller)
43+
44+
45+func keyEventOwnerByEventId (eventId) = ("get_event_owner_" + eventId)
46+
47+
48+func keyEventAddedDate (caller,eventId) = ((("event_addedDate_" + eventId) + "_") + caller)
49+
50+
51+func keyEventDate (caller,eventId) = ((("event_date_" + eventId) + "_") + caller)
52+
53+
54+func keyEventName (caller,eventId) = ((("event_name_" + eventId) + "_") + caller)
55+
56+
57+func keyEventDesc (caller,eventId) = ((("event_desc_" + eventId) + "_") + caller)
58+
59+
60+func keyEventDisplayCid (caller,eventId) = ((("event_displayCid_" + eventId) + "_") + caller)
61+
62+
63+func keyEventTags (caller,eventId) = ((("event_tags_" + eventId) + "_") + caller)
64+
65+
66+func keyEventFlag (caller,eventId) = ((("event_flag_" + eventId) + "_") + caller)
67+
68+
69+func keyEventNote (caller,eventId) = ((("event_note_" + eventId) + "_") + caller)
70+
71+
72+func keyEventCrawler (caller,eventId) = ((("event_crawlerCid_" + eventId) + "_") + caller)
73+
74+
75+func keyEventTotalTicketTypes (caller,eventId) = ((("event_totalTicketTypes_" + eventId) + "_") + caller)
76+
77+
78+func keyEventTotalTicketsIssued (caller,eventId) = ((("event_totalIssued_" + eventId) + "_") + caller)
79+
80+
81+func keyEventCanceled (caller,eventId) = ((("event_canceled_" + eventId) + "_") + caller)
82+
83+
84+func keyEventCanceledReason (caller,eventId) = ((("event_canceledReason_" + eventId) + "_") + caller)
85+
86+
87+func keyTicketName (caller,eventId,ticketId) = ((((("ticket_name_" + eventId) + "_") + caller) + "_") + ticketId)
88+
89+
90+func keyTicketDesc (caller,eventId,ticketId) = ((((("ticket_desc_" + eventId) + "_") + caller) + "_") + ticketId)
91+
92+
93+func keyTicketPrice (caller,eventId,ticketId) = ((((("ticket_price_" + eventId) + "_") + caller) + "_") + ticketId)
94+
95+
96+func keyTicketDate (caller,eventId,ticketId) = ((((("ticket_date_" + eventId) + "_") + caller) + "_") + ticketId)
97+
98+
99+func keyTicketMaxAvailable (caller,eventId,ticketId) = ((((("ticket_maxAvailable_" + eventId) + "_") + caller) + "_") + ticketId)
100+
101+
102+func keyTicketSold (caller,eventId,ticketId) = ((((("ticket_sold_" + eventId) + "_") + caller) + "_") + ticketId)
103+
104+
105+func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_onSale_" + eventId) + "_") + caller) + "_") + ticketId)
106+
107+
108+func keyTicketAmountUsed (caller,eventId,ticketId) = ((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId)
109+
110+
111+func keyTicketMaxUse (caller,eventId,ticketId) = ((((("ticket_maxUse_" + eventId) + "_") + caller) + "_") + ticketId)
112+
113+
114+func keyTicketTotalIssued (caller,eventId,ticketId) = ((((("ticket_totalIssued_" + eventId) + "_") + caller) + "_") + ticketId)
115+
116+
117+func validateString (str,max) = if ((size(str) == 0))
118+ then throw("Field cannot be is empty")
119+ else if ((size(str) > max))
120+ then throw((str + " is too long"))
121+ else true
122+
123+
124+func validateInt (num) = (0 > num)
125+
126+
127+func getEventOwnerByEventId (eventId) = valueOrElse(getString(this, keyEventOwnerByEventId(eventId)), "")
128+
129+
130+func validateUser (caller) = {
131+ let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
132+ if ((userStatus == userUnregistered))
133+ then "Register this account first with \"Account\" tab"
134+ else if ((userStatus == userSuspended))
135+ then "Account suspended"
136+ else ""
137+ }
138+
139+
140+func validateType (type) = containsElement(["online", "offline", "both"], type)
141+
142+
143+func validateEventData (caller,cidDisplay,name,description,tags,type,date) = {
144+ let checkUser = validateUser(caller)
145+ if ((checkUser != ""))
146+ then throw(checkUser)
147+ else if ((size(cidDisplay) == 0))
148+ then throw("Display CID cannot be empty")
149+ else if (!(validateCID(cidDisplay)))
150+ then throw("Problem with CID")
151+ else if (!(validateString(name, 200)))
152+ then throw("100 Char. max name")
153+ else if (!(validateType(type)))
154+ then throw("Wrong event type")
155+ else if (!(validateString(description, 1000)))
156+ then throw("1000 Char. max description")
157+ else if (!(validateString(date, 1000)))
158+ then throw("1000 Char. max date")
159+ else if ((size(split(tags, ",")) > 5))
160+ then throw("5 tags max.")
161+ else ""
162+ }
163+
164+
165+func validateTicketData (eventId,caller,name,description,price,maxAvailable,maxUse) = {
166+ let checkUser = validateUser(caller)
167+ if ((checkUser != ""))
168+ then throw(checkUser)
169+ else if (!(validateString(name, 200)))
170+ then throw("100 Char. max name")
171+ else if (!(validateString(description, 1000)))
172+ then throw("1000 Char. max description")
173+ else if (if (if (validateInt(price))
174+ then true
175+ else validateInt(maxUse))
176+ then true
177+ else validateInt(maxAvailable))
178+ then throw("Positive amount only")
179+ else if (!(validateString(description, 1000)))
180+ then throw("1000 Char. max description")
181+ else ""
182+ }
183+
184+
185+func idCallerDate (i) = if (!(dappRunning))
186+ then throw(maintenanceMSG)
187+ else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
188+
189+
190+func isPayment (i) = if ((size(i.payments) == 0))
191+ then throw("No payment attached")
192+ else {
193+ let payment = value(i.payments[0])
194+ let amount = value(payment.amount)
195+ $Tuple2(payment, amount)
196+ }
197+
198+
199+func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
200+ let $t066536689 = isPayment(i)
201+ let payment = $t066536689._1
202+ let amount = $t066536689._2
203+ if (!(isDefined(payment.assetId)))
204+ then throw("Wrong asset attached")
205+ else {
206+ let assetId = if (if ((size(priceAssetId) > 0))
207+ then (toBase58String(value(payment.assetId)) == priceAssetId)
208+ else false)
209+ then payment.assetId
210+ else throw("Wrong asset attached")
211+ if ((artworkPrice != amount))
212+ then throw("Payment amount don't match")
213+ else $Tuple2(amount, assetId)
214+ }
215+ }
216+
217+
218+func isEventOwner (eventId,caller) = {
219+ let eventOwner = getEventOwnerByEventId(eventId)
220+ if ((eventOwner == ""))
221+ then throw("Event not found")
222+ else (eventOwner == caller)
223+ }
224+
225+
226+func ticketExist (caller,eventId,ticketId) = {
227+ let ticket = getStringByKey(keyTicketName(caller, eventId, ticketId))
228+ (size(ticket) != 0)
229+ }
230+
231+
232+func eventIsCanceled (issuer,eventId) = getBooleanByKey(keyEventCanceled(issuer, eventId))
233+
234+
235+@Callable(invoke)
236+func setConf (key,val) = {
237+ let caller = toString(invoke.caller)
238+ if (containsElement([chris, toString(this)], caller))
239+ then if (contains(key, "conf_"))
240+ then [StringEntry(key, val)]
241+ else throw("Entries starting with conf_ only")
242+ else throw("You are not allowed to change this")
243+ }
244+
245+
246+
247+@Callable(i)
248+func addEvent (name,description,tags,cidDisplay,crawler,type,date) = {
249+ let $t080328081 = idCallerDate(i)
250+ let eventId = $t080328081._1
251+ let caller = $t080328081._2
252+ let addedDate = $t080328081._3
253+ let checkUser = validateUser(caller)
254+ if ((checkUser != ""))
255+ then throw(checkUser)
256+ else {
257+ let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
258+ if ((validateEvent != ""))
259+ then throw("Something went wrong!")
260+ else [IntegerEntry(keyEventAddedDate(caller, eventId), addedDate), StringEntry(keyEventDate(caller, eventId), date), StringEntry(keyEventName(caller, eventId), name), StringEntry(keyEventDesc(caller, eventId), description), StringEntry(keyEventDisplayCid(caller, eventId), cidDisplay), StringEntry(keyEventTags(caller, eventId), tags), StringEntry(keyEventCrawler(caller, eventId), crawler), IntegerEntry(keyEventTotalTicketsIssued(caller, eventId), 0), BooleanEntry(keyEventCanceled(caller, eventId), false), StringEntry(keyEventOwnerByEventId(eventId), caller)]
261+ }
262+ }
263+
264+
265+
266+@Callable(i)
267+func editEvent (eventId,name,description,tags,cidDisplay,crawler,type,date) = if (!(dappRunning))
268+ then throw(maintenanceMSG)
269+ else {
270+ let caller = toBase58String(i.caller.bytes)
271+ let checkUser = validateUser(caller)
272+ if ((checkUser != ""))
273+ then throw(checkUser)
274+ else {
275+ let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
276+ if ((validateEvent != ""))
277+ then throw("Something went wrong!")
278+ else {
279+ let entryExist = getStringByKey(keyEventName(caller, eventId))
280+ if ((entryExist == ""))
281+ then throw("Entry not found")
282+ else {
283+ let flag = getStringByKey(keyEventFlag(caller, eventId))
284+ if ((flag == "ILLEGAL"))
285+ then throw("Cannot update ILLEGAL Event")
286+ else [StringEntry(keyEventName(caller, eventId), name), StringEntry(keyEventDate(caller, eventId), date), StringEntry(keyEventDesc(caller, eventId), description), StringEntry(keyEventTags(caller, eventId), tags), StringEntry(keyEventCrawler(caller, eventId), crawler)]
287+ }
288+ }
289+ }
290+ }
291+
292+
293+
294+@Callable(i)
295+func deleteEvent (eventId) = {
296+ let $t01032710371 = idCallerDate(i)
297+ let id = $t01032710371._1
298+ let caller = $t01032710371._2
299+ let addedDate = $t01032710371._3
300+ let checkUser = validateUser(caller)
301+ if ((checkUser != ""))
302+ then throw(checkUser)
303+ else if (!(isEventOwner(eventId, caller)))
304+ then throw("You are not the owner of this event")
305+ else {
306+ let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(caller, eventId))
307+ if ((eventTotalNFT != 0))
308+ then throw("Cannot delete event with already sold tickets")
309+ else {
310+ let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId))
311+ if ((totalTicketTypeForEvent > 0))
312+ then throw("Delete all tickets first")
313+ else [DeleteEntry(keyEventAddedDate(caller, eventId)), DeleteEntry(keyEventDate(caller, eventId)), DeleteEntry(keyEventName(caller, eventId)), DeleteEntry(keyEventDesc(caller, eventId)), DeleteEntry(keyEventDisplayCid(caller, eventId)), DeleteEntry(keyEventTags(caller, eventId)), DeleteEntry(keyEventCrawler(caller, eventId)), DeleteEntry(keyEventTotalTicketsIssued(caller, eventId)), DeleteEntry(keyEventCanceled(caller, eventId)), DeleteEntry(keyEventOwnerByEventId(eventId)), DeleteEntry(keyEventTotalTicketTypes(caller, eventId))]
314+ }
315+ }
316+ }
317+
318+
319+
320+@Callable(i)
321+func cancelEvent (eventId,reason) = {
322+ let $t01171211756 = idCallerDate(i)
323+ let id = $t01171211756._1
324+ let caller = $t01171211756._2
325+ let addedDate = $t01171211756._3
326+ let checkUser = validateUser(caller)
327+ if ((checkUser != ""))
328+ then throw(checkUser)
329+ else if (!(isEventOwner(eventId, caller)))
330+ then throw("You are not the owner of this event")
331+ else [BooleanEntry(keyEventCanceled(caller, eventId), true), StringEntry(keyEventCanceledReason(caller, eventId), reason)]
332+ }
333+
334+
335+
336+@Callable(i)
337+func flagEvent (eventId,addr,flag,note) = {
338+ let $t01219112224 = idCallerDate(i)
339+ let id = $t01219112224._1
340+ let caller = $t01219112224._2
341+ if (containsElement([chris, toString(this)], caller))
342+ then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
343+ then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)]
344+ else throw(("Unknow status " + flag))
345+ else throw("You are not allowed")
346+ }
347+
348+
349+
350+@Callable(i)
351+func addTicket (eventId,name,description,price,maxAvailable,MaxUse) = {
352+ let $t01272512765 = idCallerDate(i)
353+ let id = $t01272512765._1
354+ let caller = $t01272512765._2
355+ let date = $t01272512765._3
356+ let checkUser = validateUser(caller)
357+ if ((checkUser != ""))
358+ then throw(checkUser)
359+ else if (eventIsCanceled(caller, eventId))
360+ then throw("Event have been canceled")
361+ else if (!(isEventOwner(eventId, caller)))
362+ then throw("You are not the owner of this event")
363+ else {
364+ let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, MaxUse)
365+ if ((validateTicket != ""))
366+ then throw("Something went wrong!")
367+ else {
368+ let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId))
369+[StringEntry(keyTicketName(caller, eventId, id), name), IntegerEntry(keyTicketDate(caller, eventId, id), date), StringEntry(keyTicketDesc(caller, eventId, id), description), IntegerEntry(keyTicketPrice(caller, eventId, id), price), IntegerEntry(keyTicketMaxAvailable(caller, eventId, id), maxAvailable), BooleanEntry(keyTicketOnSale(caller, eventId, id), true), IntegerEntry(keyTicketMaxUse(caller, eventId, id), MaxUse), IntegerEntry(keyTicketTotalIssued(caller, eventId, id), 0), IntegerEntry(keyEventTotalTicketTypes(caller, eventId), (totalTicketTypeForEvent + 1))]
370+ }
371+ }
372+ }
373+
374+
375+
376+@Callable(i)
377+func editTicket (ticketId,eventId,name,description,price,maxAvailable,maxUse) = {
378+ let $t01410014140 = idCallerDate(i)
379+ let id = $t01410014140._1
380+ let caller = $t01410014140._2
381+ let date = $t01410014140._3
382+ let checkUser = validateUser(caller)
383+ if ((checkUser != ""))
384+ then throw(checkUser)
385+ else if (!(isEventOwner(eventId, caller)))
386+ then throw("You are not the owner of this event")
387+ else if (!(ticketExist(caller, eventId, ticketId)))
388+ then throw("Ticket not found")
389+ else {
390+ let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, maxUse)
391+ if ((validateTicket != ""))
392+ then throw("Something went wrong!")
393+ else {
394+ let ticketSold = valueOrElse(getInteger(keyTicketSold(caller, eventId, ticketId)), 0)
395+ if ((ticketSold > maxAvailable))
396+ then throw("Max tickets available cannot be lower than amount already sold")
397+ else [StringEntry(keyTicketName(caller, eventId, ticketId), name), StringEntry(keyTicketDesc(caller, eventId, ticketId), description), IntegerEntry(keyTicketPrice(caller, eventId, ticketId), price), IntegerEntry(keyTicketMaxAvailable(caller, eventId, ticketId), maxAvailable), IntegerEntry(keyTicketMaxUse(caller, eventId, id), maxUse)]
398+ }
399+ }
400+ }
401+
402+
403+
404+@Callable(i)
405+func pauseTicketSale (eventId,ticketId,status) = {
406+ let $t01526915309 = idCallerDate(i)
407+ let id = $t01526915309._1
408+ let caller = $t01526915309._2
409+ let date = $t01526915309._3
410+ let checkUser = validateUser(caller)
411+ if ((checkUser != ""))
412+ then throw(checkUser)
413+ else if (!(isEventOwner(eventId, caller)))
414+ then throw("You are not the owner of this event")
415+ else [BooleanEntry(keyTicketOnSale(caller, eventId, id), status)]
416+ }
417+
418+
419+
420+@Callable(i)
421+func deleteTicket (ticketId,eventId) = {
422+ let $t01568315723 = idCallerDate(i)
423+ let id = $t01568315723._1
424+ let caller = $t01568315723._2
425+ let date = $t01568315723._3
426+ let checkUser = validateUser(caller)
427+ if ((checkUser != ""))
428+ then throw(checkUser)
429+ else if (!(isEventOwner(eventId, caller)))
430+ then throw("You are not the owner of this event")
431+ else if (!(ticketExist(caller, eventId, ticketId)))
432+ then throw("Ticket not found")
433+ else {
434+ let amountSold = getIntegerByKey(keyTicketSold(caller, eventId, ticketId))
435+ if ((amountSold != 0))
436+ then throw("Cannot delete ticket that sold already")
437+ else {
438+ let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId))
439+[DeleteEntry(keyTicketName(caller, eventId, ticketId)), DeleteEntry(keyTicketDate(caller, eventId, ticketId)), DeleteEntry(keyTicketDesc(caller, eventId, ticketId)), DeleteEntry(keyTicketPrice(caller, eventId, ticketId)), DeleteEntry(keyTicketMaxAvailable(caller, eventId, ticketId)), DeleteEntry(keyTicketOnSale(caller, eventId, ticketId)), DeleteEntry(keyTicketMaxUse(caller, eventId, ticketId)), DeleteEntry(keyTicketTotalIssued(caller, eventId, ticketId)), IntegerEntry(keyEventTotalTicketTypes(caller, eventId), (totalTicketTypeForEvent - 1))]
440+ }
441+ }
442+ }
443+
444+
445+
446+@Callable(i)
447+func buyTicket (ticketId,eventId,issuer) = {
448+ let $t01694716985 = idCallerDate(i)
449+ let id = $t01694716985._1
450+ let caller = $t01694716985._2
451+ let date = $t01694716985._3
452+ let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0)
453+ if (!(isEventOwner(eventId, issuer)))
454+ then throw("Event ID and Issuer don't match")
455+ else if (!(ticketExist(issuer, eventId, ticketId)))
456+ then throw("Ticket not found")
457+ else {
458+ let eventName = getStringByKey(keyEventName(issuer, eventId))
459+ if ((eventName == ""))
460+ then throw("Art doesn't exist")
461+ else if (eventIsCanceled(issuer, eventId))
462+ then throw("Event have been canceled")
463+ else {
464+ let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId))
465+ if (!(isOnSale))
466+ then throw("Tickets not for sale")
467+ else {
468+ let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId))
469+ let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId))
470+ let priceAssetId = toBase58String(signAssetId)
471+ let $t01783117905 = validatePriceAssetId(i, priceAssetId, ticketPrice)
472+ let amount = $t01783117905._1
473+ let assetId = $t01783117905._2
474+ let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId))
475+ let amountForSign = fraction(amount, signCut, 100)
476+ let amountForOrganizer = (amount - amountForSign)
477+ if ((amountSold == maxCanSell))
478+ then throw("Art sold out")
479+ else {
480+ let newAmountSold = (amountSold + 1)
481+ let issueMeta = ((((((((((("Organizer: " + issuer) + ",
482+ EventID: ") + eventId) + ",
483+ TicketID: ") + ticketId) + ",
484+ EventName: ") + eventName) + ",
485+ Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
486+ let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
487+ let idNFT = calculateAssetId(issueNFT)
488+ let sellStatus = if ((newAmountSold == maxCanSell))
489+ then false
490+ else true
491+ let receiveNFT = i.caller
492+ let soldKey = ((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + eventId) + "_") + issuer) + "_") + ticketId)
493+ let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT))
494+ let soldData = StringEntry(soldKey, soldValue)
495+ let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(issuer, eventId))
496+ let ticketTotalNFT = getIntegerByKey(keyTicketTotalIssued(issuer, eventId, ticketId))
497+ let buyRes = [IntegerEntry(keyTicketSold(issuer, eventId, ticketId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), IntegerEntry(keyEventTotalTicketsIssued(issuer, eventId), (eventTotalNFT + 1)), IntegerEntry(keyTicketTotalIssued(issuer, eventId, ticketId), (ticketTotalNFT + 1)), StringEntry((("ST_" + toString((totalNFT + 1))) + "_assetId"), toBase58String(idNFT)), BooleanEntry(keyTicketOnSale(issuer, eventId, ticketId), sellStatus), IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId), 0), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForOrganizer, assetId), ScriptTransfer(receiveNFT, 1, idNFT), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
498+soldData :: buyRes
499+ }
500+ }
501+ }
502+ }
503+ }
504+
505+
506+
507+@Callable(i)
508+func useTicket (eventId,issuer) = {
509+ let $t02018420222 = idCallerDate(i)
510+ let id = $t02018420222._1
511+ let caller = $t02018420222._2
512+ let date = $t02018420222._3
513+ let $t02022820264 = isPayment(i)
514+ let payment = $t02022820264._1
515+ let amount = $t02022820264._2
516+ if (!(isDefined(payment.assetId)))
517+ then throw("Wrong asset attached")
518+ else {
519+ let ticketId = toBase58String(value(payment.assetId))
520+ if (!(ticketExist(issuer, eventId, ticketId)))
521+ then throw("Ticket not found")
522+ else {
523+ let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId))
524+ let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId))
525+ if ((maxUsingTime == amountUsed))
526+ then throw((("Ticket used " + toString(amountUsed)) + " times already"))
527+ else [IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId), (amountUsed + 1)), ScriptTransfer(Address(fromBase58String(caller)), 1, payment.assetId)]
528+ }
529+ }
530+ }
531+
532+
533+
534+@Callable(i)
535+func deleteEntry (entry) = {
536+ let caller = toString(i.caller)
537+ if ((caller == chris))
538+ then [DeleteEntry(entry)]
539+ else throw("no")
540+ }
541+
542+

github/deemru/w8io/026f985 
38.33 ms