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