tx · 2zdvycWQd3mC5j7QTTSbJ9m9RXmyj3upDjbg8DBsJ44k 3N1rgNAEfetRH87WQqJan6zSy7Wp1byercW: -0.01800000 Waves 2022.10.26 08:02 [2288936] smart account 3N1rgNAEfetRH87WQqJan6zSy7Wp1byercW > SELF 0.00000000 Waves
{ "type": 13, "id": "2zdvycWQd3mC5j7QTTSbJ9m9RXmyj3upDjbg8DBsJ44k", "fee": 1800000, "feeAssetId": null, "timestamp": 1666760543465, "version": 2, "chainId": 84, "sender": "3N1rgNAEfetRH87WQqJan6zSy7Wp1byercW", "senderPublicKey": "4dLVvLszUGcr1uHnDX72QuZxqaZTntQWRbbhn8YQDgA4", "proofs": [ "XT2BR38CLRScQn3G7nHodRVa6RKFnxjofmwCegP2Kp8USXuKPF7hWcTtUo898oe5GgomA7xvvGDSu1TTaEnmTSa" ], "script": "base64:BgJmCAISBAoCCAgSCQoHCAgICAgICBIKCggICAgICAgICBIDCgEIEgQKAggIEgYKBAgICAgSCAoGCAgIAQEBEgkKBwgICAgBAQESBQoDCAEEEgQKAggIEgUKAwgICBIECgIICBIDCgEINQAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZWFuQnlLZXk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lbnRyeQUDbmlsCQACAQICbm8Ar3Sm+g==", "height": 2288936, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FM3GR4mX8F3GfyxApi8R7fPotqqREwvNcJ9MR8GciHC Next: EPdFjWDJjqVsMnkfaNxDDRo7eZmfhrsD4bo7GWqCWGHx Diff:
Old | New | Differences | |
---|---|---|---|
439 | 439 | then throw("Cannot delete ticket that sold already") | |
440 | 440 | else { | |
441 | 441 | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
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)), IntegerEntry(keyEventTotalTicketTypes(caller, eventId), (totalTicketTypeForEvent - 1))] | |
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 | } | |
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 $t01713917177 = idCallerDate(i) | |
452 | + | let id = $t01713917177._1 | |
453 | + | let caller = $t01713917177._2 | |
454 | + | let date = $t01713917177._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 $t01802318097 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
475 | + | let amount = $t01802318097._1 | |
476 | + | let assetId = $t01802318097._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 $t02037620414 = idCallerDate(i) | |
513 | + | let id = $t02037620414._1 | |
514 | + | let caller = $t02037620414._2 | |
515 | + | let date = $t02037620414._3 | |
516 | + | let $t02042020456 = isPayment(i) | |
517 | + | let payment = $t02042020456._1 | |
518 | + | let amount = $t02042020456._2 | |
519 | 519 | if (!(isDefined(payment.assetId))) | |
520 | 520 | then throw("Wrong asset attached") | |
521 | 521 | else { | |
533 | 533 | } | |
534 | 534 | ||
535 | 535 | ||
536 | + | ||
537 | + | @Callable(i) | |
538 | + | func deleteEntry (entry) = { | |
539 | + | let caller = toString(i.caller) | |
540 | + | if ((caller == chris)) | |
541 | + | then [DeleteEntry(entry)] | |
542 | + | else throw("no") | |
543 | + | } | |
544 | + | ||
545 | + |
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 | 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 | 317 | } | |
318 | 318 | } | |
319 | 319 | } | |
320 | 320 | ||
321 | 321 | ||
322 | 322 | ||
323 | 323 | @Callable(i) | |
324 | 324 | func cancelEvent (eventId,reason) = { | |
325 | 325 | let $t01190411948 = idCallerDate(i) | |
326 | 326 | let id = $t01190411948._1 | |
327 | 327 | let caller = $t01190411948._2 | |
328 | 328 | let addedDate = $t01190411948._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 | 341 | let $t01238312416 = idCallerDate(i) | |
342 | 342 | let id = $t01238312416._1 | |
343 | 343 | let caller = $t01238312416._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 | 355 | let $t01291712957 = idCallerDate(i) | |
356 | 356 | let id = $t01291712957._1 | |
357 | 357 | let caller = $t01291712957._2 | |
358 | 358 | let date = $t01291712957._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 | 381 | let $t01429214332 = idCallerDate(i) | |
382 | 382 | let id = $t01429214332._1 | |
383 | 383 | let caller = $t01429214332._2 | |
384 | 384 | let date = $t01429214332._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 | 409 | let $t01546115501 = idCallerDate(i) | |
410 | 410 | let id = $t01546115501._1 | |
411 | 411 | let caller = $t01546115501._2 | |
412 | 412 | let date = $t01546115501._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 | 425 | let $t01587515915 = idCallerDate(i) | |
426 | 426 | let id = $t01587515915._1 | |
427 | 427 | let caller = $t01587515915._2 | |
428 | 428 | let date = $t01587515915._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 | - | [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)), IntegerEntry(keyEventTotalTicketTypes(caller, eventId), (totalTicketTypeForEvent - 1))] | |
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 $t01713917177 = idCallerDate(i) | |
452 | + | let id = $t01713917177._1 | |
453 | + | let caller = $t01713917177._2 | |
454 | + | let date = $t01713917177._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 $t01802318097 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
475 | + | let amount = $t01802318097._1 | |
476 | + | let assetId = $t01802318097._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 $t02037620414 = idCallerDate(i) | |
513 | + | let id = $t02037620414._1 | |
514 | + | let caller = $t02037620414._2 | |
515 | + | let date = $t02037620414._3 | |
516 | + | let $t02042020456 = isPayment(i) | |
517 | + | let payment = $t02042020456._1 | |
518 | + | let amount = $t02042020456._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 | + | ||
537 | + | @Callable(i) | |
538 | + | func deleteEntry (entry) = { | |
539 | + | let caller = toString(i.caller) | |
540 | + | if ((caller == chris)) | |
541 | + | then [DeleteEntry(entry)] | |
542 | + | else throw("no") | |
543 | + | } | |
544 | + | ||
545 | + |
github/deemru/w8io/fabc49c 83.21 ms ◑