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:BgJICAISBAoCCAgSCQoHCAgICAgICBIKCggICAgICAgICBIGCgQICAgIEgcKBQgICAEBEggKBggICAgBARIFCgMIAQQSBQoDCAgIKgAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmw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UGaXNzdWVyBQdldmVudElkBQh0aWNrZXRJZAUNbmV3QW1vdW50U29sZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgICBG5mdF8JANgEAQUFaWRORlQFB3NvbGRLZXkJAMwIAgkBDEludGVnZXJFbnRyeQICEHRvdGFsX25mdF9pc3N1ZWQJAGQCBQh0b3RhbE5GVAABCQDMCAIJAQxCb29sZWFuRW50cnkCCQEPa2V5VGlja2V0T25TYWxlAwUGaXNzdWVyBQdldmVudElkBQh0aWNrZXRJZAUKc2VsbFN0YXR1cwkAzAgCBQhpc3N1ZU5GVAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUGaXNzdWVyBRJhbW91bnRGb3JPcmdhbml6ZXIFB2Fzc2V0SWQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUKcmVjZWl2ZU5GVAABBQVpZE5GVAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQULZmVlUmVjZWl2ZXIFDWFtb3VudEZvclNpZ24FB2Fzc2V0SWQFA25pbAkAzAgCBQhzb2xkRGF0YQUGYnV5UmVzAMxtKBo=", "height": 2287678, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 26ARptrS4i5TD8twt1BvpgX9JeNjbqzexfzupwPwuRLN Next: none Diff:
OldNewDifferences
119119 func validateType (type) = containsElement(["online", "offline", "both"], type)
120120
121121
122-func validateEventData (caller,cidDisplay,name,description,tags,type) = {
122+func validateEventData (caller,cidDisplay,name,description,tags,type,date) = {
123123 let checkUser = validateUser(caller)
124124 if ((checkUser != ""))
125125 then throw(checkUser)
133133 then throw("Wrong event type")
134134 else if (!(validateString(description, 1000)))
135135 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 ""
139141 }
140142
141143
172174
173175
174176 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
175- let $t056885724 = isPayment(i)
176- let payment = $t056885724._1
177- let amount = $t056885724._2
177+ let $t057785814 = isPayment(i)
178+ let payment = $t057785814._1
179+ let amount = $t057785814._2
178180 if (!(isDefined(payment.assetId)))
179181 then throw("Wrong asset attached")
180182 else {
203205
204206
205207 @Callable(i)
206-func addEvent (name,description,tags,cidDisplay,crawler,type) = {
207- let $t065826625 = idCallerDate(i)
208- let eventId = $t065826625._1
209- let caller = $t065826625._2
210- let date = $t065826625._3
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
211213 let checkUser = validateUser(caller)
212214 if ((checkUser != ""))
213215 then throw(checkUser)
214216 else {
215- let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type)
217+ let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
216218 if ((validateEvent != ""))
217219 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)]
219221 }
220222 }
221223
222224
223225
224226 @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))
226228 then throw(maintenanceMSG)
227229 else {
228230 let caller = toBase58String(i.caller.bytes)
230232 if ((checkUser != ""))
231233 then throw(checkUser)
232234 else {
233- let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type)
235+ let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
234236 if ((validateEvent != ""))
235237 then throw("Something went wrong!")
236238 else {
241243 let flag = getStringByKey(keyEventFlag(caller, eventId))
242244 if ((flag == "ILLEGAL"))
243245 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)]
245247 }
246248 }
247249 }
251253
252254 @Callable(i)
253255 func flagEvent (eventId,addr,flag,note) = {
254- let $t087138746 = idCallerDate(i)
255- let id = $t087138746._1
256- let caller = $t087138746._2
256+ let $t090059038 = idCallerDate(i)
257+ let id = $t090059038._1
258+ let caller = $t090059038._2
257259 if (containsElement([chris, toString(this)], caller))
258260 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
259261 then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)]
265267
266268 @Callable(i)
267269 func addTicket (eventId,name,description,price,maxAvailable) = {
268- let $t092349274 = idCallerDate(i)
269- let id = $t092349274._1
270- let caller = $t092349274._2
271- let date = $t092349274._3
270+ let $t095269566 = idCallerDate(i)
271+ let id = $t095269566._1
272+ let caller = $t095269566._2
273+ let date = $t095269566._3
272274 let checkUser = validateUser(caller)
273275 if ((checkUser != ""))
274276 then throw(checkUser)
291293
292294 @Callable(i)
293295 func editTicket (ticketId,eventId,name,description,price,maxAvailable) = {
294- let $t01023010270 = idCallerDate(i)
295- let id = $t01023010270._1
296- let caller = $t01023010270._2
297- let date = $t01023010270._3
296+ let $t01052210562 = idCallerDate(i)
297+ let id = $t01052210562._1
298+ let caller = $t01052210562._2
299+ let date = $t01052210562._3
298300 let checkUser = validateUser(caller)
299301 if ((checkUser != ""))
300302 then throw(checkUser)
327329
328330 @Callable(i)
329331 func pauseTicket (eventId,ticketId,status) = {
330- let $t01154311583 = idCallerDate(i)
331- let id = $t01154311583._1
332- let caller = $t01154311583._2
333- let date = $t01154311583._3
332+ let $t01183511875 = idCallerDate(i)
333+ let id = $t01183511875._1
334+ let caller = $t01183511875._2
335+ let date = $t01183511875._3
334336 let checkUser = validateUser(caller)
335337 if ((checkUser != ""))
336338 then throw(checkUser)
348350
349351 @Callable(i)
350352 func buyTicket (ticketId,eventId,issuer) = {
351- let $t01206412102 = idCallerDate(i)
352- let id = $t01206412102._1
353- let caller = $t01206412102._2
354- let date = $t01206412102._3
353+ let $t01235612394 = idCallerDate(i)
354+ let id = $t01235612394._1
355+ let caller = $t01235612394._2
356+ let date = $t01235612394._3
355357 let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0)
356358 let eventOwner = getEventOwnerByEventId(eventId)
357359 if ((eventOwner == ""))
371373 let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId))
372374 let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId))
373375 let priceAssetId = toBase58String(signAssetId)
374- let $t01301913093 = validatePriceAssetId(i, priceAssetId, ticketPrice)
375- let amount = $t01301913093._1
376- let assetId = $t01301913093._2
376+ let $t01331113385 = validatePriceAssetId(i, priceAssetId, ticketPrice)
377+ let amount = $t01331113385._1
378+ let assetId = $t01331113385._2
377379 let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId))
378380 let amountForSign = fraction(amount, signCut, 100)
379381 let amountForOrganizer = (amount - amountForSign)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VERSION = "1.0.0"
55
66 func getStringByKey (key) = valueOrElse(getString(this, key), "")
77
88
99 let userDapp = value(addressFromString(getStringByKey("conf_users_dapp")))
1010
1111 let feeReceiver = getStringByKey("conf_fee_receiver")
1212
1313 let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN"))
1414
1515 let chris = getStringByKey("conf_admin_1")
1616
1717 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
1818
1919
2020 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
2121
2222
2323 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
2424
2525 let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
2626
2727 let userSuspended = "SUSPENDED"
2828
2929 let userUnregistered = "UNREGISTERED"
3030
3131 func validateCID (cid) = if (contains(cid, "/"))
3232 then if (if ((76 > size(cid)))
3333 then (size(split(cid, "/")[0]) == 59)
3434 else false)
3535 then (16 > size(split(cid, "/")[1]))
3636 else false
3737 else false
3838
3939
4040 let signCut = 2
4141
4242 func keyUserStatus (caller) = ("user_status_" + caller)
4343
4444
4545 func keyEventOwnerByEventId (eventId) = ("event_owner_" + eventId)
4646
4747
4848 func keyEventAddedDate (caller,eventId) = ((("event_added_date_" + eventId) + "_") + caller)
4949
5050
5151 func keyEventDate (caller,eventId) = ((("event_date_" + eventId) + "_") + caller)
5252
5353
5454 func keyEventName (caller,eventId) = ((("event_name_" + eventId) + "_") + caller)
5555
5656
5757 func keyEventDesc (caller,eventId) = ((("event_desc_" + eventId) + "_") + caller)
5858
5959
6060 func keyEventDisplayCid (caller,eventId) = ((("event_display_cid_" + eventId) + "_") + caller)
6161
6262
6363 func keyEventTags (caller,eventId) = ((("event_tags_" + eventId) + "_") + caller)
6464
6565
6666 func keyEventFlag (caller,eventId) = ((("event_flag_" + eventId) + "_") + caller)
6767
6868
6969 func keyEventNote (caller,eventId) = ((("event_note_" + eventId) + "_") + caller)
7070
7171
7272 func keyEventCrawler (caller,eventId) = ((("event_crawler_cid_" + eventId) + "_") + caller)
7373
7474
7575 func keyEventType (caller,eventId) = ((("event_type_" + eventId) + "_") + caller)
7676
7777
7878 func keyTicketName (caller,eventId,ticketId) = ((((("ticket_name_" + eventId) + "_") + caller) + "_") + ticketId)
7979
8080
8181 func keyTicketDesc (caller,eventId,ticketId) = ((((("ticket_desc_" + eventId) + "_") + caller) + "_") + ticketId)
8282
8383
8484 func keyTicketPrice (caller,eventId,ticketId) = ((((("ticket_price_" + eventId) + "_") + caller) + "_") + ticketId)
8585
8686
8787 func keyTicketMaxAvailable (caller,eventId,ticketId) = ((((("ticket_maxAvailable_" + eventId) + "_") + caller) + "_") + ticketId)
8888
8989
9090 func keyTicketSold (caller,eventId,ticketId) = ((((("ticket_sold_" + eventId) + "_") + caller) + "_") + ticketId)
9191
9292
9393 func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_sold_" + eventId) + "_") + caller) + "_") + ticketId)
9494
9595
9696 func validateString (str,max) = if ((size(str) == 0))
9797 then throw("Field cannot be is empty")
9898 else if ((size(str) > max))
9999 then throw((str + " is too long"))
100100 else true
101101
102102
103103 func validateInt (num) = (0 > num)
104104
105105
106106 func getEventOwnerByEventId (eventId) = valueOrElse(getString(this, keyEventOwnerByEventId(eventId)), "")
107107
108108
109109 func validateUser (caller) = {
110110 let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
111111 if ((userStatus == userUnregistered))
112112 then "Register this account first with \"Account\" tab"
113113 else if ((userStatus == userSuspended))
114114 then "Account suspended"
115115 else ""
116116 }
117117
118118
119119 func validateType (type) = containsElement(["online", "offline", "both"], type)
120120
121121
122-func validateEventData (caller,cidDisplay,name,description,tags,type) = {
122+func validateEventData (caller,cidDisplay,name,description,tags,type,date) = {
123123 let checkUser = validateUser(caller)
124124 if ((checkUser != ""))
125125 then throw(checkUser)
126126 else if ((size(cidDisplay) == 0))
127127 then throw("Display CID cannot be empty")
128128 else if (!(validateCID(cidDisplay)))
129129 then throw("Problem with CID")
130130 else if (!(validateString(name, 200)))
131131 then throw("100 Char. max name")
132132 else if (!(validateType(type)))
133133 then throw("Wrong event type")
134134 else if (!(validateString(description, 1000)))
135135 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 ""
139141 }
140142
141143
142144 func validateTicketData (eventId,caller,name,description,price,maxAvailable) = {
143145 let checkUser = validateUser(caller)
144146 if ((checkUser != ""))
145147 then throw(checkUser)
146148 else if (!(validateString(name, 200)))
147149 then throw("100 Char. max name")
148150 else if (!(validateString(description, 1000)))
149151 then throw("1000 Char. max description")
150152 else if (if (!(validateInt(price)))
151153 then true
152154 else !(validateInt(maxAvailable)))
153155 then throw("Positive amount only")
154156 else if (!(validateString(description, 1000)))
155157 then throw("1000 Char. max description")
156158 else ""
157159 }
158160
159161
160162 func idCallerDate (i) = if (!(dappRunning))
161163 then throw(maintenanceMSG)
162164 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
163165
164166
165167 func isPayment (i) = if ((size(i.payments) == 0))
166168 then throw("No payment attached")
167169 else {
168170 let payment = value(i.payments[0])
169171 let amount = value(payment.amount)
170172 $Tuple2(payment, amount)
171173 }
172174
173175
174176 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
175- let $t056885724 = isPayment(i)
176- let payment = $t056885724._1
177- let amount = $t056885724._2
177+ let $t057785814 = isPayment(i)
178+ let payment = $t057785814._1
179+ let amount = $t057785814._2
178180 if (!(isDefined(payment.assetId)))
179181 then throw("Wrong asset attached")
180182 else {
181183 let assetId = if (if ((size(priceAssetId) > 0))
182184 then (toBase58String(value(payment.assetId)) == priceAssetId)
183185 else false)
184186 then payment.assetId
185187 else throw("Wrong asset attached")
186188 if ((artworkPrice != amount))
187189 then throw("Payment amount don't match")
188190 else $Tuple2(amount, assetId)
189191 }
190192 }
191193
192194
193195 @Callable(invoke)
194196 func setConf (key,val) = {
195197 let caller = toString(invoke.caller)
196198 if (containsElement([chris, toString(this)], caller))
197199 then if (contains(key, "conf_"))
198200 then [StringEntry(key, val)]
199201 else throw("Entries starting with conf_ only")
200202 else throw("You are not allowed to change this")
201203 }
202204
203205
204206
205207 @Callable(i)
206-func addEvent (name,description,tags,cidDisplay,crawler,type) = {
207- let $t065826625 = idCallerDate(i)
208- let eventId = $t065826625._1
209- let caller = $t065826625._2
210- let date = $t065826625._3
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
211213 let checkUser = validateUser(caller)
212214 if ((checkUser != ""))
213215 then throw(checkUser)
214216 else {
215- let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type)
217+ let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
216218 if ((validateEvent != ""))
217219 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)]
219221 }
220222 }
221223
222224
223225
224226 @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))
226228 then throw(maintenanceMSG)
227229 else {
228230 let caller = toBase58String(i.caller.bytes)
229231 let checkUser = validateUser(caller)
230232 if ((checkUser != ""))
231233 then throw(checkUser)
232234 else {
233- let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type)
235+ let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
234236 if ((validateEvent != ""))
235237 then throw("Something went wrong!")
236238 else {
237239 let entryExist = getStringByKey(keyEventName(caller, eventId))
238240 if ((entryExist == ""))
239241 then throw("Entry not found")
240242 else {
241243 let flag = getStringByKey(keyEventFlag(caller, eventId))
242244 if ((flag == "ILLEGAL"))
243245 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)]
245247 }
246248 }
247249 }
248250 }
249251
250252
251253
252254 @Callable(i)
253255 func flagEvent (eventId,addr,flag,note) = {
254- let $t087138746 = idCallerDate(i)
255- let id = $t087138746._1
256- let caller = $t087138746._2
256+ let $t090059038 = idCallerDate(i)
257+ let id = $t090059038._1
258+ let caller = $t090059038._2
257259 if (containsElement([chris, toString(this)], caller))
258260 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
259261 then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)]
260262 else throw(("Unknow status " + flag))
261263 else throw("You are not allowed")
262264 }
263265
264266
265267
266268 @Callable(i)
267269 func addTicket (eventId,name,description,price,maxAvailable) = {
268- let $t092349274 = idCallerDate(i)
269- let id = $t092349274._1
270- let caller = $t092349274._2
271- let date = $t092349274._3
270+ let $t095269566 = idCallerDate(i)
271+ let id = $t095269566._1
272+ let caller = $t095269566._2
273+ let date = $t095269566._3
272274 let checkUser = validateUser(caller)
273275 if ((checkUser != ""))
274276 then throw(checkUser)
275277 else {
276278 let isEventOwner = getEventOwnerByEventId(eventId)
277279 if ((isEventOwner == ""))
278280 then throw("Event not found")
279281 else if ((isEventOwner != caller))
280282 then throw("You are not the owner of this event")
281283 else {
282284 let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable)
283285 if ((validateTicket != ""))
284286 then throw("Something went wrong!")
285287 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)]
286288 }
287289 }
288290 }
289291
290292
291293
292294 @Callable(i)
293295 func editTicket (ticketId,eventId,name,description,price,maxAvailable) = {
294- let $t01023010270 = idCallerDate(i)
295- let id = $t01023010270._1
296- let caller = $t01023010270._2
297- let date = $t01023010270._3
296+ let $t01052210562 = idCallerDate(i)
297+ let id = $t01052210562._1
298+ let caller = $t01052210562._2
299+ let date = $t01052210562._3
298300 let checkUser = validateUser(caller)
299301 if ((checkUser != ""))
300302 then throw(checkUser)
301303 else {
302304 let isEventOwner = getEventOwnerByEventId(eventId)
303305 if ((isEventOwner == ""))
304306 then throw("Event not found")
305307 else if ((isEventOwner != caller))
306308 then throw("You are not the owner of this event")
307309 else {
308310 let ticketExist = getStringByKey(keyTicketName(caller, eventId, ticketId))
309311 if ((size(ticketExist) == 0))
310312 then throw("Ticket not found")
311313 else {
312314 let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable)
313315 if ((validateTicket != ""))
314316 then throw("Something went wrong!")
315317 else {
316318 let ticketSold = valueOrElse(getInteger(keyTicketSold(caller, eventId, ticketId)), 0)
317319 if ((ticketSold > maxAvailable))
318320 then throw("Max tickets available cannot be lower than amount already sold")
319321 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)]
320322 }
321323 }
322324 }
323325 }
324326 }
325327
326328
327329
328330 @Callable(i)
329331 func pauseTicket (eventId,ticketId,status) = {
330- let $t01154311583 = idCallerDate(i)
331- let id = $t01154311583._1
332- let caller = $t01154311583._2
333- let date = $t01154311583._3
332+ let $t01183511875 = idCallerDate(i)
333+ let id = $t01183511875._1
334+ let caller = $t01183511875._2
335+ let date = $t01183511875._3
334336 let checkUser = validateUser(caller)
335337 if ((checkUser != ""))
336338 then throw(checkUser)
337339 else {
338340 let isEventOwner = getEventOwnerByEventId(eventId)
339341 if ((isEventOwner == ""))
340342 then throw("Event not found")
341343 else if ((isEventOwner != caller))
342344 then throw("You are not the owner of this event")
343345 else [BooleanEntry(keyTicketOnSale(caller, eventId, id), status)]
344346 }
345347 }
346348
347349
348350
349351 @Callable(i)
350352 func buyTicket (ticketId,eventId,issuer) = {
351- let $t01206412102 = idCallerDate(i)
352- let id = $t01206412102._1
353- let caller = $t01206412102._2
354- let date = $t01206412102._3
353+ let $t01235612394 = idCallerDate(i)
354+ let id = $t01235612394._1
355+ let caller = $t01235612394._2
356+ let date = $t01235612394._3
355357 let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0)
356358 let eventOwner = getEventOwnerByEventId(eventId)
357359 if ((eventOwner == ""))
358360 then throw("Event not found")
359361 else if ((eventOwner != issuer))
360362 then throw("You are not the owner of this event")
361363 else {
362364 let ticketExist = getStringByKey(keyTicketName(issuer, eventId, ticketId))
363365 if ((size(ticketExist) == 0))
364366 then throw("Ticket not found")
365367 else {
366368 let eventName = getStringByKey(keyEventName(issuer, eventId))
367369 if ((eventName == ""))
368370 then throw("Art doesn't exist")
369371 else {
370372 let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId))
371373 let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId))
372374 let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId))
373375 let priceAssetId = toBase58String(signAssetId)
374- let $t01301913093 = validatePriceAssetId(i, priceAssetId, ticketPrice)
375- let amount = $t01301913093._1
376- let assetId = $t01301913093._2
376+ let $t01331113385 = validatePriceAssetId(i, priceAssetId, ticketPrice)
377+ let amount = $t01331113385._1
378+ let assetId = $t01331113385._2
377379 let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId))
378380 let amountForSign = fraction(amount, signCut, 100)
379381 let amountForOrganizer = (amount - amountForSign)
380382 if ((amountSold == maxCanSell))
381383 then throw("Art sold out")
382384 else {
383385 let newAmountSold = (amountSold + 1)
384386 let issueMeta = ((((((((((("Organizer: " + issuer) + ",
385387 EventID: ") + eventId) + ",
386388 TicketID: ") + ticketId) + ",
387389 EventName: ") + eventName) + ",
388390 Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
389391 let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
390392 let idNFT = calculateAssetId(issueNFT)
391393 let sellStatus = if (if ((newAmountSold == maxCanSell))
392394 then true
393395 else !(isOnSale))
394396 then false
395397 else true
396398 let receiveNFT = i.caller
397399 let soldKey = ((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + eventId) + "_") + issuer) + "_") + ticketId)
398400 let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT))
399401 let soldData = StringEntry(soldKey, soldValue)
400402 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)]
401403 soldData :: buyRes
402404 }
403405 }
404406 }
405407 }
406408 }
407409
408410

github/deemru/w8io/026f985 
84.50 ms