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