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