tx · EHxU475ATs1h4vS3zrgBNuypCZtPUEn243Hne1irszuo 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY: -0.01900000 Waves 2023.03.24 06:29 [2503549] smart account 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY > SELF 0.00000000 Waves
{ "type": 13, "id": "EHxU475ATs1h4vS3zrgBNuypCZtPUEn243Hne1irszuo", "fee": 1900000, "feeAssetId": null, "timestamp": 1679628631721, "version": 2, "chainId": 84, "sender": "3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY", "senderPublicKey": "J9DCtJJxJBWZdtDR12BA1U94Q3cZzMi4R6k5hYkAzmzC", "proofs": [ "5Pw86UjvfZoBSkFL3KgtoP5qARAsa4twzRVsFnqwewQqWgy7GW2LJAFyRkztwk8no8Dt8NZgMdZgYsYdv7GKefiX" ], "script": "base64:BgL1FAgCEgQKAggIEhAKDggICAgICAgICAgICAEIEg8KDQgICAgICAgICAgIAQgSBgoECAgICBIECgIICBIICgYIAQEIAQgSBAoCCAgSBAoCCAgSBwoFCAgICAgSBgoECAgICCIOZ2V0U3RyaW5nQnlLZXkiA2tleSIIdW5pdFRlc3QiCW9yYWNsZUZlZSIIc2lnbkRhcHAiC2ZlZVJlY2VpdmVyIgh1c2VyRGFwcCINd2hpdGVsaXN0RGFwcCILc2lnbkFzc2V0SWQiC3VzZG5Bc3NldElkIgt1c2R0QXNzZXRJZCIMd2F2ZXNBc3NldElkIgVjaHJpcyIZZ2V0SW50ZWdlckJ5S2V5RnJvbU9yYWNsZSIPZ2V0SW50ZWdlckJ5S2V5Ig5jaGVja1doaXRlbGlzdCIPZ2V0Qm9vbGVhbkJ5S2V5IgdzaWduQ3V0Igt1c2RuV2F2ZUN1dCIOZGVmYXVsdExpY2VuY2UiEmRlZmF1bHRIYXNoTGljZW5jZSILZGFwcFJ1bm5pbmciDm1haW50ZW5hbmNlTVNHIg11c2VyU3VzcGVuZGVkIgt1c2VyUmVtb3ZlZCIQdXNlclVucmVnaXN0Z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AACCAUCY1cDZmVlAKDCHgcJAAACCAUCY1cKZmVlQXNzZXRJZAUEdW5pdAcJAMgTAwgFAmNVCWJvZHlCeXRlcwkAkQMCCAUCY1UGcHJvb2ZzAAAJANkEAQkBAmNtAQkAkQMCCAUCY1cEYXJncwAECQD0AwMIBQJjVQlib2R5Qnl0ZXMJAJEDAggFAmNVBnByb29mcwAACAUCY1UPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJjVQlib2R5Qnl0ZXMJAJEDAggFAmNVBnByb29mcwAACAUCY1UPc2VuZGVyUHVibGljS2V5Oa1XWA==", "height": 2503549, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BVcdgVpYKXrT3UXeLm48ZvPcM9TQLhiH1qPNc7jnnBXN Next: y7M51j4x6jCigSSUbsTWRQYBsfqaeqbuw345rUvMFaM Diff:
Old | New | Differences | |
---|---|---|---|
391 | 391 | then invoke(whitelistDapp, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(pubKey)))], nil) | |
392 | 392 | else unit | |
393 | 393 | if ((get_sponsored_waves == get_sponsored_waves)) | |
394 | - | then if (true) | |
395 | - | then throw(caller) | |
396 | - | else $Tuple4(toBase58String(i.transactionId), caller, lastBlock.timestamp, (isSponsored > 0)) | |
394 | + | then $Tuple4(toBase58String(i.transactionId), caller, lastBlock.timestamp, (isSponsored > 0)) | |
397 | 395 | else throw("Strict value is not equal to itself.") | |
398 | 396 | } | |
399 | 397 | ||
404 | 402 | ||
405 | 403 | ||
406 | 404 | func buyMint (i,artId,issuer,bidId,bidOwner,pubKey) = { | |
407 | - | let $ | |
408 | - | let id = $ | |
409 | - | let caller = $ | |
410 | - | let date = $ | |
411 | - | let isSponsored = $ | |
405 | + | let $t01304413133 = idCallerDateSponsored(i, pubKey) | |
406 | + | let id = $t01304413133._1 | |
407 | + | let caller = $t01304413133._2 | |
408 | + | let date = $t01304413133._3 | |
409 | + | let isSponsored = $t01304413133._4 | |
412 | 410 | if (true) | |
413 | 411 | then throw(((((((caller + " / ") + issuer) + " / ") + bidOwner) + " / ") + pubKey)) | |
414 | 412 | else { | |
467 | 465 | then throw(checkUser) | |
468 | 466 | else { | |
469 | 467 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
470 | - | let $ | |
468 | + | let $t01473614928 = if (isBid) | |
471 | 469 | then getPriceAssetIdFromBid(bidDataKey) | |
472 | 470 | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
473 | - | let amount = $ | |
474 | - | let assetId = $ | |
471 | + | let amount = $t01473614928._1 | |
472 | + | let assetId = $t01473614928._2 | |
475 | 473 | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver) | |
476 | 474 | let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShareAgent(issuer)), 0) | |
477 | 475 | let publicAgent = valueOrElse(getString(userDapp, keyArtistPublicAgentAddr(issuer)), feeReceiver) | |
576 | 574 | ||
577 | 575 | @Callable(i) | |
578 | 576 | func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = { | |
579 | - | let $ | |
580 | - | let artId = $ | |
581 | - | let caller = $ | |
582 | - | let date = $ | |
583 | - | let isSponsored = $ | |
577 | + | let $t02010420177 = idCallerDateSponsored(i, pubKey) | |
578 | + | let artId = $t02010420177._1 | |
579 | + | let caller = $t02010420177._2 | |
580 | + | let date = $t02010420177._3 | |
581 | + | let isSponsored = $t02010420177._4 | |
584 | 582 | if (!(validateHash(sha256Hash))) | |
585 | 583 | then throw("Hash should be 64 characters maximum") | |
586 | 584 | else { | |
587 | - | let $ | |
588 | - | let licenceCID = $ | |
589 | - | let licenceHash = $ | |
585 | + | let $t02027820347 = setLIcence(cidLicence, sha256Licence) | |
586 | + | let licenceCID = $t02027820347._1 | |
587 | + | let licenceHash = $t02027820347._2 | |
590 | 588 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
591 | 589 | if ((validateArtwork != "")) | |
592 | 590 | then throw("Something went wrong!") | |
593 | 591 | else { | |
594 | 592 | let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0) | |
595 | - | let $ | |
593 | + | let $t02064620730 = if (whitelisted_drop) | |
596 | 594 | then $Tuple2(0, signID) | |
597 | 595 | else validatePayment(i) | |
598 | - | let amount = $ | |
599 | - | let assetId = $ | |
596 | + | let amount = $t02064620730._1 | |
597 | + | let assetId = $t02064620730._2 | |
600 | 598 | if (!(isDefined(amount))) | |
601 | 599 | then throw("Something went wrong") | |
602 | 600 | else { | |
637 | 635 | func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = if (!(dappRunning)) | |
638 | 636 | then throw(maintenanceMSG) | |
639 | 637 | else { | |
640 | - | let $ | |
641 | - | let id = $ | |
642 | - | let caller = $ | |
643 | - | let date = $ | |
644 | - | let isSponsored = $ | |
645 | - | let $ | |
646 | - | let licenceCID = $ | |
647 | - | let licenceHash = $ | |
638 | + | let $t02376423834 = idCallerDateSponsored(i, pubKey) | |
639 | + | let id = $t02376423834._1 | |
640 | + | let caller = $t02376423834._2 | |
641 | + | let date = $t02376423834._3 | |
642 | + | let isSponsored = $t02376423834._4 | |
643 | + | let $t02384423913 = setLIcence(cidLicence, sha256Licence) | |
644 | + | let licenceCID = $t02384423913._1 | |
645 | + | let licenceHash = $t02384423913._2 | |
648 | 646 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
649 | 647 | if ((validateArtwork != "")) | |
650 | 648 | then throw("Something went wrong!") | |
672 | 670 | ||
673 | 671 | @Callable(i) | |
674 | 672 | func flagArtwork (artId,addr,flag,note) = { | |
675 | - | let $ | |
676 | - | let id = $ | |
677 | - | let caller = $ | |
673 | + | let $t02554025574 = idCallerDate(i) | |
674 | + | let id = $t02554025574._1 | |
675 | + | let caller = $t02554025574._2 | |
678 | 676 | if (containsElement([chris, toString(this)], caller)) | |
679 | 677 | then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
680 | 678 | then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)] | |
686 | 684 | ||
687 | 685 | @Callable(i) | |
688 | 686 | func deleteArtwork (artId,addr) = { | |
689 | - | let $ | |
690 | - | let id = $ | |
691 | - | let caller = $ | |
687 | + | let $t02601026044 = idCallerDate(i) | |
688 | + | let id = $t02601026044._1 | |
689 | + | let caller = $t02601026044._2 | |
692 | 690 | let addrToUse = if (containsElement([chris, toString(this)], caller)) | |
693 | 691 | then addr | |
694 | 692 | else caller | |
721 | 719 | ||
722 | 720 | @Callable(i) | |
723 | 721 | func sellArtwork (artId,price,maxMint,assetId,blockEnd,pubKey) = { | |
724 | - | let $ | |
725 | - | let id = $ | |
726 | - | let caller = $ | |
727 | - | let date = $ | |
728 | - | let isSponsored = $ | |
722 | + | let $t02888028950 = idCallerDateSponsored(i, pubKey) | |
723 | + | let id = $t02888028950._1 | |
724 | + | let caller = $t02888028950._2 | |
725 | + | let date = $t02888028950._3 | |
726 | + | let isSponsored = $t02888028950._4 | |
729 | 727 | let artworkName = getStringByKey(keyName(caller, artId)) | |
730 | 728 | if ((artworkName == "")) | |
731 | 729 | then throw("This art doesn't match your account") | |
799 | 797 | ||
800 | 798 | @Callable(i) | |
801 | 799 | func setBid (artId,issuer) = { | |
802 | - | let $ | |
803 | - | let id = $ | |
804 | - | let caller = $ | |
805 | - | let date = $ | |
806 | - | let $ | |
807 | - | let payment = $ | |
808 | - | let amount = $ | |
800 | + | let $t03133231372 = idCallerDate(i) | |
801 | + | let id = $t03133231372._1 | |
802 | + | let caller = $t03133231372._2 | |
803 | + | let date = $t03133231372._3 | |
804 | + | let $t03137731413 = isPayment(i) | |
805 | + | let payment = $t03137731413._1 | |
806 | + | let amount = $t03137731413._2 | |
809 | 807 | let assetId = if (!(isDefined(payment.assetId))) | |
810 | 808 | then "WAVES" | |
811 | 809 | else toBase58String(value(payment.assetId)) | |
836 | 834 | ||
837 | 835 | @Callable(i) | |
838 | 836 | func acceptBid (artId,issuer,bidId,bidOwner,pubKey) = { | |
839 | - | let $ | |
840 | - | let id = $ | |
841 | - | let caller = $ | |
842 | - | let date = $ | |
843 | - | let isSponsored = $ | |
837 | + | let $t03263332703 = idCallerDateSponsored(i, pubKey) | |
838 | + | let id = $t03263332703._1 | |
839 | + | let caller = $t03263332703._2 | |
840 | + | let date = $t03263332703._3 | |
841 | + | let isSponsored = $t03263332703._4 | |
844 | 842 | if ((caller != issuer)) | |
845 | 843 | then throw("You cannot do this action") | |
846 | 844 | else buyMint(i, artId, issuer, bidId, bidOwner, pubKey) | |
850 | 848 | ||
851 | 849 | @Callable(i) | |
852 | 850 | func cancelBid (artId,issuer,bidId,bidOwner) = { | |
853 | - | let $ | |
854 | - | let id = $ | |
855 | - | let caller = $ | |
856 | - | let date = $ | |
851 | + | let $t03293732998 = idCallerDate(i) | |
852 | + | let id = $t03293732998._1 | |
853 | + | let caller = $t03293732998._2 | |
854 | + | let date = $t03293732998._3 | |
857 | 855 | if (if ((caller != bidOwner)) | |
858 | 856 | then (caller != issuer) | |
859 | 857 | else false) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let unitTest = false | |
8 | 8 | ||
9 | 9 | let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee"))) | |
10 | 10 | ||
11 | 11 | let signDapp = value(addressFromString(getStringByKey("conf_signweb_dapp"))) | |
12 | 12 | ||
13 | 13 | let feeReceiver = getStringByKey("conf_fee_receiver") | |
14 | 14 | ||
15 | 15 | let userDapp = if (unitTest) | |
16 | 16 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
17 | 17 | else value(addressFromString(getStringByKey("conf_users_dapp"))) | |
18 | 18 | ||
19 | 19 | let whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp"))) | |
20 | 20 | ||
21 | 21 | let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN")) | |
22 | 22 | ||
23 | 23 | let usdnAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDN")) | |
24 | 24 | ||
25 | 25 | let usdtAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDT")) | |
26 | 26 | ||
27 | 27 | let wavesAssetId = base58'' | |
28 | 28 | ||
29 | 29 | let chris = getStringByKey("conf_admin_1") | |
30 | 30 | ||
31 | 31 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | let signCut = 7 | |
44 | 44 | ||
45 | 45 | let usdnWaveCut = 10 | |
46 | 46 | ||
47 | 47 | let defaultLicence = getStringByKey("conf_default_licence") | |
48 | 48 | ||
49 | 49 | let defaultHashLicence = getStringByKey("conf_default_licence_hash") | |
50 | 50 | ||
51 | 51 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
52 | 52 | ||
53 | 53 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
54 | 54 | ||
55 | 55 | let userSuspended = "SUSPENDED" | |
56 | 56 | ||
57 | 57 | let userRemoved = "REMOVED" | |
58 | 58 | ||
59 | 59 | let userUnregistered = "UNREGISTERED" | |
60 | 60 | ||
61 | 61 | let userAllowed = "ALLOWED" | |
62 | 62 | ||
63 | 63 | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
64 | 64 | ||
65 | 65 | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) { | |
66 | 66 | case a: String => | |
67 | 67 | if (contains(a, sha256Hash)) | |
68 | 68 | then true | |
69 | 69 | else false | |
70 | 70 | case _ => | |
71 | 71 | false | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func validateCID (cid) = if (contains(cid, "/")) | |
76 | 76 | then if (if ((76 > size(cid))) | |
77 | 77 | then (size(split(cid, "/")[0]) == 59) | |
78 | 78 | else false) | |
79 | 79 | then (16 > size(split(cid, "/")[1])) | |
80 | 80 | else false | |
81 | 81 | else false | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func validateHash (hash) = (size(hash) == 64) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyUserStatus (caller) = ("user_status_" + caller) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyExportHash (caller,artId) = ((("art_export_hash_" + artId) + "_") + caller) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyExportCid (caller,artId) = ((("art_export_cid_" + artId) + "_") + caller) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keySignID (caller,artId) = ((("art_signid_" + artId) + "_") + caller) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyLicenceHash (caller,artId) = ((("art_licence_hash_" + artId) + "_") + caller) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyLicenceCid (caller,artId) = ((("art_licence_cid_" + artId) + "_") + caller) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyNote (caller,artId) = ((("art_note_" + artId) + "_") + caller) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyCrawler (caller,artId) = ((("art_crawler_cid_" + artId) + "_") + caller) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyRoyalties (caller,artId) = ((("art_royalties_" + artId) + "_") + caller) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyEndSale (caller,artId) = ((("art_endsale_" + artId) + "_") + caller) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyFlag (caller,artId) = ((("art_flag_" + artId) + "_") + caller) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func keyPrimaryShareAgent (artistAddr) = ("artist_agent_primary_" + artistAddr) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func keyArtistPublicAgentAddr (artistAddr) = ("artist_public_agent_" + artistAddr) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func keyPrimarySharePublicAgent (artistAddr) = ("artist_public_agent_primary_" + artistAddr) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func keyidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller))))) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay))) | |
178 | 178 | then throw("Wrong Display CID") | |
179 | 179 | else if (!(validateCID(cidExport))) | |
180 | 180 | then throw("Wrong Export CID") | |
181 | 181 | else if (if ((cidLicence != "")) | |
182 | 182 | then !(validateCID(cidLicence)) | |
183 | 183 | else false) | |
184 | 184 | then throw("Wrong Licence CID") | |
185 | 185 | else true | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func validateAllHash (sha256Export,sha256Licence) = if (!(validateHash(sha256Export))) | |
189 | 189 | then throw("Export Hash 64 char. max") | |
190 | 190 | else if (!(validateHash(sha256Licence))) | |
191 | 191 | then throw("Licence Hash 64 char. max") | |
192 | 192 | else true | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func validateString (str,max) = if ((size(str) == 0)) | |
196 | 196 | then throw("Field cannot be is empty") | |
197 | 197 | else if ((size(str) > max)) | |
198 | 198 | then throw((str + " is too long")) | |
199 | 199 | else true | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func validateUser (caller) = { | |
203 | 203 | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
204 | 204 | if (if ((userStatus == userUnregistered)) | |
205 | 205 | then true | |
206 | 206 | else (userStatus == userAllowed)) | |
207 | 207 | then "Register this account first with \"Account\" tab" | |
208 | 208 | else if ((userStatus == userSuspended)) | |
209 | 209 | then "Account suspended" | |
210 | 210 | else if ((userStatus == userRemoved)) | |
211 | 211 | then "Account removed" | |
212 | 212 | else "" | |
213 | 213 | } | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func setLIcence (cidLicence,sha256Licence) = { | |
217 | 217 | let cid = if ((size(cidLicence) == 0)) | |
218 | 218 | then defaultLicence | |
219 | 219 | else cidLicence | |
220 | 220 | let hash = if ((size(sha256Licence) == 0)) | |
221 | 221 | then defaultHashLicence | |
222 | 222 | else sha256Licence | |
223 | 223 | $Tuple2(cid, hash) | |
224 | 224 | } | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags,royalties) = { | |
228 | 228 | let checkUser = validateUser(caller) | |
229 | 229 | if ((checkUser != "")) | |
230 | 230 | then throw(checkUser) | |
231 | 231 | else if ((size(cidDisplay) == 0)) | |
232 | 232 | then throw("Display CID cannot be empty") | |
233 | 233 | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
234 | 234 | then throw("Problem with CID") | |
235 | 235 | else if (!(validateAllHash(sha256Export, licenceHash))) | |
236 | 236 | then throw("Problem with Hashes") | |
237 | 237 | else if (!(validateString(name, 100))) | |
238 | 238 | then throw("100 Char. max name") | |
239 | 239 | else if (!(validateString(description, 1000))) | |
240 | 240 | then throw("1000 Char. max description") | |
241 | 241 | else if (if ((0 > royalties)) | |
242 | 242 | then true | |
243 | 243 | else (royalties > 1000)) | |
244 | 244 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
245 | 245 | else if ((size(split(tags, ",")) > 5)) | |
246 | 246 | then throw("5 tags max.") | |
247 | 247 | else "" | |
248 | 248 | } | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func isPayment (i) = if ((size(i.payments) == 0)) | |
252 | 252 | then throw("No payment attached") | |
253 | 253 | else { | |
254 | 254 | let payment = value(i.payments[0]) | |
255 | 255 | let amount = value(payment.amount) | |
256 | 256 | $Tuple2(payment, amount) | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func validatePayment (i) = { | |
261 | 261 | let $t091809216 = isPayment(i) | |
262 | 262 | let payment = $t091809216._1 | |
263 | 263 | let amount = $t091809216._2 | |
264 | 264 | let assetId = if (if (isDefined(payment.assetId)) | |
265 | 265 | then (payment.assetId == signAssetId) | |
266 | 266 | else false) | |
267 | 267 | then payment.assetId | |
268 | 268 | else throw("Only SIGN token accepted as transaction fee") | |
269 | 269 | if ((amount != currentCertificationPrice)) | |
270 | 270 | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
271 | 271 | else $Tuple2(amount, assetId) | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) { | |
276 | 276 | case b: Int => | |
277 | 277 | if ((b != 0)) | |
278 | 278 | then true | |
279 | 279 | else false | |
280 | 280 | case _ => | |
281 | 281 | false | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
286 | 286 | let $t098049840 = isPayment(i) | |
287 | 287 | let payment = $t098049840._1 | |
288 | 288 | let amount = $t098049840._2 | |
289 | 289 | let assetId = if (!(isDefined(payment.assetId))) | |
290 | 290 | then unit | |
291 | 291 | else if (if ((size(priceAssetId) > 0)) | |
292 | 292 | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
293 | 293 | else false) | |
294 | 294 | then payment.assetId | |
295 | 295 | else throw("Wrong asset id") | |
296 | 296 | if (if ((assetId == unit)) | |
297 | 297 | then (priceAssetId != "") | |
298 | 298 | else false) | |
299 | 299 | then throw("Wrong asset id") | |
300 | 300 | else if ((artworkPrice != amount)) | |
301 | 301 | then throw("Payment don't match") | |
302 | 302 | else $Tuple2(amount, assetId) | |
303 | 303 | } | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | func acceptedAssetIds (assetId) = if (if (if (if (if ((assetId != toBase58String(signAssetId))) | |
307 | 307 | then (assetId != toBase58String(wavesAssetId)) | |
308 | 308 | else false) | |
309 | 309 | then (assetId != "WAVES") | |
310 | 310 | else false) | |
311 | 311 | then (assetId != toBase58String(usdnAssetId)) | |
312 | 312 | else false) | |
313 | 313 | then (assetId != toBase58String(usdtAssetId)) | |
314 | 314 | else false) | |
315 | 315 | then throw("Only SIGN, USDN,USDT or WAVES accepted") | |
316 | 316 | else true | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | func validateMinSell (assetId,price) = { | |
320 | 320 | let minSellWaves = if (unitTest) | |
321 | 321 | then 10 | |
322 | 322 | else getIntegerByKeyFromOracle("waves_min_sell") | |
323 | 323 | let minSellUsdn = 1000000 | |
324 | 324 | let minSellSign = if (unitTest) | |
325 | 325 | then 1 | |
326 | 326 | else (currentCertificationPrice * 2) | |
327 | 327 | if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
328 | 328 | then (minSellUsdn > price) | |
329 | 329 | else false) | |
330 | 330 | then (price != 0) | |
331 | 331 | else false) | |
332 | 332 | then true | |
333 | 333 | else if (if ((assetId == toBase58String(usdtAssetId))) | |
334 | 334 | then (minSellUsdn > price) | |
335 | 335 | else false) | |
336 | 336 | then (price != 0) | |
337 | 337 | else false) | |
338 | 338 | then true | |
339 | 339 | else if (if ((assetId == toBase58String(signAssetId))) | |
340 | 340 | then (minSellSign > price) | |
341 | 341 | else false) | |
342 | 342 | then (price != 0) | |
343 | 343 | else false) | |
344 | 344 | then true | |
345 | 345 | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
346 | 346 | then true | |
347 | 347 | else (assetId == "WAVES")) | |
348 | 348 | then (minSellWaves > price) | |
349 | 349 | else false) | |
350 | 350 | then (price != 0) | |
351 | 351 | else false) | |
352 | 352 | then throw("Wrong minimum sell price") | |
353 | 353 | else true | |
354 | 354 | } | |
355 | 355 | ||
356 | 356 | ||
357 | 357 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
358 | 358 | then unit | |
359 | 359 | else fromBase58String(assetId) | |
360 | 360 | ||
361 | 361 | ||
362 | 362 | func getPriceAssetIdFromBid (bidDataKey) = { | |
363 | 363 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
364 | 364 | if ((bidData == "")) | |
365 | 365 | then throw("Bid not found") | |
366 | 366 | else { | |
367 | 367 | let bidDataArr = split(bidData, "_") | |
368 | 368 | let bidAmount = parseIntValue(bidDataArr[1]) | |
369 | 369 | let bidAssetId = getBidAssetId(bidDataArr[0]) | |
370 | 370 | if ((0 >= bidAmount)) | |
371 | 371 | then throw("Wrong amount") | |
372 | 372 | else $Tuple2(bidAmount, bidAssetId) | |
373 | 373 | } | |
374 | 374 | } | |
375 | 375 | ||
376 | 376 | ||
377 | 377 | func idCallerDateSponsored (i,pubKey) = if (!(dappRunning)) | |
378 | 378 | then throw(maintenanceMSG) | |
379 | 379 | else { | |
380 | 380 | let isSponsored = if ((pubKey != "")) | |
381 | 381 | then valueOrElse(checkWhitelist((toString(addressFromPublicKey(fromBase58String(pubKey))) + "_free_txs")), 0) | |
382 | 382 | else 0 | |
383 | 383 | let caller = if (if ((toBase58String(i.caller.bytes) == toString(this))) | |
384 | 384 | then (isSponsored > 0) | |
385 | 385 | else false) | |
386 | 386 | then toString(addressFromPublicKey(fromBase58String(pubKey))) | |
387 | 387 | else toBase58String(i.caller.bytes) | |
388 | 388 | let get_sponsored_waves = if (if ((pubKey != "")) | |
389 | 389 | then (isSponsored > 0) | |
390 | 390 | else false) | |
391 | 391 | then invoke(whitelistDapp, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(pubKey)))], nil) | |
392 | 392 | else unit | |
393 | 393 | if ((get_sponsored_waves == get_sponsored_waves)) | |
394 | - | then if (true) | |
395 | - | then throw(caller) | |
396 | - | else $Tuple4(toBase58String(i.transactionId), caller, lastBlock.timestamp, (isSponsored > 0)) | |
394 | + | then $Tuple4(toBase58String(i.transactionId), caller, lastBlock.timestamp, (isSponsored > 0)) | |
397 | 395 | else throw("Strict value is not equal to itself.") | |
398 | 396 | } | |
399 | 397 | ||
400 | 398 | ||
401 | 399 | func idCallerDate (i) = if (!(dappRunning)) | |
402 | 400 | then throw(maintenanceMSG) | |
403 | 401 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
404 | 402 | ||
405 | 403 | ||
406 | 404 | func buyMint (i,artId,issuer,bidId,bidOwner,pubKey) = { | |
407 | - | let $ | |
408 | - | let id = $ | |
409 | - | let caller = $ | |
410 | - | let date = $ | |
411 | - | let isSponsored = $ | |
405 | + | let $t01304413133 = idCallerDateSponsored(i, pubKey) | |
406 | + | let id = $t01304413133._1 | |
407 | + | let caller = $t01304413133._2 | |
408 | + | let date = $t01304413133._3 | |
409 | + | let isSponsored = $t01304413133._4 | |
412 | 410 | if (true) | |
413 | 411 | then throw(((((((caller + " / ") + issuer) + " / ") + bidOwner) + " / ") + pubKey)) | |
414 | 412 | else { | |
415 | 413 | let isBid = if (if (if ((caller == issuer)) | |
416 | 414 | then (bidOwner != "") | |
417 | 415 | else false) | |
418 | 416 | then (bidId != "") | |
419 | 417 | else false) | |
420 | 418 | then true | |
421 | 419 | else false | |
422 | 420 | let blockEnd = getIntegerByKey(keyEndSale(caller, artId)) | |
423 | 421 | if (if (if ((blockEnd != 0)) | |
424 | 422 | then (height >= blockEnd) | |
425 | 423 | else false) | |
426 | 424 | then !(isBid) | |
427 | 425 | else false) | |
428 | 426 | then throw("Sale ended.") | |
429 | 427 | else { | |
430 | 428 | let callerIsIssuer = (caller == issuer) | |
431 | 429 | let totalNFT = getIntegerByKey("total_nft_issued") | |
432 | 430 | let signID = getStringByKey(keySignID(issuer, artId)) | |
433 | 431 | let artworkName = getStringByKey(keyName(issuer, artId)) | |
434 | 432 | if ((artworkName == "")) | |
435 | 433 | then throw("Art doesn't exist") | |
436 | 434 | else { | |
437 | 435 | let isOnSale = getBooleanByKey(keyOnSale(issuer, artId)) | |
438 | 436 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
439 | 437 | let artworkPrice = if (callerIsIssuer) | |
440 | 438 | then (currentCertificationPrice * 2) | |
441 | 439 | else getIntegerByKey(keyPrice(issuer, artId)) | |
442 | 440 | let priceAssetId = if (callerIsIssuer) | |
443 | 441 | then toBase58String(signAssetId) | |
444 | 442 | else getStringByKey(keyAssetIdAccepted(issuer, artId)) | |
445 | 443 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
446 | 444 | if (if (if (!(isBid)) | |
447 | 445 | then !(callerIsIssuer) | |
448 | 446 | else false) | |
449 | 447 | then if (if ((0 >= artworkPrice)) | |
450 | 448 | then true | |
451 | 449 | else !(isOnSale)) | |
452 | 450 | then true | |
453 | 451 | else (0 >= maxCanSell) | |
454 | 452 | else false) | |
455 | 453 | then throw("Art not for sale") | |
456 | 454 | else if (if (if (!(isBid)) | |
457 | 455 | then callerIsIssuer | |
458 | 456 | else false) | |
459 | 457 | then (0 >= maxCanSell) | |
460 | 458 | else false) | |
461 | 459 | then throw("Max issuable not set") | |
462 | 460 | else { | |
463 | 461 | let checkUser = validateUser(issuer) | |
464 | 462 | if (if (isBid) | |
465 | 463 | then (checkUser != "") | |
466 | 464 | else false) | |
467 | 465 | then throw(checkUser) | |
468 | 466 | else { | |
469 | 467 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
470 | - | let $ | |
468 | + | let $t01473614928 = if (isBid) | |
471 | 469 | then getPriceAssetIdFromBid(bidDataKey) | |
472 | 470 | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
473 | - | let amount = $ | |
474 | - | let assetId = $ | |
471 | + | let amount = $t01473614928._1 | |
472 | + | let assetId = $t01473614928._2 | |
475 | 473 | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver) | |
476 | 474 | let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShareAgent(issuer)), 0) | |
477 | 475 | let publicAgent = valueOrElse(getString(userDapp, keyArtistPublicAgentAddr(issuer)), feeReceiver) | |
478 | 476 | let publicAgentShare = valueOrElse(getInteger(userDapp, keyPrimarySharePublicAgent(issuer)), 0) | |
479 | 477 | let isWhitelisted = checkWhitelist(issuer) | |
480 | 478 | let cut = if ((isWhitelisted > height)) | |
481 | 479 | then 0 | |
482 | 480 | else if ((assetId == signAssetId)) | |
483 | 481 | then signCut | |
484 | 482 | else usdnWaveCut | |
485 | 483 | let amountForSign = fraction(amount, cut, 100) | |
486 | 484 | let amountForAgent = if (if (if ((agent != feeReceiver)) | |
487 | 485 | then (agentShare > 0) | |
488 | 486 | else false) | |
489 | 487 | then (height > isWhitelisted) | |
490 | 488 | else false) | |
491 | 489 | then fraction(amount, agentShare, 10000) | |
492 | 490 | else 0 | |
493 | 491 | let amountForPublicAgent = if (if (if ((publicAgent != feeReceiver)) | |
494 | 492 | then (publicAgentShare > 0) | |
495 | 493 | else false) | |
496 | 494 | then (height > isWhitelisted) | |
497 | 495 | else false) | |
498 | 496 | then fraction(amount, publicAgentShare, 10000) | |
499 | 497 | else 0 | |
500 | 498 | let amountForCreator = (amount - amountForSign) | |
501 | 499 | if ((amountSold == maxCanSell)) | |
502 | 500 | then throw("Art sold out") | |
503 | 501 | else { | |
504 | 502 | let newAmountSold = (amountSold + 1) | |
505 | 503 | let issueMeta = ((((((((((("Creator: " + issuer) + ", | |
506 | 504 | ArtID: ") + artId) + ", | |
507 | 505 | SignID: ") + signID) + ", | |
508 | 506 | Artwork name: ") + artworkName) + ", | |
509 | 507 | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
510 | 508 | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
511 | 509 | let idNFT = calculateAssetId(issueNFT) | |
512 | 510 | let sellStatus = if (if ((newAmountSold == maxCanSell)) | |
513 | 511 | then true | |
514 | 512 | else !(isOnSale)) | |
515 | 513 | then false | |
516 | 514 | else true | |
517 | 515 | let receiveNFT = if (if (if ((caller == issuer)) | |
518 | 516 | then (bidOwner != "") | |
519 | 517 | else false) | |
520 | 518 | then (bidId != "") | |
521 | 519 | else false) | |
522 | 520 | then addressFromStringValue(bidOwner) | |
523 | 521 | else i.caller | |
524 | 522 | let assetIdBid = if (!(isDefined(assetId))) | |
525 | 523 | then "WAVES" | |
526 | 524 | else toBase58String(value(assetId)) | |
527 | 525 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
528 | 526 | let bidDelOld = DeleteEntry((bidDataKey + "_OPEN")) | |
529 | 527 | let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date))) | |
530 | 528 | let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer) | |
531 | 529 | let soldValue = if (!(isBid)) | |
532 | 530 | then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT)) | |
533 | 531 | else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT)) | |
534 | 532 | let soldData = StringEntry(soldKey, soldValue) | |
535 | 533 | let commissionsWithAgent = if ((amountForAgent != 0)) | |
536 | 534 | then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)] | |
537 | 535 | else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)] | |
538 | 536 | let commissionsWithPublicAgent = if ((amountForPublicAgent != 0)) | |
539 | 537 | then [ScriptTransfer(Address(fromBase58String(publicAgent)), amountForPublicAgent, assetId), ScriptTransfer(Address(fromBase58String(issuer)), (amountForCreator - amountForPublicAgent), assetId)] | |
540 | 538 | else [ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId)] | |
541 | 539 | let txToCaller = if (isSponsored) | |
542 | 540 | then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)] | |
543 | 541 | else nil | |
544 | 542 | let buyRes = ((([IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), IntegerEntry(keyEndSale(issuer, artId), 0), BooleanEntry(keyOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(receiveNFT, 1, idNFT)] ++ commissionsWithAgent) ++ commissionsWithPublicAgent) ++ txToCaller) | |
545 | 543 | if (isBid) | |
546 | 544 | then [soldData, bidUpdate, bidDelOld] :: buyRes | |
547 | 545 | else soldData :: buyRes | |
548 | 546 | } | |
549 | 547 | } | |
550 | 548 | } | |
551 | 549 | } | |
552 | 550 | } | |
553 | 551 | } | |
554 | 552 | } | |
555 | 553 | ||
556 | 554 | ||
557 | 555 | func asString (bv) = match bv { | |
558 | 556 | case bv0: String => | |
559 | 557 | bv0 | |
560 | 558 | case _ => | |
561 | 559 | throw("Sponsored Public Key String expected") | |
562 | 560 | } | |
563 | 561 | ||
564 | 562 | ||
565 | 563 | @Callable(invoke) | |
566 | 564 | func setConf (key,val) = { | |
567 | 565 | let caller = toString(invoke.caller) | |
568 | 566 | if (containsElement([chris, toString(this)], caller)) | |
569 | 567 | then if (contains(key, "conf_")) | |
570 | 568 | then [StringEntry(key, val)] | |
571 | 569 | else throw("Entries starting with conf_ only") | |
572 | 570 | else throw("You are not allowed to change this") | |
573 | 571 | } | |
574 | 572 | ||
575 | 573 | ||
576 | 574 | ||
577 | 575 | @Callable(i) | |
578 | 576 | func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = { | |
579 | - | let $ | |
580 | - | let artId = $ | |
581 | - | let caller = $ | |
582 | - | let date = $ | |
583 | - | let isSponsored = $ | |
577 | + | let $t02010420177 = idCallerDateSponsored(i, pubKey) | |
578 | + | let artId = $t02010420177._1 | |
579 | + | let caller = $t02010420177._2 | |
580 | + | let date = $t02010420177._3 | |
581 | + | let isSponsored = $t02010420177._4 | |
584 | 582 | if (!(validateHash(sha256Hash))) | |
585 | 583 | then throw("Hash should be 64 characters maximum") | |
586 | 584 | else { | |
587 | - | let $ | |
588 | - | let licenceCID = $ | |
589 | - | let licenceHash = $ | |
585 | + | let $t02027820347 = setLIcence(cidLicence, sha256Licence) | |
586 | + | let licenceCID = $t02027820347._1 | |
587 | + | let licenceHash = $t02027820347._2 | |
590 | 588 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
591 | 589 | if ((validateArtwork != "")) | |
592 | 590 | then throw("Something went wrong!") | |
593 | 591 | else { | |
594 | 592 | let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0) | |
595 | - | let $ | |
593 | + | let $t02064620730 = if (whitelisted_drop) | |
596 | 594 | then $Tuple2(0, signID) | |
597 | 595 | else validatePayment(i) | |
598 | - | let amount = $ | |
599 | - | let assetId = $ | |
596 | + | let amount = $t02064620730._1 | |
597 | + | let assetId = $t02064620730._2 | |
600 | 598 | if (!(isDefined(amount))) | |
601 | 599 | then throw("Something went wrong") | |
602 | 600 | else { | |
603 | 601 | let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller)) | |
604 | 602 | if ((entryExist != "")) | |
605 | 603 | then throw("You already added it") | |
606 | 604 | else { | |
607 | 605 | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
608 | 606 | if ((hashExist != "")) | |
609 | 607 | then throw("Hash already registered") | |
610 | 608 | else { | |
611 | 609 | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
612 | 610 | if (!(isSignCertified)) | |
613 | 611 | then throw("Sign Certificate not found for this address.") | |
614 | 612 | else { | |
615 | 613 | let decrease_whitelist_drop = if (whitelisted_drop) | |
616 | 614 | then invoke(whitelistDapp, "useFreeDrop", [caller], nil) | |
617 | 615 | else unit | |
618 | 616 | if ((decrease_whitelist_drop == decrease_whitelist_drop)) | |
619 | 617 | then { | |
620 | 618 | let txToCaller = if (isSponsored) | |
621 | 619 | then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)] | |
622 | 620 | else nil | |
623 | 621 | ([StringEntry(keyOwnerByHash(sha256Hash), caller), StringEntry(keyTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyExportCid(caller, artId), cidExport), StringEntry(keyExportHash(caller, artId), sha256Export), StringEntry(keyLicenceHash(caller, artId), licenceHash), StringEntry(keyLicenceCid(caller, artId), licenceCID), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), StringEntry(keySignID(caller, artId), signID), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyidBySignid(caller, signID), artId), StringEntry(keyHashByTxidAddr(caller, artId), sha256Hash), StringEntry(keyCrawler(caller, artId), crawler), IntegerEntry(keyRoyalties(caller, artId), royalties), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, signAssetId)] ++ txToCaller) | |
624 | 622 | } | |
625 | 623 | else throw("Strict value is not equal to itself.") | |
626 | 624 | } | |
627 | 625 | } | |
628 | 626 | } | |
629 | 627 | } | |
630 | 628 | } | |
631 | 629 | } | |
632 | 630 | } | |
633 | 631 | ||
634 | 632 | ||
635 | 633 | ||
636 | 634 | @Callable(i) | |
637 | 635 | func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = if (!(dappRunning)) | |
638 | 636 | then throw(maintenanceMSG) | |
639 | 637 | else { | |
640 | - | let $ | |
641 | - | let id = $ | |
642 | - | let caller = $ | |
643 | - | let date = $ | |
644 | - | let isSponsored = $ | |
645 | - | let $ | |
646 | - | let licenceCID = $ | |
647 | - | let licenceHash = $ | |
638 | + | let $t02376423834 = idCallerDateSponsored(i, pubKey) | |
639 | + | let id = $t02376423834._1 | |
640 | + | let caller = $t02376423834._2 | |
641 | + | let date = $t02376423834._3 | |
642 | + | let isSponsored = $t02376423834._4 | |
643 | + | let $t02384423913 = setLIcence(cidLicence, sha256Licence) | |
644 | + | let licenceCID = $t02384423913._1 | |
645 | + | let licenceHash = $t02384423913._2 | |
648 | 646 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
649 | 647 | if ((validateArtwork != "")) | |
650 | 648 | then throw("Something went wrong!") | |
651 | 649 | else { | |
652 | 650 | let entryExist = getStringByKey(keyName(caller, txid)) | |
653 | 651 | if ((entryExist == "")) | |
654 | 652 | then throw("Entry not found") | |
655 | 653 | else { | |
656 | 654 | let flag = getStringByKey(keyFlag(caller, txid)) | |
657 | 655 | if ((flag == "ILLEGAL")) | |
658 | 656 | then throw("Cannot update ILLEGAL artwork") | |
659 | 657 | else if (!(isArtMinted(caller, txid))) | |
660 | 658 | then { | |
661 | 659 | let txToCaller = if (isSponsored) | |
662 | 660 | then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)] | |
663 | 661 | else nil | |
664 | 662 | ([StringEntry(keyName(caller, txid), name), StringEntry(keyDesc(caller, txid), description), StringEntry(keyDisplayCid(caller, txid), cidDisplay), StringEntry(keyExportCid(caller, txid), cidExport), StringEntry(keyExportHash(caller, txid), sha256Export), StringEntry(keyLicenceCid(caller, txid), licenceCID), StringEntry(keyLicenceHash(caller, txid), licenceHash), StringEntry(keyTags(caller, txid), tags), StringEntry(keyType(caller, txid), type), StringEntry(keyCrawler(caller, txid), crawler), IntegerEntry(keyRoyalties(caller, txid), royalties)] ++ txToCaller) | |
665 | 663 | } | |
666 | 664 | else throw("Already minted") | |
667 | 665 | } | |
668 | 666 | } | |
669 | 667 | } | |
670 | 668 | ||
671 | 669 | ||
672 | 670 | ||
673 | 671 | @Callable(i) | |
674 | 672 | func flagArtwork (artId,addr,flag,note) = { | |
675 | - | let $ | |
676 | - | let id = $ | |
677 | - | let caller = $ | |
673 | + | let $t02554025574 = idCallerDate(i) | |
674 | + | let id = $t02554025574._1 | |
675 | + | let caller = $t02554025574._2 | |
678 | 676 | if (containsElement([chris, toString(this)], caller)) | |
679 | 677 | then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
680 | 678 | then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)] | |
681 | 679 | else throw(("Unknow status " + flag)) | |
682 | 680 | else throw("You are not allowed") | |
683 | 681 | } | |
684 | 682 | ||
685 | 683 | ||
686 | 684 | ||
687 | 685 | @Callable(i) | |
688 | 686 | func deleteArtwork (artId,addr) = { | |
689 | - | let $ | |
690 | - | let id = $ | |
691 | - | let caller = $ | |
687 | + | let $t02601026044 = idCallerDate(i) | |
688 | + | let id = $t02601026044._1 | |
689 | + | let caller = $t02601026044._2 | |
692 | 690 | let addrToUse = if (containsElement([chris, toString(this)], caller)) | |
693 | 691 | then addr | |
694 | 692 | else caller | |
695 | 693 | let entryExist = valueOrErrorMessage(getStringByKey(keyName(addrToUse, artId)), "No art matching for this address") | |
696 | 694 | if ((entryExist == "")) | |
697 | 695 | then throw("No art matching for this address") | |
698 | 696 | else { | |
699 | 697 | let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId)) | |
700 | 698 | if ((sha256Hash == "")) | |
701 | 699 | then throw("No art hash matching for this address") | |
702 | 700 | else { | |
703 | 701 | let signID = getStringByKey(keySignID(addrToUse, artId)) | |
704 | 702 | if ((signID == "")) | |
705 | 703 | then throw("No SIGN ID matching") | |
706 | 704 | else { | |
707 | 705 | let dataToDelete = [DeleteEntry(keyDate(addrToUse, artId)), DeleteEntry(keyName(addrToUse, artId)), DeleteEntry(keyDesc(addrToUse, artId)), DeleteEntry(keyDisplayCid(addrToUse, artId)), DeleteEntry(keyExportCid(addrToUse, artId)), DeleteEntry(keyExportHash(addrToUse, artId)), DeleteEntry(keyLicenceHash(addrToUse, artId)), DeleteEntry(keyLicenceCid(addrToUse, artId)), DeleteEntry(keyType(addrToUse, artId)), DeleteEntry(keyTags(addrToUse, artId)), DeleteEntry(keyMaxMint(addrToUse, artId)), DeleteEntry(keySignID(addrToUse, artId)), DeleteEntry(keyIssued(addrToUse, artId)), DeleteEntry(keyOnSale(addrToUse, artId)), DeleteEntry(keyFlag(addrToUse, artId)), DeleteEntry(keyPrice(addrToUse, artId)), DeleteEntry(keyAssetIdAccepted(addrToUse, artId)), DeleteEntry(keyOwnerByHash(sha256Hash)), DeleteEntry(keyidBySignid(addrToUse, signID)), DeleteEntry(keyTxidByHashOwner(sha256Hash, addrToUse)), DeleteEntry(keyEndSale(addrToUse, artId)), DeleteEntry(keyNote(addrToUse, artId)), DeleteEntry(keyCrawler(addrToUse, artId)), DeleteEntry(keyRoyalties(addrToUse, artId))] | |
708 | 706 | if (!(isArtMinted(addrToUse, artId))) | |
709 | 707 | then if (!(dappRunning)) | |
710 | 708 | then throw(maintenanceMSG) | |
711 | 709 | else dataToDelete | |
712 | 710 | else if (containsElement([chris, toString(this)], caller)) | |
713 | 711 | then dataToDelete | |
714 | 712 | else throw("Art already minted, you cannot delete it") | |
715 | 713 | } | |
716 | 714 | } | |
717 | 715 | } | |
718 | 716 | } | |
719 | 717 | ||
720 | 718 | ||
721 | 719 | ||
722 | 720 | @Callable(i) | |
723 | 721 | func sellArtwork (artId,price,maxMint,assetId,blockEnd,pubKey) = { | |
724 | - | let $ | |
725 | - | let id = $ | |
726 | - | let caller = $ | |
727 | - | let date = $ | |
728 | - | let isSponsored = $ | |
722 | + | let $t02888028950 = idCallerDateSponsored(i, pubKey) | |
723 | + | let id = $t02888028950._1 | |
724 | + | let caller = $t02888028950._2 | |
725 | + | let date = $t02888028950._3 | |
726 | + | let isSponsored = $t02888028950._4 | |
729 | 727 | let artworkName = getStringByKey(keyName(caller, artId)) | |
730 | 728 | if ((artworkName == "")) | |
731 | 729 | then throw("This art doesn't match your account") | |
732 | 730 | else { | |
733 | 731 | let flag = getStringByKey(keyFlag(caller, artId)) | |
734 | 732 | if (containsElement(["CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
735 | 733 | then throw("Flagged artwork") | |
736 | 734 | else { | |
737 | 735 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
738 | 736 | if ((0 > blockEnd)) | |
739 | 737 | then throw("Negative end") | |
740 | 738 | else if (if ((blockEnd > 0)) | |
741 | 739 | then if ((maxMint != 1)) | |
742 | 740 | then true | |
743 | 741 | else (price != 0) | |
744 | 742 | else false) | |
745 | 743 | then throw("Timed offer only allowed for unique edition and offer only") | |
746 | 744 | else { | |
747 | 745 | let baseHeight = if ((blockEnd == 0)) | |
748 | 746 | then 0 | |
749 | 747 | else height | |
750 | 748 | if (!(acceptedAssetIds(assetId))) | |
751 | 749 | then throw("Something went wrong!") | |
752 | 750 | else if (!(validateMinSell(assetId, price))) | |
753 | 751 | then throw("Something went wrong!") | |
754 | 752 | else { | |
755 | 753 | let checkUser = validateUser(caller) | |
756 | 754 | if ((checkUser != "")) | |
757 | 755 | then throw(checkUser) | |
758 | 756 | else { | |
759 | 757 | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
760 | 758 | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
761 | 759 | if ((maxMint > 100)) | |
762 | 760 | then throw("100 editions max per artwork") | |
763 | 761 | else if (if ((amountSold != 0)) | |
764 | 762 | then (amountSold == maxCanSell) | |
765 | 763 | else false) | |
766 | 764 | then throw("Max edition reached.") | |
767 | 765 | else if (if ((amountSold > 0)) | |
768 | 766 | then (maxCanSell != maxMint) | |
769 | 767 | else false) | |
770 | 768 | then throw("Cannot change maximum issuable anymore") | |
771 | 769 | else if (if ((bidNbr > 0)) | |
772 | 770 | then (maxCanSell != maxMint) | |
773 | 771 | else false) | |
774 | 772 | then throw("Cannot change maximum issuable with active orders") | |
775 | 773 | else { | |
776 | 774 | let sellStatus = if (if ((price > 0)) | |
777 | 775 | then (maxMint > 0) | |
778 | 776 | else false) | |
779 | 777 | then true | |
780 | 778 | else false | |
781 | 779 | let txToCaller = if (isSponsored) | |
782 | 780 | then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)] | |
783 | 781 | else nil | |
784 | 782 | ([BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), StringEntry(keyAssetIdAccepted(caller, artId), assetId), IntegerEntry(keyEndSale(caller, artId), (baseHeight + blockEnd))] ++ txToCaller) | |
785 | 783 | } | |
786 | 784 | } | |
787 | 785 | } | |
788 | 786 | } | |
789 | 787 | } | |
790 | 788 | } | |
791 | 789 | } | |
792 | 790 | ||
793 | 791 | ||
794 | 792 | ||
795 | 793 | @Callable(i) | |
796 | 794 | func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "", "") | |
797 | 795 | ||
798 | 796 | ||
799 | 797 | ||
800 | 798 | @Callable(i) | |
801 | 799 | func setBid (artId,issuer) = { | |
802 | - | let $ | |
803 | - | let id = $ | |
804 | - | let caller = $ | |
805 | - | let date = $ | |
806 | - | let $ | |
807 | - | let payment = $ | |
808 | - | let amount = $ | |
800 | + | let $t03133231372 = idCallerDate(i) | |
801 | + | let id = $t03133231372._1 | |
802 | + | let caller = $t03133231372._2 | |
803 | + | let date = $t03133231372._3 | |
804 | + | let $t03137731413 = isPayment(i) | |
805 | + | let payment = $t03137731413._1 | |
806 | + | let amount = $t03137731413._2 | |
809 | 807 | let assetId = if (!(isDefined(payment.assetId))) | |
810 | 808 | then "WAVES" | |
811 | 809 | else toBase58String(value(payment.assetId)) | |
812 | 810 | let blockEnd = getIntegerByKey(keyEndSale(issuer, artId)) | |
813 | 811 | if (if ((blockEnd != 0)) | |
814 | 812 | then (height >= blockEnd) | |
815 | 813 | else false) | |
816 | 814 | then throw("Sale ended.") | |
817 | 815 | else { | |
818 | 816 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
819 | 817 | if (!(acceptedAssetIds(assetId))) | |
820 | 818 | then throw("asset not accepted") | |
821 | 819 | else if (!(validateMinSell(assetId, amount))) | |
822 | 820 | then throw("Wrong min sell") | |
823 | 821 | else { | |
824 | 822 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
825 | 823 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
826 | 824 | if ((0 >= maxCanSell)) | |
827 | 825 | then throw("No max edition set for this artwork") | |
828 | 826 | else if ((amountSold >= maxCanSell)) | |
829 | 827 | then throw("Sold out, you cannot bid") | |
830 | 828 | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
831 | 829 | } | |
832 | 830 | } | |
833 | 831 | } | |
834 | 832 | ||
835 | 833 | ||
836 | 834 | ||
837 | 835 | @Callable(i) | |
838 | 836 | func acceptBid (artId,issuer,bidId,bidOwner,pubKey) = { | |
839 | - | let $ | |
840 | - | let id = $ | |
841 | - | let caller = $ | |
842 | - | let date = $ | |
843 | - | let isSponsored = $ | |
837 | + | let $t03263332703 = idCallerDateSponsored(i, pubKey) | |
838 | + | let id = $t03263332703._1 | |
839 | + | let caller = $t03263332703._2 | |
840 | + | let date = $t03263332703._3 | |
841 | + | let isSponsored = $t03263332703._4 | |
844 | 842 | if ((caller != issuer)) | |
845 | 843 | then throw("You cannot do this action") | |
846 | 844 | else buyMint(i, artId, issuer, bidId, bidOwner, pubKey) | |
847 | 845 | } | |
848 | 846 | ||
849 | 847 | ||
850 | 848 | ||
851 | 849 | @Callable(i) | |
852 | 850 | func cancelBid (artId,issuer,bidId,bidOwner) = { | |
853 | - | let $ | |
854 | - | let id = $ | |
855 | - | let caller = $ | |
856 | - | let date = $ | |
851 | + | let $t03293732998 = idCallerDate(i) | |
852 | + | let id = $t03293732998._1 | |
853 | + | let caller = $t03293732998._2 | |
854 | + | let date = $t03293732998._3 | |
857 | 855 | if (if ((caller != bidOwner)) | |
858 | 856 | then (caller != issuer) | |
859 | 857 | else false) | |
860 | 858 | then throw("You cannot do this action") | |
861 | 859 | else { | |
862 | 860 | let returnMoneyTo = if ((caller == issuer)) | |
863 | 861 | then bidOwner | |
864 | 862 | else caller | |
865 | 863 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
866 | 864 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
867 | 865 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
868 | 866 | if ((bidData == "")) | |
869 | 867 | then throw("Bid not found") | |
870 | 868 | else { | |
871 | 869 | let bidDataArr = split(bidData, "_") | |
872 | 870 | let assetId = getBidAssetId(bidDataArr[0]) | |
873 | 871 | let bidStatus = "CANCELED" | |
874 | 872 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(returnMoneyTo)), parseIntValue(bidDataArr[1]), assetId)] | |
875 | 873 | } | |
876 | 874 | } | |
877 | 875 | } | |
878 | 876 | ||
879 | 877 | ||
880 | 878 | @Verifier(tx) | |
881 | 879 | func verifier () = match tx { | |
882 | 880 | case inv: InvokeScriptTransaction => | |
883 | 881 | if (if (if (if ((inv.function == "addArtwork")) | |
884 | 882 | then (inv.dApp == this) | |
885 | 883 | else false) | |
886 | 884 | then (inv.fee == 500000) | |
887 | 885 | else false) | |
888 | 886 | then (inv.feeAssetId == unit) | |
889 | 887 | else false) | |
890 | 888 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[13]))) | |
891 | 889 | else if (if (if (if ((inv.function == "updateArtwork")) | |
892 | 890 | then (inv.dApp == this) | |
893 | 891 | else false) | |
894 | 892 | then (inv.fee == 500000) | |
895 | 893 | else false) | |
896 | 894 | then (inv.feeAssetId == unit) | |
897 | 895 | else false) | |
898 | 896 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[12]))) | |
899 | 897 | else if (if (if (if ((inv.function == "sellArtwork")) | |
900 | 898 | then (inv.dApp == this) | |
901 | 899 | else false) | |
902 | 900 | then (inv.fee == 500000) | |
903 | 901 | else false) | |
904 | 902 | then (inv.feeAssetId == unit) | |
905 | 903 | else false) | |
906 | 904 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5]))) | |
907 | 905 | else if (if (if (if ((inv.function == "acceptBid")) | |
908 | 906 | then (inv.dApp == this) | |
909 | 907 | else false) | |
910 | 908 | then (inv.fee == 500000) | |
911 | 909 | else false) | |
912 | 910 | then (inv.feeAssetId == unit) | |
913 | 911 | else false) | |
914 | 912 | then sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[4]))) | |
915 | 913 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
916 | 914 | case _ => | |
917 | 915 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
918 | 916 | } | |
919 | 917 |
github/deemru/w8io/03bedc9 120.33 ms ◑![]()