tx · CwTT5M2DNw5dXzxhRdRTeguUUawjeN9ouZ4F4bjSi8x9 3MufcGsnx3oeXc6Sj8vx8ZraJn8gawJp9hX: -0.01800000 Waves 2022.11.03 14:23 [2300868] smart account 3MufcGsnx3oeXc6Sj8vx8ZraJn8gawJp9hX > SELF 0.00000000 Waves
{ "type": 13, "id": "CwTT5M2DNw5dXzxhRdRTeguUUawjeN9ouZ4F4bjSi8x9", "fee": 1800000, "feeAssetId": null, "timestamp": 1667474673875, "version": 2, "chainId": 84, "sender": "3MufcGsnx3oeXc6Sj8vx8ZraJn8gawJp9hX", "senderPublicKey": "BVjVq4g9NkzudJXAUnJnFQ3GCXbk1xVAsDzM8GYz3noU", "proofs": [ "4Qg8X92aYFjDauKssaa3hwCyHQohkxAyL7gkpD1jaFMaSKkJUEmXz1Fz791QxuiBf6niHYEfQByWF1dZ7Rub4Jqi" ], "script": "base64:BgJgCAISBAoCCAgSCAoGCAgICAgIEgkKBwgICAgICAgSAwoBCBIECgIICBIGCgQICAgIEggKBggICAEBARIJCgcICAgIAQEBEgUKAwgIBBIECgIICBIFCgMICAgSABIDCgEIMwAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZ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wYXltZW50B2Fzc2V0SWQJAKQDAQkAZAIFCmFtb3VudFVzZWQAAQkArAICCQCsAgIJAKwCAgkArAICCQCsAgIJAKwCAgUCaWQCAV8FBmNhbGxlcgIBXwkApAMBBQRkYXRlAgFfCQCkAwEJAGQCBQphbW91bnRVc2VkAAEJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFBmNhbGxlcgABCAUHcGF5bWVudAdhc3NldElkBQNuaWwBaQELZGVsZXRlRW50cnkBBWVudHJ5BAZjYWxsZXIJAKUIAQgFAWkGY2FsbGVyAwkAAAIFBmNhbGxlcgUFY2hyaXMJAMwIAgkBC0RlbGV0ZUVudHJ5AQUFZW50cnkFA25pbAkAAgECAm5vAOG3UAk=", "height": 2300868, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none 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 keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_onSale_" + eventId) + "_") + caller) + "_") + ticketId) | |
103 | + | ||
104 | + | ||
105 | + | func keyTicketAmountUsed (caller,eventId,ticketId,nftId) = ((((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId) | |
106 | + | ||
107 | + | ||
108 | + | func keyTicketHistoryUsed (caller,eventId,ticketId,nftId,usageIndex) = ((((((((("ticket_historyUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId) + "_") + usageIndex) | |
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, 300))) | |
149 | + | then throw("300 Char. max name") | |
150 | + | else if (!(validateString(description, 3000))) | |
151 | + | then throw("3000 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 $t065826618 = isPayment(i) | |
196 | + | let payment = $t065826618._1 | |
197 | + | let amount = $t065826618._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 $t079477996 = idCallerDate(i) | |
245 | + | let eventId = $t079477996._1 | |
246 | + | let caller = $t079477996._2 | |
247 | + | let addedDate = $t079477996._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 $t01021610260 = idCallerDate(i) | |
292 | + | let id = $t01021610260._1 | |
293 | + | let caller = $t01021610260._2 | |
294 | + | let addedDate = $t01021610260._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 $t01160111645 = idCallerDate(i) | |
318 | + | let id = $t01160111645._1 | |
319 | + | let caller = $t01160111645._2 | |
320 | + | let addedDate = $t01160111645._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 $t01208012113 = idCallerDate(i) | |
334 | + | let id = $t01208012113._1 | |
335 | + | let caller = $t01208012113._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 $t01261412654 = idCallerDate(i) | |
348 | + | let id = $t01261412654._1 | |
349 | + | let caller = $t01261412654._2 | |
350 | + | let date = $t01261412654._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 $t01416614206 = idCallerDate(i) | |
374 | + | let id = $t01416614206._1 | |
375 | + | let caller = $t01416614206._2 | |
376 | + | let date = $t01416614206._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(keyTicketTotalIssued(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, ticketId), maxUse)] | |
393 | + | } | |
394 | + | } | |
395 | + | } | |
396 | + | ||
397 | + | ||
398 | + | ||
399 | + | @Callable(i) | |
400 | + | func pauseTicketSale (eventId,ticketId,status) = { | |
401 | + | let $t01535115391 = idCallerDate(i) | |
402 | + | let id = $t01535115391._1 | |
403 | + | let caller = $t01535115391._2 | |
404 | + | let date = $t01535115391._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 $t01585415894 = idCallerDate(i) | |
420 | + | let id = $t01585415894._1 | |
421 | + | let caller = $t01585415894._2 | |
422 | + | let date = $t01585415894._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(keyTicketTotalIssued(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 $t01712517163 = idCallerDate(i) | |
446 | + | let id = $t01712517163._1 | |
447 | + | let caller = $t01712517163._2 | |
448 | + | let date = $t01712517163._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(keyTicketTotalIssued(issuer, eventId, ticketId)) | |
466 | + | let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId)) | |
467 | + | let priceAssetId = toBase58String(signAssetId) | |
468 | + | let $t01801618090 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
469 | + | let amount = $t01801618090._1 | |
470 | + | let assetId = $t01801618090._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)) + "_") + ticketId) + "_") + eventId) + "_") + issuer) + "_") + toBase58String(idNFT)) | |
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 = [StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_tickets_issued", (totalNFT + 1)), IntegerEntry(keyEventTotalTicketsIssued(issuer, eventId), (eventTotalNFT + 1)), IntegerEntry(keyTicketTotalIssued(issuer, eventId, ticketId), newAmountSold), StringEntry((("ST_" + toString((totalNFT + 1))) + "_assetId"), ((ticketId + "_") + toBase58String(idNFT))), BooleanEntry(keyTicketOnSale(issuer, eventId, ticketId), sellStatus), IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(idNFT)), 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 () = { | |
506 | + | let $t02025020288 = idCallerDate(i) | |
507 | + | let id = $t02025020288._1 | |
508 | + | let caller = $t02025020288._2 | |
509 | + | let date = $t02025020288._3 | |
510 | + | let $t02029420330 = isPayment(i) | |
511 | + | let payment = $t02029420330._1 | |
512 | + | let amount = $t02029420330._2 | |
513 | + | if (!(isDefined(payment.assetId))) | |
514 | + | then throw("Wrong asset attached") | |
515 | + | else { | |
516 | + | let eventData = getStringByKey(("nft_" + toBase58String(value(payment.assetId)))) | |
517 | + | if ((size(eventData) == 0)) | |
518 | + | then throw("Something went wrong") | |
519 | + | else { | |
520 | + | let eventDataArr = split(eventData, "_") | |
521 | + | let issuer = eventDataArr[6] | |
522 | + | let eventId = eventDataArr[5] | |
523 | + | let ticketId = eventDataArr[7] | |
524 | + | if (!(ticketExist(issuer, eventId, ticketId))) | |
525 | + | then throw("Ticket not found") | |
526 | + | else { | |
527 | + | let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId)))) | |
528 | + | let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId)) | |
529 | + | if ((maxUsingTime == amountUsed)) | |
530 | + | then throw((("Ticket used " + toString(amountUsed)) + " times already")) | |
531 | + | else [IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId))), (amountUsed + 1)), StringEntry(keyTicketHistoryUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId)), toString((amountUsed + 1))), ((((((id + "_") + caller) + "_") + toString(date)) + "_") + toString((amountUsed + 1)))), ScriptTransfer(Address(fromBase58String(caller)), 1, payment.assetId)] | |
532 | + | } | |
533 | + | } | |
534 | + | } | |
535 | + | } | |
536 | + | ||
537 | + | ||
538 | + | ||
539 | + | @Callable(i) | |
540 | + | func deleteEntry (entry) = { | |
541 | + | let caller = toString(i.caller) | |
542 | + | if ((caller == chris)) | |
543 | + | then [DeleteEntry(entry)] | |
544 | + | else throw("no") | |
545 | + | } | |
546 | + | ||
547 | + |
github/deemru/w8io/169f3d6 35.03 ms ◑