tx · 2Lg6RbFJLZjLyx7EP5KjYbkTxoE37LvrQiGiaFEvLY1b

3Mxb9hg3VkxWWfcEPfniqSmk3iSQXkgeCVU:  -0.01800000 Waves

2022.10.27 13:04 [2290686] smart account 3Mxb9hg3VkxWWfcEPfniqSmk3iSQXkgeCVU > SELF 0.00000000 Waves

{ "type": 13, "id": "2Lg6RbFJLZjLyx7EP5KjYbkTxoE37LvrQiGiaFEvLY1b", "fee": 1800000, "feeAssetId": null, "timestamp": 1666865082680, "version": 2, "chainId": 84, "sender": "3Mxb9hg3VkxWWfcEPfniqSmk3iSQXkgeCVU", "senderPublicKey": "GZzJgGQU6QzA6LPQF8TWUqoDV2FS9ecA4BWmBusebnut", "proofs": [ "3orpTnGGzuYmi6oZHhRr2ZQuZvb9J23Tn2jRyXMRUjhiKSCLGsR6BepAvf66asYjawpSw3bArt3CmocwoRBXQhMZ" ], "script": "base64:BgJgCAISBAoCCAgSCAoGCAgICAgIEgkKBwgICAgICAgSAwoBCBIECgIICBIGCgQICAgIEggKBggICAEBARIJCgcICAgIAQEBEgUKAwgIBBIECgIICBIFCgMICAgSABIDCgEIMwAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRC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jYWxsZXIJAKUIAQgFAWkGY2FsbGVyAwkAAAIFBmNhbGxlcgUFY2hyaXMJAMwIAgkBC0RlbGV0ZUVudHJ5AQUFZW50cnkFA25pbAkAAgECAm5vAJ3Kmz8=", "height": 2290686, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CFsLPcPJSd1rxtx6zvLz5TYCsvW4d2Z4rxKDkmrZm5kT Next: none Diff:
OldNewDifferences
105105 func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_onSale_" + eventId) + "_") + caller) + "_") + ticketId)
106106
107107
108-func keyTicketAmountUsed (caller,eventId,ticketId) = ((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId)
108+func keyTicketAmountUsed (caller,eventId,ticketId,nftId) = ((((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId)
109109
110110
111111 func keyTicketMaxUse (caller,eventId,ticketId) = ((((("ticket_maxUse_" + eventId) + "_") + caller) + "_") + ticketId)
192192
193193
194194 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
195- let $t064836519 = isPayment(i)
196- let payment = $t064836519._1
197- let amount = $t064836519._2
195+ let $t065086544 = isPayment(i)
196+ let payment = $t065086544._1
197+ let amount = $t065086544._2
198198 if (!(isDefined(payment.assetId)))
199199 then throw("Wrong asset attached")
200200 else {
241241
242242 @Callable(i)
243243 func addEvent (name,description,tags,cidDisplay,crawler,date) = {
244- let $t078487897 = idCallerDate(i)
245- let eventId = $t078487897._1
246- let caller = $t078487897._2
247- let addedDate = $t078487897._3
244+ let $t078737922 = idCallerDate(i)
245+ let eventId = $t078737922._1
246+ let caller = $t078737922._2
247+ let addedDate = $t078737922._3
248248 let checkUser = validateUser(caller)
249249 if ((checkUser != ""))
250250 then throw(checkUser)
288288
289289 @Callable(i)
290290 func deleteEvent (eventId) = {
291- let $t01011710161 = idCallerDate(i)
292- let id = $t01011710161._1
293- let caller = $t01011710161._2
294- let addedDate = $t01011710161._3
291+ let $t01014210186 = idCallerDate(i)
292+ let id = $t01014210186._1
293+ let caller = $t01014210186._2
294+ let addedDate = $t01014210186._3
295295 let checkUser = validateUser(caller)
296296 if ((checkUser != ""))
297297 then throw(checkUser)
314314
315315 @Callable(i)
316316 func cancelEvent (eventId,reason) = {
317- let $t01150211546 = idCallerDate(i)
318- let id = $t01150211546._1
319- let caller = $t01150211546._2
320- let addedDate = $t01150211546._3
317+ let $t01152711571 = idCallerDate(i)
318+ let id = $t01152711571._1
319+ let caller = $t01152711571._2
320+ let addedDate = $t01152711571._3
321321 let checkUser = validateUser(caller)
322322 if ((checkUser != ""))
323323 then throw(checkUser)
330330
331331 @Callable(i)
332332 func flagEvent (eventId,addr,flag,note) = {
333- let $t01198112014 = idCallerDate(i)
334- let id = $t01198112014._1
335- let caller = $t01198112014._2
333+ let $t01200612039 = idCallerDate(i)
334+ let id = $t01200612039._1
335+ let caller = $t01200612039._2
336336 if (containsElement([chris, toString(this)], caller))
337337 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
338338 then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)]
344344
345345 @Callable(i)
346346 func addTicket (eventId,name,description,price,maxAvailable,MaxUse) = {
347- let $t01251512555 = idCallerDate(i)
348- let id = $t01251512555._1
349- let caller = $t01251512555._2
350- let date = $t01251512555._3
347+ let $t01254012580 = idCallerDate(i)
348+ let id = $t01254012580._1
349+ let caller = $t01254012580._2
350+ let date = $t01254012580._3
351351 let checkUser = validateUser(caller)
352352 if ((checkUser != ""))
353353 then throw(checkUser)
370370
371371 @Callable(i)
372372 func editTicket (ticketId,eventId,name,description,price,maxAvailable,maxUse) = {
373- let $t01389013930 = idCallerDate(i)
374- let id = $t01389013930._1
375- let caller = $t01389013930._2
376- let date = $t01389013930._3
373+ let $t01391513955 = idCallerDate(i)
374+ let id = $t01391513955._1
375+ let caller = $t01391513955._2
376+ let date = $t01391513955._3
377377 let checkUser = validateUser(caller)
378378 if ((checkUser != ""))
379379 then throw(checkUser)
398398
399399 @Callable(i)
400400 func pauseTicketSale (eventId,ticketId,status) = {
401- let $t01506215102 = idCallerDate(i)
402- let id = $t01506215102._1
403- let caller = $t01506215102._2
404- let date = $t01506215102._3
401+ let $t01508715127 = idCallerDate(i)
402+ let id = $t01508715127._1
403+ let caller = $t01508715127._2
404+ let date = $t01508715127._3
405405 let checkUser = validateUser(caller)
406406 if ((checkUser != ""))
407407 then throw(checkUser)
416416
417417 @Callable(i)
418418 func deleteTicket (ticketId,eventId) = {
419- let $t01556515605 = idCallerDate(i)
420- let id = $t01556515605._1
421- let caller = $t01556515605._2
422- let date = $t01556515605._3
419+ let $t01559015630 = idCallerDate(i)
420+ let id = $t01559015630._1
421+ let caller = $t01559015630._2
422+ let date = $t01559015630._3
423423 let checkUser = validateUser(caller)
424424 if ((checkUser != ""))
425425 then throw(checkUser)
442442
443443 @Callable(i)
444444 func buyTicket (ticketId,eventId,issuer) = {
445- let $t01682916867 = idCallerDate(i)
446- let id = $t01682916867._1
447- let caller = $t01682916867._2
448- let date = $t01682916867._3
445+ let $t01685416892 = idCallerDate(i)
446+ let id = $t01685416892._1
447+ let caller = $t01685416892._2
448+ let date = $t01685416892._3
449449 let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0)
450450 if (!(isEventOwner(eventId, issuer)))
451451 then throw("Event ID and Issuer don't match")
465465 let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId))
466466 let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId))
467467 let priceAssetId = toBase58String(signAssetId)
468- let $t01771317787 = validatePriceAssetId(i, priceAssetId, ticketPrice)
469- let amount = $t01771317787._1
470- let assetId = $t01771317787._2
468+ let $t01773817812 = validatePriceAssetId(i, priceAssetId, ticketPrice)
469+ let amount = $t01773817812._1
470+ let assetId = $t01773817812._2
471471 let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId))
472472 let amountForSign = fraction(amount, signCut, 100)
473473 let amountForOrganizer = (amount - amountForSign)
491491 let soldData = StringEntry(soldKey, soldValue)
492492 let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(issuer, eventId))
493493 let ticketTotalNFT = getIntegerByKey(keyTicketTotalIssued(issuer, eventId, ticketId))
494- let buyRes = [IntegerEntry(keyTicketSold(issuer, eventId, ticketId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_tickets_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)]
494+ let buyRes = [IntegerEntry(keyTicketSold(issuer, eventId, ticketId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_tickets_issued", (totalNFT + 1)), IntegerEntry(keyEventTotalTicketsIssued(issuer, eventId), (eventTotalNFT + 1)), IntegerEntry(keyTicketTotalIssued(issuer, eventId, ticketId), (ticketTotalNFT + 1)), StringEntry((("ST_" + toString((totalNFT + 1))) + "_assetId"), ((ticketId + "_") + toBase58String(idNFT))), BooleanEntry(keyTicketOnSale(issuer, eventId, ticketId), sellStatus), IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(idNFT)), 0), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForOrganizer, assetId), ScriptTransfer(receiveNFT, 1, idNFT), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
495495 soldData :: buyRes
496496 }
497497 }
502502
503503
504504 @Callable(i)
505-func useTicket (eventId,issuer) = {
506- let $t02007020108 = idCallerDate(i)
507- let id = $t02007020108._1
508- let caller = $t02007020108._2
509- let date = $t02007020108._3
510- let $t02011420150 = isPayment(i)
511- let payment = $t02011420150._1
512- let amount = $t02011420150._2
505+func useTicket () = {
506+ let $t02008520123 = idCallerDate(i)
507+ let id = $t02008520123._1
508+ let caller = $t02008520123._2
509+ let date = $t02008520123._3
510+ let $t02012920165 = isPayment(i)
511+ let payment = $t02012920165._1
512+ let amount = $t02012920165._2
513513 if (!(isDefined(payment.assetId)))
514514 then throw("Wrong asset attached")
515515 else {
516- let ticketId = toBase58String(value(payment.assetId))
517- if (!(ticketExist(issuer, eventId, ticketId)))
518- then throw("Ticket not found")
516+ let eventData = getStringByKey(("nft_" + toBase58String(value(payment.assetId))))
517+ if ((size(eventData) == 0))
518+ then throw("Something went wrong")
519519 else {
520- let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId))
521- let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId))
522- if ((maxUsingTime == amountUsed))
523- then throw((("Ticket used " + toString(amountUsed)) + " times already"))
524- else [IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId), (amountUsed + 1)), ScriptTransfer(Address(fromBase58String(caller)), 1, payment.assetId)]
520+ let eventDataArr = split(eventData, "_")
521+ let issuer = eventDataArr[6]
522+ let eventId = eventDataArr[5]
523+ let ticketId = eventDataArr[7]
524+ if (!(ticketExist(issuer, eventId, ticketId)))
525+ then throw("Ticket not found")
526+ else {
527+ let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId))))
528+ let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId))
529+ if ((maxUsingTime == amountUsed))
530+ then throw((("Ticket used " + toString(amountUsed)) + " times already"))
531+ else [IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId))), (amountUsed + 1)), ScriptTransfer(Address(fromBase58String(caller)), 1, payment.assetId)]
532+ }
525533 }
526534 }
527535 }
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) = ("get_event_owner_" + eventId)
4646
4747
4848 func keyEventAddedDate (caller,eventId) = ((("event_addedDate_" + 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_displayCid_" + 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_crawlerCid_" + eventId) + "_") + caller)
7373
7474
7575 func keyEventTotalTicketTypes (caller,eventId) = ((("event_totalTicketTypes_" + eventId) + "_") + caller)
7676
7777
7878 func keyEventTotalTicketsIssued (caller,eventId) = ((("event_totalIssued_" + eventId) + "_") + caller)
7979
8080
8181 func keyEventCanceled (caller,eventId) = ((("event_canceled_" + eventId) + "_") + caller)
8282
8383
8484 func keyEventCanceledReason (caller,eventId) = ((("event_canceledReason_" + eventId) + "_") + caller)
8585
8686
8787 func keyTicketName (caller,eventId,ticketId) = ((((("ticket_name_" + eventId) + "_") + caller) + "_") + ticketId)
8888
8989
9090 func keyTicketDesc (caller,eventId,ticketId) = ((((("ticket_desc_" + eventId) + "_") + caller) + "_") + ticketId)
9191
9292
9393 func keyTicketPrice (caller,eventId,ticketId) = ((((("ticket_price_" + eventId) + "_") + caller) + "_") + ticketId)
9494
9595
9696 func keyTicketDate (caller,eventId,ticketId) = ((((("ticket_date_" + eventId) + "_") + caller) + "_") + ticketId)
9797
9898
9999 func keyTicketMaxAvailable (caller,eventId,ticketId) = ((((("ticket_maxAvailable_" + eventId) + "_") + caller) + "_") + ticketId)
100100
101101
102102 func keyTicketSold (caller,eventId,ticketId) = ((((("ticket_sold_" + eventId) + "_") + caller) + "_") + ticketId)
103103
104104
105105 func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_onSale_" + eventId) + "_") + caller) + "_") + ticketId)
106106
107107
108-func keyTicketAmountUsed (caller,eventId,ticketId) = ((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId)
108+func keyTicketAmountUsed (caller,eventId,ticketId,nftId) = ((((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId)
109109
110110
111111 func keyTicketMaxUse (caller,eventId,ticketId) = ((((("ticket_maxUse_" + eventId) + "_") + caller) + "_") + ticketId)
112112
113113
114114 func keyTicketTotalIssued (caller,eventId,ticketId) = ((((("ticket_totalIssued_" + eventId) + "_") + caller) + "_") + ticketId)
115115
116116
117117 func validateString (str,max) = if ((size(str) == 0))
118118 then throw("Field cannot be is empty")
119119 else if ((size(str) > max))
120120 then throw((str + " is too long"))
121121 else true
122122
123123
124124 func validateInt (num) = (0 > num)
125125
126126
127127 func getEventOwnerByEventId (eventId) = valueOrElse(getString(this, keyEventOwnerByEventId(eventId)), "")
128128
129129
130130 func validateUser (caller) = {
131131 let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
132132 if ((userStatus == userUnregistered))
133133 then "Register this account first with \"Account\" tab"
134134 else if ((userStatus == userSuspended))
135135 then "Account suspended"
136136 else ""
137137 }
138138
139139
140140 func validateEventData (caller,cidDisplay,name,description,tags,date) = {
141141 let checkUser = validateUser(caller)
142142 if ((checkUser != ""))
143143 then throw(checkUser)
144144 else if ((size(cidDisplay) == 0))
145145 then throw("Display CID cannot be empty")
146146 else if (!(validateCID(cidDisplay)))
147147 then throw("Problem with CID")
148148 else if (!(validateString(name, 300)))
149149 then throw("300 Char. max name")
150150 else if (!(validateString(description, 3000)))
151151 then throw("3000 Char. max description")
152152 else if (!(validateString(date, 1000)))
153153 then throw("1000 Char. max date")
154154 else if ((size(split(tags, ",")) > 5))
155155 then throw("5 tags max.")
156156 else ""
157157 }
158158
159159
160160 func validateTicketData (eventId,caller,name,description,price,maxAvailable,maxUse) = {
161161 let checkUser = validateUser(caller)
162162 if ((checkUser != ""))
163163 then throw(checkUser)
164164 else if (!(validateString(name, 200)))
165165 then throw("100 Char. max name")
166166 else if (!(validateString(description, 1000)))
167167 then throw("1000 Char. max description")
168168 else if (if (if (validateInt(price))
169169 then true
170170 else validateInt(maxUse))
171171 then true
172172 else validateInt(maxAvailable))
173173 then throw("Positive amount only")
174174 else if (!(validateString(description, 1000)))
175175 then throw("1000 Char. max description")
176176 else ""
177177 }
178178
179179
180180 func idCallerDate (i) = if (!(dappRunning))
181181 then throw(maintenanceMSG)
182182 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
183183
184184
185185 func isPayment (i) = if ((size(i.payments) == 0))
186186 then throw("No payment attached")
187187 else {
188188 let payment = value(i.payments[0])
189189 let amount = value(payment.amount)
190190 $Tuple2(payment, amount)
191191 }
192192
193193
194194 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
195- let $t064836519 = isPayment(i)
196- let payment = $t064836519._1
197- let amount = $t064836519._2
195+ let $t065086544 = isPayment(i)
196+ let payment = $t065086544._1
197+ let amount = $t065086544._2
198198 if (!(isDefined(payment.assetId)))
199199 then throw("Wrong asset attached")
200200 else {
201201 let assetId = if (if ((size(priceAssetId) > 0))
202202 then (toBase58String(value(payment.assetId)) == priceAssetId)
203203 else false)
204204 then payment.assetId
205205 else throw("Wrong asset attached")
206206 if ((artworkPrice != amount))
207207 then throw("Payment amount don't match")
208208 else $Tuple2(amount, assetId)
209209 }
210210 }
211211
212212
213213 func isEventOwner (eventId,caller) = {
214214 let eventOwner = getEventOwnerByEventId(eventId)
215215 if ((eventOwner == ""))
216216 then throw("Event not found")
217217 else (eventOwner == caller)
218218 }
219219
220220
221221 func ticketExist (caller,eventId,ticketId) = {
222222 let ticket = getStringByKey(keyTicketName(caller, eventId, ticketId))
223223 (size(ticket) != 0)
224224 }
225225
226226
227227 func eventIsCanceled (issuer,eventId) = getBooleanByKey(keyEventCanceled(issuer, eventId))
228228
229229
230230 @Callable(invoke)
231231 func setConf (key,val) = {
232232 let caller = toString(invoke.caller)
233233 if (containsElement([chris, toString(this)], caller))
234234 then if (contains(key, "conf_"))
235235 then [StringEntry(key, val)]
236236 else throw("Entries starting with conf_ only")
237237 else throw("You are not allowed to change this")
238238 }
239239
240240
241241
242242 @Callable(i)
243243 func addEvent (name,description,tags,cidDisplay,crawler,date) = {
244- let $t078487897 = idCallerDate(i)
245- let eventId = $t078487897._1
246- let caller = $t078487897._2
247- let addedDate = $t078487897._3
244+ let $t078737922 = idCallerDate(i)
245+ let eventId = $t078737922._1
246+ let caller = $t078737922._2
247+ let addedDate = $t078737922._3
248248 let checkUser = validateUser(caller)
249249 if ((checkUser != ""))
250250 then throw(checkUser)
251251 else {
252252 let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date)
253253 if ((validateEvent != ""))
254254 then throw("Something went wrong!")
255255 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), IntegerEntry(keyEventTotalTicketsIssued(caller, eventId), 0), BooleanEntry(keyEventCanceled(caller, eventId), false), StringEntry(keyEventOwnerByEventId(eventId), caller)]
256256 }
257257 }
258258
259259
260260
261261 @Callable(i)
262262 func editEvent (eventId,name,description,tags,cidDisplay,crawler,date) = if (!(dappRunning))
263263 then throw(maintenanceMSG)
264264 else {
265265 let caller = toBase58String(i.caller.bytes)
266266 let checkUser = validateUser(caller)
267267 if ((checkUser != ""))
268268 then throw(checkUser)
269269 else {
270270 let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date)
271271 if ((validateEvent != ""))
272272 then throw("Something went wrong!")
273273 else {
274274 let entryExist = getStringByKey(keyEventName(caller, eventId))
275275 if ((entryExist == ""))
276276 then throw("Entry not found")
277277 else {
278278 let flag = getStringByKey(keyEventFlag(caller, eventId))
279279 if ((flag == "ILLEGAL"))
280280 then throw("Cannot update ILLEGAL Event")
281281 else [StringEntry(keyEventName(caller, eventId), name), StringEntry(keyEventDate(caller, eventId), date), StringEntry(keyEventDesc(caller, eventId), description), StringEntry(keyEventTags(caller, eventId), tags), StringEntry(keyEventCrawler(caller, eventId), crawler)]
282282 }
283283 }
284284 }
285285 }
286286
287287
288288
289289 @Callable(i)
290290 func deleteEvent (eventId) = {
291- let $t01011710161 = idCallerDate(i)
292- let id = $t01011710161._1
293- let caller = $t01011710161._2
294- let addedDate = $t01011710161._3
291+ let $t01014210186 = idCallerDate(i)
292+ let id = $t01014210186._1
293+ let caller = $t01014210186._2
294+ let addedDate = $t01014210186._3
295295 let checkUser = validateUser(caller)
296296 if ((checkUser != ""))
297297 then throw(checkUser)
298298 else if (!(isEventOwner(eventId, caller)))
299299 then throw("You are not the owner of this event")
300300 else {
301301 let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(caller, eventId))
302302 if ((eventTotalNFT != 0))
303303 then throw("Cannot delete event with already sold tickets")
304304 else {
305305 let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId))
306306 if ((totalTicketTypeForEvent > 0))
307307 then throw("Delete all tickets first")
308308 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(keyEventTotalTicketsIssued(caller, eventId)), DeleteEntry(keyEventCanceled(caller, eventId)), DeleteEntry(keyEventOwnerByEventId(eventId)), DeleteEntry(keyEventTotalTicketTypes(caller, eventId))]
309309 }
310310 }
311311 }
312312
313313
314314
315315 @Callable(i)
316316 func cancelEvent (eventId,reason) = {
317- let $t01150211546 = idCallerDate(i)
318- let id = $t01150211546._1
319- let caller = $t01150211546._2
320- let addedDate = $t01150211546._3
317+ let $t01152711571 = idCallerDate(i)
318+ let id = $t01152711571._1
319+ let caller = $t01152711571._2
320+ let addedDate = $t01152711571._3
321321 let checkUser = validateUser(caller)
322322 if ((checkUser != ""))
323323 then throw(checkUser)
324324 else if (!(isEventOwner(eventId, caller)))
325325 then throw("You are not the owner of this event")
326326 else [BooleanEntry(keyEventCanceled(caller, eventId), true), StringEntry(keyEventCanceledReason(caller, eventId), reason)]
327327 }
328328
329329
330330
331331 @Callable(i)
332332 func flagEvent (eventId,addr,flag,note) = {
333- let $t01198112014 = idCallerDate(i)
334- let id = $t01198112014._1
335- let caller = $t01198112014._2
333+ let $t01200612039 = idCallerDate(i)
334+ let id = $t01200612039._1
335+ let caller = $t01200612039._2
336336 if (containsElement([chris, toString(this)], caller))
337337 then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
338338 then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)]
339339 else throw(("Unknow status " + flag))
340340 else throw("You are not allowed")
341341 }
342342
343343
344344
345345 @Callable(i)
346346 func addTicket (eventId,name,description,price,maxAvailable,MaxUse) = {
347- let $t01251512555 = idCallerDate(i)
348- let id = $t01251512555._1
349- let caller = $t01251512555._2
350- let date = $t01251512555._3
347+ let $t01254012580 = idCallerDate(i)
348+ let id = $t01254012580._1
349+ let caller = $t01254012580._2
350+ let date = $t01254012580._3
351351 let checkUser = validateUser(caller)
352352 if ((checkUser != ""))
353353 then throw(checkUser)
354354 else if (eventIsCanceled(caller, eventId))
355355 then throw("Event have been canceled")
356356 else if (!(isEventOwner(eventId, caller)))
357357 then throw("You are not the owner of this event")
358358 else {
359359 let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, MaxUse)
360360 if ((validateTicket != ""))
361361 then throw("Something went wrong!")
362362 else {
363363 let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId))
364364 [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))]
365365 }
366366 }
367367 }
368368
369369
370370
371371 @Callable(i)
372372 func editTicket (ticketId,eventId,name,description,price,maxAvailable,maxUse) = {
373- let $t01389013930 = idCallerDate(i)
374- let id = $t01389013930._1
375- let caller = $t01389013930._2
376- let date = $t01389013930._3
373+ let $t01391513955 = idCallerDate(i)
374+ let id = $t01391513955._1
375+ let caller = $t01391513955._2
376+ let date = $t01391513955._3
377377 let checkUser = validateUser(caller)
378378 if ((checkUser != ""))
379379 then throw(checkUser)
380380 else if (!(isEventOwner(eventId, caller)))
381381 then throw("You are not the owner of this event")
382382 else if (!(ticketExist(caller, eventId, ticketId)))
383383 then throw("Ticket not found")
384384 else {
385385 let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, maxUse)
386386 if ((validateTicket != ""))
387387 then throw("Something went wrong!")
388388 else {
389389 let ticketSold = valueOrElse(getInteger(keyTicketSold(caller, eventId, ticketId)), 0)
390390 if ((ticketSold > maxAvailable))
391391 then throw("Max tickets available cannot be lower than amount already sold")
392392 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)]
393393 }
394394 }
395395 }
396396
397397
398398
399399 @Callable(i)
400400 func pauseTicketSale (eventId,ticketId,status) = {
401- let $t01506215102 = idCallerDate(i)
402- let id = $t01506215102._1
403- let caller = $t01506215102._2
404- let date = $t01506215102._3
401+ let $t01508715127 = idCallerDate(i)
402+ let id = $t01508715127._1
403+ let caller = $t01508715127._2
404+ let date = $t01508715127._3
405405 let checkUser = validateUser(caller)
406406 if ((checkUser != ""))
407407 then throw(checkUser)
408408 else if (!(isEventOwner(eventId, caller)))
409409 then throw("You are not the owner of this event")
410410 else if (!(ticketExist(caller, eventId, ticketId)))
411411 then throw("Ticket not found")
412412 else [BooleanEntry(keyTicketOnSale(caller, eventId, ticketId), status)]
413413 }
414414
415415
416416
417417 @Callable(i)
418418 func deleteTicket (ticketId,eventId) = {
419- let $t01556515605 = idCallerDate(i)
420- let id = $t01556515605._1
421- let caller = $t01556515605._2
422- let date = $t01556515605._3
419+ let $t01559015630 = idCallerDate(i)
420+ let id = $t01559015630._1
421+ let caller = $t01559015630._2
422+ let date = $t01559015630._3
423423 let checkUser = validateUser(caller)
424424 if ((checkUser != ""))
425425 then throw(checkUser)
426426 else if (!(isEventOwner(eventId, caller)))
427427 then throw("You are not the owner of this event")
428428 else if (!(ticketExist(caller, eventId, ticketId)))
429429 then throw("Ticket not found")
430430 else {
431431 let amountSold = getIntegerByKey(keyTicketSold(caller, eventId, ticketId))
432432 if ((amountSold != 0))
433433 then throw("Cannot delete ticket that sold already")
434434 else {
435435 let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId))
436436 [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))]
437437 }
438438 }
439439 }
440440
441441
442442
443443 @Callable(i)
444444 func buyTicket (ticketId,eventId,issuer) = {
445- let $t01682916867 = idCallerDate(i)
446- let id = $t01682916867._1
447- let caller = $t01682916867._2
448- let date = $t01682916867._3
445+ let $t01685416892 = idCallerDate(i)
446+ let id = $t01685416892._1
447+ let caller = $t01685416892._2
448+ let date = $t01685416892._3
449449 let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0)
450450 if (!(isEventOwner(eventId, issuer)))
451451 then throw("Event ID and Issuer don't match")
452452 else if (!(ticketExist(issuer, eventId, ticketId)))
453453 then throw("Ticket not found")
454454 else {
455455 let eventName = getStringByKey(keyEventName(issuer, eventId))
456456 if ((eventName == ""))
457457 then throw("Art doesn't exist")
458458 else if (eventIsCanceled(issuer, eventId))
459459 then throw("Event have been canceled")
460460 else {
461461 let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId))
462462 if (!(isOnSale))
463463 then throw("Tickets not for sale")
464464 else {
465465 let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId))
466466 let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId))
467467 let priceAssetId = toBase58String(signAssetId)
468- let $t01771317787 = validatePriceAssetId(i, priceAssetId, ticketPrice)
469- let amount = $t01771317787._1
470- let assetId = $t01771317787._2
468+ let $t01773817812 = validatePriceAssetId(i, priceAssetId, ticketPrice)
469+ let amount = $t01773817812._1
470+ let assetId = $t01773817812._2
471471 let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId))
472472 let amountForSign = fraction(amount, signCut, 100)
473473 let amountForOrganizer = (amount - amountForSign)
474474 if ((amountSold == maxCanSell))
475475 then throw("Art sold out")
476476 else {
477477 let newAmountSold = (amountSold + 1)
478478 let issueMeta = ((((((((((("Organizer: " + issuer) + ",
479479 EventID: ") + eventId) + ",
480480 TicketID: ") + ticketId) + ",
481481 EventName: ") + eventName) + ",
482482 Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
483483 let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
484484 let idNFT = calculateAssetId(issueNFT)
485485 let sellStatus = if ((newAmountSold == maxCanSell))
486486 then false
487487 else true
488488 let receiveNFT = i.caller
489489 let soldKey = ((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + eventId) + "_") + issuer) + "_") + ticketId)
490490 let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT))
491491 let soldData = StringEntry(soldKey, soldValue)
492492 let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(issuer, eventId))
493493 let ticketTotalNFT = getIntegerByKey(keyTicketTotalIssued(issuer, eventId, ticketId))
494- let buyRes = [IntegerEntry(keyTicketSold(issuer, eventId, ticketId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_tickets_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)]
494+ let buyRes = [IntegerEntry(keyTicketSold(issuer, eventId, ticketId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_tickets_issued", (totalNFT + 1)), IntegerEntry(keyEventTotalTicketsIssued(issuer, eventId), (eventTotalNFT + 1)), IntegerEntry(keyTicketTotalIssued(issuer, eventId, ticketId), (ticketTotalNFT + 1)), StringEntry((("ST_" + toString((totalNFT + 1))) + "_assetId"), ((ticketId + "_") + toBase58String(idNFT))), BooleanEntry(keyTicketOnSale(issuer, eventId, ticketId), sellStatus), IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(idNFT)), 0), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForOrganizer, assetId), ScriptTransfer(receiveNFT, 1, idNFT), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
495495 soldData :: buyRes
496496 }
497497 }
498498 }
499499 }
500500 }
501501
502502
503503
504504 @Callable(i)
505-func useTicket (eventId,issuer) = {
506- let $t02007020108 = idCallerDate(i)
507- let id = $t02007020108._1
508- let caller = $t02007020108._2
509- let date = $t02007020108._3
510- let $t02011420150 = isPayment(i)
511- let payment = $t02011420150._1
512- let amount = $t02011420150._2
505+func useTicket () = {
506+ let $t02008520123 = idCallerDate(i)
507+ let id = $t02008520123._1
508+ let caller = $t02008520123._2
509+ let date = $t02008520123._3
510+ let $t02012920165 = isPayment(i)
511+ let payment = $t02012920165._1
512+ let amount = $t02012920165._2
513513 if (!(isDefined(payment.assetId)))
514514 then throw("Wrong asset attached")
515515 else {
516- let ticketId = toBase58String(value(payment.assetId))
517- if (!(ticketExist(issuer, eventId, ticketId)))
518- then throw("Ticket not found")
516+ let eventData = getStringByKey(("nft_" + toBase58String(value(payment.assetId))))
517+ if ((size(eventData) == 0))
518+ then throw("Something went wrong")
519519 else {
520- let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId))
521- let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId))
522- if ((maxUsingTime == amountUsed))
523- then throw((("Ticket used " + toString(amountUsed)) + " times already"))
524- else [IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId), (amountUsed + 1)), ScriptTransfer(Address(fromBase58String(caller)), 1, payment.assetId)]
520+ let eventDataArr = split(eventData, "_")
521+ let issuer = eventDataArr[6]
522+ let eventId = eventDataArr[5]
523+ let ticketId = eventDataArr[7]
524+ if (!(ticketExist(issuer, eventId, ticketId)))
525+ then throw("Ticket not found")
526+ else {
527+ let amountUsed = getIntegerByKey(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId))))
528+ let maxUsingTime = getIntegerByKey(keyTicketMaxUse(issuer, eventId, ticketId))
529+ if ((maxUsingTime == amountUsed))
530+ then throw((("Ticket used " + toString(amountUsed)) + " times already"))
531+ else [IntegerEntry(keyTicketAmountUsed(issuer, eventId, ticketId, toBase58String(value(payment.assetId))), (amountUsed + 1)), ScriptTransfer(Address(fromBase58String(caller)), 1, payment.assetId)]
532+ }
525533 }
526534 }
527535 }
528536
529537
530538
531539 @Callable(i)
532540 func deleteEntry (entry) = {
533541 let caller = toString(i.caller)
534542 if ((caller == chris))
535543 then [DeleteEntry(entry)]
536544 else throw("no")
537545 }
538546
539547

github/deemru/w8io/169f3d6 
84.21 ms