tx · 7RW2MBaXV6wkuesib9NM1U9ECvtxNiryKq5PKg4DrALu 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY: -0.02400000 Waves 2023.01.19 10:03 [2411481] smart account 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY > SELF 0.00000000 Waves
{ "type": 13, "id": "7RW2MBaXV6wkuesib9NM1U9ECvtxNiryKq5PKg4DrALu", "fee": 2400000, "feeAssetId": null, "timestamp": 1674111845471, "version": 2, "chainId": 84, "sender": "3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY", "senderPublicKey": "J9DCtJJxJBWZdtDR12BA1U94Q3cZzMi4R6k5hYkAzmzC", "proofs": [ "YA78YDEsa1414G2T8Wk9kZ2awJgKRSCB3x3XFR73V9YBHiZpjLqqMEGpPcunf73Nxg59ota651uBmbr4xFxZibf" ], "script": "base64:BgJfCAISBAoCCAgSEAoOCAgICAgICAgICAgIAQgSDwoNCAgICAgICAgICAgBCBIGCgQICAgIEgQKAggIEggKBggBAQgBCBIECgIICBIECgIICBIGCgQICAgIEgYKBAgICAhOAAdWRVJTSU9OAgUxLjEuOQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAAIdW5pdFRlc3QHAAlvcmFjbGVGZWUJAQV2YWx1ZQEJAKYIAQkBDmdldFN0cmluZ0J5S2V5AQIPY29uZl9vcmFjbGVfZmVlAAhzaWduRGFwcAkBBXZhbHVlAQkApggBCQEOZ2V0U3RyaW5nQnlLZXkBAhFjb25mX3NpZ253ZWJfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2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AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V51KeOZg==", "height": 2411481, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 136XfSnznEh4239L1vh1wFBU4FofgjHZKXLN1SXCxvE7 Next: 3TZVYwPB8Yj3wX3r6t1xB9e5eUReLbDyCyqSbCusmjoW Diff:
Old | New | Differences | |
---|---|---|---|
198 | 198 | else true | |
199 | 199 | ||
200 | 200 | ||
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 | - | } | |
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 | + | } | |
213 | 215 | ||
214 | 216 | ||
215 | 217 | func setLIcence (cidLicence,sha256Licence) = { | |
257 | 259 | ||
258 | 260 | ||
259 | 261 | func validatePayment (i) = { | |
260 | - | let $ | |
261 | - | let payment = $ | |
262 | - | let amount = $ | |
262 | + | let $t089108946 = isPayment(i) | |
263 | + | let payment = $t089108946._1 | |
264 | + | let amount = $t089108946._2 | |
263 | 265 | let assetId = if (if (isDefined(payment.assetId)) | |
264 | 266 | then (payment.assetId == signAssetId) | |
265 | 267 | else false) | |
282 | 284 | ||
283 | 285 | ||
284 | 286 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
285 | - | let $ | |
286 | - | let payment = $ | |
287 | - | let amount = $ | |
287 | + | let $t095349570 = isPayment(i) | |
288 | + | let payment = $t095349570._1 | |
289 | + | let amount = $t095349570._2 | |
288 | 290 | let assetId = if (!(isDefined(payment.assetId))) | |
289 | 291 | then unit | |
290 | 292 | else if (if ((size(priceAssetId) > 0)) | |
396 | 398 | ||
397 | 399 | ||
398 | 400 | func buyMint (i,artId,issuer,bidId,bidOwner) = { | |
399 | - | let $ | |
400 | - | let id = $ | |
401 | - | let caller = $ | |
402 | - | let date = $ | |
401 | + | let $t01270212761 = idCallerDate(i) | |
402 | + | let id = $t01270212761._1 | |
403 | + | let caller = $t01270212761._2 | |
404 | + | let date = $t01270212761._3 | |
403 | 405 | let isBid = if (if (if ((caller == issuer)) | |
404 | 406 | then (bidOwner != "") | |
405 | 407 | else false) | |
455 | 457 | then throw(checkUser) | |
456 | 458 | else { | |
457 | 459 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
458 | - | let $ | |
460 | + | let $t01446414631 = if (isBid) | |
459 | 461 | then getPriceAssetIdFromBid(bidDataKey) | |
460 | 462 | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
461 | - | let amount = $ | |
462 | - | let assetId = $ | |
463 | + | let amount = $t01446414631._1 | |
464 | + | let assetId = $t01446414631._2 | |
463 | 465 | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver) | |
464 | 466 | let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShare(issuer)), 0) | |
465 | 467 | let isWhitelisted = checkWhitelist(issuer) | |
548 | 550 | ||
549 | 551 | @Callable(i) | |
550 | 552 | func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = { | |
551 | - | let $ | |
552 | - | let artId = $ | |
553 | - | let caller = $ | |
554 | - | let date = $ | |
553 | + | let $t01866418724 = idCallerDateSponsored(i, pubKey) | |
554 | + | let artId = $t01866418724._1 | |
555 | + | let caller = $t01866418724._2 | |
556 | + | let date = $t01866418724._3 | |
555 | 557 | if (!(validateHash(sha256Hash))) | |
556 | 558 | then throw("Hash should be 64 characters maximum") | |
557 | 559 | else { | |
558 | - | let $t01879118860 = setLIcence(cidLicence, sha256Licence) | |
559 | - | let licenceCID = $t01879118860._1 | |
560 | - | let licenceHash = $t01879118860._2 | |
561 | - | if (true) | |
562 | - | then throw(toString(addressFromPublicKey(fromBase58String(pubKey)))) | |
560 | + | let $t01882518894 = setLIcence(cidLicence, sha256Licence) | |
561 | + | let licenceCID = $t01882518894._1 | |
562 | + | let licenceHash = $t01882518894._2 | |
563 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
564 | + | if ((validateArtwork != "")) | |
565 | + | then throw("Something went wrong!") | |
563 | 566 | else { | |
564 | - | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
565 | - | if ((validateArtwork != "")) | |
566 | - | then throw("Something went wrong!") | |
567 | + | let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0) | |
568 | + | let $t01919319277 = if (whitelisted_drop) | |
569 | + | then $Tuple2(0, signID) | |
570 | + | else validatePayment(i) | |
571 | + | let amount = $t01919319277._1 | |
572 | + | let assetId = $t01919319277._2 | |
573 | + | if (!(isDefined(amount))) | |
574 | + | then throw("Something went wrong") | |
567 | 575 | else { | |
568 | - | let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0) | |
569 | - | let $t01924519329 = if (whitelisted_drop) | |
570 | - | then $Tuple2(0, signID) | |
571 | - | else validatePayment(i) | |
572 | - | let amount = $t01924519329._1 | |
573 | - | let assetId = $t01924519329._2 | |
574 | - | if (!(isDefined(amount))) | |
575 | - | then throw("Something went wrong") | |
576 | + | let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller)) | |
577 | + | if ((entryExist != "")) | |
578 | + | then throw("You already added it") | |
576 | 579 | else { | |
577 | - | let | |
578 | - | if (( | |
579 | - | then throw(" | |
580 | + | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
581 | + | if ((hashExist != "")) | |
582 | + | then throw("Hash already registered") | |
580 | 583 | else { | |
581 | - | let | |
582 | - | if (( | |
583 | - | then throw(" | |
584 | + | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
585 | + | if (!(isSignCertified)) | |
586 | + | then throw("Sign Certificate not found for this address.") | |
584 | 587 | else { | |
585 | - | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
586 | - | if (!(isSignCertified)) | |
587 | - | then throw("Sign Certificate not found for this address.") | |
588 | - | else { | |
589 | - | let decrease_whitelist_drop = if (whitelisted_drop) | |
590 | - | then invoke(whitelistDapp, "useFreeDrop", [toBase58String(i.caller.bytes)], nil) | |
591 | - | else unit | |
592 | - | if ((decrease_whitelist_drop == decrease_whitelist_drop)) | |
593 | - | 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)] | |
594 | - | else throw("Strict value is not equal to itself.") | |
595 | - | } | |
588 | + | let decrease_whitelist_drop = if (whitelisted_drop) | |
589 | + | then invoke(whitelistDapp, "useFreeDrop", [toBase58String(i.caller.bytes)], nil) | |
590 | + | else unit | |
591 | + | if ((decrease_whitelist_drop == decrease_whitelist_drop)) | |
592 | + | 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)] | |
593 | + | else throw("Strict value is not equal to itself.") | |
596 | 594 | } | |
597 | 595 | } | |
598 | 596 | } | |
607 | 605 | func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = if (!(dappRunning)) | |
608 | 606 | then throw(maintenanceMSG) | |
609 | 607 | else { | |
610 | - | let $ | |
611 | - | let id = $ | |
612 | - | let caller = $ | |
613 | - | let date = $ | |
614 | - | let $ | |
615 | - | let licenceCID = $ | |
616 | - | let licenceHash = $ | |
608 | + | let $t02221922276 = idCallerDateSponsored(i, pubKey) | |
609 | + | let id = $t02221922276._1 | |
610 | + | let caller = $t02221922276._2 | |
611 | + | let date = $t02221922276._3 | |
612 | + | let $t02228622355 = setLIcence(cidLicence, sha256Licence) | |
613 | + | let licenceCID = $t02228622355._1 | |
614 | + | let licenceHash = $t02228622355._2 | |
617 | 615 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
618 | 616 | if ((validateArtwork != "")) | |
619 | 617 | then throw("Something went wrong!") | |
636 | 634 | ||
637 | 635 | @Callable(i) | |
638 | 636 | func flagArtwork (artId,addr,flag,note) = { | |
639 | - | let $ | |
640 | - | let id = $ | |
641 | - | let caller = $ | |
637 | + | let $t02385623890 = idCallerDate(i) | |
638 | + | let id = $t02385623890._1 | |
639 | + | let caller = $t02385623890._2 | |
642 | 640 | if (containsElement([chris, toString(this)], caller)) | |
643 | 641 | then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
644 | 642 | then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)] | |
650 | 648 | ||
651 | 649 | @Callable(i) | |
652 | 650 | func deleteArtwork (artId,addr) = { | |
653 | - | let $ | |
654 | - | let id = $ | |
655 | - | let caller = $ | |
651 | + | let $t02432624360 = idCallerDate(i) | |
652 | + | let id = $t02432624360._1 | |
653 | + | let caller = $t02432624360._2 | |
656 | 654 | let addrToUse = if (containsElement([chris, toString(this)], caller)) | |
657 | 655 | then addr | |
658 | 656 | else caller | |
685 | 683 | ||
686 | 684 | @Callable(i) | |
687 | 685 | func sellArtwork (artId,price,maxMint,assetId,blockEnd,pubKey) = { | |
688 | - | let $ | |
689 | - | let id = $ | |
690 | - | let caller = $ | |
686 | + | let $t02719627247 = idCallerDateSponsored(i, pubKey) | |
687 | + | let id = $t02719627247._1 | |
688 | + | let caller = $t02719627247._2 | |
691 | 689 | let artworkName = getStringByKey(keyName(caller, artId)) | |
692 | 690 | if ((artworkName == "")) | |
693 | 691 | then throw("This art doesn't match your account") | |
758 | 756 | ||
759 | 757 | @Callable(i) | |
760 | 758 | func setBid (artId,issuer) = { | |
761 | - | let $ | |
762 | - | let id = $ | |
763 | - | let caller = $ | |
764 | - | let date = $ | |
765 | - | let $ | |
766 | - | let payment = $ | |
767 | - | let amount = $ | |
759 | + | let $t02950429544 = idCallerDate(i) | |
760 | + | let id = $t02950429544._1 | |
761 | + | let caller = $t02950429544._2 | |
762 | + | let date = $t02950429544._3 | |
763 | + | let $t02954929585 = isPayment(i) | |
764 | + | let payment = $t02954929585._1 | |
765 | + | let amount = $t02954929585._2 | |
768 | 766 | let assetId = if (!(isDefined(payment.assetId))) | |
769 | 767 | then "WAVES" | |
770 | 768 | else toBase58String(value(payment.assetId)) | |
795 | 793 | ||
796 | 794 | @Callable(i) | |
797 | 795 | func acceptBid (artId,issuer,bidId,bidOwner) = { | |
798 | - | let $ | |
799 | - | let id = $ | |
800 | - | let caller = $ | |
801 | - | let date = $ | |
796 | + | let $t03074330783 = idCallerDate(i) | |
797 | + | let id = $t03074330783._1 | |
798 | + | let caller = $t03074330783._2 | |
799 | + | let date = $t03074330783._3 | |
802 | 800 | if ((caller != issuer)) | |
803 | 801 | then throw("You cannot do this action") | |
804 | 802 | else buyMint(i, artId, issuer, bidId, bidOwner) | |
808 | 806 | ||
809 | 807 | @Callable(i) | |
810 | 808 | func cancelBid (artId,issuer,bidId,bidOwner) = { | |
811 | - | let $ | |
812 | - | let id = $ | |
813 | - | let caller = $ | |
814 | - | let date = $ | |
809 | + | let $t03100931070 = idCallerDate(i) | |
810 | + | let id = $t03100931070._1 | |
811 | + | let caller = $t03100931070._2 | |
812 | + | let date = $t03100931070._3 | |
815 | 813 | if (if ((caller != bidOwner)) | |
816 | 814 | then (caller != issuer) | |
817 | 815 | 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) = { | |
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 | - | } | |
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 | + | } | |
213 | 215 | ||
214 | 216 | ||
215 | 217 | func setLIcence (cidLicence,sha256Licence) = { | |
216 | 218 | let cid = if ((size(cidLicence) == 0)) | |
217 | 219 | then defaultLicence | |
218 | 220 | else cidLicence | |
219 | 221 | let hash = if ((size(sha256Licence) == 0)) | |
220 | 222 | then defaultHashLicence | |
221 | 223 | else sha256Licence | |
222 | 224 | $Tuple2(cid, hash) | |
223 | 225 | } | |
224 | 226 | ||
225 | 227 | ||
226 | 228 | func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags,royalties) = { | |
227 | 229 | let checkUser = validateUser(caller) | |
228 | 230 | if ((checkUser != "")) | |
229 | 231 | then throw(checkUser) | |
230 | 232 | else if ((size(cidDisplay) == 0)) | |
231 | 233 | then throw("Display CID cannot be empty") | |
232 | 234 | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
233 | 235 | then throw("Problem with CID") | |
234 | 236 | else if (!(validateAllHash(sha256Export, licenceHash))) | |
235 | 237 | then throw("Problem with Hashes") | |
236 | 238 | else if (!(validateString(name, 100))) | |
237 | 239 | then throw("100 Char. max name") | |
238 | 240 | else if (!(validateString(description, 1000))) | |
239 | 241 | then throw("1000 Char. max description") | |
240 | 242 | else if (if ((0 > royalties)) | |
241 | 243 | then true | |
242 | 244 | else (royalties > 1000)) | |
243 | 245 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
244 | 246 | else if ((size(split(tags, ",")) > 5)) | |
245 | 247 | then throw("5 tags max.") | |
246 | 248 | else "" | |
247 | 249 | } | |
248 | 250 | ||
249 | 251 | ||
250 | 252 | func isPayment (i) = if ((size(i.payments) == 0)) | |
251 | 253 | then throw("No payment attached") | |
252 | 254 | else { | |
253 | 255 | let payment = value(i.payments[0]) | |
254 | 256 | let amount = value(payment.amount) | |
255 | 257 | $Tuple2(payment, amount) | |
256 | 258 | } | |
257 | 259 | ||
258 | 260 | ||
259 | 261 | func validatePayment (i) = { | |
260 | - | let $ | |
261 | - | let payment = $ | |
262 | - | let amount = $ | |
262 | + | let $t089108946 = isPayment(i) | |
263 | + | let payment = $t089108946._1 | |
264 | + | let amount = $t089108946._2 | |
263 | 265 | let assetId = if (if (isDefined(payment.assetId)) | |
264 | 266 | then (payment.assetId == signAssetId) | |
265 | 267 | else false) | |
266 | 268 | then payment.assetId | |
267 | 269 | else throw("Only SIGN token accepted as transaction fee") | |
268 | 270 | if ((amount != currentCertificationPrice)) | |
269 | 271 | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
270 | 272 | else $Tuple2(amount, assetId) | |
271 | 273 | } | |
272 | 274 | ||
273 | 275 | ||
274 | 276 | func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) { | |
275 | 277 | case b: Int => | |
276 | 278 | if ((b != 0)) | |
277 | 279 | then true | |
278 | 280 | else false | |
279 | 281 | case _ => | |
280 | 282 | false | |
281 | 283 | } | |
282 | 284 | ||
283 | 285 | ||
284 | 286 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
285 | - | let $ | |
286 | - | let payment = $ | |
287 | - | let amount = $ | |
287 | + | let $t095349570 = isPayment(i) | |
288 | + | let payment = $t095349570._1 | |
289 | + | let amount = $t095349570._2 | |
288 | 290 | let assetId = if (!(isDefined(payment.assetId))) | |
289 | 291 | then unit | |
290 | 292 | else if (if ((size(priceAssetId) > 0)) | |
291 | 293 | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
292 | 294 | else false) | |
293 | 295 | then payment.assetId | |
294 | 296 | else throw("Wrong asset id") | |
295 | 297 | if (if ((assetId == unit)) | |
296 | 298 | then (priceAssetId != "") | |
297 | 299 | else false) | |
298 | 300 | then throw("Wrong asset id") | |
299 | 301 | else if ((artworkPrice != amount)) | |
300 | 302 | then throw("Payment don't match") | |
301 | 303 | else $Tuple2(amount, assetId) | |
302 | 304 | } | |
303 | 305 | ||
304 | 306 | ||
305 | 307 | func acceptedAssetIds (assetId) = if (if (if (if (if ((assetId != toBase58String(signAssetId))) | |
306 | 308 | then (assetId != toBase58String(wavesAssetId)) | |
307 | 309 | else false) | |
308 | 310 | then (assetId != "WAVES") | |
309 | 311 | else false) | |
310 | 312 | then (assetId != toBase58String(usdnAssetId)) | |
311 | 313 | else false) | |
312 | 314 | then (assetId != toBase58String(usdtAssetId)) | |
313 | 315 | else false) | |
314 | 316 | then throw("Only SIGN, USDN,USDT or WAVES accepted") | |
315 | 317 | else true | |
316 | 318 | ||
317 | 319 | ||
318 | 320 | func validateMinSell (assetId,price) = { | |
319 | 321 | let minSellWaves = if (unitTest) | |
320 | 322 | then 10 | |
321 | 323 | else getIntegerByKeyFromOracle("waves_min_sell") | |
322 | 324 | let minSellUsdn = 1000000 | |
323 | 325 | let minSellSign = if (unitTest) | |
324 | 326 | then 1 | |
325 | 327 | else (currentCertificationPrice * 2) | |
326 | 328 | if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
327 | 329 | then (minSellUsdn > price) | |
328 | 330 | else false) | |
329 | 331 | then (price != 0) | |
330 | 332 | else false) | |
331 | 333 | then true | |
332 | 334 | else if (if ((assetId == toBase58String(usdtAssetId))) | |
333 | 335 | then (minSellUsdn > price) | |
334 | 336 | else false) | |
335 | 337 | then (price != 0) | |
336 | 338 | else false) | |
337 | 339 | then true | |
338 | 340 | else if (if ((assetId == toBase58String(signAssetId))) | |
339 | 341 | then (minSellSign > price) | |
340 | 342 | else false) | |
341 | 343 | then (price != 0) | |
342 | 344 | else false) | |
343 | 345 | then true | |
344 | 346 | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
345 | 347 | then true | |
346 | 348 | else (assetId == "WAVES")) | |
347 | 349 | then (minSellWaves > price) | |
348 | 350 | else false) | |
349 | 351 | then (price != 0) | |
350 | 352 | else false) | |
351 | 353 | then throw("Wrong minimum sell price") | |
352 | 354 | else true | |
353 | 355 | } | |
354 | 356 | ||
355 | 357 | ||
356 | 358 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
357 | 359 | then unit | |
358 | 360 | else fromBase58String(assetId) | |
359 | 361 | ||
360 | 362 | ||
361 | 363 | func getPriceAssetIdFromBid (bidDataKey) = { | |
362 | 364 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
363 | 365 | if ((bidData == "")) | |
364 | 366 | then throw("Bid not found") | |
365 | 367 | else { | |
366 | 368 | let bidDataArr = split(bidData, "_") | |
367 | 369 | let bidAmount = parseIntValue(bidDataArr[1]) | |
368 | 370 | let bidAssetId = getBidAssetId(bidDataArr[0]) | |
369 | 371 | if ((0 >= bidAmount)) | |
370 | 372 | then throw("Wrong amount") | |
371 | 373 | else $Tuple2(bidAmount, bidAssetId) | |
372 | 374 | } | |
373 | 375 | } | |
374 | 376 | ||
375 | 377 | ||
376 | 378 | func idCallerDateSponsored (i,pubKey) = if (!(dappRunning)) | |
377 | 379 | then throw(maintenanceMSG) | |
378 | 380 | else { | |
379 | 381 | let caller = if (if ((toBase58String(i.caller.bytes) == toBase58String(this.bytes))) | |
380 | 382 | then !(isDefined(i.payments)) | |
381 | 383 | else false) | |
382 | 384 | then toString(addressFromPublicKey(fromBase58String(pubKey))) | |
383 | 385 | else toBase58String(i.caller.bytes) | |
384 | 386 | let get_sponsored_waves = if ((pubKey != "")) | |
385 | 387 | then invoke(whitelistDapp, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(pubKey)))], nil) | |
386 | 388 | else unit | |
387 | 389 | if ((get_sponsored_waves == get_sponsored_waves)) | |
388 | 390 | then $Tuple3(toBase58String(i.transactionId), caller, lastBlock.timestamp) | |
389 | 391 | else throw("Strict value is not equal to itself.") | |
390 | 392 | } | |
391 | 393 | ||
392 | 394 | ||
393 | 395 | func idCallerDate (i) = if (!(dappRunning)) | |
394 | 396 | then throw(maintenanceMSG) | |
395 | 397 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
396 | 398 | ||
397 | 399 | ||
398 | 400 | func buyMint (i,artId,issuer,bidId,bidOwner) = { | |
399 | - | let $ | |
400 | - | let id = $ | |
401 | - | let caller = $ | |
402 | - | let date = $ | |
401 | + | let $t01270212761 = idCallerDate(i) | |
402 | + | let id = $t01270212761._1 | |
403 | + | let caller = $t01270212761._2 | |
404 | + | let date = $t01270212761._3 | |
403 | 405 | let isBid = if (if (if ((caller == issuer)) | |
404 | 406 | then (bidOwner != "") | |
405 | 407 | else false) | |
406 | 408 | then (bidId != "") | |
407 | 409 | else false) | |
408 | 410 | then true | |
409 | 411 | else false | |
410 | 412 | let blockEnd = getIntegerByKey(keyEndSale(caller, artId)) | |
411 | 413 | if (if (if ((blockEnd != 0)) | |
412 | 414 | then (height >= blockEnd) | |
413 | 415 | else false) | |
414 | 416 | then !(isBid) | |
415 | 417 | else false) | |
416 | 418 | then throw("Sale ended.") | |
417 | 419 | else { | |
418 | 420 | let callerIsIssuer = (caller == issuer) | |
419 | 421 | let totalNFT = getIntegerByKey("total_nft_issued") | |
420 | 422 | let signID = getStringByKey(keySignID(issuer, artId)) | |
421 | 423 | let artworkName = getStringByKey(keyName(issuer, artId)) | |
422 | 424 | if ((artworkName == "")) | |
423 | 425 | then throw("Art doesn't exist") | |
424 | 426 | else { | |
425 | 427 | let isOnSale = getBooleanByKey(keyOnSale(issuer, artId)) | |
426 | 428 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
427 | 429 | let artworkPrice = if (callerIsIssuer) | |
428 | 430 | then (currentCertificationPrice * 2) | |
429 | 431 | else getIntegerByKey(keyPrice(issuer, artId)) | |
430 | 432 | let priceAssetId = if (callerIsIssuer) | |
431 | 433 | then toBase58String(signAssetId) | |
432 | 434 | else getStringByKey(keyAssetIdAccepted(issuer, artId)) | |
433 | 435 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
434 | 436 | if (if (if (!(isBid)) | |
435 | 437 | then !(callerIsIssuer) | |
436 | 438 | else false) | |
437 | 439 | then if (if ((0 >= artworkPrice)) | |
438 | 440 | then true | |
439 | 441 | else !(isOnSale)) | |
440 | 442 | then true | |
441 | 443 | else (0 >= maxCanSell) | |
442 | 444 | else false) | |
443 | 445 | then throw("Art not for sale") | |
444 | 446 | else if (if (if (!(isBid)) | |
445 | 447 | then callerIsIssuer | |
446 | 448 | else false) | |
447 | 449 | then (0 >= maxCanSell) | |
448 | 450 | else false) | |
449 | 451 | then throw("Max issuable not set") | |
450 | 452 | else { | |
451 | 453 | let checkUser = validateUser(issuer) | |
452 | 454 | if (if (isBid) | |
453 | 455 | then (checkUser != "") | |
454 | 456 | else false) | |
455 | 457 | then throw(checkUser) | |
456 | 458 | else { | |
457 | 459 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
458 | - | let $ | |
460 | + | let $t01446414631 = if (isBid) | |
459 | 461 | then getPriceAssetIdFromBid(bidDataKey) | |
460 | 462 | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
461 | - | let amount = $ | |
462 | - | let assetId = $ | |
463 | + | let amount = $t01446414631._1 | |
464 | + | let assetId = $t01446414631._2 | |
463 | 465 | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver) | |
464 | 466 | let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShare(issuer)), 0) | |
465 | 467 | let isWhitelisted = checkWhitelist(issuer) | |
466 | 468 | let cut = if ((isWhitelisted > height)) | |
467 | 469 | then 0 | |
468 | 470 | else if ((assetId == signAssetId)) | |
469 | 471 | then signCut | |
470 | 472 | else usdnWaveCut | |
471 | 473 | let amountForSign = fraction(amount, cut, 100) | |
472 | 474 | let amountForAgent = if (if (if ((agent != feeReceiver)) | |
473 | 475 | then (agentShare > 0) | |
474 | 476 | else false) | |
475 | 477 | then (height > isWhitelisted) | |
476 | 478 | else false) | |
477 | 479 | then fraction(amount, agentShare, 100) | |
478 | 480 | else 0 | |
479 | 481 | let amountForCreator = (amount - amountForSign) | |
480 | 482 | if ((amountSold == maxCanSell)) | |
481 | 483 | then throw("Art sold out") | |
482 | 484 | else { | |
483 | 485 | let newAmountSold = (amountSold + 1) | |
484 | 486 | let issueMeta = ((((((((((("Creator: " + issuer) + ", | |
485 | 487 | ArtID: ") + artId) + ", | |
486 | 488 | SignID: ") + signID) + ", | |
487 | 489 | Artwork name: ") + artworkName) + ", | |
488 | 490 | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
489 | 491 | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
490 | 492 | let idNFT = calculateAssetId(issueNFT) | |
491 | 493 | let sellStatus = if (if ((newAmountSold == maxCanSell)) | |
492 | 494 | then true | |
493 | 495 | else !(isOnSale)) | |
494 | 496 | then false | |
495 | 497 | else true | |
496 | 498 | let receiveNFT = if (if (if ((caller == issuer)) | |
497 | 499 | then (bidOwner != "") | |
498 | 500 | else false) | |
499 | 501 | then (bidId != "") | |
500 | 502 | else false) | |
501 | 503 | then addressFromStringValue(bidOwner) | |
502 | 504 | else i.caller | |
503 | 505 | let assetIdBid = if (!(isDefined(assetId))) | |
504 | 506 | then "WAVES" | |
505 | 507 | else toBase58String(value(assetId)) | |
506 | 508 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
507 | 509 | let bidDelOld = DeleteEntry((bidDataKey + "_OPEN")) | |
508 | 510 | let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date))) | |
509 | 511 | let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer) | |
510 | 512 | let soldValue = if (!(isBid)) | |
511 | 513 | then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT)) | |
512 | 514 | else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT)) | |
513 | 515 | let soldData = StringEntry(soldKey, soldValue) | |
514 | 516 | let commissions = if ((amountForAgent != 0)) | |
515 | 517 | then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)] | |
516 | 518 | else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)] | |
517 | 519 | 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) | |
518 | 520 | if (isBid) | |
519 | 521 | then [soldData, bidUpdate, bidDelOld] :: buyRes | |
520 | 522 | else soldData :: buyRes | |
521 | 523 | } | |
522 | 524 | } | |
523 | 525 | } | |
524 | 526 | } | |
525 | 527 | } | |
526 | 528 | } | |
527 | 529 | ||
528 | 530 | ||
529 | 531 | func asString (bv) = match bv { | |
530 | 532 | case bv0: String => | |
531 | 533 | bv0 | |
532 | 534 | case _ => | |
533 | 535 | throw("Sponsored Public Key String expected") | |
534 | 536 | } | |
535 | 537 | ||
536 | 538 | ||
537 | 539 | @Callable(invoke) | |
538 | 540 | func setConf (key,val) = { | |
539 | 541 | let caller = toString(invoke.caller) | |
540 | 542 | if (containsElement([chris, toString(this)], caller)) | |
541 | 543 | then if (contains(key, "conf_")) | |
542 | 544 | then [StringEntry(key, val)] | |
543 | 545 | else throw("Entries starting with conf_ only") | |
544 | 546 | else throw("You are not allowed to change this") | |
545 | 547 | } | |
546 | 548 | ||
547 | 549 | ||
548 | 550 | ||
549 | 551 | @Callable(i) | |
550 | 552 | func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = { | |
551 | - | let $ | |
552 | - | let artId = $ | |
553 | - | let caller = $ | |
554 | - | let date = $ | |
553 | + | let $t01866418724 = idCallerDateSponsored(i, pubKey) | |
554 | + | let artId = $t01866418724._1 | |
555 | + | let caller = $t01866418724._2 | |
556 | + | let date = $t01866418724._3 | |
555 | 557 | if (!(validateHash(sha256Hash))) | |
556 | 558 | then throw("Hash should be 64 characters maximum") | |
557 | 559 | else { | |
558 | - | let $t01879118860 = setLIcence(cidLicence, sha256Licence) | |
559 | - | let licenceCID = $t01879118860._1 | |
560 | - | let licenceHash = $t01879118860._2 | |
561 | - | if (true) | |
562 | - | then throw(toString(addressFromPublicKey(fromBase58String(pubKey)))) | |
560 | + | let $t01882518894 = setLIcence(cidLicence, sha256Licence) | |
561 | + | let licenceCID = $t01882518894._1 | |
562 | + | let licenceHash = $t01882518894._2 | |
563 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
564 | + | if ((validateArtwork != "")) | |
565 | + | then throw("Something went wrong!") | |
563 | 566 | else { | |
564 | - | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
565 | - | if ((validateArtwork != "")) | |
566 | - | then throw("Something went wrong!") | |
567 | + | let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0) | |
568 | + | let $t01919319277 = if (whitelisted_drop) | |
569 | + | then $Tuple2(0, signID) | |
570 | + | else validatePayment(i) | |
571 | + | let amount = $t01919319277._1 | |
572 | + | let assetId = $t01919319277._2 | |
573 | + | if (!(isDefined(amount))) | |
574 | + | then throw("Something went wrong") | |
567 | 575 | else { | |
568 | - | let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0) | |
569 | - | let $t01924519329 = if (whitelisted_drop) | |
570 | - | then $Tuple2(0, signID) | |
571 | - | else validatePayment(i) | |
572 | - | let amount = $t01924519329._1 | |
573 | - | let assetId = $t01924519329._2 | |
574 | - | if (!(isDefined(amount))) | |
575 | - | then throw("Something went wrong") | |
576 | + | let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller)) | |
577 | + | if ((entryExist != "")) | |
578 | + | then throw("You already added it") | |
576 | 579 | else { | |
577 | - | let | |
578 | - | if (( | |
579 | - | then throw(" | |
580 | + | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
581 | + | if ((hashExist != "")) | |
582 | + | then throw("Hash already registered") | |
580 | 583 | else { | |
581 | - | let | |
582 | - | if (( | |
583 | - | then throw(" | |
584 | + | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
585 | + | if (!(isSignCertified)) | |
586 | + | then throw("Sign Certificate not found for this address.") | |
584 | 587 | else { | |
585 | - | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
586 | - | if (!(isSignCertified)) | |
587 | - | then throw("Sign Certificate not found for this address.") | |
588 | - | else { | |
589 | - | let decrease_whitelist_drop = if (whitelisted_drop) | |
590 | - | then invoke(whitelistDapp, "useFreeDrop", [toBase58String(i.caller.bytes)], nil) | |
591 | - | else unit | |
592 | - | if ((decrease_whitelist_drop == decrease_whitelist_drop)) | |
593 | - | 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)] | |
594 | - | else throw("Strict value is not equal to itself.") | |
595 | - | } | |
588 | + | let decrease_whitelist_drop = if (whitelisted_drop) | |
589 | + | then invoke(whitelistDapp, "useFreeDrop", [toBase58String(i.caller.bytes)], nil) | |
590 | + | else unit | |
591 | + | if ((decrease_whitelist_drop == decrease_whitelist_drop)) | |
592 | + | 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)] | |
593 | + | else throw("Strict value is not equal to itself.") | |
596 | 594 | } | |
597 | 595 | } | |
598 | 596 | } | |
599 | 597 | } | |
600 | 598 | } | |
601 | 599 | } | |
602 | 600 | } | |
603 | 601 | ||
604 | 602 | ||
605 | 603 | ||
606 | 604 | @Callable(i) | |
607 | 605 | func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = if (!(dappRunning)) | |
608 | 606 | then throw(maintenanceMSG) | |
609 | 607 | else { | |
610 | - | let $ | |
611 | - | let id = $ | |
612 | - | let caller = $ | |
613 | - | let date = $ | |
614 | - | let $ | |
615 | - | let licenceCID = $ | |
616 | - | let licenceHash = $ | |
608 | + | let $t02221922276 = idCallerDateSponsored(i, pubKey) | |
609 | + | let id = $t02221922276._1 | |
610 | + | let caller = $t02221922276._2 | |
611 | + | let date = $t02221922276._3 | |
612 | + | let $t02228622355 = setLIcence(cidLicence, sha256Licence) | |
613 | + | let licenceCID = $t02228622355._1 | |
614 | + | let licenceHash = $t02228622355._2 | |
617 | 615 | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties) | |
618 | 616 | if ((validateArtwork != "")) | |
619 | 617 | then throw("Something went wrong!") | |
620 | 618 | else { | |
621 | 619 | let entryExist = getStringByKey(keyName(caller, txid)) | |
622 | 620 | if ((entryExist == "")) | |
623 | 621 | then throw("Entry not found") | |
624 | 622 | else { | |
625 | 623 | let flag = getStringByKey(keyFlag(caller, txid)) | |
626 | 624 | if ((flag == "ILLEGAL")) | |
627 | 625 | then throw("Cannot update ILLEGAL artwork") | |
628 | 626 | else if (!(isArtMinted(caller, txid))) | |
629 | 627 | 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 | 628 | else throw("Already minted") | |
631 | 629 | } | |
632 | 630 | } | |
633 | 631 | } | |
634 | 632 | ||
635 | 633 | ||
636 | 634 | ||
637 | 635 | @Callable(i) | |
638 | 636 | func flagArtwork (artId,addr,flag,note) = { | |
639 | - | let $ | |
640 | - | let id = $ | |
641 | - | let caller = $ | |
637 | + | let $t02385623890 = idCallerDate(i) | |
638 | + | let id = $t02385623890._1 | |
639 | + | let caller = $t02385623890._2 | |
642 | 640 | if (containsElement([chris, toString(this)], caller)) | |
643 | 641 | then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
644 | 642 | then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)] | |
645 | 643 | else throw(("Unknow status " + flag)) | |
646 | 644 | else throw("You are not allowed") | |
647 | 645 | } | |
648 | 646 | ||
649 | 647 | ||
650 | 648 | ||
651 | 649 | @Callable(i) | |
652 | 650 | func deleteArtwork (artId,addr) = { | |
653 | - | let $ | |
654 | - | let id = $ | |
655 | - | let caller = $ | |
651 | + | let $t02432624360 = idCallerDate(i) | |
652 | + | let id = $t02432624360._1 | |
653 | + | let caller = $t02432624360._2 | |
656 | 654 | let addrToUse = if (containsElement([chris, toString(this)], caller)) | |
657 | 655 | then addr | |
658 | 656 | else caller | |
659 | 657 | let entryExist = valueOrErrorMessage(getStringByKey(keyName(addrToUse, artId)), "No art matching for this address") | |
660 | 658 | if ((entryExist == "")) | |
661 | 659 | then throw("No art matching for this address") | |
662 | 660 | else { | |
663 | 661 | let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId)) | |
664 | 662 | if ((sha256Hash == "")) | |
665 | 663 | then throw("No art hash matching for this address") | |
666 | 664 | else { | |
667 | 665 | let signID = getStringByKey(keySignID(addrToUse, artId)) | |
668 | 666 | if ((signID == "")) | |
669 | 667 | then throw("No SIGN ID matching") | |
670 | 668 | else { | |
671 | 669 | 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 | 670 | if (!(isArtMinted(addrToUse, artId))) | |
673 | 671 | then if (!(dappRunning)) | |
674 | 672 | then throw(maintenanceMSG) | |
675 | 673 | else dataToDelete | |
676 | 674 | else if (containsElement([chris, toString(this)], caller)) | |
677 | 675 | then dataToDelete | |
678 | 676 | else throw("Art already minted, you cannot delete it") | |
679 | 677 | } | |
680 | 678 | } | |
681 | 679 | } | |
682 | 680 | } | |
683 | 681 | ||
684 | 682 | ||
685 | 683 | ||
686 | 684 | @Callable(i) | |
687 | 685 | func sellArtwork (artId,price,maxMint,assetId,blockEnd,pubKey) = { | |
688 | - | let $ | |
689 | - | let id = $ | |
690 | - | let caller = $ | |
686 | + | let $t02719627247 = idCallerDateSponsored(i, pubKey) | |
687 | + | let id = $t02719627247._1 | |
688 | + | let caller = $t02719627247._2 | |
691 | 689 | let artworkName = getStringByKey(keyName(caller, artId)) | |
692 | 690 | if ((artworkName == "")) | |
693 | 691 | then throw("This art doesn't match your account") | |
694 | 692 | else { | |
695 | 693 | let flag = getStringByKey(keyFlag(caller, artId)) | |
696 | 694 | if (containsElement(["CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag)) | |
697 | 695 | then throw("Flagged artwork") | |
698 | 696 | else { | |
699 | 697 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
700 | 698 | if ((0 > blockEnd)) | |
701 | 699 | then throw("Negative end") | |
702 | 700 | else if (if ((blockEnd > 0)) | |
703 | 701 | then if ((maxMint != 1)) | |
704 | 702 | then true | |
705 | 703 | else (price != 0) | |
706 | 704 | else false) | |
707 | 705 | then throw("Timed offer only allowed for unique edition and offer only") | |
708 | 706 | else { | |
709 | 707 | let baseHeight = if ((blockEnd == 0)) | |
710 | 708 | then 0 | |
711 | 709 | else height | |
712 | 710 | if (!(acceptedAssetIds(assetId))) | |
713 | 711 | then throw("Something went wrong!") | |
714 | 712 | else if (!(validateMinSell(assetId, price))) | |
715 | 713 | then throw("Something went wrong!") | |
716 | 714 | else { | |
717 | 715 | let checkUser = validateUser(caller) | |
718 | 716 | if ((checkUser != "")) | |
719 | 717 | then throw(checkUser) | |
720 | 718 | else { | |
721 | 719 | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
722 | 720 | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
723 | 721 | if ((maxMint > 100)) | |
724 | 722 | then throw("100 editions max per artwork") | |
725 | 723 | else if (if ((amountSold != 0)) | |
726 | 724 | then (amountSold == maxCanSell) | |
727 | 725 | else false) | |
728 | 726 | then throw("Max edition reached.") | |
729 | 727 | else if (if ((amountSold > 0)) | |
730 | 728 | then (maxCanSell != maxMint) | |
731 | 729 | else false) | |
732 | 730 | then throw("Cannot change maximum issuable anymore") | |
733 | 731 | else if (if ((bidNbr > 0)) | |
734 | 732 | then (maxCanSell != maxMint) | |
735 | 733 | else false) | |
736 | 734 | then throw("Cannot change maximum issuable with active orders") | |
737 | 735 | else { | |
738 | 736 | let sellStatus = if (if ((price > 0)) | |
739 | 737 | then (maxMint > 0) | |
740 | 738 | else false) | |
741 | 739 | then true | |
742 | 740 | else false | |
743 | 741 | [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 | 742 | } | |
745 | 743 | } | |
746 | 744 | } | |
747 | 745 | } | |
748 | 746 | } | |
749 | 747 | } | |
750 | 748 | } | |
751 | 749 | ||
752 | 750 | ||
753 | 751 | ||
754 | 752 | @Callable(i) | |
755 | 753 | func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "") | |
756 | 754 | ||
757 | 755 | ||
758 | 756 | ||
759 | 757 | @Callable(i) | |
760 | 758 | func setBid (artId,issuer) = { | |
761 | - | let $ | |
762 | - | let id = $ | |
763 | - | let caller = $ | |
764 | - | let date = $ | |
765 | - | let $ | |
766 | - | let payment = $ | |
767 | - | let amount = $ | |
759 | + | let $t02950429544 = idCallerDate(i) | |
760 | + | let id = $t02950429544._1 | |
761 | + | let caller = $t02950429544._2 | |
762 | + | let date = $t02950429544._3 | |
763 | + | let $t02954929585 = isPayment(i) | |
764 | + | let payment = $t02954929585._1 | |
765 | + | let amount = $t02954929585._2 | |
768 | 766 | let assetId = if (!(isDefined(payment.assetId))) | |
769 | 767 | then "WAVES" | |
770 | 768 | else toBase58String(value(payment.assetId)) | |
771 | 769 | let blockEnd = getIntegerByKey(keyEndSale(issuer, artId)) | |
772 | 770 | if (if ((blockEnd != 0)) | |
773 | 771 | then (height >= blockEnd) | |
774 | 772 | else false) | |
775 | 773 | then throw("Sale ended.") | |
776 | 774 | else { | |
777 | 775 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
778 | 776 | if (!(acceptedAssetIds(assetId))) | |
779 | 777 | then throw("asset not accepted") | |
780 | 778 | else if (!(validateMinSell(assetId, amount))) | |
781 | 779 | then throw("Wrong min sell") | |
782 | 780 | else { | |
783 | 781 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
784 | 782 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
785 | 783 | if ((0 >= maxCanSell)) | |
786 | 784 | then throw("No max edition set for this artwork") | |
787 | 785 | else if ((amountSold >= maxCanSell)) | |
788 | 786 | then throw("Sold out, you cannot bid") | |
789 | 787 | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
790 | 788 | } | |
791 | 789 | } | |
792 | 790 | } | |
793 | 791 | ||
794 | 792 | ||
795 | 793 | ||
796 | 794 | @Callable(i) | |
797 | 795 | func acceptBid (artId,issuer,bidId,bidOwner) = { | |
798 | - | let $ | |
799 | - | let id = $ | |
800 | - | let caller = $ | |
801 | - | let date = $ | |
796 | + | let $t03074330783 = idCallerDate(i) | |
797 | + | let id = $t03074330783._1 | |
798 | + | let caller = $t03074330783._2 | |
799 | + | let date = $t03074330783._3 | |
802 | 800 | if ((caller != issuer)) | |
803 | 801 | then throw("You cannot do this action") | |
804 | 802 | else buyMint(i, artId, issuer, bidId, bidOwner) | |
805 | 803 | } | |
806 | 804 | ||
807 | 805 | ||
808 | 806 | ||
809 | 807 | @Callable(i) | |
810 | 808 | func cancelBid (artId,issuer,bidId,bidOwner) = { | |
811 | - | let $ | |
812 | - | let id = $ | |
813 | - | let caller = $ | |
814 | - | let date = $ | |
809 | + | let $t03100931070 = idCallerDate(i) | |
810 | + | let id = $t03100931070._1 | |
811 | + | let caller = $t03100931070._2 | |
812 | + | let date = $t03100931070._3 | |
815 | 813 | if (if ((caller != bidOwner)) | |
816 | 814 | then (caller != issuer) | |
817 | 815 | else false) | |
818 | 816 | then throw("You cannot do this action") | |
819 | 817 | else { | |
820 | 818 | let returnMoneyTo = if ((caller == issuer)) | |
821 | 819 | then bidOwner | |
822 | 820 | else caller | |
823 | 821 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
824 | 822 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
825 | 823 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
826 | 824 | if ((bidData == "")) | |
827 | 825 | then throw("Bid not found") | |
828 | 826 | else { | |
829 | 827 | let bidDataArr = split(bidData, "_") | |
830 | 828 | let assetId = getBidAssetId(bidDataArr[0]) | |
831 | 829 | let bidStatus = "CANCELED" | |
832 | 830 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(returnMoneyTo)), parseIntValue(bidDataArr[1]), assetId)] | |
833 | 831 | } | |
834 | 832 | } | |
835 | 833 | } | |
836 | 834 | ||
837 | 835 | ||
838 | 836 | @Verifier(tx) | |
839 | 837 | func verifier () = match tx { | |
840 | 838 | case inv: InvokeScriptTransaction => | |
841 | 839 | if (if ((inv.function == "addArtwork")) | |
842 | 840 | then (inv.dApp == this) | |
843 | 841 | else false) | |
844 | 842 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[13]))) | |
845 | 843 | else if (if ((inv.function == "updateArtwork")) | |
846 | 844 | then (inv.dApp == this) | |
847 | 845 | else false) | |
848 | 846 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[12]))) | |
849 | 847 | else if (if ((inv.function == "sellArtwork")) | |
850 | 848 | then (inv.dApp == this) | |
851 | 849 | else false) | |
852 | 850 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5]))) | |
853 | 851 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
854 | 852 | case _ => | |
855 | 853 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
856 | 854 | } | |
857 | 855 |
github/deemru/w8io/169f3d6 110.95 ms ◑