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