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