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