tx · D5i3wrWKFmC96ZSajCiBHCnkQ7RUbY1jJmGeJrj15Saj 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY: -0.01400000 Waves 2021.03.11 11:40 [1432808] smart account 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY > SELF 0.00000000 Waves
{ "type": 13, "id": "D5i3wrWKFmC96ZSajCiBHCnkQ7RUbY1jJmGeJrj15Saj", "fee": 1400000, "feeAssetId": null, "timestamp": 1615452060239, "version": 2, "chainId": 84, "sender": "3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY", "senderPublicKey": "J9DCtJJxJBWZdtDR12BA1U94Q3cZzMi4R6k5hYkAzmzC", "proofs": [ "2RqVWs3ax7m2XG2ac6bsykaPZcMHoKxJB6CNXqUs6V7vaYogZtrb25zx5TRKdJ6m7ka1pxgmPF2z2axu18TJWYPQ" ], "script": "base64:AAIEAAAAAAAAAFQIAhINCgsICAgICAgICAgICBIMCgoICAgICAgICAgIEgUKAwgICBIECgIICBIGCgQIAQEIEgQKAggIEgQKAggIEgYKBAgICAgSBQoDCAgIEgMKAQgAAABLAAAAAAh1bml0VGVzdAcAAAAACW9yYWNsZUZlZQkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAIc2lnbkRhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM05DMjhoU2l2cm1zVFVYYVlEMXg2TDM2Mko0WnBVbm9UZEIAAAAAC2ZlZVJlY2VpdmVyAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAAIdXNlckRhcHADBQAAAAh1bml0VGVzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXQ0UkdNRXlqU1dZQW9jVFBxZDU1d2RIUVFCM1BVMlVDbQkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjh4WGFZakUyN0Fh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AAAAAAABAAAAAliaWRTdGF0dXMCAAAACENBTkNFTEVECQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgUAAAAKYmlkRGF0YUtleQIAAAAFX09QRU4JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAACmJpZERhdGFLZXkCAAAAAV8FAAAACWJpZFN0YXR1cwkAASwAAAACCQABLAAAAAIFAAAAB2JpZERhdGECAAAAAV8JAAGkAAAAAQUAAAAEZGF0ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAABJjdXJyZW50X2JpZGFtb3VudF8FAAAABWFydElkCQAAZQAAAAIFAAAABmJpZE5icgAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUAAAAGY2FsbGVyCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgUAAAAKYmlkRGF0YUFycgAAAAAAAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAWkBAAAAC2RlbGV0ZUVudHJ5AAAAAQAAAAVlbnRyeQQAAAAGY2FsbGVyCQAEJQAAAAEJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAAAAAAAAAgUAAAAGY2FsbGVyBQAAAAVjaHJpcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAGC4Jy0=", "height": 1432808, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5REJhGK9v3vShNkNyvbm6G5rRt3x3W7g9dQj61CoSYJ2 Next: EogvHE2rrCy6EVXAFMtDyNhHfL491KsACqn9FJnE1c36 Diff:
Old | New | Differences | |
---|---|---|---|
648 | 648 | let exportCID = getStringByKey(keyExportCid(caller, artId)) | |
649 | 649 | if ((size(split(exportCID, "/")[0]) != 59)) | |
650 | 650 | then throw("You cannot sell art with no export file") | |
651 | - | else | |
652 | - | | |
653 | - | | |
651 | + | else { | |
652 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
653 | + | if (!(acceptedAssetIds(assetId))) | |
654 | 654 | then throw("Something went wrong!") | |
655 | - | else { | |
656 | - | let checkUser = validateUser(caller) | |
657 | - | if ((checkUser != "")) | |
658 | - | then throw(checkUser) | |
659 | - | else { | |
660 | - | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
661 | - | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
662 | - | if ((maxMint > 10)) | |
663 | - | then throw("10 editions max per artwork") | |
664 | - | else if (if ((amountSold != 0)) | |
665 | - | then (amountSold == maxCanSell) | |
666 | - | else false) | |
667 | - | then throw("Max edition reached.") | |
668 | - | else if (if ((amountSold > 0)) | |
669 | - | then (maxCanSell != maxMint) | |
655 | + | else if (!(validateMinSell(assetId, price))) | |
656 | + | then throw("Something went wrong!") | |
657 | + | else { | |
658 | + | let checkUser = validateUser(caller) | |
659 | + | if ((checkUser != "")) | |
660 | + | then throw(checkUser) | |
661 | + | else { | |
662 | + | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
663 | + | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
664 | + | if ((maxMint > 10)) | |
665 | + | then throw("10 editions max per artwork") | |
666 | + | else if (if ((amountSold != 0)) | |
667 | + | then (amountSold == maxCanSell) | |
670 | 668 | else false) | |
671 | - | then throw("Cannot change maximum issuable anymore") | |
672 | - | else { | |
673 | - | let sellStatus = if (if ((price > 0)) | |
674 | - | then (maxMint > 0) | |
669 | + | then throw("Max edition reached.") | |
670 | + | else if (if ((amountSold > 0)) | |
671 | + | then (maxCanSell != maxMint) | |
672 | + | else false) | |
673 | + | then throw("Cannot change maximum issuable anymore") | |
674 | + | else if (if ((bidNbr > 0)) | |
675 | + | then (maxCanSell != maxMint) | |
675 | 676 | else false) | |
676 | - | then true | |
677 | - | else false | |
677 | + | then throw("Cannot change maximum issuable with active orders") | |
678 | + | else { | |
679 | + | let sellStatus = if (if ((price > 0)) | |
680 | + | then (maxMint > 0) | |
681 | + | else false) | |
682 | + | then true | |
683 | + | else false | |
678 | 684 | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), StringEntry(keyAssetIdAccepted(caller, artId), assetId)] | |
679 | - | } | |
680 | - | } | |
681 | - | } | |
685 | + | } | |
686 | + | } | |
687 | + | } | |
688 | + | } | |
682 | 689 | } | |
683 | 690 | } | |
684 | 691 | ||
691 | 698 | ||
692 | 699 | @Callable(i) | |
693 | 700 | func setBid (artId,issuer) = { | |
694 | - | let $ | |
695 | - | let id = $ | |
696 | - | let caller = $ | |
697 | - | let date = $ | |
698 | - | let $ | |
699 | - | let payment = $ | |
700 | - | let amount = $ | |
701 | + | let $t02765127689 = idCallerDate(i) | |
702 | + | let id = $t02765127689._1 | |
703 | + | let caller = $t02765127689._2 | |
704 | + | let date = $t02765127689._3 | |
705 | + | let $t02769427730 = isPayment(i) | |
706 | + | let payment = $t02769427730._1 | |
707 | + | let amount = $t02769427730._2 | |
701 | 708 | let assetId = if (!(isDefined(payment.assetId))) | |
702 | 709 | then "WAVES" | |
703 | 710 | else toBase58String(value(payment.assetId)) | |
711 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
704 | 712 | if (!(acceptedAssetIds(assetId))) | |
705 | 713 | then throw("asset not accepted") | |
706 | 714 | else if (!(validateMinSell(assetId, amount))) | |
712 | 720 | then throw("No max edition set for this artwork") | |
713 | 721 | else if ((amountSold >= maxCanSell)) | |
714 | 722 | then throw("Sold out, you cannot bid") | |
715 | - | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date)))] | |
723 | + | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
716 | 724 | } | |
717 | 725 | } | |
718 | 726 | ||
730 | 738 | ||
731 | 739 | @Callable(i) | |
732 | 740 | func cancelBid (artId,issuer,bidId) = { | |
733 | - | let $t02859628748 = idCallerDate(i) | |
734 | - | let id = $t02859628748._1 | |
735 | - | let caller = $t02859628748._2 | |
736 | - | let date = $t02859628748._3 | |
741 | + | let $t02888429036 = idCallerDate(i) | |
742 | + | let id = $t02888429036._1 | |
743 | + | let caller = $t02888429036._2 | |
744 | + | let date = $t02888429036._3 | |
745 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
737 | 746 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
738 | 747 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
739 | 748 | if ((bidData == "")) | |
742 | 751 | let bidDataArr = split(bidData, "_") | |
743 | 752 | let assetId = getBidAssetId(bidDataArr[0]) | |
744 | 753 | let bidStatus = "CANCELED" | |
745 | - | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
754 | + | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
746 | 755 | } | |
747 | 756 | } | |
748 | 757 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
5 | 5 | ||
6 | 6 | let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
7 | 7 | ||
8 | 8 | let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
11 | 11 | ||
12 | 12 | let userDapp = if (unitTest) | |
13 | 13 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
14 | 14 | else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj")) | |
15 | 15 | ||
16 | 16 | let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq")) | |
17 | 17 | ||
18 | 18 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
19 | 19 | ||
20 | 20 | let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
21 | 21 | ||
22 | 22 | let wavesAssetId = base58'' | |
23 | 23 | ||
24 | 24 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
25 | 25 | ||
26 | 26 | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
27 | 27 | ||
28 | 28 | let signCut = 7 | |
29 | 29 | ||
30 | 30 | let usdnWaveCut = 10 | |
31 | 31 | ||
32 | 32 | let defaultLicence = "bafybeifuyo4pqu54ismqgtb6e4h6kkvgx7zg4u3zibh2r7y6mb64i7bzza/licence.pdf" | |
33 | 33 | ||
34 | 34 | let defaultHashLicence = "a87758c354e30a9e78fb84fa3a0010a5090ab20df0be11ad45b5720cc187e639" | |
35 | 35 | ||
36 | 36 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
37 | 37 | ||
38 | 38 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
39 | 39 | ||
40 | 40 | let userSuspended = "SUSPENDED" | |
41 | 41 | ||
42 | 42 | let userRemoved = "REMOVED" | |
43 | 43 | ||
44 | 44 | let userUnregistered = "UNREGISTERED" | |
45 | 45 | ||
46 | 46 | let userAllowed = "ALLOWED" | |
47 | 47 | ||
48 | 48 | func getStringByKeyFromUsers (key) = valueOrElse(getString(userDapp, key), "") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
67 | 67 | ||
68 | 68 | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) { | |
69 | 69 | case a: String => | |
70 | 70 | if (contains(a, sha256Hash)) | |
71 | 71 | then true | |
72 | 72 | else false | |
73 | 73 | case _ => | |
74 | 74 | false | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func validateCID (cid) = if (contains(cid, "/")) | |
79 | 79 | then if (if ((76 > size(cid))) | |
80 | 80 | then (size(split(cid, "/")[0]) == 59) | |
81 | 81 | else false) | |
82 | 82 | then (16 > size(split(cid, "/")[1])) | |
83 | 83 | else false | |
84 | 84 | else false | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func validateHash (hash) = (size(hash) == 64) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyUserStatus (caller) = ("user_status_" + caller) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyExportHash (caller,artId) = ((("art_export_hash_" + artId) + "_") + caller) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyExportCid (caller,artId) = ((("art_export_cid_" + artId) + "_") + caller) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keySignID (caller,artId) = ((("art_signid_" + artId) + "_") + caller) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyLicenceHash (caller,artId) = ((("art_licence_hash_" + artId) + "_") + caller) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyLicenceCid (caller,artId) = ((("art_licence_cid_" + artId) + "_") + caller) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyFlag (caller,artId) = ((("art_flag_" + artId) + "_") + caller) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller))))) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay))) | |
157 | 157 | then throw("Wrong Display CID") | |
158 | 158 | else if (!(validateCID(cidExport))) | |
159 | 159 | then throw("Wrong Export CID") | |
160 | 160 | else if (if ((cidLicence != "")) | |
161 | 161 | then !(validateCID(cidLicence)) | |
162 | 162 | else false) | |
163 | 163 | then throw("Wrong Licence CID") | |
164 | 164 | else true | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func validateAllHash (sha256Export,sha256Licence) = if (!(validateHash(sha256Export))) | |
168 | 168 | then throw("Export Hash 64 char. max") | |
169 | 169 | else if (!(validateHash(sha256Licence))) | |
170 | 170 | then throw("Licence Hash 64 char. max") | |
171 | 171 | else true | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func validateString (str,max) = if ((size(str) == 0)) | |
175 | 175 | then throw("Field cannot be is empty") | |
176 | 176 | else if ((size(str) > max)) | |
177 | 177 | then throw((str + " is too long")) | |
178 | 178 | else true | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func validateUser (caller) = { | |
182 | 182 | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
183 | 183 | if (if ((userStatus == userUnregistered)) | |
184 | 184 | then true | |
185 | 185 | else (userStatus == userAllowed)) | |
186 | 186 | then "Register this account first with \"Account\" tab" | |
187 | 187 | else if ((userStatus == userSuspended)) | |
188 | 188 | then "Account suspended" | |
189 | 189 | else if ((userStatus == userRemoved)) | |
190 | 190 | then "Account removed" | |
191 | 191 | else "" | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func setLIcence (cidLicence,sha256Licence) = { | |
196 | 196 | let cid = if ((size(cidLicence) == 0)) | |
197 | 197 | then defaultLicence | |
198 | 198 | else cidLicence | |
199 | 199 | let hash = if ((size(sha256Licence) == 0)) | |
200 | 200 | then defaultHashLicence | |
201 | 201 | else sha256Licence | |
202 | 202 | $Tuple2(cid, hash) | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags) = { | |
207 | 207 | let checkUser = validateUser(caller) | |
208 | 208 | if ((checkUser != "")) | |
209 | 209 | then throw(checkUser) | |
210 | 210 | else if ((size(cidDisplay) == 0)) | |
211 | 211 | then throw("Display CID cannot be empty") | |
212 | 212 | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
213 | 213 | then throw("Problem with CID") | |
214 | 214 | else if (!(validateAllHash(sha256Export, licenceHash))) | |
215 | 215 | then throw("Problem with Hashes") | |
216 | 216 | else if (!(validateString(name, 100))) | |
217 | 217 | then throw("100 Char. max name") | |
218 | 218 | else if (!(validateString(description, 1000))) | |
219 | 219 | then throw("1000 Char. max description") | |
220 | 220 | else if ((size(split(tags, ",")) > 5)) | |
221 | 221 | then throw("5 tags max.") | |
222 | 222 | else "" | |
223 | 223 | } | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func isPayment (i) = if ((size(i.payments) == 0)) | |
227 | 227 | then throw("No payment attached") | |
228 | 228 | else { | |
229 | 229 | let payment = value(i.payments[0]) | |
230 | 230 | let amount = value(payment.amount) | |
231 | 231 | $Tuple2(payment, amount) | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func validatePayment (i) = { | |
236 | 236 | let $t089588994 = isPayment(i) | |
237 | 237 | let payment = $t089588994._1 | |
238 | 238 | let amount = $t089588994._2 | |
239 | 239 | let assetId = if (if (isDefined(payment.assetId)) | |
240 | 240 | then (payment.assetId == signAssetId) | |
241 | 241 | else false) | |
242 | 242 | then payment.assetId | |
243 | 243 | else throw("Only SIGN token accepted as transaction fee") | |
244 | 244 | if ((amount != currentCertificationPrice)) | |
245 | 245 | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
246 | 246 | else $Tuple2(amount, assetId) | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) { | |
251 | 251 | case b: Int => | |
252 | 252 | if ((b != 0)) | |
253 | 253 | then true | |
254 | 254 | else false | |
255 | 255 | case _ => | |
256 | 256 | false | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
261 | 261 | let $t095879623 = isPayment(i) | |
262 | 262 | let payment = $t095879623._1 | |
263 | 263 | let amount = $t095879623._2 | |
264 | 264 | let assetId = if (!(isDefined(payment.assetId))) | |
265 | 265 | then unit | |
266 | 266 | else if (if ((size(priceAssetId) > 0)) | |
267 | 267 | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
268 | 268 | else false) | |
269 | 269 | then payment.assetId | |
270 | 270 | else throw("Wrong asset id") | |
271 | 271 | if (if ((assetId == unit)) | |
272 | 272 | then (priceAssetId != "") | |
273 | 273 | else false) | |
274 | 274 | then throw("Wrong asset id") | |
275 | 275 | else if ((artworkPrice != amount)) | |
276 | 276 | then throw("Payment don't match") | |
277 | 277 | else $Tuple2(amount, assetId) | |
278 | 278 | } | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId))) | |
282 | 282 | then (assetId != toBase58String(wavesAssetId)) | |
283 | 283 | else false) | |
284 | 284 | then (assetId != "WAVES") | |
285 | 285 | else false) | |
286 | 286 | then (assetId != toBase58String(usdnAssetId)) | |
287 | 287 | else false) | |
288 | 288 | then throw("Only SIGN, USDN or WAVES accepted") | |
289 | 289 | else true | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | func validateMinSell (assetId,price) = { | |
293 | 293 | let minSellWaves = if (unitTest) | |
294 | 294 | then 10 | |
295 | 295 | else getIntegerByKeyFromOracle("waves_min_sell") | |
296 | 296 | let minSellUsdn = 1000000 | |
297 | 297 | let minSellSign = if (unitTest) | |
298 | 298 | then 1 | |
299 | 299 | else (currentCertificationPrice * 2) | |
300 | 300 | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
301 | 301 | then (minSellUsdn > price) | |
302 | 302 | else false) | |
303 | 303 | then (price != 0) | |
304 | 304 | else false) | |
305 | 305 | then true | |
306 | 306 | else if (if ((assetId == toBase58String(signAssetId))) | |
307 | 307 | then (minSellSign > price) | |
308 | 308 | else false) | |
309 | 309 | then (price != 0) | |
310 | 310 | else false) | |
311 | 311 | then true | |
312 | 312 | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
313 | 313 | then true | |
314 | 314 | else (assetId == "WAVES")) | |
315 | 315 | then (minSellWaves > price) | |
316 | 316 | else false) | |
317 | 317 | then (price != 0) | |
318 | 318 | else false) | |
319 | 319 | then throw("Wrong minimum sell price") | |
320 | 320 | else true | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
325 | 325 | then unit | |
326 | 326 | else fromBase58String(assetId) | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | func getPriceAssetIdFromBid (bidDataKey) = { | |
330 | 330 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
331 | 331 | if ((bidData == "")) | |
332 | 332 | then throw("Bid not found") | |
333 | 333 | else { | |
334 | 334 | let bidDataArr = split(bidData, "_") | |
335 | 335 | let bidAmount = parseIntValue(bidDataArr[1]) | |
336 | 336 | let bidAssetId = getBidAssetId(bidDataArr[0]) | |
337 | 337 | if ((0 >= bidAmount)) | |
338 | 338 | then throw("Wrong amount") | |
339 | 339 | else $Tuple2(bidAmount, bidAssetId) | |
340 | 340 | } | |
341 | 341 | } | |
342 | 342 | ||
343 | 343 | ||
344 | 344 | func idCallerDate (i) = if (!(dappRunning)) | |
345 | 345 | then throw(maintenanceMSG) | |
346 | 346 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
347 | 347 | ||
348 | 348 | ||
349 | 349 | func isBidCheck (i,issuer,bidOwner,bidId) = if (if (if ((toBase58String(i.caller.bytes) == issuer)) | |
350 | 350 | then (bidOwner != "") | |
351 | 351 | else false) | |
352 | 352 | then (bidId != "") | |
353 | 353 | else false) | |
354 | 354 | then true | |
355 | 355 | else false | |
356 | 356 | ||
357 | 357 | ||
358 | 358 | func getArtData (i,issuer,artId,isBid) = { | |
359 | 359 | let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer) | |
360 | 360 | let totalNFT = getIntegerByKey("total_nft_issued") | |
361 | 361 | let signID = getStringByKey(keySignID(issuer, artId)) | |
362 | 362 | let artworkName = getStringByKey(keyName(issuer, artId)) | |
363 | 363 | if ((artworkName == "")) | |
364 | 364 | then throw("Art doesn't exist") | |
365 | 365 | else { | |
366 | 366 | let isOnSale = getBooleanByKey(keyOnSale(issuer, artId)) | |
367 | 367 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
368 | 368 | let artworkPrice = if (callerIsIssuer) | |
369 | 369 | then (currentCertificationPrice * 2) | |
370 | 370 | else getIntegerByKey(keyPrice(issuer, artId)) | |
371 | 371 | let priceAssetId = if (callerIsIssuer) | |
372 | 372 | then toBase58String(signAssetId) | |
373 | 373 | else getStringByKey(keyAssetIdAccepted(issuer, artId)) | |
374 | 374 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
375 | 375 | if (if (if (!(isBid)) | |
376 | 376 | then !(callerIsIssuer) | |
377 | 377 | else false) | |
378 | 378 | then if (if ((0 >= artworkPrice)) | |
379 | 379 | then true | |
380 | 380 | else !(isOnSale)) | |
381 | 381 | then true | |
382 | 382 | else (0 >= maxCanSell) | |
383 | 383 | else false) | |
384 | 384 | then throw("Art not for sale") | |
385 | 385 | else if (if (if (!(isBid)) | |
386 | 386 | then callerIsIssuer | |
387 | 387 | else false) | |
388 | 388 | then (0 >= maxCanSell) | |
389 | 389 | else false) | |
390 | 390 | then throw("Max issuable not set") | |
391 | 391 | else $Tuple8(totalNFT, signID, artworkName, amountSold, artworkPrice, priceAssetId, maxCanSell, isOnSale) | |
392 | 392 | } | |
393 | 393 | } | |
394 | 394 | ||
395 | 395 | ||
396 | 396 | func getBidData (i,caller,issuer,artId,bidOwner,bidId,priceAssetId,artworkPrice,isBid) = { | |
397 | 397 | let checkUser = validateUser(issuer) | |
398 | 398 | if (if (isBid) | |
399 | 399 | then (checkUser != "") | |
400 | 400 | else false) | |
401 | 401 | then throw(checkUser) | |
402 | 402 | else { | |
403 | 403 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
404 | 404 | let $t01349513624 = if (isBid) | |
405 | 405 | then getPriceAssetIdFromBid(bidDataKey) | |
406 | 406 | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
407 | 407 | let amount = $t01349513624._1 | |
408 | 408 | let assetId = $t01349513624._2 | |
409 | 409 | $Tuple3(bidDataKey, amount, assetId) | |
410 | 410 | } | |
411 | 411 | } | |
412 | 412 | ||
413 | 413 | ||
414 | 414 | func getCommissionData (issuer,priceAssetId,amount,amountSold,maxCanSell) = { | |
415 | 415 | let isWhitelisted = checkWhitelist(issuer) | |
416 | 416 | let cut = if ((isWhitelisted > height)) | |
417 | 417 | then 0 | |
418 | 418 | else if ((priceAssetId == toBase58String(signAssetId))) | |
419 | 419 | then signCut | |
420 | 420 | else usdnWaveCut | |
421 | 421 | let amountForSign = fraction(amount, cut, 100) | |
422 | 422 | let amountForCreator = (amount - amountForSign) | |
423 | 423 | if ((amountSold == maxCanSell)) | |
424 | 424 | then throw("Art sold out") | |
425 | 425 | else { | |
426 | 426 | let newAmountSold = (amountSold + 1) | |
427 | 427 | $Tuple3(amountForSign, amountForCreator, newAmountSold) | |
428 | 428 | } | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | func getIssueData (issuer,artId,signID,artworkName,newAmountSold,maxCanSell,totalNFT,caller,bidOwner,bidId,i,isOnSale) = { | |
433 | 433 | let issueMeta = ((((((((((("Creator: " + issuer) + ", | |
434 | 434 | ArtID: ") + artId) + ", | |
435 | 435 | SignID: ") + signID) + ", | |
436 | 436 | Artwork name: ") + artworkName) + ", | |
437 | 437 | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
438 | 438 | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
439 | 439 | let idNFT = calculateAssetId(issueNFT) | |
440 | 440 | let sellStatus = if (if ((newAmountSold == maxCanSell)) | |
441 | 441 | then true | |
442 | 442 | else !(isOnSale)) | |
443 | 443 | then false | |
444 | 444 | else true | |
445 | 445 | let receiveNFT = if (if (if ((caller == issuer)) | |
446 | 446 | then (bidOwner != "") | |
447 | 447 | else false) | |
448 | 448 | then (bidId != "") | |
449 | 449 | else false) | |
450 | 450 | then addressFromStringValue(bidOwner) | |
451 | 451 | else i.caller | |
452 | 452 | $Tuple4(issueNFT, idNFT, sellStatus, receiveNFT) | |
453 | 453 | } | |
454 | 454 | ||
455 | 455 | ||
456 | 456 | func getBidKeyVal (assetId,bidDataKey,date) = { | |
457 | 457 | let assetIdBid = if (!(isDefined(assetId))) | |
458 | 458 | then "WAVES" | |
459 | 459 | else toBase58String(value(assetId)) | |
460 | 460 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
461 | 461 | let bidDelOld = DeleteEntry((bidDataKey + "_OPEN")) | |
462 | 462 | let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date))) | |
463 | 463 | $Tuple3(assetIdBid, bidDelOld, bidUpdate) | |
464 | 464 | } | |
465 | 465 | ||
466 | 466 | ||
467 | 467 | func buyMint (i,artId,issuer,bidId,bidOwner) = { | |
468 | 468 | let $t01550915559 = idCallerDate(i) | |
469 | 469 | let id = $t01550915559._1 | |
470 | 470 | let caller = $t01550915559._2 | |
471 | 471 | let date = $t01550915559._3 | |
472 | 472 | let isBid = isBidCheck(i, issuer, bidOwner, bidId) | |
473 | 473 | let $t01563915790 = getArtData(i, issuer, artId, isBid) | |
474 | 474 | let totalNFT = $t01563915790._1 | |
475 | 475 | let signID = $t01563915790._2 | |
476 | 476 | let artworkName = $t01563915790._3 | |
477 | 477 | let amountSold = $t01563915790._4 | |
478 | 478 | let artworkPrice = $t01563915790._5 | |
479 | 479 | let priceAssetId = $t01563915790._6 | |
480 | 480 | let maxCanSell = $t01563915790._7 | |
481 | 481 | let isOnSale = $t01563915790._8 | |
482 | 482 | let $t01579515941 = getBidData(i, caller, issuer, artId, bidOwner, bidId, priceAssetId, artworkPrice, isBid) | |
483 | 483 | let bidDataKey = $t01579515941._1 | |
484 | 484 | let amount = $t01579515941._2 | |
485 | 485 | let assetId = $t01579515941._3 | |
486 | 486 | let $t01594616093 = getCommissionData(issuer, priceAssetId, amount, amountSold, maxCanSell) | |
487 | 487 | let amountForSign = $t01594616093._1 | |
488 | 488 | let amountForCreator = $t01594616093._2 | |
489 | 489 | let newAmountSold = $t01594616093._3 | |
490 | 490 | let $t01609816288 = getIssueData(issuer, artId, signID, artworkName, newAmountSold, maxCanSell, totalNFT, caller, bidOwner, bidId, i, isOnSale) | |
491 | 491 | let issueNFT = $t01609816288._1 | |
492 | 492 | let idNFT = $t01609816288._2 | |
493 | 493 | let sellStatus = $t01609816288._3 | |
494 | 494 | let receiveNFT = $t01609816288._4 | |
495 | 495 | let $t01629316392 = getBidKeyVal(assetId, bidDataKey, date) | |
496 | 496 | let assetIdBid = $t01629316392._1 | |
497 | 497 | let bidDelOld = $t01629316392._2 | |
498 | 498 | let bidUpdate = $t01629316392._3 | |
499 | 499 | let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer) | |
500 | 500 | let soldValue = if (!(isBid)) | |
501 | 501 | then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT)) | |
502 | 502 | else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT)) | |
503 | 503 | let soldData = StringEntry(soldKey, soldValue) | |
504 | 504 | let buyRes = [IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(receiveNFT, 1, idNFT)] | |
505 | 505 | if (isBid) | |
506 | 506 | then [soldData, bidUpdate, bidDelOld] :: buyRes | |
507 | 507 | else soldData :: buyRes | |
508 | 508 | } | |
509 | 509 | ||
510 | 510 | ||
511 | 511 | @Callable(i) | |
512 | 512 | func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
513 | 513 | let $t01773817779 = idCallerDate(i) | |
514 | 514 | let artId = $t01773817779._1 | |
515 | 515 | let caller = $t01773817779._2 | |
516 | 516 | let date = $t01773817779._3 | |
517 | 517 | if (!(validateHash(sha256Hash))) | |
518 | 518 | then throw("Hash should be 64 characters maximum") | |
519 | 519 | else { | |
520 | 520 | let $t01788017949 = setLIcence(cidLicence, sha256Licence) | |
521 | 521 | let licenceCID = $t01788017949._1 | |
522 | 522 | let licenceHash = $t01788017949._2 | |
523 | 523 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags) | |
524 | 524 | if ((validateArtwork != "")) | |
525 | 525 | then throw("Something went wrong!") | |
526 | 526 | else { | |
527 | 527 | let $t01816818210 = validatePayment(i) | |
528 | 528 | let amount = $t01816818210._1 | |
529 | 529 | let assetId = $t01816818210._2 | |
530 | 530 | if (!(isDefined(amount))) | |
531 | 531 | then throw("Something went wrong") | |
532 | 532 | else { | |
533 | 533 | let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller)) | |
534 | 534 | if ((entryExist != "")) | |
535 | 535 | then throw("You already added it") | |
536 | 536 | else { | |
537 | 537 | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
538 | 538 | if ((hashExist != "")) | |
539 | 539 | then throw("Hash already registered") | |
540 | 540 | else { | |
541 | 541 | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
542 | 542 | if (!(isSignCertified)) | |
543 | 543 | then throw("Sign Certificate not found for this address.") | |
544 | 544 | else [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), 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), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
545 | 545 | } | |
546 | 546 | } | |
547 | 547 | } | |
548 | 548 | } | |
549 | 549 | } | |
550 | 550 | } | |
551 | 551 | ||
552 | 552 | ||
553 | 553 | ||
554 | 554 | @Callable(i) | |
555 | 555 | func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = if (!(dappRunning)) | |
556 | 556 | then throw(maintenanceMSG) | |
557 | 557 | else { | |
558 | 558 | let caller = toBase58String(i.caller.bytes) | |
559 | 559 | let $t02079420863 = setLIcence(cidLicence, sha256Licence) | |
560 | 560 | let licenceCID = $t02079420863._1 | |
561 | 561 | let licenceHash = $t02079420863._2 | |
562 | 562 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags) | |
563 | 563 | if ((validateArtwork != "")) | |
564 | 564 | then throw("Something went wrong!") | |
565 | 565 | else { | |
566 | 566 | let entryExist = getStringByKey(keyName(caller, txid)) | |
567 | 567 | if ((entryExist == "")) | |
568 | 568 | then throw("Entry not found") | |
569 | 569 | else { | |
570 | 570 | let flag = getStringByKey(keyFlag(caller, txid)) | |
571 | 571 | if ((flag == "ILLEGAL")) | |
572 | 572 | then throw("Cannot update ILLEGAL artwork") | |
573 | 573 | else if (!(isArtMinted(caller, txid))) | |
574 | 574 | then [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)] | |
575 | 575 | else throw("Already minted") | |
576 | 576 | } | |
577 | 577 | } | |
578 | 578 | } | |
579 | 579 | ||
580 | 580 | ||
581 | 581 | ||
582 | 582 | @Callable(i) | |
583 | 583 | func flagArtwork (artId,addr,flag) = { | |
584 | 584 | let $t02220522238 = idCallerDate(i) | |
585 | 585 | let id = $t02220522238._1 | |
586 | 586 | let caller = $t02220522238._2 | |
587 | 587 | if (containsElement([chris, joep, toString(this)], caller)) | |
588 | 588 | then if ((flag == "CONSENT")) | |
589 | 589 | then [StringEntry(keyFlag(addr, artId), flag)] | |
590 | 590 | else if ((flag == "")) | |
591 | 591 | then [StringEntry(keyFlag(addr, artId), flag)] | |
592 | 592 | else if ((flag == "CHANGE_REQUIRED")) | |
593 | 593 | then [StringEntry(keyFlag(addr, artId), flag)] | |
594 | 594 | else if (if ((flag == "ILLEGAL")) | |
595 | 595 | then containsElement([chris, toString(this)], caller) | |
596 | 596 | else false) | |
597 | 597 | then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyName(addr, artId), "ILLEGAL CONTENT"), StringEntry(keyDesc(addr, artId), "ILLEGAL CONTENT"), StringEntry(keyDisplayCid(addr, artId), ""), StringEntry(keyExportCid(addr, artId), ""), StringEntry(keyLicenceCid(addr, artId), "")] | |
598 | 598 | else throw(("Unknow status " + flag)) | |
599 | 599 | else throw("You are not allowed") | |
600 | 600 | } | |
601 | 601 | ||
602 | 602 | ||
603 | 603 | ||
604 | 604 | @Callable(i) | |
605 | 605 | func deleteArtwork (artId,addr) = { | |
606 | 606 | let $t02325723290 = idCallerDate(i) | |
607 | 607 | let id = $t02325723290._1 | |
608 | 608 | let caller = $t02325723290._2 | |
609 | 609 | let addrToUse = if (containsElement([chris, joep, toString(this)], caller)) | |
610 | 610 | then addr | |
611 | 611 | else caller | |
612 | 612 | let entryExist = valueOrErrorMessage(getStringByKey(keyName(addrToUse, artId)), "No art matching for this address") | |
613 | 613 | if ((entryExist == "")) | |
614 | 614 | then throw("No art matching for this address") | |
615 | 615 | else { | |
616 | 616 | let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId)) | |
617 | 617 | if ((sha256Hash == "")) | |
618 | 618 | then throw("No art hash matching for this address") | |
619 | 619 | else { | |
620 | 620 | let signID = getStringByKey(keySignID(addrToUse, artId)) | |
621 | 621 | if ((signID == "")) | |
622 | 622 | then throw("No SIGN ID matching") | |
623 | 623 | else { | |
624 | 624 | 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(addr, artId)), DeleteEntry(keyPrice(addr, artId)), DeleteEntry(keyAssetIdAccepted(addr, artId)), DeleteEntry(keyOwnerByHash(sha256Hash)), DeleteEntry(keyidBySignid(addrToUse, signID)), DeleteEntry(keyTxidByHashOwner(sha256Hash, addrToUse))] | |
625 | 625 | if (!(isArtMinted(addrToUse, artId))) | |
626 | 626 | then if (!(dappRunning)) | |
627 | 627 | then throw(maintenanceMSG) | |
628 | 628 | else dataToDelete | |
629 | 629 | else if (containsElement([chris, toString(this)], caller)) | |
630 | 630 | then dataToDelete | |
631 | 631 | else throw("Art already minted, you cannot delete it") | |
632 | 632 | } | |
633 | 633 | } | |
634 | 634 | } | |
635 | 635 | } | |
636 | 636 | ||
637 | 637 | ||
638 | 638 | ||
639 | 639 | @Callable(i) | |
640 | 640 | func sellArtwork (artId,price,maxMint,assetId) = { | |
641 | 641 | let $t02565625689 = idCallerDate(i) | |
642 | 642 | let id = $t02565625689._1 | |
643 | 643 | let caller = $t02565625689._2 | |
644 | 644 | let artworkName = getStringByKey(keyName(caller, artId)) | |
645 | 645 | if ((artworkName == "")) | |
646 | 646 | then throw("This art doesn't match your account") | |
647 | 647 | else { | |
648 | 648 | let exportCID = getStringByKey(keyExportCid(caller, artId)) | |
649 | 649 | if ((size(split(exportCID, "/")[0]) != 59)) | |
650 | 650 | then throw("You cannot sell art with no export file") | |
651 | - | else | |
652 | - | | |
653 | - | | |
651 | + | else { | |
652 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
653 | + | if (!(acceptedAssetIds(assetId))) | |
654 | 654 | then throw("Something went wrong!") | |
655 | - | else { | |
656 | - | let checkUser = validateUser(caller) | |
657 | - | if ((checkUser != "")) | |
658 | - | then throw(checkUser) | |
659 | - | else { | |
660 | - | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
661 | - | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
662 | - | if ((maxMint > 10)) | |
663 | - | then throw("10 editions max per artwork") | |
664 | - | else if (if ((amountSold != 0)) | |
665 | - | then (amountSold == maxCanSell) | |
666 | - | else false) | |
667 | - | then throw("Max edition reached.") | |
668 | - | else if (if ((amountSold > 0)) | |
669 | - | then (maxCanSell != maxMint) | |
655 | + | else if (!(validateMinSell(assetId, price))) | |
656 | + | then throw("Something went wrong!") | |
657 | + | else { | |
658 | + | let checkUser = validateUser(caller) | |
659 | + | if ((checkUser != "")) | |
660 | + | then throw(checkUser) | |
661 | + | else { | |
662 | + | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
663 | + | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
664 | + | if ((maxMint > 10)) | |
665 | + | then throw("10 editions max per artwork") | |
666 | + | else if (if ((amountSold != 0)) | |
667 | + | then (amountSold == maxCanSell) | |
670 | 668 | else false) | |
671 | - | then throw("Cannot change maximum issuable anymore") | |
672 | - | else { | |
673 | - | let sellStatus = if (if ((price > 0)) | |
674 | - | then (maxMint > 0) | |
669 | + | then throw("Max edition reached.") | |
670 | + | else if (if ((amountSold > 0)) | |
671 | + | then (maxCanSell != maxMint) | |
672 | + | else false) | |
673 | + | then throw("Cannot change maximum issuable anymore") | |
674 | + | else if (if ((bidNbr > 0)) | |
675 | + | then (maxCanSell != maxMint) | |
675 | 676 | else false) | |
676 | - | then true | |
677 | - | else false | |
677 | + | then throw("Cannot change maximum issuable with active orders") | |
678 | + | else { | |
679 | + | let sellStatus = if (if ((price > 0)) | |
680 | + | then (maxMint > 0) | |
681 | + | else false) | |
682 | + | then true | |
683 | + | else false | |
678 | 684 | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), StringEntry(keyAssetIdAccepted(caller, artId), assetId)] | |
679 | - | } | |
680 | - | } | |
681 | - | } | |
685 | + | } | |
686 | + | } | |
687 | + | } | |
688 | + | } | |
682 | 689 | } | |
683 | 690 | } | |
684 | 691 | ||
685 | 692 | ||
686 | 693 | ||
687 | 694 | @Callable(i) | |
688 | 695 | func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "") | |
689 | 696 | ||
690 | 697 | ||
691 | 698 | ||
692 | 699 | @Callable(i) | |
693 | 700 | func setBid (artId,issuer) = { | |
694 | - | let $ | |
695 | - | let id = $ | |
696 | - | let caller = $ | |
697 | - | let date = $ | |
698 | - | let $ | |
699 | - | let payment = $ | |
700 | - | let amount = $ | |
701 | + | let $t02765127689 = idCallerDate(i) | |
702 | + | let id = $t02765127689._1 | |
703 | + | let caller = $t02765127689._2 | |
704 | + | let date = $t02765127689._3 | |
705 | + | let $t02769427730 = isPayment(i) | |
706 | + | let payment = $t02769427730._1 | |
707 | + | let amount = $t02769427730._2 | |
701 | 708 | let assetId = if (!(isDefined(payment.assetId))) | |
702 | 709 | then "WAVES" | |
703 | 710 | else toBase58String(value(payment.assetId)) | |
711 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
704 | 712 | if (!(acceptedAssetIds(assetId))) | |
705 | 713 | then throw("asset not accepted") | |
706 | 714 | else if (!(validateMinSell(assetId, amount))) | |
707 | 715 | then throw("Wrong min sell") | |
708 | 716 | else { | |
709 | 717 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
710 | 718 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
711 | 719 | if ((0 >= maxCanSell)) | |
712 | 720 | then throw("No max edition set for this artwork") | |
713 | 721 | else if ((amountSold >= maxCanSell)) | |
714 | 722 | then throw("Sold out, you cannot bid") | |
715 | - | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date)))] | |
723 | + | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
716 | 724 | } | |
717 | 725 | } | |
718 | 726 | ||
719 | 727 | ||
720 | 728 | ||
721 | 729 | @Callable(i) | |
722 | 730 | func acceptBid (artId,issuer,bidId,bidOwner) = { | |
723 | 731 | let caller = toBase58String(i.caller.bytes) | |
724 | 732 | if ((caller != issuer)) | |
725 | 733 | then throw("You cannot do this action") | |
726 | 734 | else buyMint(i, artId, issuer, bidId, bidOwner) | |
727 | 735 | } | |
728 | 736 | ||
729 | 737 | ||
730 | 738 | ||
731 | 739 | @Callable(i) | |
732 | 740 | func cancelBid (artId,issuer,bidId) = { | |
733 | - | let $t02859628748 = idCallerDate(i) | |
734 | - | let id = $t02859628748._1 | |
735 | - | let caller = $t02859628748._2 | |
736 | - | let date = $t02859628748._3 | |
741 | + | let $t02888429036 = idCallerDate(i) | |
742 | + | let id = $t02888429036._1 | |
743 | + | let caller = $t02888429036._2 | |
744 | + | let date = $t02888429036._3 | |
745 | + | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
737 | 746 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
738 | 747 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
739 | 748 | if ((bidData == "")) | |
740 | 749 | then throw("Bid not found") | |
741 | 750 | else { | |
742 | 751 | let bidDataArr = split(bidData, "_") | |
743 | 752 | let assetId = getBidAssetId(bidDataArr[0]) | |
744 | 753 | let bidStatus = "CANCELED" | |
745 | - | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
754 | + | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
746 | 755 | } | |
747 | 756 | } | |
748 | 757 | ||
749 | 758 | ||
750 | 759 | ||
751 | 760 | @Callable(i) | |
752 | 761 | func deleteEntry (entry) = { | |
753 | 762 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
754 | 763 | if ((caller == chris)) | |
755 | 764 | then [DeleteEntry(entry)] | |
756 | 765 | else throw("no") | |
757 | 766 | } | |
758 | 767 | ||
759 | 768 |
github/deemru/w8io/026f985 92.96 ms ◑