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