tx · B8kSasrY3ieF7gbkMCo5bGiDtCvshSwkw1p1tmrSHe6h

3N6yPEN3qNbKESnUewrj3EYVr6eLAd9AYBB:  -0.01400000 Waves

2022.10.25 11:43 [2287700] smart account 3N6yPEN3qNbKESnUewrj3EYVr6eLAd9AYBB > SELF 0.00000000 Waves

{ "type": 13, "id": "B8kSasrY3ieF7gbkMCo5bGiDtCvshSwkw1p1tmrSHe6h", "fee": 1400000, "feeAssetId": null, "timestamp": 1666687454301, "version": 2, "chainId": 84, "sender": "3N6yPEN3qNbKESnUewrj3EYVr6eLAd9AYBB", "senderPublicKey": "9RjLrGXy4wnGfNiZRhKSUh5wDnj5rLGPzbCE75KaVemg", "proofs": [ "cQed8WZQuxT7458czkByJtfihXisnQh9DZTuji6TYTCVPt4sZhrzxKwms5Qmxqp94Q7SLWfK6b8nStFwhugYhtD" ], "script": "base64:BgJICAISBAoCCAgSCQoHCAgICAgICBIKCggICAgICAgICBIGCgQICAgIEgcKBQgICAEBEggKBggICAgBARIFCgMIAQQSBQoDCAgIKgAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb29sZWFuQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAmwg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mVzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQENa2V5VGlja2V0U29sZAMFBmlzc3VlcgUHZXZlbnRJZAUIdGlja2V0SWQFDW5ld0Ftb3VudFNvbGQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICAgRuZnRfCQDYBAEFBWlkTkZUBQdzb2xkS2V5CQDMCAIJAQxJbnRlZ2VyRW50cnkCAhB0b3RhbF9uZnRfaXNzdWVkCQBkAgUIdG90YWxORlQAAQkAzAgCCQEMQm9vbGVhbkVudHJ5AgkBD2tleVRpY2tldE9uU2FsZQMFBmlzc3VlcgUHZXZlbnRJZAUIdGlja2V0SWQFCnNlbGxTdGF0dXMJAMwIAgUIaXNzdWVORlQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFBmlzc3VlcgUSYW1vdW50Rm9yT3JnYW5pemVyBQdhc3NldElkCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCnJlY2VpdmVORlQAAQUFaWRORlQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFC2ZlZVJlY2VpdmVyBQ1hbW91bnRGb3JTaWduBQdhc3NldElkBQNuaWwJAMwIAgUIc29sZERhdGEFBmJ1eVJlcwBeOyGU", "height": 2287700, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3qYUZ3511N7uvXLVpe862BVPK9MDr6JzwcQEGnvJKF97 Next: GWwep4LEsHGmJ82eUcWSYa9eaYvo8tha3otThADEkfpv Diff:
OldNewDifferences
4242 func keyUserStatus (caller) = ("user_status_" + caller)
4343
4444
45-func keyEventOwnerByEventId (eventId) = ("event_owner_" + eventId)
45+func keyEventOwnerByEventId (eventId) = ("get_event_owner_" + eventId)
4646
4747
4848 func keyEventAddedDate (caller,eventId) = ((("event_added_date_" + eventId) + "_") + caller)
174174
175175
176176 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
177- let $t057785814 = isPayment(i)
178- let payment = $t057785814._1
179- let amount = $t057785814._2
177+ let $t057825818 = isPayment(i)
178+ let payment = $t057825818._1
179+ let amount = $t057825818._2
180180 if (!(isDefined(payment.assetId)))
181181 then throw("Wrong asset attached")
182182 else {
206206
207207 @Callable(i)
208208 func addEvent (name,description,tags,cidDisplay,crawler,type,date) = {
209- let $t066866735 = idCallerDate(i)
210- let eventId = $t066866735._1
211- let caller = $t066866735._2
212- let addedDate = $t066866735._3
209+ let $t066906739 = idCallerDate(i)
210+ let eventId = $t066906739._1
211+ let caller = $t066906739._2
212+ let addedDate = $t066906739._3
213213 let checkUser = validateUser(caller)
214214 if ((checkUser != ""))
215215 then throw(checkUser)
253253
254254 @Callable(i)
255255 func flagEvent (eventId,addr,flag,note) = {
256- let $t090059038 = idCallerDate(i)
257- let id = $t090059038._1
258- let caller = $t090059038._2
256+ let $t090099042 = idCallerDate(i)
257+ let id = $t090099042._1
258+ let caller = $t090099042._2
259259 if (containsElement([chris, toString(this)], caller))
260260 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
261261 then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)]
267267
268268 @Callable(i)
269269 func addTicket (eventId,name,description,price,maxAvailable) = {
270- let $t095269566 = idCallerDate(i)
271- let id = $t095269566._1
272- let caller = $t095269566._2
273- let date = $t095269566._3
270+ let $t095309570 = idCallerDate(i)
271+ let id = $t095309570._1
272+ let caller = $t095309570._2
273+ let date = $t095309570._3
274274 let checkUser = validateUser(caller)
275275 if ((checkUser != ""))
276276 then throw(checkUser)
293293
294294 @Callable(i)
295295 func editTicket (ticketId,eventId,name,description,price,maxAvailable) = {
296- let $t01052210562 = idCallerDate(i)
297- let id = $t01052210562._1
298- let caller = $t01052210562._2
299- let date = $t01052210562._3
296+ let $t01052610566 = idCallerDate(i)
297+ let id = $t01052610566._1
298+ let caller = $t01052610566._2
299+ let date = $t01052610566._3
300300 let checkUser = validateUser(caller)
301301 if ((checkUser != ""))
302302 then throw(checkUser)
329329
330330 @Callable(i)
331331 func pauseTicket (eventId,ticketId,status) = {
332- let $t01183511875 = idCallerDate(i)
333- let id = $t01183511875._1
334- let caller = $t01183511875._2
335- let date = $t01183511875._3
332+ let $t01183911879 = idCallerDate(i)
333+ let id = $t01183911879._1
334+ let caller = $t01183911879._2
335+ let date = $t01183911879._3
336336 let checkUser = validateUser(caller)
337337 if ((checkUser != ""))
338338 then throw(checkUser)
350350
351351 @Callable(i)
352352 func buyTicket (ticketId,eventId,issuer) = {
353- let $t01235612394 = idCallerDate(i)
354- let id = $t01235612394._1
355- let caller = $t01235612394._2
356- let date = $t01235612394._3
353+ let $t01236012398 = idCallerDate(i)
354+ let id = $t01236012398._1
355+ let caller = $t01236012398._2
356+ let date = $t01236012398._3
357357 let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0)
358358 let eventOwner = getEventOwnerByEventId(eventId)
359359 if ((eventOwner == ""))
373373 let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId))
374374 let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId))
375375 let priceAssetId = toBase58String(signAssetId)
376- let $t01331113385 = validatePriceAssetId(i, priceAssetId, ticketPrice)
377- let amount = $t01331113385._1
378- let assetId = $t01331113385._2
376+ let $t01331513389 = validatePriceAssetId(i, priceAssetId, ticketPrice)
377+ let amount = $t01331513389._1
378+ let assetId = $t01331513389._2
379379 let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId))
380380 let amountForSign = fraction(amount, signCut, 100)
381381 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
45-func keyEventOwnerByEventId (eventId) = ("event_owner_" + eventId)
45+func keyEventOwnerByEventId (eventId) = ("get_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
122122 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")
136136 else if (!(validateString(date, 1000)))
137137 then throw("1000 Char. max date")
138138 else if ((size(split(tags, ",")) > 5))
139139 then throw("5 tags max.")
140140 else ""
141141 }
142142
143143
144144 func validateTicketData (eventId,caller,name,description,price,maxAvailable) = {
145145 let checkUser = validateUser(caller)
146146 if ((checkUser != ""))
147147 then throw(checkUser)
148148 else if (!(validateString(name, 200)))
149149 then throw("100 Char. max name")
150150 else if (!(validateString(description, 1000)))
151151 then throw("1000 Char. max description")
152152 else if (if (!(validateInt(price)))
153153 then true
154154 else !(validateInt(maxAvailable)))
155155 then throw("Positive amount only")
156156 else if (!(validateString(description, 1000)))
157157 then throw("1000 Char. max description")
158158 else ""
159159 }
160160
161161
162162 func idCallerDate (i) = if (!(dappRunning))
163163 then throw(maintenanceMSG)
164164 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
165165
166166
167167 func isPayment (i) = if ((size(i.payments) == 0))
168168 then throw("No payment attached")
169169 else {
170170 let payment = value(i.payments[0])
171171 let amount = value(payment.amount)
172172 $Tuple2(payment, amount)
173173 }
174174
175175
176176 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
177- let $t057785814 = isPayment(i)
178- let payment = $t057785814._1
179- let amount = $t057785814._2
177+ let $t057825818 = isPayment(i)
178+ let payment = $t057825818._1
179+ let amount = $t057825818._2
180180 if (!(isDefined(payment.assetId)))
181181 then throw("Wrong asset attached")
182182 else {
183183 let assetId = if (if ((size(priceAssetId) > 0))
184184 then (toBase58String(value(payment.assetId)) == priceAssetId)
185185 else false)
186186 then payment.assetId
187187 else throw("Wrong asset attached")
188188 if ((artworkPrice != amount))
189189 then throw("Payment amount don't match")
190190 else $Tuple2(amount, assetId)
191191 }
192192 }
193193
194194
195195 @Callable(invoke)
196196 func setConf (key,val) = {
197197 let caller = toString(invoke.caller)
198198 if (containsElement([chris, toString(this)], caller))
199199 then if (contains(key, "conf_"))
200200 then [StringEntry(key, val)]
201201 else throw("Entries starting with conf_ only")
202202 else throw("You are not allowed to change this")
203203 }
204204
205205
206206
207207 @Callable(i)
208208 func addEvent (name,description,tags,cidDisplay,crawler,type,date) = {
209- let $t066866735 = idCallerDate(i)
210- let eventId = $t066866735._1
211- let caller = $t066866735._2
212- let addedDate = $t066866735._3
209+ let $t066906739 = idCallerDate(i)
210+ let eventId = $t066906739._1
211+ let caller = $t066906739._2
212+ let addedDate = $t066906739._3
213213 let checkUser = validateUser(caller)
214214 if ((checkUser != ""))
215215 then throw(checkUser)
216216 else {
217217 let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
218218 if ((validateEvent != ""))
219219 then throw("Something went wrong!")
220220 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)]
221221 }
222222 }
223223
224224
225225
226226 @Callable(i)
227227 func editEvent (eventId,name,description,tags,cidDisplay,crawler,type,date) = if (!(dappRunning))
228228 then throw(maintenanceMSG)
229229 else {
230230 let caller = toBase58String(i.caller.bytes)
231231 let checkUser = validateUser(caller)
232232 if ((checkUser != ""))
233233 then throw(checkUser)
234234 else {
235235 let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, type, date)
236236 if ((validateEvent != ""))
237237 then throw("Something went wrong!")
238238 else {
239239 let entryExist = getStringByKey(keyEventName(caller, eventId))
240240 if ((entryExist == ""))
241241 then throw("Entry not found")
242242 else {
243243 let flag = getStringByKey(keyEventFlag(caller, eventId))
244244 if ((flag == "ILLEGAL"))
245245 then throw("Cannot update ILLEGAL Event")
246246 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)]
247247 }
248248 }
249249 }
250250 }
251251
252252
253253
254254 @Callable(i)
255255 func flagEvent (eventId,addr,flag,note) = {
256- let $t090059038 = idCallerDate(i)
257- let id = $t090059038._1
258- let caller = $t090059038._2
256+ let $t090099042 = idCallerDate(i)
257+ let id = $t090099042._1
258+ let caller = $t090099042._2
259259 if (containsElement([chris, toString(this)], caller))
260260 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
261261 then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)]
262262 else throw(("Unknow status " + flag))
263263 else throw("You are not allowed")
264264 }
265265
266266
267267
268268 @Callable(i)
269269 func addTicket (eventId,name,description,price,maxAvailable) = {
270- let $t095269566 = idCallerDate(i)
271- let id = $t095269566._1
272- let caller = $t095269566._2
273- let date = $t095269566._3
270+ let $t095309570 = idCallerDate(i)
271+ let id = $t095309570._1
272+ let caller = $t095309570._2
273+ let date = $t095309570._3
274274 let checkUser = validateUser(caller)
275275 if ((checkUser != ""))
276276 then throw(checkUser)
277277 else {
278278 let isEventOwner = getEventOwnerByEventId(eventId)
279279 if ((isEventOwner == ""))
280280 then throw("Event not found")
281281 else if ((isEventOwner != caller))
282282 then throw("You are not the owner of this event")
283283 else {
284284 let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable)
285285 if ((validateTicket != ""))
286286 then throw("Something went wrong!")
287287 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)]
288288 }
289289 }
290290 }
291291
292292
293293
294294 @Callable(i)
295295 func editTicket (ticketId,eventId,name,description,price,maxAvailable) = {
296- let $t01052210562 = idCallerDate(i)
297- let id = $t01052210562._1
298- let caller = $t01052210562._2
299- let date = $t01052210562._3
296+ let $t01052610566 = idCallerDate(i)
297+ let id = $t01052610566._1
298+ let caller = $t01052610566._2
299+ let date = $t01052610566._3
300300 let checkUser = validateUser(caller)
301301 if ((checkUser != ""))
302302 then throw(checkUser)
303303 else {
304304 let isEventOwner = getEventOwnerByEventId(eventId)
305305 if ((isEventOwner == ""))
306306 then throw("Event not found")
307307 else if ((isEventOwner != caller))
308308 then throw("You are not the owner of this event")
309309 else {
310310 let ticketExist = getStringByKey(keyTicketName(caller, eventId, ticketId))
311311 if ((size(ticketExist) == 0))
312312 then throw("Ticket not found")
313313 else {
314314 let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable)
315315 if ((validateTicket != ""))
316316 then throw("Something went wrong!")
317317 else {
318318 let ticketSold = valueOrElse(getInteger(keyTicketSold(caller, eventId, ticketId)), 0)
319319 if ((ticketSold > maxAvailable))
320320 then throw("Max tickets available cannot be lower than amount already sold")
321321 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)]
322322 }
323323 }
324324 }
325325 }
326326 }
327327
328328
329329
330330 @Callable(i)
331331 func pauseTicket (eventId,ticketId,status) = {
332- let $t01183511875 = idCallerDate(i)
333- let id = $t01183511875._1
334- let caller = $t01183511875._2
335- let date = $t01183511875._3
332+ let $t01183911879 = idCallerDate(i)
333+ let id = $t01183911879._1
334+ let caller = $t01183911879._2
335+ let date = $t01183911879._3
336336 let checkUser = validateUser(caller)
337337 if ((checkUser != ""))
338338 then throw(checkUser)
339339 else {
340340 let isEventOwner = getEventOwnerByEventId(eventId)
341341 if ((isEventOwner == ""))
342342 then throw("Event not found")
343343 else if ((isEventOwner != caller))
344344 then throw("You are not the owner of this event")
345345 else [BooleanEntry(keyTicketOnSale(caller, eventId, id), status)]
346346 }
347347 }
348348
349349
350350
351351 @Callable(i)
352352 func buyTicket (ticketId,eventId,issuer) = {
353- let $t01235612394 = idCallerDate(i)
354- let id = $t01235612394._1
355- let caller = $t01235612394._2
356- let date = $t01235612394._3
353+ let $t01236012398 = idCallerDate(i)
354+ let id = $t01236012398._1
355+ let caller = $t01236012398._2
356+ let date = $t01236012398._3
357357 let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0)
358358 let eventOwner = getEventOwnerByEventId(eventId)
359359 if ((eventOwner == ""))
360360 then throw("Event not found")
361361 else if ((eventOwner != issuer))
362362 then throw("You are not the owner of this event")
363363 else {
364364 let ticketExist = getStringByKey(keyTicketName(issuer, eventId, ticketId))
365365 if ((size(ticketExist) == 0))
366366 then throw("Ticket not found")
367367 else {
368368 let eventName = getStringByKey(keyEventName(issuer, eventId))
369369 if ((eventName == ""))
370370 then throw("Art doesn't exist")
371371 else {
372372 let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId))
373373 let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId))
374374 let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId))
375375 let priceAssetId = toBase58String(signAssetId)
376- let $t01331113385 = validatePriceAssetId(i, priceAssetId, ticketPrice)
377- let amount = $t01331113385._1
378- let assetId = $t01331113385._2
376+ let $t01331513389 = validatePriceAssetId(i, priceAssetId, ticketPrice)
377+ let amount = $t01331513389._1
378+ let assetId = $t01331513389._2
379379 let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId))
380380 let amountForSign = fraction(amount, signCut, 100)
381381 let amountForOrganizer = (amount - amountForSign)
382382 if ((amountSold == maxCanSell))
383383 then throw("Art sold out")
384384 else {
385385 let newAmountSold = (amountSold + 1)
386386 let issueMeta = ((((((((((("Organizer: " + issuer) + ",
387387 EventID: ") + eventId) + ",
388388 TicketID: ") + ticketId) + ",
389389 EventName: ") + eventName) + ",
390390 Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
391391 let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
392392 let idNFT = calculateAssetId(issueNFT)
393393 let sellStatus = if (if ((newAmountSold == maxCanSell))
394394 then true
395395 else !(isOnSale))
396396 then false
397397 else true
398398 let receiveNFT = i.caller
399399 let soldKey = ((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + eventId) + "_") + issuer) + "_") + ticketId)
400400 let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT))
401401 let soldData = StringEntry(soldKey, soldValue)
402402 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)]
403403 soldData :: buyRes
404404 }
405405 }
406406 }
407407 }
408408 }
409409
410410

github/deemru/w8io/169f3d6 
74.44 ms