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