tx · 3cVi2etBmSmMFj4SvvciXXp3VRUe62MNR9VNyQFwTXiy 3MqCvcQA6Kk6P8UuyXor7pJ2avQexj3JG4c: -0.02000000 Waves 2022.11.08 12:12 [2307972] smart account 3MqCvcQA6Kk6P8UuyXor7pJ2avQexj3JG4c > SELF 0.00000000 Waves
{ "type": 13, "id": "3cVi2etBmSmMFj4SvvciXXp3VRUe62MNR9VNyQFwTXiy", "fee": 2000000, "feeAssetId": null, "timestamp": 1667898718770, "version": 2, "chainId": 84, "sender": "3MqCvcQA6Kk6P8UuyXor7pJ2avQexj3JG4c", "senderPublicKey": "CcyAUmSuwb7ek89W18yVbqPiR3n2cf2En1CKGyRWRCfP", "proofs": [ "31ByLUq9jMKsxDtXiUNHHYTemNQJdwmVh9kWJwKygiW5twN7gLxy58nfmJcRqDnSSEK9ri9FJEjfDzPMg8T4xVHr" ], "script": "base64:BgJkCAISBAoCCAgSCAoGCAgICAgIEgkKBwgICAgICAgSAwoBCBIECgIICBIGCgQICAgIEgoKCAgICAEBAQEBEgsKCQgICAgBAQEBARIFCgMICAQSBAoCCAgSBQoDCAgIEgASAwoBCDYAB1ZFUlNJT04CBTEuMC4wAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAAh1c2VyRGFwcAkBBXZhbHVlAQkApggBCQEOZ2V0U3RyaW5nQnlLZXkBAg9jb25mX3VzZXJzX2RhcHAAC2ZlZVJlY2VpdmVyCQEOZ2V0U3RyaW5nQnlLZXkBAhFjb25mX2ZlZV9yZWNlaXZlcgALc2lnbkFzc2V0SWQJANkEAQkBDmdldFN0cmluZ0J5S2V5AQIYY29uZl9hY2NlcHRlZF9hc3NldF9TSUdOAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAQ9nZXRJbnRlZ2VyQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBQNrZXkAAAEPZ2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BAgJubwAL2cvt", "height": 2307972, "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 keyEventStartingPrice (caller,eventId) = ((("event_startingPrice_" + eventId) + "_") + caller) | |
88 | + | ||
89 | + | ||
90 | + | func keyTicketName (caller,eventId,ticketId) = ((((("ticket_name_" + eventId) + "_") + caller) + "_") + ticketId) | |
91 | + | ||
92 | + | ||
93 | + | func keyTicketDesc (caller,eventId,ticketId) = ((((("ticket_desc_" + eventId) + "_") + caller) + "_") + ticketId) | |
94 | + | ||
95 | + | ||
96 | + | func keyTicketPrice (caller,eventId,ticketId) = ((((("ticket_price_" + eventId) + "_") + caller) + "_") + ticketId) | |
97 | + | ||
98 | + | ||
99 | + | func keyTicketDate (caller,eventId,ticketId) = ((((("ticket_date_" + eventId) + "_") + caller) + "_") + ticketId) | |
100 | + | ||
101 | + | ||
102 | + | func keyTicketResellLimitation (caller,eventId,ticketId) = ((((("ticket_resellLimitation_" + eventId) + "_") + caller) + "_") + ticketId) | |
103 | + | ||
104 | + | ||
105 | + | func keyTicketMaxAvailable (caller,eventId,ticketId) = ((((("ticket_maxAvailable_" + eventId) + "_") + caller) + "_") + ticketId) | |
106 | + | ||
107 | + | ||
108 | + | func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_onSale_" + eventId) + "_") + caller) + "_") + ticketId) | |
109 | + | ||
110 | + | ||
111 | + | func keyTicketAmountUsed (caller,eventId,ticketId,nftId) = ((((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId) | |
112 | + | ||
113 | + | ||
114 | + | func keyTicketHistoryUsed (caller,eventId,ticketId,nftId,usageIndex) = ((((((((("ticket_historyUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId) + "_") + usageIndex) | |
115 | + | ||
116 | + | ||
117 | + | func keyTicketMaxUse (caller,eventId,ticketId) = ((((("ticket_maxUse_" + eventId) + "_") + caller) + "_") + ticketId) | |
118 | + | ||
119 | + | ||
120 | + | func keyTicketTotalIssued (caller,eventId,ticketId) = ((((("ticket_totalIssued_" + eventId) + "_") + caller) + "_") + ticketId) | |
121 | + | ||
122 | + | ||
123 | + | func keyTicketRoyalty (caller,eventId,ticketId) = ((((("ticket_royalties_" + eventId) + "_") + caller) + "_") + ticketId) | |
124 | + | ||
125 | + | ||
126 | + | func validateString (str,max) = if ((size(str) == 0)) | |
127 | + | then throw("Field cannot be is empty") | |
128 | + | else if ((size(str) > max)) | |
129 | + | then throw((str + " is too long")) | |
130 | + | else true | |
131 | + | ||
132 | + | ||
133 | + | func validateInt (num) = (0 > num) | |
134 | + | ||
135 | + | ||
136 | + | func getEventOwnerByEventId (eventId) = valueOrElse(getString(this, keyEventOwnerByEventId(eventId)), "") | |
137 | + | ||
138 | + | ||
139 | + | func validateUser (caller) = { | |
140 | + | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
141 | + | if ((userStatus == userUnregistered)) | |
142 | + | then "Register this account first with \"Account\" tab" | |
143 | + | else if ((userStatus == userSuspended)) | |
144 | + | then "Account suspended" | |
145 | + | else "" | |
146 | + | } | |
147 | + | ||
148 | + | ||
149 | + | func validateEventData (caller,cidDisplay,name,description,tags,date) = { | |
150 | + | let checkUser = validateUser(caller) | |
151 | + | if ((checkUser != "")) | |
152 | + | then throw(checkUser) | |
153 | + | else if ((size(cidDisplay) == 0)) | |
154 | + | then throw("Display CID cannot be empty") | |
155 | + | else if (!(validateCID(cidDisplay))) | |
156 | + | then throw("Problem with CID") | |
157 | + | else if (!(validateString(name, 300))) | |
158 | + | then throw("300 Char. max name") | |
159 | + | else if (!(validateString(description, 3000))) | |
160 | + | then throw("3000 Char. max description") | |
161 | + | else if (!(validateString(date, 1000))) | |
162 | + | then throw("1000 Char. max date") | |
163 | + | else if ((size(split(tags, ",")) > 5)) | |
164 | + | then throw("5 tags max.") | |
165 | + | else "" | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | func validateTicketData (eventId,caller,name,description,price,maxAvailable,maxUse,resellLimitation) = { | |
170 | + | let checkUser = validateUser(caller) | |
171 | + | if ((checkUser != "")) | |
172 | + | then throw(checkUser) | |
173 | + | else if (!(validateString(name, 200))) | |
174 | + | then throw("100 Char. max name") | |
175 | + | else if (!(validateString(description, 1000))) | |
176 | + | then throw("1000 Char. max description") | |
177 | + | else if (if (if (if (validateInt(price)) | |
178 | + | then true | |
179 | + | else validateInt(maxUse)) | |
180 | + | then true | |
181 | + | else validateInt(maxAvailable)) | |
182 | + | then true | |
183 | + | else validateInt(resellLimitation)) | |
184 | + | then throw("Positive amount only") | |
185 | + | else if (!(validateString(description, 1000))) | |
186 | + | then throw("1000 Char. max description") | |
187 | + | else "" | |
188 | + | } | |
189 | + | ||
190 | + | ||
191 | + | func idCallerDate (i) = if (!(dappRunning)) | |
192 | + | then throw(maintenanceMSG) | |
193 | + | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
194 | + | ||
195 | + | ||
196 | + | func isPayment (i) = if ((size(i.payments) == 0)) | |
197 | + | then throw("No payment attached") | |
198 | + | else { | |
199 | + | let payment = value(i.payments[0]) | |
200 | + | let amount = value(payment.amount) | |
201 | + | $Tuple2(payment, amount) | |
202 | + | } | |
203 | + | ||
204 | + | ||
205 | + | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
206 | + | let $t070137049 = isPayment(i) | |
207 | + | let payment = $t070137049._1 | |
208 | + | let amount = $t070137049._2 | |
209 | + | if (!(isDefined(payment.assetId))) | |
210 | + | then throw("Wrong asset attached") | |
211 | + | else { | |
212 | + | let assetId = if (if ((size(priceAssetId) > 0)) | |
213 | + | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
214 | + | else false) | |
215 | + | then payment.assetId | |
216 | + | else throw("Wrong asset attached") | |
217 | + | if ((artworkPrice != amount)) | |
218 | + | then throw("Payment amount don't match") | |
219 | + | else $Tuple2(amount, assetId) | |
220 | + | } | |
221 | + | } | |
222 | + | ||
223 | + | ||
224 | + | func isEventOwner (eventId,caller) = { | |
225 | + | let eventOwner = getEventOwnerByEventId(eventId) | |
226 | + | if ((eventOwner == "")) | |
227 | + | then throw("Event not found") | |
228 | + | else (eventOwner == caller) | |
229 | + | } | |
230 | + | ||
231 | + | ||
232 | + | func ticketExist (caller,eventId,ticketId) = { | |
233 | + | let ticket = getStringByKey(keyTicketName(caller, eventId, ticketId)) | |
234 | + | (size(ticket) != 0) | |
235 | + | } | |
236 | + | ||
237 | + | ||
238 | + | func eventIsCanceled (issuer,eventId) = getBooleanByKey(keyEventCanceled(issuer, eventId)) | |
239 | + | ||
240 | + | ||
241 | + | @Callable(invoke) | |
242 | + | func setConf (key,val) = { | |
243 | + | let caller = toString(invoke.caller) | |
244 | + | if (containsElement([chris, toString(this)], caller)) | |
245 | + | then if (contains(key, "conf_")) | |
246 | + | then [StringEntry(key, val)] | |
247 | + | else throw("Entries starting with conf_ only") | |
248 | + | else throw("You are not allowed to change this") | |
249 | + | } | |
250 | + | ||
251 | + | ||
252 | + | ||
253 | + | @Callable(i) | |
254 | + | func addEvent (name,description,tags,cidDisplay,crawler,date) = { | |
255 | + | let $t083788427 = idCallerDate(i) | |
256 | + | let eventId = $t083788427._1 | |
257 | + | let caller = $t083788427._2 | |
258 | + | let addedDate = $t083788427._3 | |
259 | + | let checkUser = validateUser(caller) | |
260 | + | if ((checkUser != "")) | |
261 | + | then throw(checkUser) | |
262 | + | else { | |
263 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date) | |
264 | + | if ((validateEvent != "")) | |
265 | + | then throw("Something went wrong!") | |
266 | + | 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)] | |
267 | + | } | |
268 | + | } | |
269 | + | ||
270 | + | ||
271 | + | ||
272 | + | @Callable(i) | |
273 | + | func editEvent (eventId,name,description,tags,cidDisplay,crawler,date) = if (!(dappRunning)) | |
274 | + | then throw(maintenanceMSG) | |
275 | + | else { | |
276 | + | let caller = toBase58String(i.caller.bytes) | |
277 | + | let checkUser = validateUser(caller) | |
278 | + | if ((checkUser != "")) | |
279 | + | then throw(checkUser) | |
280 | + | else { | |
281 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date) | |
282 | + | if ((validateEvent != "")) | |
283 | + | then throw("Something went wrong!") | |
284 | + | else { | |
285 | + | let entryExist = getStringByKey(keyEventName(caller, eventId)) | |
286 | + | if ((entryExist == "")) | |
287 | + | then throw("Entry not found") | |
288 | + | else { | |
289 | + | let flag = getStringByKey(keyEventFlag(caller, eventId)) | |
290 | + | if ((flag == "ILLEGAL")) | |
291 | + | then throw("Cannot update ILLEGAL Event") | |
292 | + | 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)] | |
293 | + | } | |
294 | + | } | |
295 | + | } | |
296 | + | } | |
297 | + | ||
298 | + | ||
299 | + | ||
300 | + | @Callable(i) | |
301 | + | func deleteEvent (eventId) = { | |
302 | + | let $t01064710691 = idCallerDate(i) | |
303 | + | let id = $t01064710691._1 | |
304 | + | let caller = $t01064710691._2 | |
305 | + | let addedDate = $t01064710691._3 | |
306 | + | let checkUser = validateUser(caller) | |
307 | + | if ((checkUser != "")) | |
308 | + | then throw(checkUser) | |
309 | + | else if (!(isEventOwner(eventId, caller))) | |
310 | + | then throw("You are not the owner of this event") | |
311 | + | else { | |
312 | + | let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(caller, eventId)) | |
313 | + | if ((eventTotalNFT != 0)) | |
314 | + | then throw("Cannot delete event with already sold tickets") | |
315 | + | else { | |
316 | + | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
317 | + | if ((totalTicketTypeForEvent > 0)) | |
318 | + | then throw("Delete all tickets first") | |
319 | + | 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))] | |
320 | + | } | |
321 | + | } | |
322 | + | } | |
323 | + | ||
324 | + | ||
325 | + | ||
326 | + | @Callable(i) | |
327 | + | func cancelEvent (eventId,reason) = { | |
328 | + | let $t01203212076 = idCallerDate(i) | |
329 | + | let id = $t01203212076._1 | |
330 | + | let caller = $t01203212076._2 | |
331 | + | let addedDate = $t01203212076._3 | |
332 | + | let checkUser = validateUser(caller) | |
333 | + | if ((checkUser != "")) | |
334 | + | then throw(checkUser) | |
335 | + | else if (!(isEventOwner(eventId, caller))) | |
336 | + | then throw("You are not the owner of this event") | |
337 | + | else [BooleanEntry(keyEventCanceled(caller, eventId), true), StringEntry(keyEventCanceledReason(caller, eventId), reason)] | |
338 | + | } | |
339 | + | ||
340 | + | ||
341 | + | ||
342 | + | @Callable(i) | |
343 | + | func flagEvent (eventId,addr,flag,note) = { | |
344 | + | let $t01251112544 = idCallerDate(i) | |
345 | + | let id = $t01251112544._1 | |
346 | + | let caller = $t01251112544._2 | |
347 | + | if (containsElement([chris, toString(this)], caller)) | |
348 | + | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
349 | + | then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)] | |
350 | + | else throw(("Unknow status " + flag)) | |
351 | + | else throw("You are not allowed") | |
352 | + | } | |
353 | + | ||
354 | + | ||
355 | + | ||
356 | + | @Callable(i) | |
357 | + | func addTicket (eventId,name,description,price,maxAvailable,MaxUse,Royalties,resellLimitation) = { | |
358 | + | let $t01308413124 = idCallerDate(i) | |
359 | + | let id = $t01308413124._1 | |
360 | + | let caller = $t01308413124._2 | |
361 | + | let date = $t01308413124._3 | |
362 | + | let checkUser = validateUser(caller) | |
363 | + | if ((checkUser != "")) | |
364 | + | then throw(checkUser) | |
365 | + | else if (eventIsCanceled(caller, eventId)) | |
366 | + | then throw("Event have been canceled") | |
367 | + | else if (!(isEventOwner(eventId, caller))) | |
368 | + | then throw("You are not the owner of this event") | |
369 | + | else { | |
370 | + | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, MaxUse, resellLimitation) | |
371 | + | if ((validateTicket != "")) | |
372 | + | then throw("Something went wrong!") | |
373 | + | else { | |
374 | + | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
375 | + | [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)), IntegerEntry(keyTicketRoyalty(caller, eventId, id), Royalties), IntegerEntry(keyTicketResellLimitation(caller, eventId, id), resellLimitation)] | |
376 | + | } | |
377 | + | } | |
378 | + | } | |
379 | + | ||
380 | + | ||
381 | + | ||
382 | + | @Callable(i) | |
383 | + | func editTicket (ticketId,eventId,name,description,price,maxAvailable,maxUse,Royalties,resellLimitation) = { | |
384 | + | let $t01484814888 = idCallerDate(i) | |
385 | + | let id = $t01484814888._1 | |
386 | + | let caller = $t01484814888._2 | |
387 | + | let date = $t01484814888._3 | |
388 | + | let checkUser = validateUser(caller) | |
389 | + | if ((checkUser != "")) | |
390 | + | then throw(checkUser) | |
391 | + | else if (!(isEventOwner(eventId, caller))) | |
392 | + | then throw("You are not the owner of this event") | |
393 | + | else if (!(ticketExist(caller, eventId, ticketId))) | |
394 | + | then throw("Ticket not found") | |
395 | + | else { | |
396 | + | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, maxUse, resellLimitation) | |
397 | + | if ((validateTicket != "")) | |
398 | + | then throw("Something went wrong!") | |
399 | + | else { | |
400 | + | let ticketSold = valueOrElse(getInteger(keyTicketTotalIssued(caller, eventId, ticketId)), 0) | |
401 | + | if ((ticketSold > maxAvailable)) | |
402 | + | then throw("Max tickets available cannot be lower than amount already sold") | |
403 | + | 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), IntegerEntry(keyTicketRoyalty(caller, eventId, ticketId), Royalties), IntegerEntry(keyTicketResellLimitation(caller, eventId, ticketId), resellLimitation)] | |
404 | + | } | |
405 | + | } | |
406 | + | } | |
407 | + | ||
408 | + | ||
409 | + | ||
410 | + | @Callable(i) | |
411 | + | func pauseTicketSale (eventId,ticketId,status) = { | |
412 | + | let $t01621916259 = idCallerDate(i) | |
413 | + | let id = $t01621916259._1 | |
414 | + | let caller = $t01621916259._2 | |
415 | + | let date = $t01621916259._3 | |
416 | + | let checkUser = validateUser(caller) | |
417 | + | if ((checkUser != "")) | |
418 | + | then throw(checkUser) | |
419 | + | else if (!(isEventOwner(eventId, caller))) | |
420 | + | then throw("You are not the owner of this event") | |
421 | + | else if (!(ticketExist(caller, eventId, ticketId))) | |
422 | + | then throw("Ticket not found") | |
423 | + | else [BooleanEntry(keyTicketOnSale(caller, eventId, ticketId), status)] | |
424 | + | } | |
425 | + | ||
426 | + | ||
427 | + | ||
428 | + | @Callable(i) | |
429 | + | func deleteTicket (ticketId,eventId) = { | |
430 | + | let $t01672216762 = idCallerDate(i) | |
431 | + | let id = $t01672216762._1 | |
432 | + | let caller = $t01672216762._2 | |
433 | + | let date = $t01672216762._3 | |
434 | + | let checkUser = validateUser(caller) | |
435 | + | if ((checkUser != "")) | |
436 | + | then throw(checkUser) | |
437 | + | else if (!(isEventOwner(eventId, caller))) | |
438 | + | then throw("You are not the owner of this event") | |
439 | + | else if (!(ticketExist(caller, eventId, ticketId))) | |
440 | + | then throw("Ticket not found") | |
441 | + | else { | |
442 | + | let amountSold = getIntegerByKey(keyTicketTotalIssued(caller, eventId, ticketId)) | |
443 | + | if ((amountSold != 0)) | |
444 | + | then throw("Cannot delete ticket that sold already") | |
445 | + | else { | |
446 | + | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
447 | + | [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)), DeleteEntry(keyTicketRoyalty(caller, eventId, ticketId)), DeleteEntry(keyTicketResellLimitation(caller, eventId, ticketId)), IntegerEntry(keyEventTotalTicketTypes(caller, eventId), (totalTicketTypeForEvent - 1))] | |
448 | + | } | |
449 | + | } | |
450 | + | } | |
451 | + | ||
452 | + | ||
453 | + | ||
454 | + | @Callable(i) | |
455 | + | func buyTicket (ticketId,eventId,issuer) = { | |
456 | + | let $t01813018168 = idCallerDate(i) | |
457 | + | let id = $t01813018168._1 | |
458 | + | let caller = $t01813018168._2 | |
459 | + | let date = $t01813018168._3 | |
460 | + | let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0) | |
461 | + | if (!(isEventOwner(eventId, issuer))) | |
462 | + | then throw("Event ID and Issuer don't match") | |
463 | + | else if (!(ticketExist(issuer, eventId, ticketId))) | |
464 | + | then throw("Ticket not found") | |
465 | + | else { | |
466 | + | let eventName = getStringByKey(keyEventName(issuer, eventId)) | |
467 | + | if ((eventName == "")) | |
468 | + | then throw("Art doesn't exist") | |
469 | + | else if (eventIsCanceled(issuer, eventId)) | |
470 | + | then throw("Event have been canceled") | |
471 | + | else { | |
472 | + | let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId)) | |
473 | + | if (!(isOnSale)) | |
474 | + | then throw("Tickets not for sale") | |
475 | + | else { | |
476 | + | let amountSold = getIntegerByKey(keyTicketTotalIssued(issuer, eventId, ticketId)) | |
477 | + | let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId)) | |
478 | + | let priceAssetId = toBase58String(signAssetId) | |
479 | + | let $t01902119095 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
480 | + | let amount = $t01902119095._1 | |
481 | + | let assetId = $t01902119095._2 | |
482 | + | let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId)) | |
483 | + | let amountForSign = fraction(amount, signCut, 100) | |
484 | + | let amountForOrganizer = (amount - amountForSign) | |
485 | + | if ((amountSold == maxCanSell)) | |
486 | + | then throw("Art sold out") | |
487 | + | else { | |
488 | + | let newAmountSold = (amountSold + 1) | |
489 | + | let issueMeta = ((((((((((("Organizer: " + issuer) + ", | |
490 | + | EventID: ") + eventId) + ", | |
491 | + | TicketID: ") + ticketId) + ", | |
492 | + | EventName: ") + eventName) + ", | |
493 | + | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
494 | + | let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
495 | + | let idNFT = calculateAssetId(issueNFT) | |
496 | + | let sellStatus = if ((newAmountSold == maxCanSell)) | |
497 | + | then false | |
498 | + | else true | |
499 | + | let receiveNFT = i.caller | |
500 | + | let soldKey = ((((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + ticketId) + "_") + eventId) + "_") + issuer) + "_") + toBase58String(idNFT)) | |
501 | + | let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT)) | |
502 | + | let soldData = StringEntry(soldKey, soldValue) | |
503 | + | let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(issuer, eventId)) | |
504 | + | let ticketTotalNFT = getIntegerByKey(keyTicketTotalIssued(issuer, eventId, ticketId)) | |
505 | + | 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)] | |
506 | + | soldData :: buyRes | |
507 | + | } | |
508 | + | } | |
509 | + | } | |
510 | + | } | |
511 | + | } | |
512 | + | ||
513 | + | ||
514 | + | ||
515 | + | @Callable(i) | |
516 | + | func useTicket () = { | |
517 | + | let $t02125521293 = idCallerDate(i) | |
518 | + | let id = $t02125521293._1 | |
519 | + | let caller = $t02125521293._2 | |
520 | + | let date = $t02125521293._3 | |
521 | + | let $t02129921335 = isPayment(i) | |
522 | + | let payment = $t02129921335._1 | |
523 | + | let amount = $t02129921335._2 | |
524 | + | if (!(isDefined(payment.assetId))) | |
525 | + | then throw("Wrong asset attached") | |
526 | + | else { | |
527 | + | let eventData = getStringByKey(("nft_" + toBase58String(value(payment.assetId)))) | |
528 | + | if ((size(eventData) == 0)) | |
529 | + | then throw("Something went wrong") | |
530 | + | else { | |
531 | + | let eventDataArr = split(eventData, "_") | |
532 | + | let issuer = eventDataArr[7] | |
533 | + | let eventId = eventDataArr[6] | |
534 | + | let ticketId = eventDataArr[5] | |
535 | + | if (!(ticketExist(issuer, eventId, ticketId))) | |
536 | + | then throw("Ticket not found") | |
537 | + | else { | |
538 | + | let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId)))) | |
539 | + | let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId)) | |
540 | + | if ((maxUsingTime == amountUsed)) | |
541 | + | then throw((("Ticket used " + toString(amountUsed)) + " times already")) | |
542 | + | else { | |
543 | + | let initUseData = getStringByKey(keyTicketHistoryUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId)), "1")) | |
544 | + | let firstUseAddr = if (if (if ((maxUsingTime > 1)) | |
545 | + | then (amountUsed >= 1) | |
546 | + | else false) | |
547 | + | then (initUseData != "") | |
548 | + | else false) | |
549 | + | then split(initUseData, "_")[1] | |
550 | + | else caller | |
551 | + | if ((firstUseAddr != caller)) | |
552 | + | then throw("You are not the initial user of this ticket. ") | |
553 | + | 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)] | |
554 | + | } | |
555 | + | } | |
556 | + | } | |
557 | + | } | |
558 | + | } | |
559 | + | ||
560 | + | ||
561 | + | ||
562 | + | @Callable(i) | |
563 | + | func deleteEntry (entry) = { | |
564 | + | let caller = toString(i.caller) | |
565 | + | if ((caller == chris)) | |
566 | + | then [DeleteEntry(entry)] | |
567 | + | else throw("no") | |
568 | + | } | |
569 | + | ||
570 | + |
github/deemru/w8io/169f3d6 43.38 ms ◑