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