tx · 56oFrd4ykCTG9ZJ55yactupJzJvxB2PYFtdpZQyoRh81 3Mxb9hg3VkxWWfcEPfniqSmk3iSQXkgeCVU: -0.01800000 Waves 2022.10.27 06:53 [2290322] smart account 3Mxb9hg3VkxWWfcEPfniqSmk3iSQXkgeCVU > SELF 0.00000000 Waves
{ "type": 13, "id": "56oFrd4ykCTG9ZJ55yactupJzJvxB2PYFtdpZQyoRh81", "fee": 1800000, "feeAssetId": null, "timestamp": 1666842796806, "version": 2, "chainId": 84, "sender": "3Mxb9hg3VkxWWfcEPfniqSmk3iSQXkgeCVU", "senderPublicKey": "GZzJgGQU6QzA6LPQF8TWUqoDV2FS9ecA4BWmBusebnut", "proofs": [ "5n59rFvH7XsPWi5H8k2MeDLdT6EZ4vpmYAoSbKnZLpBYiD6QKgTYDeS55PspfowhbtRTERh9unHzNupuS8K5nE2x" ], "script": "base64:BgJkCAISBAoCCAgSCAoGCAgICAgIEgkKBwgICAgICAgSAwoBCBIECgIICBIGCgQICAgIEggKBggICAEBARIJCgcICAgIAQEBEgUKAwgIBBIECgIICBIFCgMICAgSBAoCCAgSAwoBCDMAB1ZFUlNJT04CBTEuMC4wAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAAh1c2VyRGFwcAkBBXZhbHVlAQkApggBCQEOZ2V0U3RyaW5nQnlLZXkBAg9jb25mX3VzZXJzX2RhcHAAC2ZlZVJlY2VpdmVyCQEOZ2V0U3RyaW5nQnlLZXkBAhFjb25mX2ZlZV9yZWNlaXZlcgALc2lnbkFzc2V0SWQJANkEAQkBDmdldFN0cmluZ0J5S2V5AQIYY29uZl9hY2NlcHRlZF9hc3NldF9TSUdOAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAQ9nZXRJbnRlZ2VyQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBQNrZXkAAAEPZ2V0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ja2V0IG5vdCBmb3VuZAQKYW1vdW50VXNlZAkBD2dldEludGVnZXJCeUtleQEJARNrZXlUaWNrZXRBbW91bnRVc2VkAwUGaXNzdWVyBQdldmVudElkBQh0aWNrZXRJZAQMbWF4VXNpbmdUaW1lCQEPZ2V0SW50ZWdlckJ5S2V5AQkBD2tleVRpY2tldE1heFVzZQMFBmlzc3VlcgUHZXZlbnRJZAUIdGlja2V0SWQDCQAAAgUMbWF4VXNpbmdUaW1lBQphbW91bnRVc2VkCQACAQkArAICCQCsAgICDFRpY2tldCB1c2VkIAkApAMBBQphbW91bnRVc2VkAg4gdGltZXMgYWxyZWFkeQkAzAgCCQEMSW50ZWdlckVudHJ5AgkBE2tleVRpY2tldEFtb3VudFVzZWQDBQZpc3N1ZXIFB2V2ZW50SWQFCHRpY2tldElkCQBkAgUKYW1vdW50VXNlZAABCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBBQZjYWxsZXIAAQgFB3BheW1lbnQHYXNzZXRJZAUDbmlsAWkBC2RlbGV0ZUVudHJ5AQVlbnRyeQQGY2FsbGVyCQClCAEIBQFpBmNhbGxlcgMJAAACBQZjYWxsZXIFBWNocmlzCQDMCAIJAQtEZWxldGVFbnRyeQEFBWVudHJ5BQNuaWwJAAIBAgJubwCV8iw9", "height": 2290322, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: CFsLPcPJSd1rxtx6zvLz5TYCsvW4d2Z4rxKDkmrZm5kT Full:
Old | New | Differences | |
---|---|---|---|
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 validateEventData (caller,cidDisplay,name,description,tags,date) = { | |
141 | + | let checkUser = validateUser(caller) | |
142 | + | if ((checkUser != "")) | |
143 | + | then throw(checkUser) | |
144 | + | else if ((size(cidDisplay) == 0)) | |
145 | + | then throw("Display CID cannot be empty") | |
146 | + | else if (!(validateCID(cidDisplay))) | |
147 | + | then throw("Problem with CID") | |
148 | + | else if (!(validateString(name, 200))) | |
149 | + | then throw("100 Char. max name") | |
150 | + | else if (!(validateString(description, 1000))) | |
151 | + | then throw("1000 Char. max description") | |
152 | + | else if (!(validateString(date, 1000))) | |
153 | + | then throw("1000 Char. max date") | |
154 | + | else if ((size(split(tags, ",")) > 5)) | |
155 | + | then throw("5 tags max.") | |
156 | + | else "" | |
157 | + | } | |
158 | + | ||
159 | + | ||
160 | + | func validateTicketData (eventId,caller,name,description,price,maxAvailable,maxUse) = { | |
161 | + | let checkUser = validateUser(caller) | |
162 | + | if ((checkUser != "")) | |
163 | + | then throw(checkUser) | |
164 | + | else if (!(validateString(name, 200))) | |
165 | + | then throw("100 Char. max name") | |
166 | + | else if (!(validateString(description, 1000))) | |
167 | + | then throw("1000 Char. max description") | |
168 | + | else if (if (if (validateInt(price)) | |
169 | + | then true | |
170 | + | else validateInt(maxUse)) | |
171 | + | then true | |
172 | + | else validateInt(maxAvailable)) | |
173 | + | then throw("Positive amount only") | |
174 | + | else if (!(validateString(description, 1000))) | |
175 | + | then throw("1000 Char. max description") | |
176 | + | else "" | |
177 | + | } | |
178 | + | ||
179 | + | ||
180 | + | func idCallerDate (i) = if (!(dappRunning)) | |
181 | + | then throw(maintenanceMSG) | |
182 | + | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
183 | + | ||
184 | + | ||
185 | + | func isPayment (i) = if ((size(i.payments) == 0)) | |
186 | + | then throw("No payment attached") | |
187 | + | else { | |
188 | + | let payment = value(i.payments[0]) | |
189 | + | let amount = value(payment.amount) | |
190 | + | $Tuple2(payment, amount) | |
191 | + | } | |
192 | + | ||
193 | + | ||
194 | + | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
195 | + | let $t064836519 = isPayment(i) | |
196 | + | let payment = $t064836519._1 | |
197 | + | let amount = $t064836519._2 | |
198 | + | if (!(isDefined(payment.assetId))) | |
199 | + | then throw("Wrong asset attached") | |
200 | + | else { | |
201 | + | let assetId = if (if ((size(priceAssetId) > 0)) | |
202 | + | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
203 | + | else false) | |
204 | + | then payment.assetId | |
205 | + | else throw("Wrong asset attached") | |
206 | + | if ((artworkPrice != amount)) | |
207 | + | then throw("Payment amount don't match") | |
208 | + | else $Tuple2(amount, assetId) | |
209 | + | } | |
210 | + | } | |
211 | + | ||
212 | + | ||
213 | + | func isEventOwner (eventId,caller) = { | |
214 | + | let eventOwner = getEventOwnerByEventId(eventId) | |
215 | + | if ((eventOwner == "")) | |
216 | + | then throw("Event not found") | |
217 | + | else (eventOwner == caller) | |
218 | + | } | |
219 | + | ||
220 | + | ||
221 | + | func ticketExist (caller,eventId,ticketId) = { | |
222 | + | let ticket = getStringByKey(keyTicketName(caller, eventId, ticketId)) | |
223 | + | (size(ticket) != 0) | |
224 | + | } | |
225 | + | ||
226 | + | ||
227 | + | func eventIsCanceled (issuer,eventId) = getBooleanByKey(keyEventCanceled(issuer, eventId)) | |
228 | + | ||
229 | + | ||
230 | + | @Callable(invoke) | |
231 | + | func setConf (key,val) = { | |
232 | + | let caller = toString(invoke.caller) | |
233 | + | if (containsElement([chris, toString(this)], caller)) | |
234 | + | then if (contains(key, "conf_")) | |
235 | + | then [StringEntry(key, val)] | |
236 | + | else throw("Entries starting with conf_ only") | |
237 | + | else throw("You are not allowed to change this") | |
238 | + | } | |
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | @Callable(i) | |
243 | + | func addEvent (name,description,tags,cidDisplay,crawler,date) = { | |
244 | + | let $t078487897 = idCallerDate(i) | |
245 | + | let eventId = $t078487897._1 | |
246 | + | let caller = $t078487897._2 | |
247 | + | let addedDate = $t078487897._3 | |
248 | + | let checkUser = validateUser(caller) | |
249 | + | if ((checkUser != "")) | |
250 | + | then throw(checkUser) | |
251 | + | else { | |
252 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date) | |
253 | + | if ((validateEvent != "")) | |
254 | + | then throw("Something went wrong!") | |
255 | + | 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)] | |
256 | + | } | |
257 | + | } | |
258 | + | ||
259 | + | ||
260 | + | ||
261 | + | @Callable(i) | |
262 | + | func editEvent (eventId,name,description,tags,cidDisplay,crawler,date) = if (!(dappRunning)) | |
263 | + | then throw(maintenanceMSG) | |
264 | + | else { | |
265 | + | let caller = toBase58String(i.caller.bytes) | |
266 | + | let checkUser = validateUser(caller) | |
267 | + | if ((checkUser != "")) | |
268 | + | then throw(checkUser) | |
269 | + | else { | |
270 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date) | |
271 | + | if ((validateEvent != "")) | |
272 | + | then throw("Something went wrong!") | |
273 | + | else { | |
274 | + | let entryExist = getStringByKey(keyEventName(caller, eventId)) | |
275 | + | if ((entryExist == "")) | |
276 | + | then throw("Entry not found") | |
277 | + | else { | |
278 | + | let flag = getStringByKey(keyEventFlag(caller, eventId)) | |
279 | + | if ((flag == "ILLEGAL")) | |
280 | + | then throw("Cannot update ILLEGAL Event") | |
281 | + | 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)] | |
282 | + | } | |
283 | + | } | |
284 | + | } | |
285 | + | } | |
286 | + | ||
287 | + | ||
288 | + | ||
289 | + | @Callable(i) | |
290 | + | func deleteEvent (eventId) = { | |
291 | + | let $t01011710161 = idCallerDate(i) | |
292 | + | let id = $t01011710161._1 | |
293 | + | let caller = $t01011710161._2 | |
294 | + | let addedDate = $t01011710161._3 | |
295 | + | let checkUser = validateUser(caller) | |
296 | + | if ((checkUser != "")) | |
297 | + | then throw(checkUser) | |
298 | + | else if (!(isEventOwner(eventId, caller))) | |
299 | + | then throw("You are not the owner of this event") | |
300 | + | else { | |
301 | + | let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(caller, eventId)) | |
302 | + | if ((eventTotalNFT != 0)) | |
303 | + | then throw("Cannot delete event with already sold tickets") | |
304 | + | else { | |
305 | + | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
306 | + | if ((totalTicketTypeForEvent > 0)) | |
307 | + | then throw("Delete all tickets first") | |
308 | + | 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))] | |
309 | + | } | |
310 | + | } | |
311 | + | } | |
312 | + | ||
313 | + | ||
314 | + | ||
315 | + | @Callable(i) | |
316 | + | func cancelEvent (eventId,reason) = { | |
317 | + | let $t01150211546 = idCallerDate(i) | |
318 | + | let id = $t01150211546._1 | |
319 | + | let caller = $t01150211546._2 | |
320 | + | let addedDate = $t01150211546._3 | |
321 | + | let checkUser = validateUser(caller) | |
322 | + | if ((checkUser != "")) | |
323 | + | then throw(checkUser) | |
324 | + | else if (!(isEventOwner(eventId, caller))) | |
325 | + | then throw("You are not the owner of this event") | |
326 | + | else [BooleanEntry(keyEventCanceled(caller, eventId), true), StringEntry(keyEventCanceledReason(caller, eventId), reason)] | |
327 | + | } | |
328 | + | ||
329 | + | ||
330 | + | ||
331 | + | @Callable(i) | |
332 | + | func flagEvent (eventId,addr,flag,note) = { | |
333 | + | let $t01198112014 = idCallerDate(i) | |
334 | + | let id = $t01198112014._1 | |
335 | + | let caller = $t01198112014._2 | |
336 | + | if (containsElement([chris, toString(this)], caller)) | |
337 | + | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
338 | + | then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)] | |
339 | + | else throw(("Unknow status " + flag)) | |
340 | + | else throw("You are not allowed") | |
341 | + | } | |
342 | + | ||
343 | + | ||
344 | + | ||
345 | + | @Callable(i) | |
346 | + | func addTicket (eventId,name,description,price,maxAvailable,MaxUse) = { | |
347 | + | let $t01251512555 = idCallerDate(i) | |
348 | + | let id = $t01251512555._1 | |
349 | + | let caller = $t01251512555._2 | |
350 | + | let date = $t01251512555._3 | |
351 | + | let checkUser = validateUser(caller) | |
352 | + | if ((checkUser != "")) | |
353 | + | then throw(checkUser) | |
354 | + | else if (eventIsCanceled(caller, eventId)) | |
355 | + | then throw("Event have been canceled") | |
356 | + | else if (!(isEventOwner(eventId, caller))) | |
357 | + | then throw("You are not the owner of this event") | |
358 | + | else { | |
359 | + | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, MaxUse) | |
360 | + | if ((validateTicket != "")) | |
361 | + | then throw("Something went wrong!") | |
362 | + | else { | |
363 | + | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
364 | + | [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))] | |
365 | + | } | |
366 | + | } | |
367 | + | } | |
368 | + | ||
369 | + | ||
370 | + | ||
371 | + | @Callable(i) | |
372 | + | func editTicket (ticketId,eventId,name,description,price,maxAvailable,maxUse) = { | |
373 | + | let $t01389013930 = idCallerDate(i) | |
374 | + | let id = $t01389013930._1 | |
375 | + | let caller = $t01389013930._2 | |
376 | + | let date = $t01389013930._3 | |
377 | + | let checkUser = validateUser(caller) | |
378 | + | if ((checkUser != "")) | |
379 | + | then throw(checkUser) | |
380 | + | else if (!(isEventOwner(eventId, caller))) | |
381 | + | then throw("You are not the owner of this event") | |
382 | + | else if (!(ticketExist(caller, eventId, ticketId))) | |
383 | + | then throw("Ticket not found") | |
384 | + | else { | |
385 | + | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, maxUse) | |
386 | + | if ((validateTicket != "")) | |
387 | + | then throw("Something went wrong!") | |
388 | + | else { | |
389 | + | let ticketSold = valueOrElse(getInteger(keyTicketSold(caller, eventId, ticketId)), 0) | |
390 | + | if ((ticketSold > maxAvailable)) | |
391 | + | then throw("Max tickets available cannot be lower than amount already sold") | |
392 | + | 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)] | |
393 | + | } | |
394 | + | } | |
395 | + | } | |
396 | + | ||
397 | + | ||
398 | + | ||
399 | + | @Callable(i) | |
400 | + | func pauseTicketSale (eventId,ticketId,status) = { | |
401 | + | let $t01506215102 = idCallerDate(i) | |
402 | + | let id = $t01506215102._1 | |
403 | + | let caller = $t01506215102._2 | |
404 | + | let date = $t01506215102._3 | |
405 | + | let checkUser = validateUser(caller) | |
406 | + | if ((checkUser != "")) | |
407 | + | then throw(checkUser) | |
408 | + | else if (!(isEventOwner(eventId, caller))) | |
409 | + | then throw("You are not the owner of this event") | |
410 | + | else if (!(ticketExist(caller, eventId, ticketId))) | |
411 | + | then throw("Ticket not found") | |
412 | + | else [BooleanEntry(keyTicketOnSale(caller, eventId, ticketId), status)] | |
413 | + | } | |
414 | + | ||
415 | + | ||
416 | + | ||
417 | + | @Callable(i) | |
418 | + | func deleteTicket (ticketId,eventId) = { | |
419 | + | let $t01556515605 = idCallerDate(i) | |
420 | + | let id = $t01556515605._1 | |
421 | + | let caller = $t01556515605._2 | |
422 | + | let date = $t01556515605._3 | |
423 | + | let checkUser = validateUser(caller) | |
424 | + | if ((checkUser != "")) | |
425 | + | then throw(checkUser) | |
426 | + | else if (!(isEventOwner(eventId, caller))) | |
427 | + | then throw("You are not the owner of this event") | |
428 | + | else if (!(ticketExist(caller, eventId, ticketId))) | |
429 | + | then throw("Ticket not found") | |
430 | + | else { | |
431 | + | let amountSold = getIntegerByKey(keyTicketSold(caller, eventId, ticketId)) | |
432 | + | if ((amountSold != 0)) | |
433 | + | then throw("Cannot delete ticket that sold already") | |
434 | + | else { | |
435 | + | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
436 | + | [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))] | |
437 | + | } | |
438 | + | } | |
439 | + | } | |
440 | + | ||
441 | + | ||
442 | + | ||
443 | + | @Callable(i) | |
444 | + | func buyTicket (ticketId,eventId,issuer) = { | |
445 | + | let $t01682916867 = idCallerDate(i) | |
446 | + | let id = $t01682916867._1 | |
447 | + | let caller = $t01682916867._2 | |
448 | + | let date = $t01682916867._3 | |
449 | + | let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0) | |
450 | + | if (!(isEventOwner(eventId, issuer))) | |
451 | + | then throw("Event ID and Issuer don't match") | |
452 | + | else if (!(ticketExist(issuer, eventId, ticketId))) | |
453 | + | then throw("Ticket not found") | |
454 | + | else { | |
455 | + | let eventName = getStringByKey(keyEventName(issuer, eventId)) | |
456 | + | if ((eventName == "")) | |
457 | + | then throw("Art doesn't exist") | |
458 | + | else if (eventIsCanceled(issuer, eventId)) | |
459 | + | then throw("Event have been canceled") | |
460 | + | else { | |
461 | + | let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId)) | |
462 | + | if (!(isOnSale)) | |
463 | + | then throw("Tickets not for sale") | |
464 | + | else { | |
465 | + | let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId)) | |
466 | + | let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId)) | |
467 | + | let priceAssetId = toBase58String(signAssetId) | |
468 | + | let $t01771317787 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
469 | + | let amount = $t01771317787._1 | |
470 | + | let assetId = $t01771317787._2 | |
471 | + | let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId)) | |
472 | + | let amountForSign = fraction(amount, signCut, 100) | |
473 | + | let amountForOrganizer = (amount - amountForSign) | |
474 | + | if ((amountSold == maxCanSell)) | |
475 | + | then throw("Art sold out") | |
476 | + | else { | |
477 | + | let newAmountSold = (amountSold + 1) | |
478 | + | let issueMeta = ((((((((((("Organizer: " + issuer) + ", | |
479 | + | EventID: ") + eventId) + ", | |
480 | + | TicketID: ") + ticketId) + ", | |
481 | + | EventName: ") + eventName) + ", | |
482 | + | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
483 | + | let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
484 | + | let idNFT = calculateAssetId(issueNFT) | |
485 | + | let sellStatus = if ((newAmountSold == maxCanSell)) | |
486 | + | then false | |
487 | + | else true | |
488 | + | let receiveNFT = i.caller | |
489 | + | let soldKey = ((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + eventId) + "_") + issuer) + "_") + ticketId) | |
490 | + | let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT)) | |
491 | + | let soldData = StringEntry(soldKey, soldValue) | |
492 | + | let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(issuer, eventId)) | |
493 | + | let ticketTotalNFT = getIntegerByKey(keyTicketTotalIssued(issuer, eventId, ticketId)) | |
494 | + | let buyRes = [IntegerEntry(keyTicketSold(issuer, eventId, ticketId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_tickets_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)] | |
495 | + | soldData :: buyRes | |
496 | + | } | |
497 | + | } | |
498 | + | } | |
499 | + | } | |
500 | + | } | |
501 | + | ||
502 | + | ||
503 | + | ||
504 | + | @Callable(i) | |
505 | + | func useTicket (eventId,issuer) = { | |
506 | + | let $t02007020108 = idCallerDate(i) | |
507 | + | let id = $t02007020108._1 | |
508 | + | let caller = $t02007020108._2 | |
509 | + | let date = $t02007020108._3 | |
510 | + | let $t02011420150 = isPayment(i) | |
511 | + | let payment = $t02011420150._1 | |
512 | + | let amount = $t02011420150._2 | |
513 | + | if (!(isDefined(payment.assetId))) | |
514 | + | then throw("Wrong asset attached") | |
515 | + | else { | |
516 | + | let ticketId = toBase58String(value(payment.assetId)) | |
517 | + | if (!(ticketExist(issuer, eventId, ticketId))) | |
518 | + | then throw("Ticket not found") | |
519 | + | else { | |
520 | + | let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId)) | |
521 | + | let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId)) | |
522 | + | if ((maxUsingTime == amountUsed)) | |
523 | + | then throw((("Ticket used " + toString(amountUsed)) + " times already")) | |
524 | + | else [IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId), (amountUsed + 1)), ScriptTransfer(Address(fromBase58String(caller)), 1, payment.assetId)] | |
525 | + | } | |
526 | + | } | |
527 | + | } | |
528 | + | ||
529 | + | ||
530 | + | ||
531 | + | @Callable(i) | |
532 | + | func deleteEntry (entry) = { | |
533 | + | let caller = toString(i.caller) | |
534 | + | if ((caller == chris)) | |
535 | + | then [DeleteEntry(entry)] | |
536 | + | else throw("no") | |
537 | + | } | |
538 | + | ||
539 | + |
github/deemru/w8io/169f3d6 36.87 ms ◑