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:BgJgCAISBAoCCAgSCAoGCAgICAgIEgkKBwgICAgICAgSAwoBCBIECgIICBIGCgQICAgIEggKBggICAEBARIJCgcICAgIAQEBEgUKAwgIBBIECgIICBIFCgMICAgSABIDCgEIMwAHVkVSU0lPTgIFMS4wLjABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVzZXJEYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAtzaWduQXNzZXRJZAkA2QQBCQEOZ2V0U3RyaW5nQnlLZXkBAhhjb25mX2FjY2VwdGVkX2Fzc2V0X1NJR04ABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAQ9nZXRCb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YWxsZXIJAKUIAQgFAWkGY2FsbGVyAwkAAAIFBmNhbGxlcgUFY2hyaXMJAMwIAgkBC0RlbGV0ZUVudHJ5AQUFZW50cnkFA25pbAkAAgECAm5vAJ3Kmz8=", "height": 2290686, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CFsLPcPJSd1rxtx6zvLz5TYCsvW4d2Z4rxKDkmrZm5kT Next: none Diff:
Old | New | Differences | |
---|---|---|---|
105 | 105 | func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_onSale_" + eventId) + "_") + caller) + "_") + ticketId) | |
106 | 106 | ||
107 | 107 | ||
108 | - | func keyTicketAmountUsed (caller,eventId,ticketId) = ((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) | |
108 | + | func keyTicketAmountUsed (caller,eventId,ticketId,nftId) = ((((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyTicketMaxUse (caller,eventId,ticketId) = ((((("ticket_maxUse_" + eventId) + "_") + caller) + "_") + ticketId) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
195 | - | let $ | |
196 | - | let payment = $ | |
197 | - | let amount = $ | |
195 | + | let $t065086544 = isPayment(i) | |
196 | + | let payment = $t065086544._1 | |
197 | + | let amount = $t065086544._2 | |
198 | 198 | if (!(isDefined(payment.assetId))) | |
199 | 199 | then throw("Wrong asset attached") | |
200 | 200 | else { | |
241 | 241 | ||
242 | 242 | @Callable(i) | |
243 | 243 | func addEvent (name,description,tags,cidDisplay,crawler,date) = { | |
244 | - | let $ | |
245 | - | let eventId = $ | |
246 | - | let caller = $ | |
247 | - | let addedDate = $ | |
244 | + | let $t078737922 = idCallerDate(i) | |
245 | + | let eventId = $t078737922._1 | |
246 | + | let caller = $t078737922._2 | |
247 | + | let addedDate = $t078737922._3 | |
248 | 248 | let checkUser = validateUser(caller) | |
249 | 249 | if ((checkUser != "")) | |
250 | 250 | then throw(checkUser) | |
288 | 288 | ||
289 | 289 | @Callable(i) | |
290 | 290 | func deleteEvent (eventId) = { | |
291 | - | let $ | |
292 | - | let id = $ | |
293 | - | let caller = $ | |
294 | - | let addedDate = $ | |
291 | + | let $t01014210186 = idCallerDate(i) | |
292 | + | let id = $t01014210186._1 | |
293 | + | let caller = $t01014210186._2 | |
294 | + | let addedDate = $t01014210186._3 | |
295 | 295 | let checkUser = validateUser(caller) | |
296 | 296 | if ((checkUser != "")) | |
297 | 297 | then throw(checkUser) | |
314 | 314 | ||
315 | 315 | @Callable(i) | |
316 | 316 | func cancelEvent (eventId,reason) = { | |
317 | - | let $ | |
318 | - | let id = $ | |
319 | - | let caller = $ | |
320 | - | let addedDate = $ | |
317 | + | let $t01152711571 = idCallerDate(i) | |
318 | + | let id = $t01152711571._1 | |
319 | + | let caller = $t01152711571._2 | |
320 | + | let addedDate = $t01152711571._3 | |
321 | 321 | let checkUser = validateUser(caller) | |
322 | 322 | if ((checkUser != "")) | |
323 | 323 | then throw(checkUser) | |
330 | 330 | ||
331 | 331 | @Callable(i) | |
332 | 332 | func flagEvent (eventId,addr,flag,note) = { | |
333 | - | let $ | |
334 | - | let id = $ | |
335 | - | let caller = $ | |
333 | + | let $t01200612039 = idCallerDate(i) | |
334 | + | let id = $t01200612039._1 | |
335 | + | let caller = $t01200612039._2 | |
336 | 336 | if (containsElement([chris, toString(this)], caller)) | |
337 | 337 | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
338 | 338 | then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)] | |
344 | 344 | ||
345 | 345 | @Callable(i) | |
346 | 346 | func addTicket (eventId,name,description,price,maxAvailable,MaxUse) = { | |
347 | - | let $ | |
348 | - | let id = $ | |
349 | - | let caller = $ | |
350 | - | let date = $ | |
347 | + | let $t01254012580 = idCallerDate(i) | |
348 | + | let id = $t01254012580._1 | |
349 | + | let caller = $t01254012580._2 | |
350 | + | let date = $t01254012580._3 | |
351 | 351 | let checkUser = validateUser(caller) | |
352 | 352 | if ((checkUser != "")) | |
353 | 353 | then throw(checkUser) | |
370 | 370 | ||
371 | 371 | @Callable(i) | |
372 | 372 | func editTicket (ticketId,eventId,name,description,price,maxAvailable,maxUse) = { | |
373 | - | let $ | |
374 | - | let id = $ | |
375 | - | let caller = $ | |
376 | - | let date = $ | |
373 | + | let $t01391513955 = idCallerDate(i) | |
374 | + | let id = $t01391513955._1 | |
375 | + | let caller = $t01391513955._2 | |
376 | + | let date = $t01391513955._3 | |
377 | 377 | let checkUser = validateUser(caller) | |
378 | 378 | if ((checkUser != "")) | |
379 | 379 | then throw(checkUser) | |
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func pauseTicketSale (eventId,ticketId,status) = { | |
401 | - | let $ | |
402 | - | let id = $ | |
403 | - | let caller = $ | |
404 | - | let date = $ | |
401 | + | let $t01508715127 = idCallerDate(i) | |
402 | + | let id = $t01508715127._1 | |
403 | + | let caller = $t01508715127._2 | |
404 | + | let date = $t01508715127._3 | |
405 | 405 | let checkUser = validateUser(caller) | |
406 | 406 | if ((checkUser != "")) | |
407 | 407 | then throw(checkUser) | |
416 | 416 | ||
417 | 417 | @Callable(i) | |
418 | 418 | func deleteTicket (ticketId,eventId) = { | |
419 | - | let $ | |
420 | - | let id = $ | |
421 | - | let caller = $ | |
422 | - | let date = $ | |
419 | + | let $t01559015630 = idCallerDate(i) | |
420 | + | let id = $t01559015630._1 | |
421 | + | let caller = $t01559015630._2 | |
422 | + | let date = $t01559015630._3 | |
423 | 423 | let checkUser = validateUser(caller) | |
424 | 424 | if ((checkUser != "")) | |
425 | 425 | then throw(checkUser) | |
442 | 442 | ||
443 | 443 | @Callable(i) | |
444 | 444 | func buyTicket (ticketId,eventId,issuer) = { | |
445 | - | let $ | |
446 | - | let id = $ | |
447 | - | let caller = $ | |
448 | - | let date = $ | |
445 | + | let $t01685416892 = idCallerDate(i) | |
446 | + | let id = $t01685416892._1 | |
447 | + | let caller = $t01685416892._2 | |
448 | + | let date = $t01685416892._3 | |
449 | 449 | let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0) | |
450 | 450 | if (!(isEventOwner(eventId, issuer))) | |
451 | 451 | then throw("Event ID and Issuer don't match") | |
465 | 465 | let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId)) | |
466 | 466 | let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId)) | |
467 | 467 | let priceAssetId = toBase58String(signAssetId) | |
468 | - | let $ | |
469 | - | let amount = $ | |
470 | - | let assetId = $ | |
468 | + | let $t01773817812 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
469 | + | let amount = $t01773817812._1 | |
470 | + | let assetId = $t01773817812._2 | |
471 | 471 | let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId)) | |
472 | 472 | let amountForSign = fraction(amount, signCut, 100) | |
473 | 473 | let amountForOrganizer = (amount - amountForSign) | |
491 | 491 | let soldData = StringEntry(soldKey, soldValue) | |
492 | 492 | let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(issuer, eventId)) | |
493 | 493 | 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)] | |
495 | 495 | soldData :: buyRes | |
496 | 496 | } | |
497 | 497 | } | |
502 | 502 | ||
503 | 503 | ||
504 | 504 | @Callable(i) | |
505 | - | func useTicket ( | |
506 | - | let $ | |
507 | - | let id = $ | |
508 | - | let caller = $ | |
509 | - | let date = $ | |
510 | - | let $ | |
511 | - | let payment = $ | |
512 | - | let amount = $ | |
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 | |
513 | 513 | if (!(isDefined(payment.assetId))) | |
514 | 514 | then throw("Wrong asset attached") | |
515 | 515 | else { | |
516 | - | let | |
517 | - | if ( | |
518 | - | then throw(" | |
516 | + | let eventData = getStringByKey(("nft_" + toBase58String(value(payment.assetId)))) | |
517 | + | if ((size(eventData) == 0)) | |
518 | + | then throw("Something went wrong") | |
519 | 519 | 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 | + | } | |
525 | 533 | } | |
526 | 534 | } | |
527 | 535 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let VERSION = "1.0.0" | |
5 | 5 | ||
6 | 6 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | let userDapp = value(addressFromString(getStringByKey("conf_users_dapp"))) | |
10 | 10 | ||
11 | 11 | let feeReceiver = getStringByKey("conf_fee_receiver") | |
12 | 12 | ||
13 | 13 | let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN")) | |
14 | 14 | ||
15 | 15 | let chris = getStringByKey("conf_admin_1") | |
16 | 16 | ||
17 | 17 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
24 | 24 | ||
25 | 25 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
26 | 26 | ||
27 | 27 | let userSuspended = "SUSPENDED" | |
28 | 28 | ||
29 | 29 | let userUnregistered = "UNREGISTERED" | |
30 | 30 | ||
31 | 31 | func validateCID (cid) = if (contains(cid, "/")) | |
32 | 32 | then if (if ((76 > size(cid))) | |
33 | 33 | then (size(split(cid, "/")[0]) == 59) | |
34 | 34 | else false) | |
35 | 35 | then (16 > size(split(cid, "/")[1])) | |
36 | 36 | else false | |
37 | 37 | else false | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | let signCut = 2 | |
41 | 41 | ||
42 | 42 | func keyUserStatus (caller) = ("user_status_" + caller) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyEventOwnerByEventId (eventId) = ("get_event_owner_" + eventId) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyEventAddedDate (caller,eventId) = ((("event_addedDate_" + eventId) + "_") + caller) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyEventDate (caller,eventId) = ((("event_date_" + eventId) + "_") + caller) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyEventName (caller,eventId) = ((("event_name_" + eventId) + "_") + caller) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyEventDesc (caller,eventId) = ((("event_desc_" + eventId) + "_") + caller) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyEventDisplayCid (caller,eventId) = ((("event_displayCid_" + eventId) + "_") + caller) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyEventTags (caller,eventId) = ((("event_tags_" + eventId) + "_") + caller) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyEventFlag (caller,eventId) = ((("event_flag_" + eventId) + "_") + caller) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyEventNote (caller,eventId) = ((("event_note_" + eventId) + "_") + caller) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyEventCrawler (caller,eventId) = ((("event_crawlerCid_" + eventId) + "_") + caller) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyEventTotalTicketTypes (caller,eventId) = ((("event_totalTicketTypes_" + eventId) + "_") + caller) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyEventTotalTicketsIssued (caller,eventId) = ((("event_totalIssued_" + eventId) + "_") + caller) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyEventCanceled (caller,eventId) = ((("event_canceled_" + eventId) + "_") + caller) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyEventCanceledReason (caller,eventId) = ((("event_canceledReason_" + eventId) + "_") + caller) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyTicketName (caller,eventId,ticketId) = ((((("ticket_name_" + eventId) + "_") + caller) + "_") + ticketId) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyTicketDesc (caller,eventId,ticketId) = ((((("ticket_desc_" + eventId) + "_") + caller) + "_") + ticketId) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyTicketPrice (caller,eventId,ticketId) = ((((("ticket_price_" + eventId) + "_") + caller) + "_") + ticketId) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyTicketDate (caller,eventId,ticketId) = ((((("ticket_date_" + eventId) + "_") + caller) + "_") + ticketId) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyTicketMaxAvailable (caller,eventId,ticketId) = ((((("ticket_maxAvailable_" + eventId) + "_") + caller) + "_") + ticketId) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyTicketSold (caller,eventId,ticketId) = ((((("ticket_sold_" + eventId) + "_") + caller) + "_") + ticketId) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyTicketOnSale (caller,eventId,ticketId) = ((((("ticket_onSale_" + eventId) + "_") + caller) + "_") + ticketId) | |
106 | 106 | ||
107 | 107 | ||
108 | - | func keyTicketAmountUsed (caller,eventId,ticketId) = ((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) | |
108 | + | func keyTicketAmountUsed (caller,eventId,ticketId,nftId) = ((((((("ticket_amountUsed_" + eventId) + "_") + caller) + "_") + ticketId) + "_") + nftId) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyTicketMaxUse (caller,eventId,ticketId) = ((((("ticket_maxUse_" + eventId) + "_") + caller) + "_") + ticketId) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyTicketTotalIssued (caller,eventId,ticketId) = ((((("ticket_totalIssued_" + eventId) + "_") + caller) + "_") + ticketId) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func validateString (str,max) = if ((size(str) == 0)) | |
118 | 118 | then throw("Field cannot be is empty") | |
119 | 119 | else if ((size(str) > max)) | |
120 | 120 | then throw((str + " is too long")) | |
121 | 121 | else true | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func validateInt (num) = (0 > num) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getEventOwnerByEventId (eventId) = valueOrElse(getString(this, keyEventOwnerByEventId(eventId)), "") | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func validateUser (caller) = { | |
131 | 131 | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
132 | 132 | if ((userStatus == userUnregistered)) | |
133 | 133 | then "Register this account first with \"Account\" tab" | |
134 | 134 | else if ((userStatus == userSuspended)) | |
135 | 135 | then "Account suspended" | |
136 | 136 | else "" | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func validateEventData (caller,cidDisplay,name,description,tags,date) = { | |
141 | 141 | let checkUser = validateUser(caller) | |
142 | 142 | if ((checkUser != "")) | |
143 | 143 | then throw(checkUser) | |
144 | 144 | else if ((size(cidDisplay) == 0)) | |
145 | 145 | then throw("Display CID cannot be empty") | |
146 | 146 | else if (!(validateCID(cidDisplay))) | |
147 | 147 | then throw("Problem with CID") | |
148 | 148 | else if (!(validateString(name, 300))) | |
149 | 149 | then throw("300 Char. max name") | |
150 | 150 | else if (!(validateString(description, 3000))) | |
151 | 151 | then throw("3000 Char. max description") | |
152 | 152 | else if (!(validateString(date, 1000))) | |
153 | 153 | then throw("1000 Char. max date") | |
154 | 154 | else if ((size(split(tags, ",")) > 5)) | |
155 | 155 | then throw("5 tags max.") | |
156 | 156 | else "" | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func validateTicketData (eventId,caller,name,description,price,maxAvailable,maxUse) = { | |
161 | 161 | let checkUser = validateUser(caller) | |
162 | 162 | if ((checkUser != "")) | |
163 | 163 | then throw(checkUser) | |
164 | 164 | else if (!(validateString(name, 200))) | |
165 | 165 | then throw("100 Char. max name") | |
166 | 166 | else if (!(validateString(description, 1000))) | |
167 | 167 | then throw("1000 Char. max description") | |
168 | 168 | else if (if (if (validateInt(price)) | |
169 | 169 | then true | |
170 | 170 | else validateInt(maxUse)) | |
171 | 171 | then true | |
172 | 172 | else validateInt(maxAvailable)) | |
173 | 173 | then throw("Positive amount only") | |
174 | 174 | else if (!(validateString(description, 1000))) | |
175 | 175 | then throw("1000 Char. max description") | |
176 | 176 | else "" | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func idCallerDate (i) = if (!(dappRunning)) | |
181 | 181 | then throw(maintenanceMSG) | |
182 | 182 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func isPayment (i) = if ((size(i.payments) == 0)) | |
186 | 186 | then throw("No payment attached") | |
187 | 187 | else { | |
188 | 188 | let payment = value(i.payments[0]) | |
189 | 189 | let amount = value(payment.amount) | |
190 | 190 | $Tuple2(payment, amount) | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
195 | - | let $ | |
196 | - | let payment = $ | |
197 | - | let amount = $ | |
195 | + | let $t065086544 = isPayment(i) | |
196 | + | let payment = $t065086544._1 | |
197 | + | let amount = $t065086544._2 | |
198 | 198 | if (!(isDefined(payment.assetId))) | |
199 | 199 | then throw("Wrong asset attached") | |
200 | 200 | else { | |
201 | 201 | let assetId = if (if ((size(priceAssetId) > 0)) | |
202 | 202 | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
203 | 203 | else false) | |
204 | 204 | then payment.assetId | |
205 | 205 | else throw("Wrong asset attached") | |
206 | 206 | if ((artworkPrice != amount)) | |
207 | 207 | then throw("Payment amount don't match") | |
208 | 208 | else $Tuple2(amount, assetId) | |
209 | 209 | } | |
210 | 210 | } | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func isEventOwner (eventId,caller) = { | |
214 | 214 | let eventOwner = getEventOwnerByEventId(eventId) | |
215 | 215 | if ((eventOwner == "")) | |
216 | 216 | then throw("Event not found") | |
217 | 217 | else (eventOwner == caller) | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func ticketExist (caller,eventId,ticketId) = { | |
222 | 222 | let ticket = getStringByKey(keyTicketName(caller, eventId, ticketId)) | |
223 | 223 | (size(ticket) != 0) | |
224 | 224 | } | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func eventIsCanceled (issuer,eventId) = getBooleanByKey(keyEventCanceled(issuer, eventId)) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | @Callable(invoke) | |
231 | 231 | func setConf (key,val) = { | |
232 | 232 | let caller = toString(invoke.caller) | |
233 | 233 | if (containsElement([chris, toString(this)], caller)) | |
234 | 234 | then if (contains(key, "conf_")) | |
235 | 235 | then [StringEntry(key, val)] | |
236 | 236 | else throw("Entries starting with conf_ only") | |
237 | 237 | else throw("You are not allowed to change this") | |
238 | 238 | } | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | ||
242 | 242 | @Callable(i) | |
243 | 243 | func addEvent (name,description,tags,cidDisplay,crawler,date) = { | |
244 | - | let $ | |
245 | - | let eventId = $ | |
246 | - | let caller = $ | |
247 | - | let addedDate = $ | |
244 | + | let $t078737922 = idCallerDate(i) | |
245 | + | let eventId = $t078737922._1 | |
246 | + | let caller = $t078737922._2 | |
247 | + | let addedDate = $t078737922._3 | |
248 | 248 | let checkUser = validateUser(caller) | |
249 | 249 | if ((checkUser != "")) | |
250 | 250 | then throw(checkUser) | |
251 | 251 | else { | |
252 | 252 | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date) | |
253 | 253 | if ((validateEvent != "")) | |
254 | 254 | then throw("Something went wrong!") | |
255 | 255 | 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)] | |
256 | 256 | } | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | ||
261 | 261 | @Callable(i) | |
262 | 262 | func editEvent (eventId,name,description,tags,cidDisplay,crawler,date) = if (!(dappRunning)) | |
263 | 263 | then throw(maintenanceMSG) | |
264 | 264 | else { | |
265 | 265 | let caller = toBase58String(i.caller.bytes) | |
266 | 266 | let checkUser = validateUser(caller) | |
267 | 267 | if ((checkUser != "")) | |
268 | 268 | then throw(checkUser) | |
269 | 269 | else { | |
270 | 270 | let validateEvent = validateEventData(caller, cidDisplay, name, description, tags, date) | |
271 | 271 | if ((validateEvent != "")) | |
272 | 272 | then throw("Something went wrong!") | |
273 | 273 | else { | |
274 | 274 | let entryExist = getStringByKey(keyEventName(caller, eventId)) | |
275 | 275 | if ((entryExist == "")) | |
276 | 276 | then throw("Entry not found") | |
277 | 277 | else { | |
278 | 278 | let flag = getStringByKey(keyEventFlag(caller, eventId)) | |
279 | 279 | if ((flag == "ILLEGAL")) | |
280 | 280 | then throw("Cannot update ILLEGAL Event") | |
281 | 281 | 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)] | |
282 | 282 | } | |
283 | 283 | } | |
284 | 284 | } | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(i) | |
290 | 290 | func deleteEvent (eventId) = { | |
291 | - | let $ | |
292 | - | let id = $ | |
293 | - | let caller = $ | |
294 | - | let addedDate = $ | |
291 | + | let $t01014210186 = idCallerDate(i) | |
292 | + | let id = $t01014210186._1 | |
293 | + | let caller = $t01014210186._2 | |
294 | + | let addedDate = $t01014210186._3 | |
295 | 295 | let checkUser = validateUser(caller) | |
296 | 296 | if ((checkUser != "")) | |
297 | 297 | then throw(checkUser) | |
298 | 298 | else if (!(isEventOwner(eventId, caller))) | |
299 | 299 | then throw("You are not the owner of this event") | |
300 | 300 | else { | |
301 | 301 | let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(caller, eventId)) | |
302 | 302 | if ((eventTotalNFT != 0)) | |
303 | 303 | then throw("Cannot delete event with already sold tickets") | |
304 | 304 | else { | |
305 | 305 | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
306 | 306 | if ((totalTicketTypeForEvent > 0)) | |
307 | 307 | then throw("Delete all tickets first") | |
308 | 308 | 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))] | |
309 | 309 | } | |
310 | 310 | } | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | ||
315 | 315 | @Callable(i) | |
316 | 316 | func cancelEvent (eventId,reason) = { | |
317 | - | let $ | |
318 | - | let id = $ | |
319 | - | let caller = $ | |
320 | - | let addedDate = $ | |
317 | + | let $t01152711571 = idCallerDate(i) | |
318 | + | let id = $t01152711571._1 | |
319 | + | let caller = $t01152711571._2 | |
320 | + | let addedDate = $t01152711571._3 | |
321 | 321 | let checkUser = validateUser(caller) | |
322 | 322 | if ((checkUser != "")) | |
323 | 323 | then throw(checkUser) | |
324 | 324 | else if (!(isEventOwner(eventId, caller))) | |
325 | 325 | then throw("You are not the owner of this event") | |
326 | 326 | else [BooleanEntry(keyEventCanceled(caller, eventId), true), StringEntry(keyEventCanceledReason(caller, eventId), reason)] | |
327 | 327 | } | |
328 | 328 | ||
329 | 329 | ||
330 | 330 | ||
331 | 331 | @Callable(i) | |
332 | 332 | func flagEvent (eventId,addr,flag,note) = { | |
333 | - | let $ | |
334 | - | let id = $ | |
335 | - | let caller = $ | |
333 | + | let $t01200612039 = idCallerDate(i) | |
334 | + | let id = $t01200612039._1 | |
335 | + | let caller = $t01200612039._2 | |
336 | 336 | if (containsElement([chris, toString(this)], caller)) | |
337 | 337 | then if (containsElement(["", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
338 | 338 | then [StringEntry(keyEventFlag(addr, eventId), flag), StringEntry(keyEventNote(addr, eventId), note)] | |
339 | 339 | else throw(("Unknow status " + flag)) | |
340 | 340 | else throw("You are not allowed") | |
341 | 341 | } | |
342 | 342 | ||
343 | 343 | ||
344 | 344 | ||
345 | 345 | @Callable(i) | |
346 | 346 | func addTicket (eventId,name,description,price,maxAvailable,MaxUse) = { | |
347 | - | let $ | |
348 | - | let id = $ | |
349 | - | let caller = $ | |
350 | - | let date = $ | |
347 | + | let $t01254012580 = idCallerDate(i) | |
348 | + | let id = $t01254012580._1 | |
349 | + | let caller = $t01254012580._2 | |
350 | + | let date = $t01254012580._3 | |
351 | 351 | let checkUser = validateUser(caller) | |
352 | 352 | if ((checkUser != "")) | |
353 | 353 | then throw(checkUser) | |
354 | 354 | else if (eventIsCanceled(caller, eventId)) | |
355 | 355 | then throw("Event have been canceled") | |
356 | 356 | else if (!(isEventOwner(eventId, caller))) | |
357 | 357 | then throw("You are not the owner of this event") | |
358 | 358 | else { | |
359 | 359 | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, MaxUse) | |
360 | 360 | if ((validateTicket != "")) | |
361 | 361 | then throw("Something went wrong!") | |
362 | 362 | else { | |
363 | 363 | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
364 | 364 | [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))] | |
365 | 365 | } | |
366 | 366 | } | |
367 | 367 | } | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | ||
371 | 371 | @Callable(i) | |
372 | 372 | func editTicket (ticketId,eventId,name,description,price,maxAvailable,maxUse) = { | |
373 | - | let $ | |
374 | - | let id = $ | |
375 | - | let caller = $ | |
376 | - | let date = $ | |
373 | + | let $t01391513955 = idCallerDate(i) | |
374 | + | let id = $t01391513955._1 | |
375 | + | let caller = $t01391513955._2 | |
376 | + | let date = $t01391513955._3 | |
377 | 377 | let checkUser = validateUser(caller) | |
378 | 378 | if ((checkUser != "")) | |
379 | 379 | then throw(checkUser) | |
380 | 380 | else if (!(isEventOwner(eventId, caller))) | |
381 | 381 | then throw("You are not the owner of this event") | |
382 | 382 | else if (!(ticketExist(caller, eventId, ticketId))) | |
383 | 383 | then throw("Ticket not found") | |
384 | 384 | else { | |
385 | 385 | let validateTicket = validateTicketData(eventId, caller, name, description, price, maxAvailable, maxUse) | |
386 | 386 | if ((validateTicket != "")) | |
387 | 387 | then throw("Something went wrong!") | |
388 | 388 | else { | |
389 | 389 | let ticketSold = valueOrElse(getInteger(keyTicketSold(caller, eventId, ticketId)), 0) | |
390 | 390 | if ((ticketSold > maxAvailable)) | |
391 | 391 | then throw("Max tickets available cannot be lower than amount already sold") | |
392 | 392 | 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)] | |
393 | 393 | } | |
394 | 394 | } | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func pauseTicketSale (eventId,ticketId,status) = { | |
401 | - | let $ | |
402 | - | let id = $ | |
403 | - | let caller = $ | |
404 | - | let date = $ | |
401 | + | let $t01508715127 = idCallerDate(i) | |
402 | + | let id = $t01508715127._1 | |
403 | + | let caller = $t01508715127._2 | |
404 | + | let date = $t01508715127._3 | |
405 | 405 | let checkUser = validateUser(caller) | |
406 | 406 | if ((checkUser != "")) | |
407 | 407 | then throw(checkUser) | |
408 | 408 | else if (!(isEventOwner(eventId, caller))) | |
409 | 409 | then throw("You are not the owner of this event") | |
410 | 410 | else if (!(ticketExist(caller, eventId, ticketId))) | |
411 | 411 | then throw("Ticket not found") | |
412 | 412 | else [BooleanEntry(keyTicketOnSale(caller, eventId, ticketId), status)] | |
413 | 413 | } | |
414 | 414 | ||
415 | 415 | ||
416 | 416 | ||
417 | 417 | @Callable(i) | |
418 | 418 | func deleteTicket (ticketId,eventId) = { | |
419 | - | let $ | |
420 | - | let id = $ | |
421 | - | let caller = $ | |
422 | - | let date = $ | |
419 | + | let $t01559015630 = idCallerDate(i) | |
420 | + | let id = $t01559015630._1 | |
421 | + | let caller = $t01559015630._2 | |
422 | + | let date = $t01559015630._3 | |
423 | 423 | let checkUser = validateUser(caller) | |
424 | 424 | if ((checkUser != "")) | |
425 | 425 | then throw(checkUser) | |
426 | 426 | else if (!(isEventOwner(eventId, caller))) | |
427 | 427 | then throw("You are not the owner of this event") | |
428 | 428 | else if (!(ticketExist(caller, eventId, ticketId))) | |
429 | 429 | then throw("Ticket not found") | |
430 | 430 | else { | |
431 | 431 | let amountSold = getIntegerByKey(keyTicketSold(caller, eventId, ticketId)) | |
432 | 432 | if ((amountSold != 0)) | |
433 | 433 | then throw("Cannot delete ticket that sold already") | |
434 | 434 | else { | |
435 | 435 | let totalTicketTypeForEvent = getIntegerByKey(keyEventTotalTicketTypes(caller, eventId)) | |
436 | 436 | [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))] | |
437 | 437 | } | |
438 | 438 | } | |
439 | 439 | } | |
440 | 440 | ||
441 | 441 | ||
442 | 442 | ||
443 | 443 | @Callable(i) | |
444 | 444 | func buyTicket (ticketId,eventId,issuer) = { | |
445 | - | let $ | |
446 | - | let id = $ | |
447 | - | let caller = $ | |
448 | - | let date = $ | |
445 | + | let $t01685416892 = idCallerDate(i) | |
446 | + | let id = $t01685416892._1 | |
447 | + | let caller = $t01685416892._2 | |
448 | + | let date = $t01685416892._3 | |
449 | 449 | let totalNFT = valueOrElse(getIntegerByKey("total_tickets_issued"), 0) | |
450 | 450 | if (!(isEventOwner(eventId, issuer))) | |
451 | 451 | then throw("Event ID and Issuer don't match") | |
452 | 452 | else if (!(ticketExist(issuer, eventId, ticketId))) | |
453 | 453 | then throw("Ticket not found") | |
454 | 454 | else { | |
455 | 455 | let eventName = getStringByKey(keyEventName(issuer, eventId)) | |
456 | 456 | if ((eventName == "")) | |
457 | 457 | then throw("Art doesn't exist") | |
458 | 458 | else if (eventIsCanceled(issuer, eventId)) | |
459 | 459 | then throw("Event have been canceled") | |
460 | 460 | else { | |
461 | 461 | let isOnSale = getBooleanByKey(keyTicketOnSale(issuer, eventId, ticketId)) | |
462 | 462 | if (!(isOnSale)) | |
463 | 463 | then throw("Tickets not for sale") | |
464 | 464 | else { | |
465 | 465 | let amountSold = getIntegerByKey(keyTicketSold(issuer, eventId, ticketId)) | |
466 | 466 | let ticketPrice = getIntegerByKey(keyTicketPrice(issuer, eventId, ticketId)) | |
467 | 467 | let priceAssetId = toBase58String(signAssetId) | |
468 | - | let $ | |
469 | - | let amount = $ | |
470 | - | let assetId = $ | |
468 | + | let $t01773817812 = validatePriceAssetId(i, priceAssetId, ticketPrice) | |
469 | + | let amount = $t01773817812._1 | |
470 | + | let assetId = $t01773817812._2 | |
471 | 471 | let maxCanSell = getIntegerByKey(keyTicketMaxAvailable(issuer, eventId, ticketId)) | |
472 | 472 | let amountForSign = fraction(amount, signCut, 100) | |
473 | 473 | let amountForOrganizer = (amount - amountForSign) | |
474 | 474 | if ((amountSold == maxCanSell)) | |
475 | 475 | then throw("Art sold out") | |
476 | 476 | else { | |
477 | 477 | let newAmountSold = (amountSold + 1) | |
478 | 478 | let issueMeta = ((((((((((("Organizer: " + issuer) + ", | |
479 | 479 | EventID: ") + eventId) + ", | |
480 | 480 | TicketID: ") + ticketId) + ", | |
481 | 481 | EventName: ") + eventName) + ", | |
482 | 482 | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
483 | 483 | let issueNFT = Issue(("ST_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
484 | 484 | let idNFT = calculateAssetId(issueNFT) | |
485 | 485 | let sellStatus = if ((newAmountSold == maxCanSell)) | |
486 | 486 | then false | |
487 | 487 | else true | |
488 | 488 | let receiveNFT = i.caller | |
489 | 489 | let soldKey = ((((((((("ticket_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + eventId) + "_") + issuer) + "_") + ticketId) | |
490 | 490 | let soldValue = ((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + toBase58String(idNFT)) | |
491 | 491 | let soldData = StringEntry(soldKey, soldValue) | |
492 | 492 | let eventTotalNFT = getIntegerByKey(keyEventTotalTicketsIssued(issuer, eventId)) | |
493 | 493 | 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)] | |
495 | 495 | soldData :: buyRes | |
496 | 496 | } | |
497 | 497 | } | |
498 | 498 | } | |
499 | 499 | } | |
500 | 500 | } | |
501 | 501 | ||
502 | 502 | ||
503 | 503 | ||
504 | 504 | @Callable(i) | |
505 | - | func useTicket ( | |
506 | - | let $ | |
507 | - | let id = $ | |
508 | - | let caller = $ | |
509 | - | let date = $ | |
510 | - | let $ | |
511 | - | let payment = $ | |
512 | - | let amount = $ | |
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 | |
513 | 513 | if (!(isDefined(payment.assetId))) | |
514 | 514 | then throw("Wrong asset attached") | |
515 | 515 | else { | |
516 | - | let | |
517 | - | if ( | |
518 | - | then throw(" | |
516 | + | let eventData = getStringByKey(("nft_" + toBase58String(value(payment.assetId)))) | |
517 | + | if ((size(eventData) == 0)) | |
518 | + | then throw("Something went wrong") | |
519 | 519 | 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 | + | } | |
525 | 533 | } | |
526 | 534 | } | |
527 | 535 | } | |
528 | 536 | ||
529 | 537 | ||
530 | 538 | ||
531 | 539 | @Callable(i) | |
532 | 540 | func deleteEntry (entry) = { | |
533 | 541 | let caller = toString(i.caller) | |
534 | 542 | if ((caller == chris)) | |
535 | 543 | then [DeleteEntry(entry)] | |
536 | 544 | else throw("no") | |
537 | 545 | } | |
538 | 546 | ||
539 | 547 |
github/deemru/w8io/169f3d6 84.21 ms ◑