tx · BJY64MKbSrh6xDgHLVrV7exPhHmPioCGhkzvHRJZidNU

3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY:  -0.02200000 Waves

2022.07.14 07:53 [2138941] smart account 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY > SELF 0.00000000 Waves

{ "type": 13, "id": "BJY64MKbSrh6xDgHLVrV7exPhHmPioCGhkzvHRJZidNU", "fee": 2200000, "feeAssetId": null, "timestamp": 1657774419462, "version": 2, "chainId": 84, "sender": "3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY", "senderPublicKey": "J9DCtJJxJBWZdtDR12BA1U94Q3cZzMi4R6k5hYkAzmzC", "proofs": [ "5jgqfz5xAdU2LPAmoyTf6dX2kvK9R17RiXt4XRRQJBUvCaefjCSm4bMcjNBp3hmV7T25KkpF8xydYUGdoggjnYXV" ], "script": "base64:BgJaCAISBAoCCAgSDgoMCAgICAgICAgICAgIEg0KCwgICAgICAgICAgIEgYKBAgICAgSBAoCCAgSBwoFCAEBCAESBAoCCAgSBAoCCAgSBgoECAgICBIGCgQICAgISQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAAIdW5pdFRlc3QHAAlvcmFjbGVGZWUJAQV2YWx1ZQEJAKYIAQkBDmdldFN0cmluZ0J5S2V5AQIPY29uZl9vcmFjbGVfZmVlAAhzaWduRGFwcAkBBXZhbHVlAQkApggBCQEOZ2V0U3RyaW5nQnlLZXkBAhFjb25mX3NpZ253ZWJfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZGFwc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AQxJbnRlZ2VyRW50cnkCCQCsAgICEmN1cnJlbnRfYmlkYW1vdW50XwUFYXJ0SWQJAGUCBQZiaWROYnIAAQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUNcmV0dXJuTW9uZXlUbwkBDXBhcnNlSW50VmFsdWUBCQCRAwIFCmJpZERhdGFBcnIAAQUHYXNzZXRJZAUDbmlsAP84vQs=", "height": 2138941, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5g2H7FmPjurUc5TquBFWnjWd59BujWEeFAJNT9SC4KhX Next: AvRwdiH22cgEjygtguxjUZcGC3qGWz4C4qsTvsH1wXTb Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func getStringByKey (key) = valueOrElse(getString(this, key), "")
5+
6+
47 let unitTest = false
58
6-let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
9+let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee")))
710
8-let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB"))
11+let signDapp = value(addressFromString(getStringByKey("conf_signweb_dapp")))
912
10-let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
13+let feeReceiver = getStringByKey("conf_fee_receiver")
1114
1215 let userDapp = if (unitTest)
1316 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
14- else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj"))
17+ else value(addressFromString(getStringByKey("conf_users_dapp")))
1518
16-let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq"))
19+let whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp")))
1720
18-let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
21+let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN"))
1922
20-let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
23+let usdnAssetId = fromBase58String("conf_accepted_asset_USDN")
2124
2225 let wavesAssetId = base58''
2326
24-let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
27+let chris = getStringByKey("conf_admin_1")
2528
26-let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
29+let joep = getStringByKey("conf_admin_2")
30+
31+func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
32+
33+
34+func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
35+
36+
37+func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
38+
39+
40+func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
41+
2742
2843 let signCut = 7
2944
3045 let usdnWaveCut = 10
3146
32-let defaultLicence = "bafybeifuyo4pqu54ismqgtb6e4h6kkvgx7zg4u3zibh2r7y6mb64i7bzza/licence.pdf"
47+let defaultLicence = getStringByKey("conf_default_licence")
3348
34-let defaultHashLicence = "a87758c354e30a9e78fb84fa3a0010a5090ab20df0be11ad45b5720cc187e639"
49+let defaultHashLicence = getStringByKey("conf_default_licence_hash")
3550
3651 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
3752
4459 let userUnregistered = "UNREGISTERED"
4560
4661 let userAllowed = "ALLOWED"
47-
48-func getStringByKey (key) = valueOrElse(getString(this, key), "")
49-
50-
51-func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
52-
53-
54-func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
55-
56-
57-func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
58-
59-
60-func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
61-
6262
6363 let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId)))
6464
245245
246246
247247 func validatePayment (i) = {
248- let $t094199455 = isPayment(i)
249- let payment = $t094199455._1
250- let amount = $t094199455._2
248+ let $t01020010236 = isPayment(i)
249+ let payment = $t01020010236._1
250+ let amount = $t01020010236._2
251251 let assetId = if (if (isDefined(payment.assetId))
252252 then (payment.assetId == signAssetId)
253253 else false)
270270
271271
272272 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
273- let $t01004810084 = isPayment(i)
274- let payment = $t01004810084._1
275- let amount = $t01004810084._2
273+ let $t01082910865 = isPayment(i)
274+ let payment = $t01082910865._1
275+ let amount = $t01082910865._2
276276 let assetId = if (!(isDefined(payment.assetId)))
277277 then unit
278278 else if (if ((size(priceAssetId) > 0))
359359
360360
361361 func buyMint (i,artId,issuer,bidId,bidOwner) = {
362- let $t01230912366 = idCallerDate(i)
363- let id = $t01230912366._1
364- let caller = $t01230912366._2
365- let date = $t01230912366._3
362+ let $t01309013147 = idCallerDate(i)
363+ let id = $t01309013147._1
364+ let caller = $t01309013147._2
365+ let date = $t01309013147._3
366366 let isBid = if (if (if ((toBase58String(i.caller.bytes) == issuer))
367367 then (bidOwner != "")
368368 else false)
418418 then throw(checkUser)
419419 else {
420420 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
421- let $t01411714284 = if (isBid)
421+ let $t01489815065 = if (isBid)
422422 then getPriceAssetIdFromBid(bidDataKey)
423423 else validatePriceAssetId(i, priceAssetId, artworkPrice)
424- let amount = $t01411714284._1
425- let assetId = $t01411714284._2
424+ let amount = $t01489815065._1
425+ let assetId = $t01489815065._2
426426 let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver)
427427 let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShare(issuer)), 0)
428428 let isWhitelisted = checkWhitelist(issuer)
489489 }
490490
491491
492+@Callable(invoke)
493+func setConf (key,val) = {
494+ let caller = toString(invoke.caller)
495+ if (containsElement([chris, toString(this)], caller))
496+ then if (contains(val, "conf_"))
497+ then [StringEntry(key, val)]
498+ else throw("Entries starting with conf_ only")
499+ else throw("You are not allowed to change this")
500+ }
501+
502+
503+
492504 @Callable(i)
493505 func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler) = {
494- let $t01768617727 = idCallerDate(i)
495- let artId = $t01768617727._1
496- let caller = $t01768617727._2
497- let date = $t01768617727._3
506+ let $t01885018891 = idCallerDate(i)
507+ let artId = $t01885018891._1
508+ let caller = $t01885018891._2
509+ let date = $t01885018891._3
498510 if (!(validateHash(sha256Hash)))
499511 then throw("Hash should be 64 characters maximum")
500512 else {
501- let $t01782817897 = setLIcence(cidLicence, sha256Licence)
502- let licenceCID = $t01782817897._1
503- let licenceHash = $t01782817897._2
513+ let $t01899219061 = setLIcence(cidLicence, sha256Licence)
514+ let licenceCID = $t01899219061._1
515+ let licenceHash = $t01899219061._2
504516 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags)
505517 if ((validateArtwork != ""))
506518 then throw("Something went wrong!")
507519 else {
508- let $t01811618158 = validatePayment(i)
509- let amount = $t01811618158._1
510- let assetId = $t01811618158._2
520+ let $t01928019322 = validatePayment(i)
521+ let amount = $t01928019322._1
522+ let assetId = $t01928019322._2
511523 if (!(isDefined(amount)))
512524 then throw("Something went wrong")
513525 else {
537549 then throw(maintenanceMSG)
538550 else {
539551 let caller = toBase58String(i.caller.bytes)
540- let $t02089020959 = setLIcence(cidLicence, sha256Licence)
541- let licenceCID = $t02089020959._1
542- let licenceHash = $t02089020959._2
552+ let $t02205422123 = setLIcence(cidLicence, sha256Licence)
553+ let licenceCID = $t02205422123._1
554+ let licenceHash = $t02205422123._2
543555 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags)
544556 if ((validateArtwork != ""))
545557 then throw("Something went wrong!")
562574
563575 @Callable(i)
564576 func flagArtwork (artId,addr,flag,note) = {
565- let $t02238422417 = idCallerDate(i)
566- let id = $t02238422417._1
567- let caller = $t02238422417._2
577+ let $t02354823581 = idCallerDate(i)
578+ let id = $t02354823581._1
579+ let caller = $t02354823581._2
568580 if (containsElement([chris, toString(this)], caller))
569581 then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
570582 then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)]
576588
577589 @Callable(i)
578590 func deleteArtwork (artId,addr) = {
579- let $t02285322886 = idCallerDate(i)
580- let id = $t02285322886._1
581- let caller = $t02285322886._2
591+ let $t02401724050 = idCallerDate(i)
592+ let id = $t02401724050._1
593+ let caller = $t02401724050._2
582594 let addrToUse = if (containsElement([chris, joep, toString(this)], caller))
583595 then addr
584596 else caller
611623
612624 @Callable(i)
613625 func sellArtwork (artId,price,maxMint,assetId,blockEnd) = {
614- let $t02565925692 = idCallerDate(i)
615- let id = $t02565925692._1
616- let caller = $t02565925692._2
626+ let $t02682326856 = idCallerDate(i)
627+ let id = $t02682326856._1
628+ let caller = $t02682326856._2
617629 let artworkName = getStringByKey(keyName(caller, artId))
618630 if ((artworkName == ""))
619631 then throw("This art doesn't match your account")
684696
685697 @Callable(i)
686698 func setBid (artId,issuer) = {
687- let $t02794927987 = idCallerDate(i)
688- let id = $t02794927987._1
689- let caller = $t02794927987._2
690- let date = $t02794927987._3
691- let $t02799228028 = isPayment(i)
692- let payment = $t02799228028._1
693- let amount = $t02799228028._2
699+ let $t02911329151 = idCallerDate(i)
700+ let id = $t02911329151._1
701+ let caller = $t02911329151._2
702+ let date = $t02911329151._3
703+ let $t02915629192 = isPayment(i)
704+ let payment = $t02915629192._1
705+ let amount = $t02915629192._2
694706 let assetId = if (!(isDefined(payment.assetId)))
695707 then "WAVES"
696708 else toBase58String(value(payment.assetId))
731743
732744 @Callable(i)
733745 func cancelBid (artId,issuer,bidId,bidOwner) = {
734- let $t02945529514 = idCallerDate(i)
735- let id = $t02945529514._1
736- let caller = $t02945529514._2
737- let date = $t02945529514._3
746+ let $t03061930678 = idCallerDate(i)
747+ let id = $t03061930678._1
748+ let caller = $t03061930678._2
749+ let date = $t03061930678._3
738750 if (if ((caller != bidOwner))
739751 then (caller != issuer)
740752 else false)
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func getStringByKey (key) = valueOrElse(getString(this, key), "")
5+
6+
47 let unitTest = false
58
6-let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
9+let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee")))
710
8-let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB"))
11+let signDapp = value(addressFromString(getStringByKey("conf_signweb_dapp")))
912
10-let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
13+let feeReceiver = getStringByKey("conf_fee_receiver")
1114
1215 let userDapp = if (unitTest)
1316 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
14- else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj"))
17+ else value(addressFromString(getStringByKey("conf_users_dapp")))
1518
16-let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq"))
19+let whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp")))
1720
18-let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
21+let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN"))
1922
20-let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
23+let usdnAssetId = fromBase58String("conf_accepted_asset_USDN")
2124
2225 let wavesAssetId = base58''
2326
24-let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
27+let chris = getStringByKey("conf_admin_1")
2528
26-let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
29+let joep = getStringByKey("conf_admin_2")
30+
31+func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
32+
33+
34+func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
35+
36+
37+func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
38+
39+
40+func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
41+
2742
2843 let signCut = 7
2944
3045 let usdnWaveCut = 10
3146
32-let defaultLicence = "bafybeifuyo4pqu54ismqgtb6e4h6kkvgx7zg4u3zibh2r7y6mb64i7bzza/licence.pdf"
47+let defaultLicence = getStringByKey("conf_default_licence")
3348
34-let defaultHashLicence = "a87758c354e30a9e78fb84fa3a0010a5090ab20df0be11ad45b5720cc187e639"
49+let defaultHashLicence = getStringByKey("conf_default_licence_hash")
3550
3651 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
3752
3853 let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
3954
4055 let userSuspended = "SUSPENDED"
4156
4257 let userRemoved = "REMOVED"
4358
4459 let userUnregistered = "UNREGISTERED"
4560
4661 let userAllowed = "ALLOWED"
47-
48-func getStringByKey (key) = valueOrElse(getString(this, key), "")
49-
50-
51-func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
52-
53-
54-func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
55-
56-
57-func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
58-
59-
60-func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
61-
6262
6363 let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId)))
6464
6565 func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) {
6666 case a: String =>
6767 if (contains(a, sha256Hash))
6868 then true
6969 else false
7070 case _ =>
7171 false
7272 }
7373
7474
7575 func validateCID (cid) = if (contains(cid, "/"))
7676 then if (if ((76 > size(cid)))
7777 then (size(split(cid, "/")[0]) == 59)
7878 else false)
7979 then (16 > size(split(cid, "/")[1]))
8080 else false
8181 else false
8282
8383
8484 func validateHash (hash) = (size(hash) == 64)
8585
8686
8787 func keyUserStatus (caller) = ("user_status_" + caller)
8888
8989
9090 func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller)
9191
9292
9393 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
9494
9595
9696 func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller)
9797
9898
9999 func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller)
100100
101101
102102 func keyExportHash (caller,artId) = ((("art_export_hash_" + artId) + "_") + caller)
103103
104104
105105 func keyExportCid (caller,artId) = ((("art_export_cid_" + artId) + "_") + caller)
106106
107107
108108 func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller)
109109
110110
111111 func keySignID (caller,artId) = ((("art_signid_" + artId) + "_") + caller)
112112
113113
114114 func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller)
115115
116116
117117 func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller)
118118
119119
120120 func keyLicenceHash (caller,artId) = ((("art_licence_hash_" + artId) + "_") + caller)
121121
122122
123123 func keyLicenceCid (caller,artId) = ((("art_licence_cid_" + artId) + "_") + caller)
124124
125125
126126 func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller)
127127
128128
129129 func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller)
130130
131131
132132 func keyNote (caller,artId) = ((("art_note_" + artId) + "_") + caller)
133133
134134
135135 func keyCrawler (caller,artId) = ((("art_crawler_cid_" + artId) + "_") + caller)
136136
137137
138138 func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller)
139139
140140
141141 func keyEndSale (caller,artId) = ((("art_endsale_" + artId) + "_") + caller)
142142
143143
144144 func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller)
145145
146146
147147 func keyFlag (caller,artId) = ((("art_flag_" + artId) + "_") + caller)
148148
149149
150150 func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
151151
152152
153153 func keyPrimaryShare (artistAddr) = ("artist_agent_primary_" + artistAddr)
154154
155155
156156 func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller)
157157
158158
159159 func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash)
160160
161161
162162 func keyidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller)
163163
164164
165165 func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller)))))
166166
167167
168168 func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay)))
169169 then throw("Wrong Display CID")
170170 else if (!(validateCID(cidExport)))
171171 then throw("Wrong Export CID")
172172 else if (if ((cidLicence != ""))
173173 then !(validateCID(cidLicence))
174174 else false)
175175 then throw("Wrong Licence CID")
176176 else true
177177
178178
179179 func validateAllHash (sha256Export,sha256Licence) = if (!(validateHash(sha256Export)))
180180 then throw("Export Hash 64 char. max")
181181 else if (!(validateHash(sha256Licence)))
182182 then throw("Licence Hash 64 char. max")
183183 else true
184184
185185
186186 func validateString (str,max) = if ((size(str) == 0))
187187 then throw("Field cannot be is empty")
188188 else if ((size(str) > max))
189189 then throw((str + " is too long"))
190190 else true
191191
192192
193193 func validateUser (caller) = {
194194 let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
195195 if (if ((userStatus == userUnregistered))
196196 then true
197197 else (userStatus == userAllowed))
198198 then "Register this account first with \"Account\" tab"
199199 else if ((userStatus == userSuspended))
200200 then "Account suspended"
201201 else if ((userStatus == userRemoved))
202202 then "Account removed"
203203 else ""
204204 }
205205
206206
207207 func setLIcence (cidLicence,sha256Licence) = {
208208 let cid = if ((size(cidLicence) == 0))
209209 then defaultLicence
210210 else cidLicence
211211 let hash = if ((size(sha256Licence) == 0))
212212 then defaultHashLicence
213213 else sha256Licence
214214 $Tuple2(cid, hash)
215215 }
216216
217217
218218 func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags) = {
219219 let checkUser = validateUser(caller)
220220 if ((checkUser != ""))
221221 then throw(checkUser)
222222 else if ((size(cidDisplay) == 0))
223223 then throw("Display CID cannot be empty")
224224 else if (!(validateAllCID(cidDisplay, cidExport, licenceCID)))
225225 then throw("Problem with CID")
226226 else if (!(validateAllHash(sha256Export, licenceHash)))
227227 then throw("Problem with Hashes")
228228 else if (!(validateString(name, 100)))
229229 then throw("100 Char. max name")
230230 else if (!(validateString(description, 1000)))
231231 then throw("1000 Char. max description")
232232 else if ((size(split(tags, ",")) > 5))
233233 then throw("5 tags max.")
234234 else ""
235235 }
236236
237237
238238 func isPayment (i) = if ((size(i.payments) == 0))
239239 then throw("No payment attached")
240240 else {
241241 let payment = value(i.payments[0])
242242 let amount = value(payment.amount)
243243 $Tuple2(payment, amount)
244244 }
245245
246246
247247 func validatePayment (i) = {
248- let $t094199455 = isPayment(i)
249- let payment = $t094199455._1
250- let amount = $t094199455._2
248+ let $t01020010236 = isPayment(i)
249+ let payment = $t01020010236._1
250+ let amount = $t01020010236._2
251251 let assetId = if (if (isDefined(payment.assetId))
252252 then (payment.assetId == signAssetId)
253253 else false)
254254 then payment.assetId
255255 else throw("Only SIGN token accepted as transaction fee")
256256 if ((amount != currentCertificationPrice))
257257 then throw(("Payment amount should be " + toString(currentCertificationPrice)))
258258 else $Tuple2(amount, assetId)
259259 }
260260
261261
262262 func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) {
263263 case b: Int =>
264264 if ((b != 0))
265265 then true
266266 else false
267267 case _ =>
268268 false
269269 }
270270
271271
272272 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
273- let $t01004810084 = isPayment(i)
274- let payment = $t01004810084._1
275- let amount = $t01004810084._2
273+ let $t01082910865 = isPayment(i)
274+ let payment = $t01082910865._1
275+ let amount = $t01082910865._2
276276 let assetId = if (!(isDefined(payment.assetId)))
277277 then unit
278278 else if (if ((size(priceAssetId) > 0))
279279 then (toBase58String(value(payment.assetId)) == priceAssetId)
280280 else false)
281281 then payment.assetId
282282 else throw("Wrong asset id")
283283 if (if ((assetId == unit))
284284 then (priceAssetId != "")
285285 else false)
286286 then throw("Wrong asset id")
287287 else if ((artworkPrice != amount))
288288 then throw("Payment don't match")
289289 else $Tuple2(amount, assetId)
290290 }
291291
292292
293293 func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId)))
294294 then (assetId != toBase58String(wavesAssetId))
295295 else false)
296296 then (assetId != "WAVES")
297297 else false)
298298 then (assetId != toBase58String(usdnAssetId))
299299 else false)
300300 then throw("Only SIGN, USDN or WAVES accepted")
301301 else true
302302
303303
304304 func validateMinSell (assetId,price) = {
305305 let minSellWaves = if (unitTest)
306306 then 10
307307 else getIntegerByKeyFromOracle("waves_min_sell")
308308 let minSellUsdn = 1000000
309309 let minSellSign = if (unitTest)
310310 then 1
311311 else (currentCertificationPrice * 2)
312312 if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
313313 then (minSellUsdn > price)
314314 else false)
315315 then (price != 0)
316316 else false)
317317 then true
318318 else if (if ((assetId == toBase58String(signAssetId)))
319319 then (minSellSign > price)
320320 else false)
321321 then (price != 0)
322322 else false)
323323 then true
324324 else if (if (if ((assetId == toBase58String(wavesAssetId)))
325325 then true
326326 else (assetId == "WAVES"))
327327 then (minSellWaves > price)
328328 else false)
329329 then (price != 0)
330330 else false)
331331 then throw("Wrong minimum sell price")
332332 else true
333333 }
334334
335335
336336 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
337337 then unit
338338 else fromBase58String(assetId)
339339
340340
341341 func getPriceAssetIdFromBid (bidDataKey) = {
342342 let bidData = getStringByKey((bidDataKey + "_OPEN"))
343343 if ((bidData == ""))
344344 then throw("Bid not found")
345345 else {
346346 let bidDataArr = split(bidData, "_")
347347 let bidAmount = parseIntValue(bidDataArr[1])
348348 let bidAssetId = getBidAssetId(bidDataArr[0])
349349 if ((0 >= bidAmount))
350350 then throw("Wrong amount")
351351 else $Tuple2(bidAmount, bidAssetId)
352352 }
353353 }
354354
355355
356356 func idCallerDate (i) = if (!(dappRunning))
357357 then throw(maintenanceMSG)
358358 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
359359
360360
361361 func buyMint (i,artId,issuer,bidId,bidOwner) = {
362- let $t01230912366 = idCallerDate(i)
363- let id = $t01230912366._1
364- let caller = $t01230912366._2
365- let date = $t01230912366._3
362+ let $t01309013147 = idCallerDate(i)
363+ let id = $t01309013147._1
364+ let caller = $t01309013147._2
365+ let date = $t01309013147._3
366366 let isBid = if (if (if ((toBase58String(i.caller.bytes) == issuer))
367367 then (bidOwner != "")
368368 else false)
369369 then (bidId != "")
370370 else false)
371371 then true
372372 else false
373373 let blockEnd = getIntegerByKey(keyEndSale(caller, artId))
374374 if (if (if ((blockEnd != 0))
375375 then (height >= blockEnd)
376376 else false)
377377 then !(isBid)
378378 else false)
379379 then throw("Sale ended.")
380380 else {
381381 let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer)
382382 let totalNFT = getIntegerByKey("total_nft_issued")
383383 let signID = getStringByKey(keySignID(issuer, artId))
384384 let artworkName = getStringByKey(keyName(issuer, artId))
385385 if ((artworkName == ""))
386386 then throw("Art doesn't exist")
387387 else {
388388 let isOnSale = getBooleanByKey(keyOnSale(issuer, artId))
389389 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
390390 let artworkPrice = if (callerIsIssuer)
391391 then (currentCertificationPrice * 2)
392392 else getIntegerByKey(keyPrice(issuer, artId))
393393 let priceAssetId = if (callerIsIssuer)
394394 then toBase58String(signAssetId)
395395 else getStringByKey(keyAssetIdAccepted(issuer, artId))
396396 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
397397 if (if (if (!(isBid))
398398 then !(callerIsIssuer)
399399 else false)
400400 then if (if ((0 >= artworkPrice))
401401 then true
402402 else !(isOnSale))
403403 then true
404404 else (0 >= maxCanSell)
405405 else false)
406406 then throw("Art not for sale")
407407 else if (if (if (!(isBid))
408408 then callerIsIssuer
409409 else false)
410410 then (0 >= maxCanSell)
411411 else false)
412412 then throw("Max issuable not set")
413413 else {
414414 let checkUser = validateUser(issuer)
415415 if (if (isBid)
416416 then (checkUser != "")
417417 else false)
418418 then throw(checkUser)
419419 else {
420420 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
421- let $t01411714284 = if (isBid)
421+ let $t01489815065 = if (isBid)
422422 then getPriceAssetIdFromBid(bidDataKey)
423423 else validatePriceAssetId(i, priceAssetId, artworkPrice)
424- let amount = $t01411714284._1
425- let assetId = $t01411714284._2
424+ let amount = $t01489815065._1
425+ let assetId = $t01489815065._2
426426 let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver)
427427 let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShare(issuer)), 0)
428428 let isWhitelisted = checkWhitelist(issuer)
429429 let cut = if ((isWhitelisted > height))
430430 then 0
431431 else if ((assetId == signAssetId))
432432 then signCut
433433 else usdnWaveCut
434434 let amountForSign = fraction(amount, cut, 100)
435435 let amountForAgent = if (if (if ((agent != feeReceiver))
436436 then (agentShare > 0)
437437 else false)
438438 then (height > isWhitelisted)
439439 else false)
440440 then fraction(amount, agentShare, 100)
441441 else 0
442442 let amountForCreator = (amount - amountForSign)
443443 if ((amountSold == maxCanSell))
444444 then throw("Art sold out")
445445 else {
446446 let newAmountSold = (amountSold + 1)
447447 let issueMeta = ((((((((((("Creator: " + issuer) + ",
448448 ArtID: ") + artId) + ",
449449 SignID: ") + signID) + ",
450450 Artwork name: ") + artworkName) + ",
451451 Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
452452 let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
453453 let idNFT = calculateAssetId(issueNFT)
454454 let sellStatus = if (if ((newAmountSold == maxCanSell))
455455 then true
456456 else !(isOnSale))
457457 then false
458458 else true
459459 let receiveNFT = if (if (if ((caller == issuer))
460460 then (bidOwner != "")
461461 else false)
462462 then (bidId != "")
463463 else false)
464464 then addressFromStringValue(bidOwner)
465465 else i.caller
466466 let assetIdBid = if (!(isDefined(assetId)))
467467 then "WAVES"
468468 else toBase58String(value(assetId))
469469 let bidData = getStringByKey((bidDataKey + "_OPEN"))
470470 let bidDelOld = DeleteEntry((bidDataKey + "_OPEN"))
471471 let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date)))
472472 let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)
473473 let soldValue = if (!(isBid))
474474 then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))
475475 else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT))
476476 let soldData = StringEntry(soldKey, soldValue)
477477 let commissions = if ((amountForAgent != 0))
478478 then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
479479 else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
480480 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)
481481 if (isBid)
482482 then [soldData, bidUpdate, bidDelOld] :: buyRes
483483 else soldData :: buyRes
484484 }
485485 }
486486 }
487487 }
488488 }
489489 }
490490
491491
492+@Callable(invoke)
493+func setConf (key,val) = {
494+ let caller = toString(invoke.caller)
495+ if (containsElement([chris, toString(this)], caller))
496+ then if (contains(val, "conf_"))
497+ then [StringEntry(key, val)]
498+ else throw("Entries starting with conf_ only")
499+ else throw("You are not allowed to change this")
500+ }
501+
502+
503+
492504 @Callable(i)
493505 func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler) = {
494- let $t01768617727 = idCallerDate(i)
495- let artId = $t01768617727._1
496- let caller = $t01768617727._2
497- let date = $t01768617727._3
506+ let $t01885018891 = idCallerDate(i)
507+ let artId = $t01885018891._1
508+ let caller = $t01885018891._2
509+ let date = $t01885018891._3
498510 if (!(validateHash(sha256Hash)))
499511 then throw("Hash should be 64 characters maximum")
500512 else {
501- let $t01782817897 = setLIcence(cidLicence, sha256Licence)
502- let licenceCID = $t01782817897._1
503- let licenceHash = $t01782817897._2
513+ let $t01899219061 = setLIcence(cidLicence, sha256Licence)
514+ let licenceCID = $t01899219061._1
515+ let licenceHash = $t01899219061._2
504516 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags)
505517 if ((validateArtwork != ""))
506518 then throw("Something went wrong!")
507519 else {
508- let $t01811618158 = validatePayment(i)
509- let amount = $t01811618158._1
510- let assetId = $t01811618158._2
520+ let $t01928019322 = validatePayment(i)
521+ let amount = $t01928019322._1
522+ let assetId = $t01928019322._2
511523 if (!(isDefined(amount)))
512524 then throw("Something went wrong")
513525 else {
514526 let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller))
515527 if ((entryExist != ""))
516528 then throw("You already added it")
517529 else {
518530 let hashExist = getStringByKey(keyOwnerByHash(sha256Hash))
519531 if ((hashExist != ""))
520532 then throw("Hash already registered")
521533 else {
522534 let isSignCertified = checkSignCertificate(signID, caller, sha256Hash)
523535 if (!(isSignCertified))
524536 then throw("Sign Certificate not found for this address.")
525537 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)]
526538 }
527539 }
528540 }
529541 }
530542 }
531543 }
532544
533545
534546
535547 @Callable(i)
536548 func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler) = if (!(dappRunning))
537549 then throw(maintenanceMSG)
538550 else {
539551 let caller = toBase58String(i.caller.bytes)
540- let $t02089020959 = setLIcence(cidLicence, sha256Licence)
541- let licenceCID = $t02089020959._1
542- let licenceHash = $t02089020959._2
552+ let $t02205422123 = setLIcence(cidLicence, sha256Licence)
553+ let licenceCID = $t02205422123._1
554+ let licenceHash = $t02205422123._2
543555 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags)
544556 if ((validateArtwork != ""))
545557 then throw("Something went wrong!")
546558 else {
547559 let entryExist = getStringByKey(keyName(caller, txid))
548560 if ((entryExist == ""))
549561 then throw("Entry not found")
550562 else {
551563 let flag = getStringByKey(keyFlag(caller, txid))
552564 if ((flag == "ILLEGAL"))
553565 then throw("Cannot update ILLEGAL artwork")
554566 else if (!(isArtMinted(caller, txid)))
555567 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)]
556568 else throw("Already minted")
557569 }
558570 }
559571 }
560572
561573
562574
563575 @Callable(i)
564576 func flagArtwork (artId,addr,flag,note) = {
565- let $t02238422417 = idCallerDate(i)
566- let id = $t02238422417._1
567- let caller = $t02238422417._2
577+ let $t02354823581 = idCallerDate(i)
578+ let id = $t02354823581._1
579+ let caller = $t02354823581._2
568580 if (containsElement([chris, toString(this)], caller))
569581 then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
570582 then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)]
571583 else throw(("Unknow status " + flag))
572584 else throw("You are not allowed")
573585 }
574586
575587
576588
577589 @Callable(i)
578590 func deleteArtwork (artId,addr) = {
579- let $t02285322886 = idCallerDate(i)
580- let id = $t02285322886._1
581- let caller = $t02285322886._2
591+ let $t02401724050 = idCallerDate(i)
592+ let id = $t02401724050._1
593+ let caller = $t02401724050._2
582594 let addrToUse = if (containsElement([chris, joep, toString(this)], caller))
583595 then addr
584596 else caller
585597 let entryExist = valueOrErrorMessage(getStringByKey(keyName(addrToUse, artId)), "No art matching for this address")
586598 if ((entryExist == ""))
587599 then throw("No art matching for this address")
588600 else {
589601 let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId))
590602 if ((sha256Hash == ""))
591603 then throw("No art hash matching for this address")
592604 else {
593605 let signID = getStringByKey(keySignID(addrToUse, artId))
594606 if ((signID == ""))
595607 then throw("No SIGN ID matching")
596608 else {
597609 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))]
598610 if (!(isArtMinted(addrToUse, artId)))
599611 then if (!(dappRunning))
600612 then throw(maintenanceMSG)
601613 else dataToDelete
602614 else if (containsElement([chris, toString(this)], caller))
603615 then dataToDelete
604616 else throw("Art already minted, you cannot delete it")
605617 }
606618 }
607619 }
608620 }
609621
610622
611623
612624 @Callable(i)
613625 func sellArtwork (artId,price,maxMint,assetId,blockEnd) = {
614- let $t02565925692 = idCallerDate(i)
615- let id = $t02565925692._1
616- let caller = $t02565925692._2
626+ let $t02682326856 = idCallerDate(i)
627+ let id = $t02682326856._1
628+ let caller = $t02682326856._2
617629 let artworkName = getStringByKey(keyName(caller, artId))
618630 if ((artworkName == ""))
619631 then throw("This art doesn't match your account")
620632 else {
621633 let flag = getStringByKey(keyFlag(caller, artId))
622634 if (containsElement(["CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
623635 then throw("Flagged artwork")
624636 else {
625637 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
626638 if ((0 > blockEnd))
627639 then throw("Negative end")
628640 else if (if ((blockEnd > 0))
629641 then if ((maxMint != 1))
630642 then true
631643 else (price != 0)
632644 else false)
633645 then throw("Timed offer only allowed for unique edition and offer only")
634646 else {
635647 let baseHeight = if ((blockEnd == 0))
636648 then 0
637649 else height
638650 if (!(acceptedAssetIds(assetId)))
639651 then throw("Something went wrong!")
640652 else if (!(validateMinSell(assetId, price)))
641653 then throw("Something went wrong!")
642654 else {
643655 let checkUser = validateUser(caller)
644656 if ((checkUser != ""))
645657 then throw(checkUser)
646658 else {
647659 let amountSold = getIntegerByKey(keyIssued(caller, artId))
648660 let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId))
649661 if ((maxMint > 100))
650662 then throw("100 editions max per artwork")
651663 else if (if ((amountSold != 0))
652664 then (amountSold == maxCanSell)
653665 else false)
654666 then throw("Max edition reached.")
655667 else if (if ((amountSold > 0))
656668 then (maxCanSell != maxMint)
657669 else false)
658670 then throw("Cannot change maximum issuable anymore")
659671 else if (if ((bidNbr > 0))
660672 then (maxCanSell != maxMint)
661673 else false)
662674 then throw("Cannot change maximum issuable with active orders")
663675 else {
664676 let sellStatus = if (if ((price > 0))
665677 then (maxMint > 0)
666678 else false)
667679 then true
668680 else false
669681 [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))]
670682 }
671683 }
672684 }
673685 }
674686 }
675687 }
676688 }
677689
678690
679691
680692 @Callable(i)
681693 func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "")
682694
683695
684696
685697 @Callable(i)
686698 func setBid (artId,issuer) = {
687- let $t02794927987 = idCallerDate(i)
688- let id = $t02794927987._1
689- let caller = $t02794927987._2
690- let date = $t02794927987._3
691- let $t02799228028 = isPayment(i)
692- let payment = $t02799228028._1
693- let amount = $t02799228028._2
699+ let $t02911329151 = idCallerDate(i)
700+ let id = $t02911329151._1
701+ let caller = $t02911329151._2
702+ let date = $t02911329151._3
703+ let $t02915629192 = isPayment(i)
704+ let payment = $t02915629192._1
705+ let amount = $t02915629192._2
694706 let assetId = if (!(isDefined(payment.assetId)))
695707 then "WAVES"
696708 else toBase58String(value(payment.assetId))
697709 let blockEnd = getIntegerByKey(keyEndSale(issuer, artId))
698710 if (if ((blockEnd != 0))
699711 then (height >= blockEnd)
700712 else false)
701713 then throw("Sale ended.")
702714 else {
703715 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
704716 if (!(acceptedAssetIds(assetId)))
705717 then throw("asset not accepted")
706718 else if (!(validateMinSell(assetId, amount)))
707719 then throw("Wrong min sell")
708720 else {
709721 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
710722 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
711723 if ((0 >= maxCanSell))
712724 then throw("No max edition set for this artwork")
713725 else if ((amountSold >= maxCanSell))
714726 then throw("Sold out, you cannot bid")
715727 else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))]
716728 }
717729 }
718730 }
719731
720732
721733
722734 @Callable(i)
723735 func acceptBid (artId,issuer,bidId,bidOwner) = {
724736 let caller = toBase58String(i.caller.bytes)
725737 if ((caller != issuer))
726738 then throw("You cannot do this action")
727739 else buyMint(i, artId, issuer, bidId, bidOwner)
728740 }
729741
730742
731743
732744 @Callable(i)
733745 func cancelBid (artId,issuer,bidId,bidOwner) = {
734- let $t02945529514 = idCallerDate(i)
735- let id = $t02945529514._1
736- let caller = $t02945529514._2
737- let date = $t02945529514._3
746+ let $t03061930678 = idCallerDate(i)
747+ let id = $t03061930678._1
748+ let caller = $t03061930678._2
749+ let date = $t03061930678._3
738750 if (if ((caller != bidOwner))
739751 then (caller != issuer)
740752 else false)
741753 then throw("You cannot do this action")
742754 else {
743755 let returnMoneyTo = if ((caller == issuer))
744756 then bidOwner
745757 else caller
746758 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
747759 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
748760 let bidData = getStringByKey((bidDataKey + "_OPEN"))
749761 if ((bidData == ""))
750762 then throw("Bid not found")
751763 else {
752764 let bidDataArr = split(bidData, "_")
753765 let assetId = getBidAssetId(bidDataArr[0])
754766 let bidStatus = "CANCELED"
755767 [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(returnMoneyTo)), parseIntValue(bidDataArr[1]), assetId)]
756768 }
757769 }
758770 }
759771
760772

github/deemru/w8io/169f3d6 
147.95 ms