tx · CxHg64HGcYtsbZ9MTpLG2yaupKsd14esi2545sDP313B 3N2Tdcx5fzxJAKP5hMp9W35Cp1EFzfiJ1zG: -0.01400000 Waves 2020.10.15 14:06 [1221591] smart account 3N2Tdcx5fzxJAKP5hMp9W35Cp1EFzfiJ1zG > SELF 0.00000000 Waves
{ "type": 13, "id": "CxHg64HGcYtsbZ9MTpLG2yaupKsd14esi2545sDP313B", "fee": 1400000, "feeAssetId": null, "timestamp": 1602760004454, "version": 2, "chainId": 84, "sender": "3N2Tdcx5fzxJAKP5hMp9W35Cp1EFzfiJ1zG", "senderPublicKey": "9SULUbW7L2jV2nv8v48Kdzox4cZ8jEfg778yJHJpgVwM", "proofs": [ "4ktaNhvpVc4sJtdSAGF8PdyrTZk4soYbVHCcnAnrGGRFEwqMgxNh3idRVxTCXLVnA6PmkxHL5KB67nyw7ZKG8Ebz" ], "script": "base64:AAIEAAAAAAAAAFoIAhIGCgQICAgIEgMKAQgSBgoECAgICBIECgIICBIDCgEIEg4KDAgICAgICAEICAgICBINCgsICAgICAEICAgICBIECgIICBIGCgQIAQEIEgQKAggIEgMKAQgAAAA6AAAAAA9zdG9yYWdlVmVyaWZpZXIJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEAAAAADHNpZ25WZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTkMyOGhTaXZybXNUVVhhWUQxeDZMMzYySjRacFVub1RkQgAAAAALZmVlUmVjZWl2ZXICAAAAIzNOMUU2dFhkZFJvVmFSZlE5ZFEzdmc1TGFXMmZzZDhIS3ViAAAAAAtzaWduQXNzZXRJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresAAAAAC3VzZG5Bc3NldElkAQAAACAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAAAAAAMd2F2ZXNBc3NldElkAQAA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AALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlckRhdGUAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAtrZXlVc2VyQWRkcgAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAC2tleVVzZXJOYW1lAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlckRlc2MAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAA1rZXlVc2VyU29jaWFsAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAADmxhc3RfaW52b2tlX2lkBQAAAAJpZAUAAAADbmlsCQAAAgAAAAECAAAAE1lvdSBhcmUgbm90IGFsbG93ZWQAAAAAImKY0A==", "height": 1221591, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3b8EK6QdA3wvsyzRcUHwXuu341SWRCW3Ehmh6u4Lix7o Next: Dx9vfNH8Yn9kaTyA6kX3LEkrdu5ocbuSeUVzKJNj3LFT Diff:
Old | New | Differences | |
---|---|---|---|
352 | 352 | else { | |
353 | 353 | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, callerAddress)) | |
354 | 354 | if ((entryExist != "")) | |
355 | - | then throw("You already added | |
355 | + | then throw("You already added it on Sign Art") | |
356 | 356 | else { | |
357 | 357 | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
358 | 358 | if ((hashExist != "")) | |
359 | - | then throw(" | |
359 | + | then throw("Hash already registered on Sign Art") | |
360 | 360 | else { | |
361 | 361 | let isSignCertified = checkSignCertificate(signID, callerAddress, sha256Hash) | |
362 | 362 | if (!(isSignCertified)) | |
363 | - | then throw("Sign Certificate not found | |
363 | + | then throw("Sign Certificate not found for this address.") | |
364 | 364 | else if ((size(cidDisplay) == 0)) | |
365 | 365 | then throw("Display CID cannot be empty") | |
366 | 366 | else if (!(validateString(name, 100))) | |
367 | - | then throw("100 | |
367 | + | then throw("100 Char. max for the name") | |
368 | 368 | else if (!(validateString(description, 1000))) | |
369 | - | then throw("1000 Characters maximum for the description") | |
370 | - | else { | |
371 | - | let tagsList = split(tags, ",") | |
372 | - | if ((size(tagsList) > 5)) | |
373 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
374 | - | else { | |
375 | - | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
376 | - | case s: String => | |
377 | - | s | |
378 | - | case _ => | |
379 | - | userUnregistered | |
380 | - | } | |
381 | - | let timestamp = lastBlock.timestamp | |
382 | - | if (if (isDefined(userIsRegistered)) | |
383 | - | then (userIsRegistered == userUnregistered) | |
384 | - | else false) | |
385 | - | then throw("Please register this account first with \"User infos\" tab") | |
386 | - | else if ((userIsRegistered == userSuspended)) | |
387 | - | then throw("Your account is suspended") | |
388 | - | else if ((userIsRegistered == userRemoved)) | |
389 | - | then throw("Your account have been removed") | |
390 | - | else if ((maxmint > 10)) | |
391 | - | then throw("Maximum 10 editions per artwork") | |
392 | - | else if ((size(sha256Hash) != 64)) | |
393 | - | then throw("Hash should be sha256 string composed of 64 char.") | |
394 | - | else [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry(keyArtArtidBySignid(callerAddress, signID), artId), StringEntry("last_invoke_id", artId), StringEntry(keyArtHashByTxidAddr(callerAddress, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
395 | - | } | |
396 | - | } | |
369 | + | then throw("1000 Char. max for the description") | |
370 | + | else if ((size(split(tags, ",")) > 5)) | |
371 | + | then throw("5 tags max.") | |
372 | + | else { | |
373 | + | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
374 | + | case s: String => | |
375 | + | s | |
376 | + | case _ => | |
377 | + | userUnregistered | |
378 | + | } | |
379 | + | let timestamp = lastBlock.timestamp | |
380 | + | if (if (isDefined(userIsRegistered)) | |
381 | + | then (userIsRegistered == userUnregistered) | |
382 | + | else false) | |
383 | + | then throw("Register this account first with \"User infos\" tab") | |
384 | + | else if ((userIsRegistered == userSuspended)) | |
385 | + | then throw("Account suspended") | |
386 | + | else if ((userIsRegistered == userRemoved)) | |
387 | + | then throw("Account removed") | |
388 | + | else if ((maxmint > 10)) | |
389 | + | then throw("10 editions max per artwork") | |
390 | + | else if ((size(sha256Hash) != 64)) | |
391 | + | then throw("Hash should be 64 char.") | |
392 | + | else [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry(keyArtArtidBySignid(callerAddress, signID), artId), StringEntry("last_invoke_id", artId), StringEntry(keyArtHashByTxidAddr(callerAddress, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
393 | + | } | |
397 | 394 | } | |
398 | 395 | } | |
399 | 396 | } | |
439 | 436 | if (if (isDefined(userIsRegistered)) | |
440 | 437 | then (userIsRegistered == userUnregistered) | |
441 | 438 | else false) | |
442 | - | then throw(" | |
439 | + | then throw("Register this account first with \"User infos\" tab") | |
443 | 440 | else if ((userIsRegistered == userSuspended)) | |
444 | - | then throw(" | |
441 | + | then throw("Account suspended") | |
445 | 442 | else if ((userIsRegistered == userRemoved)) | |
446 | - | then throw(" | |
443 | + | then throw("Account removed") | |
447 | 444 | else if ((maxmint > 10)) | |
448 | - | then throw(" | |
445 | + | then throw("M10 editions max per artwork") | |
449 | 446 | else if (!(artworkMinted)) | |
450 | 447 | then [StringEntry(keyArtName(callerAddress, txid), name), StringEntry(keyArtDesc(callerAddress, txid), description), StringEntry(keyArtDisplayCid(callerAddress, txid), cidDisplay), StringEntry(keyArtExportCid(callerAddress, txid), cidExport), StringEntry(keyArtExportHash(callerAddress, txid), sha256Export), StringEntry(keyArtLicenceCid(callerAddress, txid), cidLicence), StringEntry(keyArtLicenceHash(callerAddress, txid), sha256Licence), IntegerEntry(keyArtMaxMint(callerAddress, txid), maxmint), StringEntry(keyArtTags(callerAddress, txid), tags), StringEntry(keyArtType(callerAddress, txid), type), StringEntry("last_invoke_id", updateId)] | |
451 | - | else throw(" | |
448 | + | else throw("Artwork already minted") | |
452 | 449 | } | |
453 | 450 | } | |
454 | 451 | } | |
469 | 466 | case s: String => | |
470 | 467 | s | |
471 | 468 | case _ => | |
472 | - | throw("No artwork matching | |
469 | + | throw("No artwork matching") | |
473 | 470 | } | |
474 | 471 | let artworkMinted = match getInteger(this, keyArtIssued(addressToUse, artId)) { | |
475 | 472 | case b: Int => | |
484 | 481 | case s: String => | |
485 | 482 | s | |
486 | 483 | case _ => | |
487 | - | throw("No artwork hash matching | |
484 | + | throw("No artwork hash matching") | |
488 | 485 | } | |
489 | 486 | let signID = match getString(this, keyArtSignID(addressToUse, artId)) { | |
490 | 487 | case s: String => | |
491 | 488 | s | |
492 | 489 | case _ => | |
493 | - | throw("No SIGN ID matching | |
490 | + | throw("No SIGN ID matching") | |
494 | 491 | } | |
495 | 492 | let dataToDelete = [DeleteEntry(keyArtDate(addressToUse, artId)), DeleteEntry(keyArtName(addressToUse, artId)), DeleteEntry(keyArtDesc(addressToUse, artId)), DeleteEntry(keyArtDisplayCid(addressToUse, artId)), DeleteEntry(keyArtExportCid(addressToUse, artId)), DeleteEntry(keyArtExportHash(addressToUse, artId)), DeleteEntry(keyArtLicenceHash(addressToUse, artId)), DeleteEntry(keyArtLicenceCid(addressToUse, artId)), DeleteEntry(keyArtType(addressToUse, artId)), DeleteEntry(keyArtTags(addressToUse, artId)), DeleteEntry(keyArtMaxMint(addressToUse, artId)), DeleteEntry(keyArtSignID(addressToUse, artId)), DeleteEntry(keyArtIssued(addressToUse, artId)), DeleteEntry(keyArtOnSale(addressToUse, artId)), StringEntry("last_invoke_id", id), DeleteEntry(keyArtOwnerByHash(sha256Hash)), DeleteEntry(keyArtArtidBySignid(addressToUse, signID)), DeleteEntry(keyArtTxidByHashOwner(sha256Hash, addressToUse)), DeleteEntry(keyArtPrice(addressToUse, artId)), DeleteEntry(keyArtMaxMint(addressToUse, artId)), DeleteEntry(keyArtAssetIdAccepted(addressToUse, artId)), DeleteEntry(((((("art_sold_1_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_2_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_3_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_4_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_5_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_6_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_7_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_8_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_9_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_10_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse))] | |
496 | 493 | if (if ((callerAddress == admin)) | |
499 | 496 | then dataToDelete | |
500 | 497 | else if (!(artworkMinted)) | |
501 | 498 | then dataToDelete | |
502 | - | else throw(" | |
499 | + | else throw("Artwork already minted, you cannot delete it") | |
503 | 500 | } | |
504 | 501 | ||
505 | 502 | ||
581 | 578 | case s: String => | |
582 | 579 | s | |
583 | 580 | case _ => | |
584 | - | throw(" | |
581 | + | throw("Artwork doesn't exit") | |
585 | 582 | } | |
586 | 583 | let displayCID = getStringByKey(keyArtDisplayCid(issuer, artId)) | |
587 | 584 | let exportCID = getStringByKey(keyArtExportCid(issuer, artId)) | |
595 | 592 | let priceAssetId = getStringByKey(keyArtAssetIdAccepted(issuer, artId)) | |
596 | 593 | let sourceHash = getStringByKey(keyArtHashByTxidAddr(issuer, artId)) | |
597 | 594 | if ((artworkPrice == 0)) | |
598 | - | then throw(" | |
595 | + | then throw("Artwork not for sell") | |
599 | 596 | else if (!(isOnSale)) | |
600 | - | then throw(" | |
597 | + | then throw("Artwork not for sale") | |
601 | 598 | else { | |
602 | 599 | let maxCanSell = getIntegerByKey(keyArtMaxMint(issuer, artId)) | |
603 | 600 | let payment = value(invoke.payments[0]) | |
613 | 610 | let amountForSign = ((amount / 100) * cut) | |
614 | 611 | let amountForCreator = (amount - amountForSign) | |
615 | 612 | if ((amountSold == maxCanSell)) | |
616 | - | then throw(" | |
613 | + | then throw("Artwork sold out") | |
617 | 614 | else if ((artworkPrice != amount)) | |
618 | - | then throw( | |
615 | + | then throw("Payment don't match") | |
619 | 616 | else { | |
620 | 617 | let newAmountSold = (amountSold + 1) | |
621 | 618 | let entryDate = lastBlock.timestamp |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | 5 | ||
6 | 6 | let signVerifier = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
7 | 7 | ||
8 | 8 | let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
9 | 9 | ||
10 | 10 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
11 | 11 | ||
12 | 12 | let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
13 | 13 | ||
14 | 14 | let wavesAssetId = base58'' | |
15 | 15 | ||
16 | 16 | let signCut = 8 | |
17 | 17 | ||
18 | 18 | let usdnCut = 10 | |
19 | 19 | ||
20 | 20 | let wavesCut = 10 | |
21 | 21 | ||
22 | 22 | let admin = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
23 | 23 | ||
24 | 24 | let admin2 = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
25 | 25 | ||
26 | 26 | let WHITELISTEDONLY = true | |
27 | 27 | ||
28 | 28 | let userAllowed = "ALLOWED" | |
29 | 29 | ||
30 | 30 | let userRegistered = "REGISTERED" | |
31 | 31 | ||
32 | 32 | let userVerified = "VERIFIED" | |
33 | 33 | ||
34 | 34 | let userSuspended = "SUSPENDED" | |
35 | 35 | ||
36 | 36 | let userRemoved = "REMOVED" | |
37 | 37 | ||
38 | 38 | let userUnregistered = "UNREGISTERED" | |
39 | 39 | ||
40 | 40 | let userReset = "RESET" | |
41 | 41 | ||
42 | 42 | let onSale = "ON_SALE" | |
43 | 43 | ||
44 | 44 | let sold = "SOLD" | |
45 | 45 | ||
46 | 46 | let canceled = "CANCELED" | |
47 | 47 | ||
48 | 48 | func getStringByKey (key) = match getString(this, key) { | |
49 | 49 | case a: String => | |
50 | 50 | a | |
51 | 51 | case _ => | |
52 | 52 | "" | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func getIntegerByKey (key) = match getInteger(this, key) { | |
57 | 57 | case i: Int => | |
58 | 58 | i | |
59 | 59 | case _ => | |
60 | 60 | 0 | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getBooleanByKey (key) = match getBoolean(this, key) { | |
65 | 65 | case i: Boolean => | |
66 | 66 | i | |
67 | 67 | case _ => | |
68 | 68 | false | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signVerifier, ((("data_fc_" + signID) + "_") + Owner)) { | |
73 | 73 | case a: String => | |
74 | 74 | if (contains(a, sha256Hash)) | |
75 | 75 | then true | |
76 | 76 | else false | |
77 | 77 | case _ => | |
78 | 78 | false | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func validateCID (cid) = if (if ((75 > size(cid))) | |
83 | 83 | then (60 > size(split(cid, "/")[0])) | |
84 | 84 | else false) | |
85 | 85 | then (16 > size(split(cid, "/")[1])) | |
86 | 86 | else false | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func validateHash (hash) = (65 > size(hash)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyUserAddr (callerAddr) = ("user_" + callerAddr) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyUserName (callerAddr) = ("user_name_" + callerAddr) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyUserDesc (callerAddr) = ("user_desc_" + callerAddr) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyUserSocial (callerAddr) = ("user_social_" + callerAddr) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyUserThumb (callerAddr) = ("user_thumb_" + callerAddr) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keyUserStatus (callerAddr) = ("user_status_" + callerAddr) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyUserDate (callerAddr) = ("user_date_" + callerAddr) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyArtDate (callerAddr,artId) = ((("art_date_" + artId) + "_") + callerAddr) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyArtName (callerAddr,artId) = ((("art_name_" + artId) + "_") + callerAddr) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyArtDesc (callerAddr,artId) = ((("art_desc_" + artId) + "_") + callerAddr) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyArtDisplayCid (callerAddr,artId) = ((("art_display_cid_" + artId) + "_") + callerAddr) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyArtExportHash (callerAddr,artId) = ((("art_export_hash_" + artId) + "_") + callerAddr) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyArtExportCid (callerAddr,artId) = ((("art_export_cid_" + artId) + "_") + callerAddr) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyArtMaxMint (callerAddr,artId) = ((("art_maxmint_" + artId) + "_") + callerAddr) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyArtSignID (callerAddr,artId) = ((("art_signid_" + artId) + "_") + callerAddr) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func keyArtIssued (callerAddr,artId) = ((("art_issued_" + artId) + "_") + callerAddr) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func keyArtOnSale (callerAddr,artId) = ((("art_onsale_" + artId) + "_") + callerAddr) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func keyArtLicenceHash (callerAddr,artId) = ((("art_licence_hash_" + artId) + "_") + callerAddr) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func keyArtLicenceCid (callerAddr,artId) = ((("art_licence_cid_" + artId) + "_") + callerAddr) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func keyArtTags (callerAddr,artId) = ((("art_tags_" + artId) + "_") + callerAddr) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func keyArtType (callerAddr,artId) = ((("art_type_" + artId) + "_") + callerAddr) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func keyArtPrice (callerAddr,artId) = ((("art_price_" + artId) + "_") + callerAddr) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyArtAssetIdAccepted (callerAddr,artId) = ((("art_assetAccepted_" + artId) + "_") + callerAddr) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func keyArtHashByTxidAddr (callerAddr,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + callerAddr) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func keyArtOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func keyArtArtidBySignid (callerAddr,signId) = ((("get_artidbysignid_" + signId) + "_") + callerAddr) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr))))) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func validateAllCID (cidDisplay,cidExport,cidLicence) = if (if ((cidDisplay != "")) | |
174 | 174 | then !(validateCID(cidDisplay)) | |
175 | 175 | else false) | |
176 | 176 | then throw("Wrong Display CID length") | |
177 | 177 | else if (if ((cidExport != "")) | |
178 | 178 | then !(validateCID(cidExport)) | |
179 | 179 | else false) | |
180 | 180 | then throw("Wrong Export CID length") | |
181 | 181 | else if (if ((cidLicence != "")) | |
182 | 182 | then !(validateCID(cidLicence)) | |
183 | 183 | else false) | |
184 | 184 | then throw("Wrong Licence CID length") | |
185 | 185 | else true | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func validateAllHash (sha256Export,sha256Licence) = if (if ((sha256Export != "")) | |
189 | 189 | then !(validateHash(sha256Export)) | |
190 | 190 | else false) | |
191 | 191 | then throw("Export Hash should be 64 characters maximum") | |
192 | 192 | else if (if ((sha256Licence != "")) | |
193 | 193 | then !(validateHash(sha256Licence)) | |
194 | 194 | else false) | |
195 | 195 | then throw("Licence Hash should be 64 characters maximum") | |
196 | 196 | else true | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func validateString (str,max) = if ((size(str) == 0)) | |
200 | 200 | then throw("Field cannot be is empty") | |
201 | 201 | else if ((size(str) > max)) | |
202 | 202 | then throw((str + " is too long")) | |
203 | 203 | else true | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | @Callable(i) | |
207 | 207 | func registerUser (name,description,thumb,social) = { | |
208 | 208 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
209 | 209 | let userCanRegister = getStringByKey(keyUserStatus(callerAddr)) | |
210 | 210 | let id = toBase58String(i.transactionId) | |
211 | 211 | let timestamp = lastBlock.timestamp | |
212 | 212 | if (if ((userCanRegister == userSuspended)) | |
213 | 213 | then true | |
214 | 214 | else (userCanRegister == userRemoved)) | |
215 | 215 | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
216 | 216 | else if ((userCanRegister == userRegistered)) | |
217 | 217 | then throw("You are already registered, please use update method instead.") | |
218 | 218 | else if (if ((userCanRegister == "")) | |
219 | 219 | then WHITELISTEDONLY | |
220 | 220 | else false) | |
221 | 221 | then throw("You are now allowed to register yet, please contact us first to get approved.") | |
222 | 222 | else if (if ((name == "")) | |
223 | 223 | then true | |
224 | 224 | else (description == "")) | |
225 | 225 | then throw("Name and description cannot be empty") | |
226 | 226 | else if ((size(description) > 600)) | |
227 | 227 | then throw("600 Characters maximum for the description") | |
228 | 228 | else [IntegerEntry(keyUserDate(callerAddr), timestamp), StringEntry(keyUserAddr(callerAddr), ((id + "_") + toString(lastBlock.timestamp))), StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), StringEntry(keyUserStatus(callerAddr), userRegistered), StringEntry("last_invoke_id", id)] | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Callable(i) | |
234 | 234 | func deleteEntry (entry) = { | |
235 | 235 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
236 | 236 | if ((callerAddr == admin)) | |
237 | 237 | then [DeleteEntry(entry)] | |
238 | 238 | else throw("no") | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | ||
243 | 243 | @Callable(i) | |
244 | 244 | func updateUser (name,description,thumb,social) = { | |
245 | 245 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
246 | 246 | let userCanRegister = getStringByKey(keyUserStatus(callerAddr)) | |
247 | 247 | if (if ((userCanRegister == userSuspended)) | |
248 | 248 | then true | |
249 | 249 | else (userCanRegister == userRemoved)) | |
250 | 250 | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
251 | 251 | else if (if ((userCanRegister == "")) | |
252 | 252 | then true | |
253 | 253 | else (userCanRegister == userAllowed)) | |
254 | 254 | then throw("Please register first with registerUser") | |
255 | 255 | else { | |
256 | 256 | let id = toBase58String(i.transactionId) | |
257 | 257 | let timestamp = lastBlock.timestamp | |
258 | 258 | if (if ((name == "")) | |
259 | 259 | then true | |
260 | 260 | else (description == "")) | |
261 | 261 | then throw("Name and description cannot be empty") | |
262 | 262 | else if ((size(description) > 600)) | |
263 | 263 | then throw("600 Characters maximum for the description") | |
264 | 264 | else [StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), StringEntry("last_invoke_id", id)] | |
265 | 265 | } | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | ||
270 | 270 | @Callable(i) | |
271 | 271 | func changeUserStatus (address,status) = { | |
272 | 272 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
273 | 273 | let id = toBase58String(i.transactionId) | |
274 | 274 | let currentStatus = getStringByKey(keyUserStatus(address)) | |
275 | 275 | let statusToSet = if ((status == userVerified)) | |
276 | 276 | then userVerified | |
277 | 277 | else if ((status == userRegistered)) | |
278 | 278 | then userRegistered | |
279 | 279 | else if ((status == userSuspended)) | |
280 | 280 | then userSuspended | |
281 | 281 | else if ((status == userRemoved)) | |
282 | 282 | then userRemoved | |
283 | 283 | else if ((status == userAllowed)) | |
284 | 284 | then userAllowed | |
285 | 285 | else if (if ((status == userReset)) | |
286 | 286 | then (currentStatus == userAllowed) | |
287 | 287 | else false) | |
288 | 288 | then "" | |
289 | 289 | else throw("Unknown status") | |
290 | 290 | if (if ((currentStatus == userAllowed)) | |
291 | 291 | then (status == userAllowed) | |
292 | 292 | else false) | |
293 | 293 | then throw("This user is already allowed") | |
294 | 294 | else if (if ((currentStatus == userRegistered)) | |
295 | 295 | then (status == userAllowed) | |
296 | 296 | else false) | |
297 | 297 | then throw("This user is already allowed and registered") | |
298 | 298 | else if (if ((currentStatus == userVerified)) | |
299 | 299 | then (status == userAllowed) | |
300 | 300 | else false) | |
301 | 301 | then throw("This user is already allowed and verified") | |
302 | 302 | else if (if ((callerAddr == admin)) | |
303 | 303 | then true | |
304 | 304 | else (callerAddr == admin2)) | |
305 | 305 | then [StringEntry(keyUserStatus(address), statusToSet), StringEntry("last_invoke_id", id)] | |
306 | 306 | else throw(((("You are not allowed to change user status " + callerAddr) + " / ") + admin)) | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | ||
311 | 311 | @Callable(i) | |
312 | 312 | func creditUser (address) = { | |
313 | 313 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
314 | 314 | let id = toBase58String(i.transactionId) | |
315 | 315 | if (if ((callerAddr == admin)) | |
316 | 316 | then true | |
317 | 317 | else (callerAddr == admin2)) | |
318 | 318 | then [ScriptTransfer(Address(fromBase58String(address)), 150000000000, signAssetId)] | |
319 | 319 | else throw("You are not allowed to do that") | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | ||
324 | 324 | @Callable(invoke) | |
325 | 325 | func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
326 | 326 | let artId = toBase58String(invoke.transactionId) | |
327 | 327 | let callerAddress = toBase58String(invoke.caller.bytes) | |
328 | 328 | if (!(validateAllCID(cidDisplay, cidExport, cidLicence))) | |
329 | 329 | then throw("Problem with CID") | |
330 | 330 | else if (!(validateHash(sha256Hash))) | |
331 | 331 | then throw("Hash should be 64 characters maximum") | |
332 | 332 | else if (!(validateAllHash(sha256Export, sha256Licence))) | |
333 | 333 | then throw("Problem with Hashes") | |
334 | 334 | else if ((size(invoke.payments) == 0)) | |
335 | 335 | then throw("No payment attached") | |
336 | 336 | else { | |
337 | 337 | let payment = value(invoke.payments[0]) | |
338 | 338 | let amount = value(payment.amount) | |
339 | 339 | let assetId = if (if (isDefined(payment.assetId)) | |
340 | 340 | then (payment.assetId == signAssetId) | |
341 | 341 | else false) | |
342 | 342 | then payment.assetId | |
343 | 343 | else throw("Only SIGN token accepted at the moment") | |
344 | 344 | let currentCertificationPrice = match getInteger(storageVerifier, ("certification_fee_" + toBase58String(signAssetId))) { | |
345 | 345 | case price: Int => | |
346 | 346 | price | |
347 | 347 | case _ => | |
348 | 348 | throw("Price undefined in oracle") | |
349 | 349 | } | |
350 | 350 | if ((amount != currentCertificationPrice)) | |
351 | 351 | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
352 | 352 | else { | |
353 | 353 | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, callerAddress)) | |
354 | 354 | if ((entryExist != "")) | |
355 | - | then throw("You already added | |
355 | + | then throw("You already added it on Sign Art") | |
356 | 356 | else { | |
357 | 357 | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
358 | 358 | if ((hashExist != "")) | |
359 | - | then throw(" | |
359 | + | then throw("Hash already registered on Sign Art") | |
360 | 360 | else { | |
361 | 361 | let isSignCertified = checkSignCertificate(signID, callerAddress, sha256Hash) | |
362 | 362 | if (!(isSignCertified)) | |
363 | - | then throw("Sign Certificate not found | |
363 | + | then throw("Sign Certificate not found for this address.") | |
364 | 364 | else if ((size(cidDisplay) == 0)) | |
365 | 365 | then throw("Display CID cannot be empty") | |
366 | 366 | else if (!(validateString(name, 100))) | |
367 | - | then throw("100 | |
367 | + | then throw("100 Char. max for the name") | |
368 | 368 | else if (!(validateString(description, 1000))) | |
369 | - | then throw("1000 Characters maximum for the description") | |
370 | - | else { | |
371 | - | let tagsList = split(tags, ",") | |
372 | - | if ((size(tagsList) > 5)) | |
373 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
374 | - | else { | |
375 | - | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
376 | - | case s: String => | |
377 | - | s | |
378 | - | case _ => | |
379 | - | userUnregistered | |
380 | - | } | |
381 | - | let timestamp = lastBlock.timestamp | |
382 | - | if (if (isDefined(userIsRegistered)) | |
383 | - | then (userIsRegistered == userUnregistered) | |
384 | - | else false) | |
385 | - | then throw("Please register this account first with \"User infos\" tab") | |
386 | - | else if ((userIsRegistered == userSuspended)) | |
387 | - | then throw("Your account is suspended") | |
388 | - | else if ((userIsRegistered == userRemoved)) | |
389 | - | then throw("Your account have been removed") | |
390 | - | else if ((maxmint > 10)) | |
391 | - | then throw("Maximum 10 editions per artwork") | |
392 | - | else if ((size(sha256Hash) != 64)) | |
393 | - | then throw("Hash should be sha256 string composed of 64 char.") | |
394 | - | else [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry(keyArtArtidBySignid(callerAddress, signID), artId), StringEntry("last_invoke_id", artId), StringEntry(keyArtHashByTxidAddr(callerAddress, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
395 | - | } | |
396 | - | } | |
369 | + | then throw("1000 Char. max for the description") | |
370 | + | else if ((size(split(tags, ",")) > 5)) | |
371 | + | then throw("5 tags max.") | |
372 | + | else { | |
373 | + | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
374 | + | case s: String => | |
375 | + | s | |
376 | + | case _ => | |
377 | + | userUnregistered | |
378 | + | } | |
379 | + | let timestamp = lastBlock.timestamp | |
380 | + | if (if (isDefined(userIsRegistered)) | |
381 | + | then (userIsRegistered == userUnregistered) | |
382 | + | else false) | |
383 | + | then throw("Register this account first with \"User infos\" tab") | |
384 | + | else if ((userIsRegistered == userSuspended)) | |
385 | + | then throw("Account suspended") | |
386 | + | else if ((userIsRegistered == userRemoved)) | |
387 | + | then throw("Account removed") | |
388 | + | else if ((maxmint > 10)) | |
389 | + | then throw("10 editions max per artwork") | |
390 | + | else if ((size(sha256Hash) != 64)) | |
391 | + | then throw("Hash should be 64 char.") | |
392 | + | else [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry(keyArtArtidBySignid(callerAddress, signID), artId), StringEntry("last_invoke_id", artId), StringEntry(keyArtHashByTxidAddr(callerAddress, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
393 | + | } | |
397 | 394 | } | |
398 | 395 | } | |
399 | 396 | } | |
400 | 397 | } | |
401 | 398 | } | |
402 | 399 | ||
403 | 400 | ||
404 | 401 | ||
405 | 402 | @Callable(invoke) | |
406 | 403 | func updateArtwork (txid,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
407 | 404 | let updateId = toBase58String(invoke.transactionId) | |
408 | 405 | let callerAddress = toBase58String(invoke.caller.bytes) | |
409 | 406 | if (!(validateAllCID(cidDisplay, cidExport, cidLicence))) | |
410 | 407 | then throw("Problem with CID") | |
411 | 408 | else if (!(validateAllHash(sha256Export, sha256Licence))) | |
412 | 409 | then throw("Problem with Hashes") | |
413 | 410 | else { | |
414 | 411 | let entryExist = getStringByKey(keyArtName(callerAddress, txid)) | |
415 | 412 | if ((entryExist == "")) | |
416 | 413 | then throw("Entry not found") | |
417 | 414 | else if (!(validateString(name, 100))) | |
418 | 415 | then throw("100 Char. max for the name") | |
419 | 416 | else if (!(validateString(description, 1000))) | |
420 | 417 | then throw("1000 Char. max for the description") | |
421 | 418 | else { | |
422 | 419 | let artworkMinted = match getInteger(this, keyArtIssued(callerAddress, txid)) { | |
423 | 420 | case b: Int => | |
424 | 421 | if ((b == 0)) | |
425 | 422 | then false | |
426 | 423 | else true | |
427 | 424 | case _ => | |
428 | 425 | false | |
429 | 426 | } | |
430 | 427 | if ((size(split(tags, ",")) > 5)) | |
431 | 428 | then throw("5 tags max.") | |
432 | 429 | else { | |
433 | 430 | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
434 | 431 | case s: String => | |
435 | 432 | s | |
436 | 433 | case _ => | |
437 | 434 | userUnregistered | |
438 | 435 | } | |
439 | 436 | if (if (isDefined(userIsRegistered)) | |
440 | 437 | then (userIsRegistered == userUnregistered) | |
441 | 438 | else false) | |
442 | - | then throw(" | |
439 | + | then throw("Register this account first with \"User infos\" tab") | |
443 | 440 | else if ((userIsRegistered == userSuspended)) | |
444 | - | then throw(" | |
441 | + | then throw("Account suspended") | |
445 | 442 | else if ((userIsRegistered == userRemoved)) | |
446 | - | then throw(" | |
443 | + | then throw("Account removed") | |
447 | 444 | else if ((maxmint > 10)) | |
448 | - | then throw(" | |
445 | + | then throw("M10 editions max per artwork") | |
449 | 446 | else if (!(artworkMinted)) | |
450 | 447 | then [StringEntry(keyArtName(callerAddress, txid), name), StringEntry(keyArtDesc(callerAddress, txid), description), StringEntry(keyArtDisplayCid(callerAddress, txid), cidDisplay), StringEntry(keyArtExportCid(callerAddress, txid), cidExport), StringEntry(keyArtExportHash(callerAddress, txid), sha256Export), StringEntry(keyArtLicenceCid(callerAddress, txid), cidLicence), StringEntry(keyArtLicenceHash(callerAddress, txid), sha256Licence), IntegerEntry(keyArtMaxMint(callerAddress, txid), maxmint), StringEntry(keyArtTags(callerAddress, txid), tags), StringEntry(keyArtType(callerAddress, txid), type), StringEntry("last_invoke_id", updateId)] | |
451 | - | else throw(" | |
448 | + | else throw("Artwork already minted") | |
452 | 449 | } | |
453 | 450 | } | |
454 | 451 | } | |
455 | 452 | } | |
456 | 453 | ||
457 | 454 | ||
458 | 455 | ||
459 | 456 | @Callable(i) | |
460 | 457 | func deleteArtwork (artId,address) = { | |
461 | 458 | let callerAddress = toString(addressFromPublicKey(i.callerPublicKey)) | |
462 | 459 | let id = toBase58String(i.transactionId) | |
463 | 460 | let addressToUse = if (if ((callerAddress == admin)) | |
464 | 461 | then true | |
465 | 462 | else (callerAddress == admin2)) | |
466 | 463 | then address | |
467 | 464 | else callerAddress | |
468 | 465 | let entryExist = match getString(this, keyArtName(addressToUse, artId)) { | |
469 | 466 | case s: String => | |
470 | 467 | s | |
471 | 468 | case _ => | |
472 | - | throw("No artwork matching | |
469 | + | throw("No artwork matching") | |
473 | 470 | } | |
474 | 471 | let artworkMinted = match getInteger(this, keyArtIssued(addressToUse, artId)) { | |
475 | 472 | case b: Int => | |
476 | 473 | if ((b != 0)) | |
477 | 474 | then true | |
478 | 475 | else false | |
479 | 476 | case _ => | |
480 | 477 | false | |
481 | 478 | } | |
482 | 479 | let maxMint = getIntegerByKey(keyArtMaxMint(addressToUse, artId)) | |
483 | 480 | let sha256Hash = match getString(this, keyArtHashByTxidAddr(addressToUse, artId)) { | |
484 | 481 | case s: String => | |
485 | 482 | s | |
486 | 483 | case _ => | |
487 | - | throw("No artwork hash matching | |
484 | + | throw("No artwork hash matching") | |
488 | 485 | } | |
489 | 486 | let signID = match getString(this, keyArtSignID(addressToUse, artId)) { | |
490 | 487 | case s: String => | |
491 | 488 | s | |
492 | 489 | case _ => | |
493 | - | throw("No SIGN ID matching | |
490 | + | throw("No SIGN ID matching") | |
494 | 491 | } | |
495 | 492 | let dataToDelete = [DeleteEntry(keyArtDate(addressToUse, artId)), DeleteEntry(keyArtName(addressToUse, artId)), DeleteEntry(keyArtDesc(addressToUse, artId)), DeleteEntry(keyArtDisplayCid(addressToUse, artId)), DeleteEntry(keyArtExportCid(addressToUse, artId)), DeleteEntry(keyArtExportHash(addressToUse, artId)), DeleteEntry(keyArtLicenceHash(addressToUse, artId)), DeleteEntry(keyArtLicenceCid(addressToUse, artId)), DeleteEntry(keyArtType(addressToUse, artId)), DeleteEntry(keyArtTags(addressToUse, artId)), DeleteEntry(keyArtMaxMint(addressToUse, artId)), DeleteEntry(keyArtSignID(addressToUse, artId)), DeleteEntry(keyArtIssued(addressToUse, artId)), DeleteEntry(keyArtOnSale(addressToUse, artId)), StringEntry("last_invoke_id", id), DeleteEntry(keyArtOwnerByHash(sha256Hash)), DeleteEntry(keyArtArtidBySignid(addressToUse, signID)), DeleteEntry(keyArtTxidByHashOwner(sha256Hash, addressToUse)), DeleteEntry(keyArtPrice(addressToUse, artId)), DeleteEntry(keyArtMaxMint(addressToUse, artId)), DeleteEntry(keyArtAssetIdAccepted(addressToUse, artId)), DeleteEntry(((((("art_sold_1_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_2_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_3_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_4_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_5_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_6_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_7_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_8_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_9_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse)), DeleteEntry(((((("art_sold_10_of_" + toString(maxMint)) + "_") + artId) + "_") + addressToUse))] | |
496 | 493 | if (if ((callerAddress == admin)) | |
497 | 494 | then true | |
498 | 495 | else (callerAddress == admin2)) | |
499 | 496 | then dataToDelete | |
500 | 497 | else if (!(artworkMinted)) | |
501 | 498 | then dataToDelete | |
502 | - | else throw(" | |
499 | + | else throw("Artwork already minted, you cannot delete it") | |
503 | 500 | } | |
504 | 501 | ||
505 | 502 | ||
506 | 503 | ||
507 | 504 | @Callable(invoke) | |
508 | 505 | func sellArtwork (artId,price,maxMint,assetId) = { | |
509 | 506 | let id = toBase58String(invoke.transactionId) | |
510 | 507 | let callerAddress = toBase58String(invoke.caller.bytes) | |
511 | 508 | let sellDate = lastBlock.timestamp | |
512 | 509 | let exportCID = getStringByKey(keyArtExportCid(callerAddress, artId)) | |
513 | 510 | if ((size(split(exportCID, "/")[0]) != 59)) | |
514 | 511 | then throw("You cannot sell artwork with no export file") | |
515 | 512 | else { | |
516 | 513 | let exportHash = getStringByKey(keyArtExportHash(callerAddress, artId)) | |
517 | 514 | if ((size(exportHash) != 64)) | |
518 | 515 | then throw("You cannot sell artwork with no export hash") | |
519 | 516 | else if (if (if ((assetId != toBase58String(signAssetId))) | |
520 | 517 | then (assetId != toBase58String(wavesAssetId)) | |
521 | 518 | else false) | |
522 | 519 | then (assetId != toBase58String(usdnAssetId)) | |
523 | 520 | else false) | |
524 | 521 | then throw("Only SIGN, USDN or WAVES currency accepted at the moment") | |
525 | 522 | else { | |
526 | 523 | let artworkName = match getString(this, keyArtName(callerAddress, artId)) { | |
527 | 524 | case s: String => | |
528 | 525 | s | |
529 | 526 | case _ => | |
530 | 527 | throw("This artwork doesn't exit or you are not the owner") | |
531 | 528 | } | |
532 | 529 | let userIsRegistered = match getString(this, keyUserStatus(callerAddress)) { | |
533 | 530 | case s: String => | |
534 | 531 | s | |
535 | 532 | case _ => | |
536 | 533 | throw("Please register this account first") | |
537 | 534 | } | |
538 | 535 | let amountSold = match getInteger(this, keyArtIssued(callerAddress, artId)) { | |
539 | 536 | case n: Int => | |
540 | 537 | n | |
541 | 538 | case _ => | |
542 | 539 | 0 | |
543 | 540 | } | |
544 | 541 | let maxCanSell = match getInteger(this, keyArtMaxMint(callerAddress, artId)) { | |
545 | 542 | case n: Int => | |
546 | 543 | n | |
547 | 544 | case _ => | |
548 | 545 | 0 | |
549 | 546 | } | |
550 | 547 | if (if ((amountSold != 0)) | |
551 | 548 | then (amountSold == maxCanSell) | |
552 | 549 | else false) | |
553 | 550 | then throw("You reached the max edition allowed to sell for this edition.") | |
554 | 551 | else if (if ((amountSold > 0)) | |
555 | 552 | then (maxCanSell != maxMint) | |
556 | 553 | else false) | |
557 | 554 | then throw("You cannot change the maximum issuable anymore") | |
558 | 555 | else if ((userIsRegistered == userSuspended)) | |
559 | 556 | then throw("Your account is suspended") | |
560 | 557 | else if ((userIsRegistered == userRemoved)) | |
561 | 558 | then throw("Your account have been deleted") | |
562 | 559 | else { | |
563 | 560 | let sellStatus = if ((price > 0)) | |
564 | 561 | then true | |
565 | 562 | else false | |
566 | 563 | [BooleanEntry(keyArtOnSale(callerAddress, artId), sellStatus), IntegerEntry(keyArtPrice(callerAddress, artId), price), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxMint), StringEntry(keyArtAssetIdAccepted(callerAddress, artId), assetId), StringEntry("last_invoke_id", id)] | |
567 | 564 | } | |
568 | 565 | } | |
569 | 566 | } | |
570 | 567 | } | |
571 | 568 | ||
572 | 569 | ||
573 | 570 | ||
574 | 571 | @Callable(invoke) | |
575 | 572 | func buyArtwork (artId,issuer) = { | |
576 | 573 | let id = toBase58String(invoke.transactionId) | |
577 | 574 | let callerAddress = toBase58String(invoke.caller.bytes) | |
578 | 575 | let totalNFT = getIntegerByKey("total_nft_issued") | |
579 | 576 | let signID = getStringByKey(keyArtSignID(issuer, artId)) | |
580 | 577 | let artworkName = match getString(this, keyArtName(issuer, artId)) { | |
581 | 578 | case s: String => | |
582 | 579 | s | |
583 | 580 | case _ => | |
584 | - | throw(" | |
581 | + | throw("Artwork doesn't exit") | |
585 | 582 | } | |
586 | 583 | let displayCID = getStringByKey(keyArtDisplayCid(issuer, artId)) | |
587 | 584 | let exportCID = getStringByKey(keyArtExportCid(issuer, artId)) | |
588 | 585 | let exportHash = getStringByKey(keyArtExportHash(issuer, artId)) | |
589 | 586 | let licenceCID = getStringByKey(keyArtLicenceCid(issuer, artId)) | |
590 | 587 | let licenceHash = getStringByKey(keyArtLicenceHash(issuer, artId)) | |
591 | 588 | let description = take(getStringByKey(keyArtDesc(issuer, artId)), 50) | |
592 | 589 | let amountSold = getIntegerByKey(keyArtIssued(issuer, artId)) | |
593 | 590 | let artworkPrice = getIntegerByKey(keyArtPrice(issuer, artId)) | |
594 | 591 | let isOnSale = getBooleanByKey(keyArtOnSale(issuer, artId)) | |
595 | 592 | let priceAssetId = getStringByKey(keyArtAssetIdAccepted(issuer, artId)) | |
596 | 593 | let sourceHash = getStringByKey(keyArtHashByTxidAddr(issuer, artId)) | |
597 | 594 | if ((artworkPrice == 0)) | |
598 | - | then throw(" | |
595 | + | then throw("Artwork not for sell") | |
599 | 596 | else if (!(isOnSale)) | |
600 | - | then throw(" | |
597 | + | then throw("Artwork not for sale") | |
601 | 598 | else { | |
602 | 599 | let maxCanSell = getIntegerByKey(keyArtMaxMint(issuer, artId)) | |
603 | 600 | let payment = value(invoke.payments[0]) | |
604 | 601 | let amount = value(payment.amount) | |
605 | 602 | let assetId = if (if (isDefined(payment.assetId)) | |
606 | 603 | then (payment.assetId == fromBase58String(priceAssetId)) | |
607 | 604 | else false) | |
608 | 605 | then payment.assetId | |
609 | 606 | else throw((("Only " + priceAssetId) + " token id accepted at the moment")) | |
610 | 607 | let cut = if ((priceAssetId == toBase58String(signAssetId))) | |
611 | 608 | then 8 | |
612 | 609 | else 10 | |
613 | 610 | let amountForSign = ((amount / 100) * cut) | |
614 | 611 | let amountForCreator = (amount - amountForSign) | |
615 | 612 | if ((amountSold == maxCanSell)) | |
616 | - | then throw(" | |
613 | + | then throw("Artwork sold out") | |
617 | 614 | else if ((artworkPrice != amount)) | |
618 | - | then throw( | |
615 | + | then throw("Payment don't match") | |
619 | 616 | else { | |
620 | 617 | let newAmountSold = (amountSold + 1) | |
621 | 618 | let entryDate = lastBlock.timestamp | |
622 | 619 | let issueMeta = (((((((((((((((((((((((((((("{\"version\": 1, | |
623 | 620 | \"creator\": \"" + issuer) + "\", | |
624 | 621 | \"artID\": \"") + artId) + "\", | |
625 | 622 | \"signID\": \"") + signID) + "\", | |
626 | 623 | \"artwork_name\": \"") + artworkName) + "\", | |
627 | 624 | \"artwork_desc\": \"") + description) + "\", | |
628 | 625 | \"issue\": \"") + toString(newAmountSold)) + "/") + toString(maxCanSell)) + "\", | |
629 | 626 | \"maxIssuable\": \"") + toString(maxCanSell)) + "\", | |
630 | 627 | \"source_hash\": \"") + sourceHash) + "\", | |
631 | 628 | \"display_cid\": \"") + displayCID) + "\", | |
632 | 629 | \"export_cid\": \"") + exportCID) + "\", | |
633 | 630 | \"export_hash\": \"") + exportHash) + "\", | |
634 | 631 | \"licence_cid\": \"") + licenceCID) + "\", | |
635 | 632 | \"licence_hash\": \"") + licenceHash) + "\"}") | |
636 | 633 | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
637 | 634 | let idNFT = calculateAssetId(issueNFT) | |
638 | 635 | let sellStatus = if ((newAmountSold == maxCanSell)) | |
639 | 636 | then false | |
640 | 637 | else true | |
641 | 638 | [IntegerEntry(keyArtIssued(issuer, artId), newAmountSold), StringEntry(((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer), ((((((((callerAddress + "_") + toString(entryDate)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId)), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyArtOnSale(issuer, artId), sellStatus), StringEntry("last_invoke_id", id), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(invoke.caller, 1, idNFT)] | |
642 | 639 | } | |
643 | 640 | } | |
644 | 641 | } | |
645 | 642 | ||
646 | 643 | ||
647 | 644 | ||
648 | 645 | @Callable(i) | |
649 | 646 | func deleteUser (address) = { | |
650 | 647 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
651 | 648 | let id = toBase58String(i.transactionId) | |
652 | 649 | if (if ((callerAddr == admin)) | |
653 | 650 | then true | |
654 | 651 | else (callerAddr == admin2)) | |
655 | 652 | then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), StringEntry(keyUserStatus(address), userRemoved), StringEntry("last_invoke_id", id)] | |
656 | 653 | else throw("You are not allowed") | |
657 | 654 | } | |
658 | 655 | ||
659 | 656 |
github/deemru/w8io/026f985 89.69 ms ◑