tx · DbnLvyzjUCECjSN7H8FQjGRMSqg7bqoZcWWnaxTbBMCR 3N1PhK7vobC3HzVcYu1HEysKMvJDS8u9w99: -0.01400000 Waves 2022.10.25 11:25 [2287678] smart account 3N1PhK7vobC3HzVcYu1HEysKMvJDS8u9w99 > SELF 0.00000000 Waves
{ "type": 13, "id": "DbnLvyzjUCECjSN7H8FQjGRMSqg7bqoZcWWnaxTbBMCR", "fee": 1400000, "feeAssetId": null, "timestamp": 1666686366438, "version": 2, "chainId": 84, "sender": "3N1PhK7vobC3HzVcYu1HEysKMvJDS8u9w99", "senderPublicKey": "HXPToVX68cRVQojFPvq2UHkNvBcMWbQXfTZtjim9UrfE", "proofs": [ "2ko3Pvj26LpiSCZRLLoTxSoUHkywLJr4BkM5owygXF2MzVgXU92DY2FLZVASXMoAMSRUHqFYvgebf5ic7VataGc8" ], "script": "base64:BgJICAISBAoCCAgSCQoHCAgICAgICBIKCggICAgICAgICBIGCgQICAgIEgcKBQgICAEBEggKBggICAgBARIFCgMIAQQSBQoDCAgIKgAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmwg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GaXNzdWVyBQdldmVudElkBQh0aWNrZXRJZAUNbmV3QW1vdW50U29sZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgICBG5mdF8JANgEAQUFaWRORlQFB3NvbGRLZXkJAMwIAgkBDEludGVnZXJFbnRyeQICEHRvdGFsX25mdF9pc3N1ZWQJAGQCBQh0b3RhbE5GVAABCQDMCAIJAQxCb29sZWFuRW50cnkCCQEPa2V5VGlja2V0T25TYWxlAwUGaXNzdWVyBQdldmVudElkBQh0aWNrZXRJZAUKc2VsbFN0YXR1cwkAzAgCBQhpc3N1ZU5GVAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUGaXNzdWVyBRJhbW91bnRGb3JPcmdhbml6ZXIFB2Fzc2V0SWQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUKcmVjZWl2ZU5GVAABBQVpZE5GVAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQULZmVlUmVjZWl2ZXIFDWFtb3VudEZvclNpZ24FB2Fzc2V0SWQFA25pbAkAzAgCBQhzb2xkRGF0YQUGYnV5UmVzAMxtKBo=", "height": 2287678, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 26ARptrS4i5TD8twt1BvpgX9JeNjbqzexfzupwPwuRLN Next: none Diff:
Old | New | Differences | |
---|---|---|---|
119 | 119 | func validateType (type) = containsElement(["online", "offline", "both"], type) | |
120 | 120 | ||
121 | 121 | ||
122 | - | func validateEventData (caller,cidDisplay,name,description,tags,type) = { | |
122 | + | func validateEventData (caller,cidDisplay,name,description,tags,type,date) = { | |
123 | 123 | let checkUser = validateUser(caller) | |
124 | 124 | if ((checkUser != "")) | |
125 | 125 | then throw(checkUser) | |
133 | 133 | then throw("Wrong event type") | |
134 | 134 | else if (!(validateString(description, 1000))) | |
135 | 135 | then throw("1000 Char. max description") | |
136 | - | else if ((size(split(tags, ",")) > 5)) | |
137 | - | then throw("5 tags max.") | |
138 | - | else "" | |
136 | + | else if (!(validateString(date, 1000))) | |
137 | + | then throw("1000 Char. max date") | |
138 | + | else if ((size(split(tags, ",")) > 5)) | |
139 | + | then throw("5 tags max.") | |
140 | + | else "" | |
139 | 141 | } | |
140 | 142 | ||
141 | 143 | ||
172 | 174 | ||
173 | 175 | ||
174 | 176 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
175 | - | let $ | |
176 | - | let payment = $ | |
177 | - | let amount = $ | |
177 | + | let $t057785814 = isPayment(i) | |
178 | + | let payment = $t057785814._1 | |
179 | + | let amount = $t057785814._2 | |
178 | 180 | if (!(isDefined(payment.assetId))) | |
179 | 181 | then throw("Wrong asset attached") | |
180 | 182 | else { | |
203 | 205 | ||
204 | 206 | ||
205 | 207 | @Callable(i) | |
206 | - | func addEvent (name,description,tags,cidDisplay,crawler,type) = { | |
207 | - | let $ | |
208 | - | let eventId = $ | |
209 | - | let caller = $ | |
210 | - | let | |
208 | + | func addEvent (name,description,date,tags,cidDisplay,crawler,type) = { | |
209 | + | let $t066866735 = idCallerDate(i) | |
210 | + | let eventId = $t066866735._1 | |
211 | + | let caller = $t066866735._2 | |
212 | + | let addedDate = $t066866735._3 | |
211 | 213 | let checkUser = validateUser(caller) | |
212 | 214 | if ((checkUser != "")) | |
213 | 215 | then throw(checkUser) | |
214 | 216 | else { | |
215 | - | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type) | |
217 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date) | |
216 | 218 | if ((validateEvent != "")) | |
217 | 219 | then throw("Something went wrong!") | |
218 | - | else [IntegerEntry(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), StringEntry(keyEventOwnerByEventId(eventId), caller)] | |
220 | + | 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), StringEntry(keyEventOwnerByEventId(eventId), caller)] | |
219 | 221 | } | |
220 | 222 | } | |
221 | 223 | ||
222 | 224 | ||
223 | 225 | ||
224 | 226 | @Callable(i) | |
225 | - | func editEvent (eventId,name,description,tags,cidDisplay,crawler,type) = if (!(dappRunning)) | |
227 | + | func editEvent (eventId,name,description,tags,cidDisplay,crawler,type,date) = if (!(dappRunning)) | |
226 | 228 | then throw(maintenanceMSG) | |
227 | 229 | else { | |
228 | 230 | let caller = toBase58String(i.caller.bytes) | |
230 | 232 | if ((checkUser != "")) | |
231 | 233 | then throw(checkUser) | |
232 | 234 | else { | |
233 | - | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type) | |
235 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date) | |
234 | 236 | if ((validateEvent != "")) | |
235 | 237 | then throw("Something went wrong!") | |
236 | 238 | else { | |
241 | 243 | let flag = getStringByKey(keyEventFlag(caller, eventId)) | |
242 | 244 | if ((flag == "ILLEGAL")) | |
243 | 245 | then throw("Cannot update ILLEGAL Event") | |
244 | - | else [StringEntry(keyEventName(caller, eventId), name), StringEntry(keyEventDesc(caller, eventId), description), StringEntry(keyEventTags(caller, eventId), tags), StringEntry(keyEventType(caller, eventId), type), StringEntry(keyEventCrawler(caller, eventId), crawler)] | |
246 | + | 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)] | |
245 | 247 | } | |
246 | 248 | } | |
247 | 249 | } | |
251 | 253 | ||
252 | 254 | @Callable(i) | |
253 | 255 | func flagEvent (eventId,addr,flag,note) = { | |
254 | - | let $ | |
255 | - | let id = $ | |
256 | - | let caller = $ | |
256 | + | let $t090059038 = idCallerDate(i) | |
257 | + | let id = $t090059038._1 | |
258 | + | let caller = $t090059038._2 | |
257 | 259 | if (containsElement([chris, toString(this)], caller)) | |
258 | 260 | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
259 | 261 | then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)] | |
265 | 267 | ||
266 | 268 | @Callable(i) | |
267 | 269 | func addTicket (eventId,name,description,price,maxAvailable) = { | |
268 | - | let $ | |
269 | - | let id = $ | |
270 | - | let caller = $ | |
271 | - | let date = $ | |
270 | + | let $t095269566 = idCallerDate(i) | |
271 | + | let id = $t095269566._1 | |
272 | + | let caller = $t095269566._2 | |
273 | + | let date = $t095269566._3 | |
272 | 274 | let checkUser = validateUser(caller) | |
273 | 275 | if ((checkUser != "")) | |
274 | 276 | then throw(checkUser) | |
291 | 293 | ||
292 | 294 | @Callable(i) | |
293 | 295 | func editTicket (ticketId,eventId,name,description,price,maxAvailable) = { | |
294 | - | let $ | |
295 | - | let id = $ | |
296 | - | let caller = $ | |
297 | - | let date = $ | |
296 | + | let $t01052210562 = idCallerDate(i) | |
297 | + | let id = $t01052210562._1 | |
298 | + | let caller = $t01052210562._2 | |
299 | + | let date = $t01052210562._3 | |
298 | 300 | let checkUser = validateUser(caller) | |
299 | 301 | if ((checkUser != "")) | |
300 | 302 | then throw(checkUser) | |
327 | 329 | ||
328 | 330 | @Callable(i) | |
329 | 331 | func pauseTicket (eventId,ticketId,status) = { | |
330 | - | let $ | |
331 | - | let id = $ | |
332 | - | let caller = $ | |
333 | - | let date = $ | |
332 | + | let $t01183511875 = idCallerDate(i) | |
333 | + | let id = $t01183511875._1 | |
334 | + | let caller = $t01183511875._2 | |
335 | + | let date = $t01183511875._3 | |
334 | 336 | let checkUser = validateUser(caller) | |
335 | 337 | if ((checkUser != "")) | |
336 | 338 | then throw(checkUser) | |
348 | 350 | ||
349 | 351 | @Callable(i) | |
350 | 352 | func buyTicket (ticketId,eventId,issuer) = { | |
351 | - | let $ | |
352 | - | let id = $ | |
353 | - | let caller = $ | |
354 | - | let date = $ | |
353 | + | let $t01235612394 = idCallerDate(i) | |
354 | + | let id = $t01235612394._1 | |
355 | + | let caller = $t01235612394._2 | |
356 | + | let date = $t01235612394._3 | |
355 | 357 | let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0) | |
356 | 358 | let eventOwner = getEventOwnerByEventId(eventId) | |
357 | 359 | if ((eventOwner == "")) | |
371 | 373 | let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId)) | |
372 | 374 | let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId)) | |
373 | 375 | let priceAssetId = toBase58String(signAssetId) | |
374 | - | let $ | |
375 | - | let amount = $ | |
376 | - | let assetId = $ | |
376 | + | let $t01331113385 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
377 | + | let amount = $t01331113385._1 | |
378 | + | let assetId = $t01331113385._2 | |
377 | 379 | let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId)) | |
378 | 380 | let amountForSign = fraction(amount, signCut, 100) | |
379 | 381 | let amountForOrganizer = (amount - amountForSign) |
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) = ("event_owner_" + eventId) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyEventAddedDate (caller,eventId) = ((("event_added_date_" + 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_display_cid_" + 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_crawler_cid_" + eventId) + "_") + caller) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyEventType (caller,eventId) = ((("event_type_" + eventId) + "_") + caller) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyTicketName (caller,eventId,ticketId) = ((((("ticket_name_" + eventId) + "_") + caller) + "_") + ticketId) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyTicketDesc (caller,eventId,ticketId) = ((((("ticket_desc_" + eventId) + "_") + caller) + "_") + ticketId) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyTicketPrice (caller,eventId,ticketId) = ((((("ticket_price_" + eventId) + "_") + caller) + "_") + ticketId) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyTicketMaxAvailable (caller,eventId,ticketId) = ((((("ticket_maxAvailable_" + eventId) + "_") + caller) + "_") + ticketId) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyTicketSold (caller,eventId,ticketId) = ((((("ticket_sold_" + eventId) + "_") + caller) + "_") + ticketId) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_sold_" + eventId) + "_") + caller) + "_") + ticketId) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func validateString (str,max) = if ((size(str) == 0)) | |
97 | 97 | then throw("Field cannot be is empty") | |
98 | 98 | else if ((size(str) > max)) | |
99 | 99 | then throw((str + " is too long")) | |
100 | 100 | else true | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func validateInt (num) = (0 > num) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getEventOwnerByEventId (eventId) = valueOrElse(getString(this, keyEventOwnerByEventId(eventId)), "") | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func validateUser (caller) = { | |
110 | 110 | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
111 | 111 | if ((userStatus == userUnregistered)) | |
112 | 112 | then "Register this account first with \"Account\" tab" | |
113 | 113 | else if ((userStatus == userSuspended)) | |
114 | 114 | then "Account suspended" | |
115 | 115 | else "" | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func validateType (type) = containsElement(["online", "offline", "both"], type) | |
120 | 120 | ||
121 | 121 | ||
122 | - | func validateEventData (caller,cidDisplay,name,description,tags,type) = { | |
122 | + | func validateEventData (caller,cidDisplay,name,description,tags,type,date) = { | |
123 | 123 | let checkUser = validateUser(caller) | |
124 | 124 | if ((checkUser != "")) | |
125 | 125 | then throw(checkUser) | |
126 | 126 | else if ((size(cidDisplay) == 0)) | |
127 | 127 | then throw("Display CID cannot be empty") | |
128 | 128 | else if (!(validateCID(cidDisplay))) | |
129 | 129 | then throw("Problem with CID") | |
130 | 130 | else if (!(validateString(name, 200))) | |
131 | 131 | then throw("100 Char. max name") | |
132 | 132 | else if (!(validateType(type))) | |
133 | 133 | then throw("Wrong event type") | |
134 | 134 | else if (!(validateString(description, 1000))) | |
135 | 135 | then throw("1000 Char. max description") | |
136 | - | else if ((size(split(tags, ",")) > 5)) | |
137 | - | then throw("5 tags max.") | |
138 | - | else "" | |
136 | + | else if (!(validateString(date, 1000))) | |
137 | + | then throw("1000 Char. max date") | |
138 | + | else if ((size(split(tags, ",")) > 5)) | |
139 | + | then throw("5 tags max.") | |
140 | + | else "" | |
139 | 141 | } | |
140 | 142 | ||
141 | 143 | ||
142 | 144 | func validateTicketData (eventId,caller,name,description,price,maxAvailable) = { | |
143 | 145 | let checkUser = validateUser(caller) | |
144 | 146 | if ((checkUser != "")) | |
145 | 147 | then throw(checkUser) | |
146 | 148 | else if (!(validateString(name, 200))) | |
147 | 149 | then throw("100 Char. max name") | |
148 | 150 | else if (!(validateString(description, 1000))) | |
149 | 151 | then throw("1000 Char. max description") | |
150 | 152 | else if (if (!(validateInt(price))) | |
151 | 153 | then true | |
152 | 154 | else !(validateInt(maxAvailable))) | |
153 | 155 | then throw("Positive amount only") | |
154 | 156 | else if (!(validateString(description, 1000))) | |
155 | 157 | then throw("1000 Char. max description") | |
156 | 158 | else "" | |
157 | 159 | } | |
158 | 160 | ||
159 | 161 | ||
160 | 162 | func idCallerDate (i) = if (!(dappRunning)) | |
161 | 163 | then throw(maintenanceMSG) | |
162 | 164 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
163 | 165 | ||
164 | 166 | ||
165 | 167 | func isPayment (i) = if ((size(i.payments) == 0)) | |
166 | 168 | then throw("No payment attached") | |
167 | 169 | else { | |
168 | 170 | let payment = value(i.payments[0]) | |
169 | 171 | let amount = value(payment.amount) | |
170 | 172 | $Tuple2(payment, amount) | |
171 | 173 | } | |
172 | 174 | ||
173 | 175 | ||
174 | 176 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
175 | - | let $ | |
176 | - | let payment = $ | |
177 | - | let amount = $ | |
177 | + | let $t057785814 = isPayment(i) | |
178 | + | let payment = $t057785814._1 | |
179 | + | let amount = $t057785814._2 | |
178 | 180 | if (!(isDefined(payment.assetId))) | |
179 | 181 | then throw("Wrong asset attached") | |
180 | 182 | else { | |
181 | 183 | let assetId = if (if ((size(priceAssetId) > 0)) | |
182 | 184 | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
183 | 185 | else false) | |
184 | 186 | then payment.assetId | |
185 | 187 | else throw("Wrong asset attached") | |
186 | 188 | if ((artworkPrice != amount)) | |
187 | 189 | then throw("Payment amount don't match") | |
188 | 190 | else $Tuple2(amount, assetId) | |
189 | 191 | } | |
190 | 192 | } | |
191 | 193 | ||
192 | 194 | ||
193 | 195 | @Callable(invoke) | |
194 | 196 | func setConf (key,val) = { | |
195 | 197 | let caller = toString(invoke.caller) | |
196 | 198 | if (containsElement([chris, toString(this)], caller)) | |
197 | 199 | then if (contains(key, "conf_")) | |
198 | 200 | then [StringEntry(key, val)] | |
199 | 201 | else throw("Entries starting with conf_ only") | |
200 | 202 | else throw("You are not allowed to change this") | |
201 | 203 | } | |
202 | 204 | ||
203 | 205 | ||
204 | 206 | ||
205 | 207 | @Callable(i) | |
206 | - | func addEvent (name,description,tags,cidDisplay,crawler,type) = { | |
207 | - | let $ | |
208 | - | let eventId = $ | |
209 | - | let caller = $ | |
210 | - | let | |
208 | + | func addEvent (name,description,date,tags,cidDisplay,crawler,type) = { | |
209 | + | let $t066866735 = idCallerDate(i) | |
210 | + | let eventId = $t066866735._1 | |
211 | + | let caller = $t066866735._2 | |
212 | + | let addedDate = $t066866735._3 | |
211 | 213 | let checkUser = validateUser(caller) | |
212 | 214 | if ((checkUser != "")) | |
213 | 215 | then throw(checkUser) | |
214 | 216 | else { | |
215 | - | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type) | |
217 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date) | |
216 | 218 | if ((validateEvent != "")) | |
217 | 219 | then throw("Something went wrong!") | |
218 | - | else [IntegerEntry(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), StringEntry(keyEventOwnerByEventId(eventId), caller)] | |
220 | + | 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), StringEntry(keyEventOwnerByEventId(eventId), caller)] | |
219 | 221 | } | |
220 | 222 | } | |
221 | 223 | ||
222 | 224 | ||
223 | 225 | ||
224 | 226 | @Callable(i) | |
225 | - | func editEvent (eventId,name,description,tags,cidDisplay,crawler,type) = if (!(dappRunning)) | |
227 | + | func editEvent (eventId,name,description,tags,cidDisplay,crawler,type,date) = if (!(dappRunning)) | |
226 | 228 | then throw(maintenanceMSG) | |
227 | 229 | else { | |
228 | 230 | let caller = toBase58String(i.caller.bytes) | |
229 | 231 | let checkUser = validateUser(caller) | |
230 | 232 | if ((checkUser != "")) | |
231 | 233 | then throw(checkUser) | |
232 | 234 | else { | |
233 | - | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type) | |
235 | + | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date) | |
234 | 236 | if ((validateEvent != "")) | |
235 | 237 | then throw("Something went wrong!") | |
236 | 238 | else { | |
237 | 239 | let entryExist = getStringByKey(keyEventName(caller, eventId)) | |
238 | 240 | if ((entryExist == "")) | |
239 | 241 | then throw("Entry not found") | |
240 | 242 | else { | |
241 | 243 | let flag = getStringByKey(keyEventFlag(caller, eventId)) | |
242 | 244 | if ((flag == "ILLEGAL")) | |
243 | 245 | then throw("Cannot update ILLEGAL Event") | |
244 | - | else [StringEntry(keyEventName(caller, eventId), name), StringEntry(keyEventDesc(caller, eventId), description), StringEntry(keyEventTags(caller, eventId), tags), StringEntry(keyEventType(caller, eventId), type), StringEntry(keyEventCrawler(caller, eventId), crawler)] | |
246 | + | 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)] | |
245 | 247 | } | |
246 | 248 | } | |
247 | 249 | } | |
248 | 250 | } | |
249 | 251 | ||
250 | 252 | ||
251 | 253 | ||
252 | 254 | @Callable(i) | |
253 | 255 | func flagEvent (eventId,addr,flag,note) = { | |
254 | - | let $ | |
255 | - | let id = $ | |
256 | - | let caller = $ | |
256 | + | let $t090059038 = idCallerDate(i) | |
257 | + | let id = $t090059038._1 | |
258 | + | let caller = $t090059038._2 | |
257 | 259 | if (containsElement([chris, toString(this)], caller)) | |
258 | 260 | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
259 | 261 | then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)] | |
260 | 262 | else throw(("Unknow status " + flag)) | |
261 | 263 | else throw("You are not allowed") | |
262 | 264 | } | |
263 | 265 | ||
264 | 266 | ||
265 | 267 | ||
266 | 268 | @Callable(i) | |
267 | 269 | func addTicket (eventId,name,description,price,maxAvailable) = { | |
268 | - | let $ | |
269 | - | let id = $ | |
270 | - | let caller = $ | |
271 | - | let date = $ | |
270 | + | let $t095269566 = idCallerDate(i) | |
271 | + | let id = $t095269566._1 | |
272 | + | let caller = $t095269566._2 | |
273 | + | let date = $t095269566._3 | |
272 | 274 | let checkUser = validateUser(caller) | |
273 | 275 | if ((checkUser != "")) | |
274 | 276 | then throw(checkUser) | |
275 | 277 | else { | |
276 | 278 | let isEventOwner = getEventOwnerByEventId(eventId) | |
277 | 279 | if ((isEventOwner == "")) | |
278 | 280 | then throw("Event not found") | |
279 | 281 | else if ((isEventOwner != caller)) | |
280 | 282 | then throw("You are not the owner of this event") | |
281 | 283 | else { | |
282 | 284 | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable) | |
283 | 285 | if ((validateTicket != "")) | |
284 | 286 | then throw("Something went wrong!") | |
285 | 287 | else [StringEntry(keyTicketName(caller, eventId, id), name), StringEntry(keyTicketDesc(caller, eventId, id), description), IntegerEntry(keyTicketPrice(caller, eventId, id), price), IntegerEntry(keyTicketMaxAvailable(caller, eventId, id), maxAvailable), BooleanEntry(keyTicketOnSale(caller, eventId, id), true)] | |
286 | 288 | } | |
287 | 289 | } | |
288 | 290 | } | |
289 | 291 | ||
290 | 292 | ||
291 | 293 | ||
292 | 294 | @Callable(i) | |
293 | 295 | func editTicket (ticketId,eventId,name,description,price,maxAvailable) = { | |
294 | - | let $ | |
295 | - | let id = $ | |
296 | - | let caller = $ | |
297 | - | let date = $ | |
296 | + | let $t01052210562 = idCallerDate(i) | |
297 | + | let id = $t01052210562._1 | |
298 | + | let caller = $t01052210562._2 | |
299 | + | let date = $t01052210562._3 | |
298 | 300 | let checkUser = validateUser(caller) | |
299 | 301 | if ((checkUser != "")) | |
300 | 302 | then throw(checkUser) | |
301 | 303 | else { | |
302 | 304 | let isEventOwner = getEventOwnerByEventId(eventId) | |
303 | 305 | if ((isEventOwner == "")) | |
304 | 306 | then throw("Event not found") | |
305 | 307 | else if ((isEventOwner != caller)) | |
306 | 308 | then throw("You are not the owner of this event") | |
307 | 309 | else { | |
308 | 310 | let ticketExist = getStringByKey(keyTicketName(caller, eventId, ticketId)) | |
309 | 311 | if ((size(ticketExist) == 0)) | |
310 | 312 | then throw("Ticket not found") | |
311 | 313 | else { | |
312 | 314 | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable) | |
313 | 315 | if ((validateTicket != "")) | |
314 | 316 | then throw("Something went wrong!") | |
315 | 317 | else { | |
316 | 318 | let ticketSold = valueOrElse(getInteger(keyTicketSold(caller, eventId, ticketId)), 0) | |
317 | 319 | if ((ticketSold > maxAvailable)) | |
318 | 320 | then throw("Max tickets available cannot be lower than amount already sold") | |
319 | 321 | 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)] | |
320 | 322 | } | |
321 | 323 | } | |
322 | 324 | } | |
323 | 325 | } | |
324 | 326 | } | |
325 | 327 | ||
326 | 328 | ||
327 | 329 | ||
328 | 330 | @Callable(i) | |
329 | 331 | func pauseTicket (eventId,ticketId,status) = { | |
330 | - | let $ | |
331 | - | let id = $ | |
332 | - | let caller = $ | |
333 | - | let date = $ | |
332 | + | let $t01183511875 = idCallerDate(i) | |
333 | + | let id = $t01183511875._1 | |
334 | + | let caller = $t01183511875._2 | |
335 | + | let date = $t01183511875._3 | |
334 | 336 | let checkUser = validateUser(caller) | |
335 | 337 | if ((checkUser != "")) | |
336 | 338 | then throw(checkUser) | |
337 | 339 | else { | |
338 | 340 | let isEventOwner = getEventOwnerByEventId(eventId) | |
339 | 341 | if ((isEventOwner == "")) | |
340 | 342 | then throw("Event not found") | |
341 | 343 | else if ((isEventOwner != caller)) | |
342 | 344 | then throw("You are not the owner of this event") | |
343 | 345 | else [BooleanEntry(keyTicketOnSale(caller, eventId, id), status)] | |
344 | 346 | } | |
345 | 347 | } | |
346 | 348 | ||
347 | 349 | ||
348 | 350 | ||
349 | 351 | @Callable(i) | |
350 | 352 | func buyTicket (ticketId,eventId,issuer) = { | |
351 | - | let $ | |
352 | - | let id = $ | |
353 | - | let caller = $ | |
354 | - | let date = $ | |
353 | + | let $t01235612394 = idCallerDate(i) | |
354 | + | let id = $t01235612394._1 | |
355 | + | let caller = $t01235612394._2 | |
356 | + | let date = $t01235612394._3 | |
355 | 357 | let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0) | |
356 | 358 | let eventOwner = getEventOwnerByEventId(eventId) | |
357 | 359 | if ((eventOwner == "")) | |
358 | 360 | then throw("Event not found") | |
359 | 361 | else if ((eventOwner != issuer)) | |
360 | 362 | then throw("You are not the owner of this event") | |
361 | 363 | else { | |
362 | 364 | let ticketExist = getStringByKey(keyTicketName(issuer, eventId, ticketId)) | |
363 | 365 | if ((size(ticketExist) == 0)) | |
364 | 366 | then throw("Ticket not found") | |
365 | 367 | else { | |
366 | 368 | let eventName = getStringByKey(keyEventName(issuer, eventId)) | |
367 | 369 | if ((eventName == "")) | |
368 | 370 | then throw("Art doesn't exist") | |
369 | 371 | else { | |
370 | 372 | let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId)) | |
371 | 373 | let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId)) | |
372 | 374 | let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId)) | |
373 | 375 | let priceAssetId = toBase58String(signAssetId) | |
374 | - | let $ | |
375 | - | let amount = $ | |
376 | - | let assetId = $ | |
376 | + | let $t01331113385 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
377 | + | let amount = $t01331113385._1 | |
378 | + | let assetId = $t01331113385._2 | |
377 | 379 | let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId)) | |
378 | 380 | let amountForSign = fraction(amount, signCut, 100) | |
379 | 381 | let amountForOrganizer = (amount - amountForSign) | |
380 | 382 | if ((amountSold == maxCanSell)) | |
381 | 383 | then throw("Art sold out") | |
382 | 384 | else { | |
383 | 385 | let newAmountSold = (amountSold + 1) | |
384 | 386 | let issueMeta = ((((((((((("Organizer: " + issuer) + ", | |
385 | 387 | EventID: ") + eventId) + ", | |
386 | 388 | TicketID: ") + ticketId) + ", | |
387 | 389 | EventName: ") + eventName) + ", | |
388 | 390 | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
389 | 391 | let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
390 | 392 | let idNFT = calculateAssetId(issueNFT) | |
391 | 393 | let sellStatus = if (if ((newAmountSold == maxCanSell)) | |
392 | 394 | then true | |
393 | 395 | else !(isOnSale)) | |
394 | 396 | then false | |
395 | 397 | else true | |
396 | 398 | let receiveNFT = i.caller | |
397 | 399 | let soldKey = ((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + eventId) + "_") + issuer) + "_") + ticketId) | |
398 | 400 | let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT)) | |
399 | 401 | let soldData = StringEntry(soldKey, soldValue) | |
400 | 402 | let buyRes = [IntegerEntry(keyTicketSold(issuer, eventId, ticketId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyTicketOnSale(issuer, eventId, ticketId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForOrganizer, assetId), ScriptTransfer(receiveNFT, 1, idNFT), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)] | |
401 | 403 | soldData :: buyRes | |
402 | 404 | } | |
403 | 405 | } | |
404 | 406 | } | |
405 | 407 | } | |
406 | 408 | } | |
407 | 409 | ||
408 | 410 |
github/deemru/w8io/026f985 84.50 ms ◑