tx · 2CdVoqS9tPHRqkHUTveMhdsq3nf9Dx92jUtLhSkxuXke 3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA: -0.01000000 Waves 2021.10.09 20:06 [1739002] smart account 3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA > SELF 0.00000000 Waves
{ "type": 13, "id": "2CdVoqS9tPHRqkHUTveMhdsq3nf9Dx92jUtLhSkxuXke", "fee": 1000000, "feeAssetId": null, "timestamp": 1633799266572, "version": 2, "chainId": 84, "sender": "3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA", "senderPublicKey": "9abKuN1XmLjjire2feZH26PmcEWhEXxiHToWSmii3Gn2", "proofs": [ "2DaCt8o1kNWrA7VfWrK1wp5RSs2PaqESEL4Wipwz9M2djXt4s4uC8ZnBY3RgYtgPDVXBiR6Bze1wxbNF7TxA9fEA" ], "script": "base64:AAIFAAAAAAAAAD4IAhIFCgMBCAgSCQoHCAgICAgICBIICgYIAQEICAESBAoCCAgSAwoBCBIECgIICBIGCgQICAgIEgUKAwgICAAAAFAAAAAACHVuaXRUZXN0BwAAAAAJb3JhY2xlRmVlCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNNcFpRanpHb2dtaWZjRUtlOG1EZDZyaWJMN254VDlBQ3llAAAAAAtmZWVSZWNlaXZlcgIAAAAjM042NXhMcThKY0NlYUVpUjFUSlE3ZEJxWEJ2RXk2RTQ4V3oAAAAACGNlcnREYXBwAgAAACMzTXhjWHJOYk1aS1lhU3JoY2ZlTW0yaFpuQmVDdTN5UldzdwAAAAAIdXNlckRhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM045Y1FnWkZQSEhWdTh3cXNuMkRrUUZlaGczaDhDTmlvb0EAAAAADXdoaXRlbGlzdERhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM045eFpZR3B6TUZEWHZYdWN0bVU2elY4cVN6bTJaZkYzMWYAAAAAC1VTRE5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AAAABWJpZElkBAAAAAthdWN0aW9uVHlwZQkBAAAADmdldFN0cmluZ0J5S2V5AAAAAQkBAAAADmtleUF1Y3Rpb25UeXBlAAAAAgUAAAAGaXNzdWVyBQAAAAVhcnRJZAMJAAAAAAAAAgUAAAALYXVjdGlvblR5cGUFAAAADGF1Y3Rpb25UeXBlMQkBAAAADWNhbmNlbEJpZEltcGwAAAAEBQAAAAFpBQAAAAVhcnRJZAUAAAAGaXNzdWVyBQAAAAViaWRJZAkBAAAAGGNhbmNlbEJpZEltcGxUcmFkaXRpb25hbAAAAAQFAAAAAWkFAAAABWFydElkBQAAAAZpc3N1ZXIFAAAABWJpZElkAAAAAD3scDM=", "height": 1739002, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8t4AM3PB7RZbMnaXwskFNNy5hi7AbDTvR7YLENTu9PbP Next: FVC58Wazb9odxubs8ZnKFXRKFzEc2xXgXYXmkXb3vRKB Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let USDNAssetId = base58'132maRL3uF35tc2bpRih9D6MYq5DR6H28zkop786dKyu' | |
17 | 17 | ||
18 | - | let owners = [ | |
18 | + | let owners = [getString(oracleFee, "owner1"), getString(oracleFee, "owner2")] | |
19 | 19 | ||
20 | 20 | let USDNFirstSellCut = 150 | |
21 | 21 | ||
39 | 39 | ||
40 | 40 | let auctionType2 = "TRADITIONAL" | |
41 | 41 | ||
42 | + | let auctionType3 = "DIRECT" | |
43 | + | ||
42 | 44 | func getStringByKeyFromUsers (key) = valueOrElse(getString(userDapp, key), "") | |
43 | 45 | ||
44 | 46 | ||
45 | 47 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
48 | + | ||
49 | + | ||
50 | + | func getStringByKeyOrError (key,error) = valueOrErrorMessage(getString(this, key), error) | |
46 | 51 | ||
47 | 52 | ||
48 | 53 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
76 | 81 | ||
77 | 82 | ||
78 | 83 | func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller) | |
79 | - | ||
80 | - | ||
81 | - | func keyMinPrice (caller,artId) = ((("art_minprice_" + artId) + "_") + caller) | |
82 | 84 | ||
83 | 85 | ||
84 | 86 | func keyHighestBidBidId (artId) = ("art_highestBidBidId_" + artId) | |
169 | 171 | then throw(checkUser) | |
170 | 172 | else if ((size(cidDisplay) == 0)) | |
171 | 173 | then throw("Display CID cannot be empty") | |
172 | - | else if (!(validateString(name, 100))) | |
173 | - | then throw("100 Char. max name") | |
174 | - | else if (!(validateString(description, 1000))) | |
175 | - | then throw("1000 Char. max description") | |
176 | - | else if ((size(split(tags, ",")) > 5)) | |
177 | - | then throw("5 tags max.") | |
178 | - | else "" | |
174 | + | else if ((size(cidDisplay) != 46)) | |
175 | + | then throw("This doesn't seem a valid CID!") | |
176 | + | else if (!(validateString(name, 100))) | |
177 | + | then throw("100 Char. max name") | |
178 | + | else if (!(validateString(description, 1000))) | |
179 | + | then throw("1000 Char. max description") | |
180 | + | else if ((size(split(tags, ",")) > 5)) | |
181 | + | then throw("5 tags max.") | |
182 | + | else "" | |
179 | 183 | } | |
180 | 184 | ||
181 | 185 | ||
196 | 200 | then (payment.assetId == USDNAssetId) | |
197 | 201 | else false) | |
198 | 202 | then payment.assetId | |
199 | - | else throw("Only | |
203 | + | else throw("Only USDN token accepted as transaction fee") | |
200 | 204 | if ((amount != currentCertificationPrice)) | |
201 | - | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
205 | + | then throw(((("Payment amount should be " + toString(currentCertificationPrice)) + " but is: ") + toString(amount))) | |
202 | 206 | else $Tuple2(amount, assetId) | |
203 | 207 | } | |
204 | 208 | ||
235 | 239 | ||
236 | 240 | ||
237 | 241 | func acceptedAssetIds (assetId) = if ((assetId != toBase58String(USDNAssetId))) | |
238 | - | then throw("Only | |
242 | + | then throw("Only USDN accepted") | |
239 | 243 | else true | |
240 | 244 | ||
241 | 245 | ||
372 | 376 | } | |
373 | 377 | ||
374 | 378 | ||
379 | + | func calculateRarity (mintIndex) = if ((4 > mintIndex)) | |
380 | + | then "SSR" | |
381 | + | else if ((11 > mintIndex)) | |
382 | + | then "SR" | |
383 | + | else if ((101 > mintIndex)) | |
384 | + | then "R" | |
385 | + | else "N" | |
386 | + | ||
387 | + | ||
375 | 388 | func getBidKeyVal (assetId,bidDataKey,date) = { | |
376 | 389 | let assetIdBid = if (!(isDefined(assetId))) | |
377 | 390 | then throw("Only USDN is accepted") | |
422 | 435 | let bidDelOld = bidKeyValue._2 | |
423 | 436 | let bidUpdate = bidKeyValue._3 | |
424 | 437 | let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer) | |
438 | + | let rarity = calculateRarity(newAmountSold) | |
425 | 439 | let soldValue = if (!(isBid)) | |
426 | 440 | then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + idNFT) | |
427 | 441 | else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + idNFT) | |
428 | 442 | let soldData = StringEntry(soldKey, soldValue) | |
429 | - | let buyRes = [IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + idNFT), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyOnSale(issuer, artId), sellStatus), ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSconex, assetId), StringEntry(KeyNftIssuer(idNFT), issuer)] | |
443 | + | let buyRes = [IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + idNFT), soldKey), StringEntry(("nft_rarity_" + idNFT), rarity), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyOnSale(issuer, artId), sellStatus), ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSconex, assetId), StringEntry(KeyNftIssuer(idNFT), issuer)] | |
430 | 444 | let res = invoke(addressFromStringValue(certDapp), "createCert", [toString(receiveNFT), idNFT, issuer], nil) | |
431 | 445 | if ((res == res)) | |
432 | 446 | then if (isBid) | |
480 | 494 | let payment = isPaymentVar._1 | |
481 | 495 | let amount = isPaymentVar._2 | |
482 | 496 | if ((highestBid >= amount)) | |
483 | - | then throw(("Please place a bid higher | |
497 | + | then throw(("Please place a bid higher than: " + toString(highestBid))) | |
484 | 498 | else { | |
485 | 499 | let assetId = if (!(isDefined(payment.assetId))) | |
486 | 500 | then throw("Only USDN is accepted!") | |
548 | 562 | let date = t02894229094._3 | |
549 | 563 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
550 | 564 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
551 | - | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
552 | - | if ((bidData == "")) | |
553 | - | then throw("Bid not found") | |
554 | - | else { | |
555 | - | let bidDataArr = split(bidData, "_") | |
556 | - | let assetId = getBidAssetId(bidDataArr[0]) | |
557 | - | let bidStatus = "CANCELED" | |
565 | + | let bidData = getStringByKeyOrError((bidDataKey + "_OPEN"), "Bid not found") | |
566 | + | let bidDataArr = split(bidData, "_") | |
567 | + | let assetId = getBidAssetId(bidDataArr[0]) | |
568 | + | let bidStatus = "CANCELED" | |
558 | 569 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
559 | - | } | |
560 | 570 | } | |
561 | 571 | ||
562 | 572 | ||
567 | 577 | let date = t02894229094._3 | |
568 | 578 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
569 | 579 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
570 | - | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
571 | - | if ((bidData == "")) | |
572 | - | then throw("Bid not found") | |
573 | - | else { | |
574 | - | let bidDataArr = split(bidData, "_") | |
575 | - | let assetId = getBidAssetId(bidDataArr[0]) | |
576 | - | let bidStatus = "CANCELED" | |
577 | - | let bidAmount = parseIntValue(bidDataArr[1]) | |
578 | - | let highestBidId = getStringByKey(keyHighestBidBidId(artId)) | |
579 | - | if ((bidId == highestBidId)) | |
580 | - | then throw("You can't cancel the highest bid!") | |
581 | - | else [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), bidAmount, assetId)] | |
582 | - | } | |
580 | + | let bidData = getStringByKeyOrError((bidDataKey + "_OPEN"), "Bid not found") | |
581 | + | let bidDataArr = split(bidData, "_") | |
582 | + | let assetId = getBidAssetId(bidDataArr[0]) | |
583 | + | let bidStatus = "CANCELED" | |
584 | + | let bidAmount = parseIntValue(bidDataArr[1]) | |
585 | + | let highestBidId = getStringByKey(keyHighestBidBidId(artId)) | |
586 | + | if ((bidId == highestBidId)) | |
587 | + | then throw("You can't cancel the highest bid!") | |
588 | + | else [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), bidAmount, assetId)] | |
583 | 589 | } | |
584 | 590 | ||
585 | 591 | ||
591 | 597 | let idNFT = calculateAssetId(issueNFT) | |
592 | 598 | $Tuple2([issueNFT, ScriptTransfer(receiveNFTAddy, 1, idNFT)], toBase58String(idNFT)) | |
593 | 599 | } | |
594 | - | else throw("Only the | |
600 | + | else throw("Only the dApp can mint NFT's") | |
595 | 601 | ||
596 | 602 | ||
597 | 603 | ||
617 | 623 | else { | |
618 | 624 | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
619 | 625 | if ((hashExist != "")) | |
620 | - | then throw(" | |
626 | + | then throw("This hash is already registered") | |
621 | 627 | else [StringEntry(keyOwnerByHash(sha256Hash), caller), StringEntry(keyTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyHashByTxidAddr(caller, artId), sha256Hash), StringEntry(keyEntitlement(caller, artId), entitlement), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
622 | 628 | } | |
623 | 629 | } | |
627 | 633 | ||
628 | 634 | ||
629 | 635 | @Callable(i) | |
630 | - | func sellArtwork (artId,price,maxMint,assetId,auctionType, | |
636 | + | func sellArtwork (artId,price,maxMint,assetId,auctionType,duration) = { | |
631 | 637 | let t02571425747 = idCallerDate(i) | |
632 | 638 | let id = t02571425747._1 | |
633 | 639 | let caller = t02571425747._2 | |
634 | 640 | let artworkName = getStringByKey(keyName(caller, artId)) | |
635 | - | if (!(containsElement([auctionType1, auctionType2], auctionType))) | |
636 | - | then throw("We | |
641 | + | if (!(containsElement([auctionType1, auctionType2, auctionType3], auctionType))) | |
642 | + | then throw("We don't know this auction type") | |
637 | 643 | else if ((artworkName == "")) | |
638 | 644 | then throw("This art doesn't match your account") | |
639 | 645 | else { | |
649 | 655 | else { | |
650 | 656 | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
651 | 657 | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
652 | - | if ((maxMint > | |
653 | - | then throw(" | |
658 | + | if ((maxMint > 5000)) | |
659 | + | then throw("5000 editions max per artwork") | |
654 | 660 | else if (if ((amountSold != 0)) | |
655 | 661 | then (amountSold == maxCanSell) | |
656 | 662 | else false) | |
670 | 676 | then true | |
671 | 677 | else false | |
672 | 678 | let endHeight = (duration + height) | |
673 | - | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint | |
679 | + | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), IntegerEntry(keyDuration(caller, artId), duration), IntegerEntry(keyEndHeight(caller, artId), endHeight), StringEntry(keyAssetIdAccepted(caller, artId), assetId), StringEntry(keyAuctionType(caller, artId), auctionType)] | |
674 | 680 | } | |
675 | 681 | } | |
676 | 682 | } | |
680 | 686 | ||
681 | 687 | ||
682 | 688 | @Callable(i) | |
683 | - | func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "", false) | |
689 | + | func buyArtwork (artId,issuer) = { | |
690 | + | let auctionType = getStringByKey(keyAuctionType(issuer, artId)) | |
691 | + | if ((auctionType == auctionType3)) | |
692 | + | then buyMint(i, artId, issuer, "", "", false) | |
693 | + | else throw("Direct buy only allowed when no auction type is set!") | |
694 | + | } | |
684 | 695 | ||
685 | 696 | ||
686 | 697 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
5 | 5 | ||
6 | 6 | let oracleFee = value(addressFromString("3MpZQjzGogmifcEKe8mDd6ribL7nxT9ACye")) | |
7 | 7 | ||
8 | 8 | let feeReceiver = "3N65xLq8JcCeaEiR1TJQ7dBqXBvEy6E48Wz" | |
9 | 9 | ||
10 | 10 | let certDapp = "3MxcXrNbMZKYaSrhcfeMm2hZnBeCu3yRWsw" | |
11 | 11 | ||
12 | 12 | let userDapp = value(addressFromString("3N9cQgZFPHHVu8wqsn2DkQFehg3h8CNiooA")) | |
13 | 13 | ||
14 | 14 | let whitelistDapp = value(addressFromString("3N9xZYGpzMFDXvXuctmU6zV8qSzm2ZfF31f")) | |
15 | 15 | ||
16 | 16 | let USDNAssetId = base58'132maRL3uF35tc2bpRih9D6MYq5DR6H28zkop786dKyu' | |
17 | 17 | ||
18 | - | let owners = [ | |
18 | + | let owners = [getString(oracleFee, "owner1"), getString(oracleFee, "owner2")] | |
19 | 19 | ||
20 | 20 | let USDNFirstSellCut = 150 | |
21 | 21 | ||
22 | 22 | let USDNSecondSellCut = 30 | |
23 | 23 | ||
24 | 24 | let originalCreatorCut = 70 | |
25 | 25 | ||
26 | 26 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
27 | 27 | ||
28 | 28 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
29 | 29 | ||
30 | 30 | let userSuspended = "SUSPENDED" | |
31 | 31 | ||
32 | 32 | let userRemoved = "REMOVED" | |
33 | 33 | ||
34 | 34 | let userUnregistered = "UNREGISTERED" | |
35 | 35 | ||
36 | 36 | let userAllowed = "ALLOWED" | |
37 | 37 | ||
38 | 38 | let auctionType1 = "BIDTYPE" | |
39 | 39 | ||
40 | 40 | let auctionType2 = "TRADITIONAL" | |
41 | 41 | ||
42 | + | let auctionType3 = "DIRECT" | |
43 | + | ||
42 | 44 | func getStringByKeyFromUsers (key) = valueOrElse(getString(userDapp, key), "") | |
43 | 45 | ||
44 | 46 | ||
45 | 47 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
48 | + | ||
49 | + | ||
50 | + | func getStringByKeyOrError (key,error) = valueOrErrorMessage(getString(this, key), error) | |
46 | 51 | ||
47 | 52 | ||
48 | 53 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
49 | 54 | ||
50 | 55 | ||
51 | 56 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
52 | 57 | ||
53 | 58 | ||
54 | 59 | func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0) | |
55 | 60 | ||
56 | 61 | ||
57 | 62 | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
58 | 63 | ||
59 | 64 | ||
60 | 65 | func validateHash (hash) = (size(hash) == 64) | |
61 | 66 | ||
62 | 67 | ||
63 | 68 | func keyUserStatus (caller) = ("user_status_" + caller) | |
64 | 69 | ||
65 | 70 | ||
66 | 71 | func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller) | |
67 | 72 | ||
68 | 73 | ||
69 | 74 | func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller) | |
70 | 75 | ||
71 | 76 | ||
72 | 77 | func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller) | |
73 | 78 | ||
74 | 79 | ||
75 | 80 | func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller) | |
76 | 81 | ||
77 | 82 | ||
78 | 83 | func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller) | |
79 | - | ||
80 | - | ||
81 | - | func keyMinPrice (caller,artId) = ((("art_minprice_" + artId) + "_") + caller) | |
82 | 84 | ||
83 | 85 | ||
84 | 86 | func keyHighestBidBidId (artId) = ("art_highestBidBidId_" + artId) | |
85 | 87 | ||
86 | 88 | ||
87 | 89 | func keyBidId (bidId) = ("bid_" + bidId) | |
88 | 90 | ||
89 | 91 | ||
90 | 92 | func keyDuration (caller,artId) = ((("art_duration_" + artId) + "_") + caller) | |
91 | 93 | ||
92 | 94 | ||
93 | 95 | func keyEndHeight (caller,artId) = ((("art_endheight_" + artId) + "_") + caller) | |
94 | 96 | ||
95 | 97 | ||
96 | 98 | func keyAuctionType (caller,artId) = ((("art_auctiontype_" + artId) + "_") + caller) | |
97 | 99 | ||
98 | 100 | ||
99 | 101 | func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller) | |
100 | 102 | ||
101 | 103 | ||
102 | 104 | func KeyNftIssuer (nftId) = ("nft_issued_" + nftId) | |
103 | 105 | ||
104 | 106 | ||
105 | 107 | func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller) | |
106 | 108 | ||
107 | 109 | ||
108 | 110 | func keyEntitlement (caller,artId) = ((("art_entitlement_" + artId) + "_") + caller) | |
109 | 111 | ||
110 | 112 | ||
111 | 113 | func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller) | |
112 | 114 | ||
113 | 115 | ||
114 | 116 | func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller) | |
115 | 117 | ||
116 | 118 | ||
117 | 119 | func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller) | |
118 | 120 | ||
119 | 121 | ||
120 | 122 | func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller) | |
121 | 123 | ||
122 | 124 | ||
123 | 125 | func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller) | |
124 | 126 | ||
125 | 127 | ||
126 | 128 | func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash) | |
127 | 129 | ||
128 | 130 | ||
129 | 131 | func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller))))) | |
130 | 132 | ||
131 | 133 | ||
132 | 134 | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(USDNAssetId))) | |
133 | 135 | ||
134 | 136 | func getAmountByBidId (bidId) = valueOrElse(getIntegerByKey(keyBidId(bidId)), 0) | |
135 | 137 | ||
136 | 138 | ||
137 | 139 | func getAmountHighestBidByArtId (artId) = { | |
138 | 140 | let bidId = getStringByKey(keyHighestBidBidId(artId)) | |
139 | 141 | if ((bidId == "")) | |
140 | 142 | then 0 | |
141 | 143 | else getAmountByBidId(bidId) | |
142 | 144 | } | |
143 | 145 | ||
144 | 146 | ||
145 | 147 | func validateString (str,max) = if ((size(str) == 0)) | |
146 | 148 | then throw("Field cannot be is empty") | |
147 | 149 | else if ((size(str) > max)) | |
148 | 150 | then throw((str + " is too long")) | |
149 | 151 | else true | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | func validateUser (caller) = { | |
153 | 155 | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
154 | 156 | if (if ((userStatus == userUnregistered)) | |
155 | 157 | then true | |
156 | 158 | else (userStatus == userAllowed)) | |
157 | 159 | then "Register this account first with 'Account' tab" | |
158 | 160 | else if ((userStatus == userSuspended)) | |
159 | 161 | then "Account suspended" | |
160 | 162 | else if ((userStatus == userRemoved)) | |
161 | 163 | then "Account removed" | |
162 | 164 | else "" | |
163 | 165 | } | |
164 | 166 | ||
165 | 167 | ||
166 | 168 | func validateArtworkData (caller,cidDisplay,name,description,tags) = { | |
167 | 169 | let checkUser = validateUser(caller) | |
168 | 170 | if ((checkUser != "")) | |
169 | 171 | then throw(checkUser) | |
170 | 172 | else if ((size(cidDisplay) == 0)) | |
171 | 173 | then throw("Display CID cannot be empty") | |
172 | - | else if (!(validateString(name, 100))) | |
173 | - | then throw("100 Char. max name") | |
174 | - | else if (!(validateString(description, 1000))) | |
175 | - | then throw("1000 Char. max description") | |
176 | - | else if ((size(split(tags, ",")) > 5)) | |
177 | - | then throw("5 tags max.") | |
178 | - | else "" | |
174 | + | else if ((size(cidDisplay) != 46)) | |
175 | + | then throw("This doesn't seem a valid CID!") | |
176 | + | else if (!(validateString(name, 100))) | |
177 | + | then throw("100 Char. max name") | |
178 | + | else if (!(validateString(description, 1000))) | |
179 | + | then throw("1000 Char. max description") | |
180 | + | else if ((size(split(tags, ",")) > 5)) | |
181 | + | then throw("5 tags max.") | |
182 | + | else "" | |
179 | 183 | } | |
180 | 184 | ||
181 | 185 | ||
182 | 186 | func isPayment (i) = if ((size(i.payments) == 0)) | |
183 | 187 | then throw("No payment attached") | |
184 | 188 | else { | |
185 | 189 | let payment = value(i.payments[0]) | |
186 | 190 | let amount = value(payment.amount) | |
187 | 191 | $Tuple2(payment, amount) | |
188 | 192 | } | |
189 | 193 | ||
190 | 194 | ||
191 | 195 | func validatePayment (i) = { | |
192 | 196 | let t089829018 = isPayment(i) | |
193 | 197 | let payment = t089829018._1 | |
194 | 198 | let amount = t089829018._2 | |
195 | 199 | let assetId = if (if (isDefined(payment.assetId)) | |
196 | 200 | then (payment.assetId == USDNAssetId) | |
197 | 201 | else false) | |
198 | 202 | then payment.assetId | |
199 | - | else throw("Only | |
203 | + | else throw("Only USDN token accepted as transaction fee") | |
200 | 204 | if ((amount != currentCertificationPrice)) | |
201 | - | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
205 | + | then throw(((("Payment amount should be " + toString(currentCertificationPrice)) + " but is: ") + toString(amount))) | |
202 | 206 | else $Tuple2(amount, assetId) | |
203 | 207 | } | |
204 | 208 | ||
205 | 209 | ||
206 | 210 | func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) { | |
207 | 211 | case b: Int => | |
208 | 212 | if ((b != 0)) | |
209 | 213 | then true | |
210 | 214 | else false | |
211 | 215 | case _ => | |
212 | 216 | false | |
213 | 217 | } | |
214 | 218 | ||
215 | 219 | ||
216 | 220 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
217 | 221 | let t096119647 = isPayment(i) | |
218 | 222 | let payment = t096119647._1 | |
219 | 223 | let amount = t096119647._2 | |
220 | 224 | let assetId = if (!(isDefined(payment.assetId))) | |
221 | 225 | then throw("Wrong asset id") | |
222 | 226 | else if (if ((size(priceAssetId) > 0)) | |
223 | 227 | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
224 | 228 | else false) | |
225 | 229 | then payment.assetId | |
226 | 230 | else throw("Wrong asset id") | |
227 | 231 | if (if ((assetId == unit)) | |
228 | 232 | then (priceAssetId != "") | |
229 | 233 | else false) | |
230 | 234 | then throw("Wrong asset id") | |
231 | 235 | else if ((artworkPrice != amount)) | |
232 | 236 | then throw(((("Payment don't match " + toString(artworkPrice)) + " ") + toString(amount))) | |
233 | 237 | else $Tuple2(amount, assetId) | |
234 | 238 | } | |
235 | 239 | ||
236 | 240 | ||
237 | 241 | func acceptedAssetIds (assetId) = if ((assetId != toBase58String(USDNAssetId))) | |
238 | - | then throw("Only | |
242 | + | then throw("Only USDN accepted") | |
239 | 243 | else true | |
240 | 244 | ||
241 | 245 | ||
242 | 246 | func validateMinSell (assetId,price) = { | |
243 | 247 | let minSellSconex = if (unitTest) | |
244 | 248 | then 1 | |
245 | 249 | else (currentCertificationPrice * 2) | |
246 | 250 | if (if (if ((assetId == toBase58String(USDNAssetId))) | |
247 | 251 | then (minSellSconex > price) | |
248 | 252 | else false) | |
249 | 253 | then (price != 0) | |
250 | 254 | else false) | |
251 | 255 | then throw(("Wrong minimum sell price " + toString(minSellSconex))) | |
252 | 256 | else true | |
253 | 257 | } | |
254 | 258 | ||
255 | 259 | ||
256 | 260 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
257 | 261 | then throw("Only USDN is accepted!") | |
258 | 262 | else fromBase58String(assetId) | |
259 | 263 | ||
260 | 264 | ||
261 | 265 | func getPriceAssetIdFromBid (bidDataKey) = { | |
262 | 266 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
263 | 267 | if ((bidData == "")) | |
264 | 268 | then throw("Bid not found") | |
265 | 269 | else { | |
266 | 270 | let bidDataArr = split(bidData, "_") | |
267 | 271 | let bidAmount = parseIntValue(bidDataArr[1]) | |
268 | 272 | let bidAssetId = getBidAssetId(bidDataArr[0]) | |
269 | 273 | if ((0 >= bidAmount)) | |
270 | 274 | then throw("Wrong amount") | |
271 | 275 | else $Tuple2(bidAmount, bidAssetId) | |
272 | 276 | } | |
273 | 277 | } | |
274 | 278 | ||
275 | 279 | ||
276 | 280 | func idCallerDate (i) = if (!(dappRunning)) | |
277 | 281 | then throw(maintenanceMSG) | |
278 | 282 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
279 | 283 | ||
280 | 284 | ||
281 | 285 | func isBidCheck (i,issuer,bidOwner,bidId) = if (if (if ((toBase58String(i.caller.bytes) == issuer)) | |
282 | 286 | then (bidOwner != "") | |
283 | 287 | else false) | |
284 | 288 | then (bidId != "") | |
285 | 289 | else false) | |
286 | 290 | then true | |
287 | 291 | else false | |
288 | 292 | ||
289 | 293 | ||
290 | 294 | func getArtData (i,issuer,artId,isBid) = { | |
291 | 295 | let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer) | |
292 | 296 | let totalNFT = getIntegerByKey("total_nft_issued") | |
293 | 297 | let artworkName = getStringByKey(keyName(issuer, artId)) | |
294 | 298 | if ((artworkName == "")) | |
295 | 299 | then throw("Art doesn't exist") | |
296 | 300 | else { | |
297 | 301 | let isOnSale = getBooleanByKey(keyOnSale(issuer, artId)) | |
298 | 302 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
299 | 303 | let artworkPrice = valueOrElse(getIntegerByKey(keyPrice(issuer, artId)), (currentCertificationPrice * 2)) | |
300 | 304 | let priceAssetId = if (callerIsIssuer) | |
301 | 305 | then toBase58String(USDNAssetId) | |
302 | 306 | else getStringByKey(keyAssetIdAccepted(issuer, artId)) | |
303 | 307 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
304 | 308 | if (if (if (!(isBid)) | |
305 | 309 | then !(callerIsIssuer) | |
306 | 310 | else false) | |
307 | 311 | then if (if ((0 >= artworkPrice)) | |
308 | 312 | then true | |
309 | 313 | else !(isOnSale)) | |
310 | 314 | then true | |
311 | 315 | else (0 >= maxCanSell) | |
312 | 316 | else false) | |
313 | 317 | then throw("Art not for sale") | |
314 | 318 | else if (if (if (!(isBid)) | |
315 | 319 | then callerIsIssuer | |
316 | 320 | else false) | |
317 | 321 | then (0 >= maxCanSell) | |
318 | 322 | else false) | |
319 | 323 | then throw("Max issuable not set") | |
320 | 324 | else $Tuple7(totalNFT, artworkName, amountSold, artworkPrice, priceAssetId, maxCanSell, isOnSale) | |
321 | 325 | } | |
322 | 326 | } | |
323 | 327 | ||
324 | 328 | ||
325 | 329 | func getBidData (i,caller,issuer,artId,bidOwner,bidId,priceAssetId,artworkPrice,isBid) = { | |
326 | 330 | let checkUser = validateUser(issuer) | |
327 | 331 | if (if (isBid) | |
328 | 332 | then (checkUser != "") | |
329 | 333 | else false) | |
330 | 334 | then throw(checkUser) | |
331 | 335 | else { | |
332 | 336 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
333 | 337 | let t01351913648 = if (isBid) | |
334 | 338 | then getPriceAssetIdFromBid(bidDataKey) | |
335 | 339 | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
336 | 340 | let amount = t01351913648._1 | |
337 | 341 | let assetId = t01351913648._2 | |
338 | 342 | $Tuple3(bidDataKey, amount, assetId) | |
339 | 343 | } | |
340 | 344 | } | |
341 | 345 | ||
342 | 346 | ||
343 | 347 | func getCommissionData (issuer,assetId,amount,amountSold,maxCanSell) = { | |
344 | 348 | let isWhitelisted = checkWhitelist(issuer) | |
345 | 349 | let cut = if ((isWhitelisted > height)) | |
346 | 350 | then 0 | |
347 | 351 | else if ((assetId == USDNAssetId)) | |
348 | 352 | then USDNFirstSellCut | |
349 | 353 | else throw("Only USDN is accepted!") | |
350 | 354 | let amountForSconex = fraction(amount, cut, 1000) | |
351 | 355 | let amountForCreator = (amount - amountForSconex) | |
352 | 356 | if ((amountSold == maxCanSell)) | |
353 | 357 | then throw("Art sold out") | |
354 | 358 | else { | |
355 | 359 | let newAmountSold = (amountSold + 1) | |
356 | 360 | $Tuple3(amountForSconex, amountForCreator, newAmountSold) | |
357 | 361 | } | |
358 | 362 | } | |
359 | 363 | ||
360 | 364 | ||
361 | 365 | func getIssueData (issuer,artId,artworkName,newAmountSold,maxCanSell,totalNFT,caller,bidOwner,bidId,i,isOnSale) = { | |
362 | 366 | let issueMeta = ((((((((("Creator: " + issuer) + ",ArtID: ") + artId) + ",Artwork name: ") + artworkName) + ",Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
363 | 367 | let sellStatus = if (if ((newAmountSold == maxCanSell)) | |
364 | 368 | then true | |
365 | 369 | else !(isOnSale)) | |
366 | 370 | then false | |
367 | 371 | else true | |
368 | 372 | let receiveNFT = if ((bidOwner != "")) | |
369 | 373 | then addressFromStringValue(bidOwner) | |
370 | 374 | else i.caller | |
371 | 375 | $Tuple3(sellStatus, receiveNFT, issueMeta) | |
372 | 376 | } | |
373 | 377 | ||
374 | 378 | ||
379 | + | func calculateRarity (mintIndex) = if ((4 > mintIndex)) | |
380 | + | then "SSR" | |
381 | + | else if ((11 > mintIndex)) | |
382 | + | then "SR" | |
383 | + | else if ((101 > mintIndex)) | |
384 | + | then "R" | |
385 | + | else "N" | |
386 | + | ||
387 | + | ||
375 | 388 | func getBidKeyVal (assetId,bidDataKey,date) = { | |
376 | 389 | let assetIdBid = if (!(isDefined(assetId))) | |
377 | 390 | then throw("Only USDN is accepted") | |
378 | 391 | else toBase58String(value(assetId)) | |
379 | 392 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
380 | 393 | let bidDelOld = DeleteEntry((bidDataKey + "_OPEN")) | |
381 | 394 | let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date))) | |
382 | 395 | $Tuple3(assetIdBid, bidDelOld, bidUpdate) | |
383 | 396 | } | |
384 | 397 | ||
385 | 398 | ||
386 | 399 | func buyMint (i,artId,issuer,bidId,bidOwner,isBid) = { | |
387 | 400 | let callerData = idCallerDate(i) | |
388 | 401 | let id = callerData._1 | |
389 | 402 | let caller = callerData._2 | |
390 | 403 | let date = callerData._3 | |
391 | 404 | let artData = getArtData(i, issuer, artId, isBid) | |
392 | 405 | let totalNFT = artData._1 | |
393 | 406 | let artworkName = artData._2 | |
394 | 407 | let amountSold = artData._3 | |
395 | 408 | let artworkPrice = artData._4 | |
396 | 409 | let priceAssetId = artData._5 | |
397 | 410 | let maxCanSell = artData._6 | |
398 | 411 | let isOnSale = artData._7 | |
399 | 412 | let bidData = getBidData(i, caller, issuer, artId, bidOwner, bidId, priceAssetId, artworkPrice, isBid) | |
400 | 413 | let bidDataKey = bidData._1 | |
401 | 414 | let amount = bidData._2 | |
402 | 415 | let assetId = bidData._3 | |
403 | 416 | let commisionData = getCommissionData(issuer, value(assetId), amount, amountSold, maxCanSell) | |
404 | 417 | let amountForSconex = commisionData._1 | |
405 | 418 | let amountForCreator = commisionData._2 | |
406 | 419 | let newAmountSold = commisionData._3 | |
407 | 420 | let issuerData = getIssueData(issuer, artId, artworkName, newAmountSold, maxCanSell, totalNFT, caller, bidOwner, bidId, i, isOnSale) | |
408 | 421 | let sellStatus = issuerData._1 | |
409 | 422 | let receiveNFT = issuerData._2 | |
410 | 423 | let issueMeta = issuerData._3 | |
411 | 424 | let idNFTInvoke = invoke(this, "mintNft", [totalNFT, issueMeta, toString(receiveNFT)], nil) | |
412 | 425 | if ((idNFTInvoke == idNFTInvoke)) | |
413 | 426 | then { | |
414 | 427 | let idNFT = match idNFTInvoke { | |
415 | 428 | case r: String => | |
416 | 429 | r | |
417 | 430 | case _ => | |
418 | 431 | throw("Incorrect invoke result") | |
419 | 432 | } | |
420 | 433 | let bidKeyValue = getBidKeyVal(assetId, bidDataKey, date) | |
421 | 434 | let assetIdBid = bidKeyValue._1 | |
422 | 435 | let bidDelOld = bidKeyValue._2 | |
423 | 436 | let bidUpdate = bidKeyValue._3 | |
424 | 437 | let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer) | |
438 | + | let rarity = calculateRarity(newAmountSold) | |
425 | 439 | let soldValue = if (!(isBid)) | |
426 | 440 | then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + idNFT) | |
427 | 441 | else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + idNFT) | |
428 | 442 | let soldData = StringEntry(soldKey, soldValue) | |
429 | - | let buyRes = [IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + idNFT), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyOnSale(issuer, artId), sellStatus), ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSconex, assetId), StringEntry(KeyNftIssuer(idNFT), issuer)] | |
443 | + | let buyRes = [IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + idNFT), soldKey), StringEntry(("nft_rarity_" + idNFT), rarity), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyOnSale(issuer, artId), sellStatus), ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSconex, assetId), StringEntry(KeyNftIssuer(idNFT), issuer)] | |
430 | 444 | let res = invoke(addressFromStringValue(certDapp), "createCert", [toString(receiveNFT), idNFT, issuer], nil) | |
431 | 445 | if ((res == res)) | |
432 | 446 | then if (isBid) | |
433 | 447 | then (((buyRes :+ soldData) :+ bidUpdate) :+ bidDelOld) | |
434 | 448 | else soldData :: buyRes | |
435 | 449 | else throw("Strict value is not equal to itself.") | |
436 | 450 | } | |
437 | 451 | else throw("Strict value is not equal to itself.") | |
438 | 452 | } | |
439 | 453 | ||
440 | 454 | ||
441 | 455 | func setBidNonTraditional (i,artId,issuer) = { | |
442 | 456 | let t02770927747 = idCallerDate(i) | |
443 | 457 | let id = t02770927747._1 | |
444 | 458 | let caller = t02770927747._2 | |
445 | 459 | let date = t02770927747._3 | |
446 | 460 | let t02775227788 = isPayment(i) | |
447 | 461 | let payment = t02775227788._1 | |
448 | 462 | let amount = t02775227788._2 | |
449 | 463 | let assetId = if (!(isDefined(payment.assetId))) | |
450 | 464 | then throw("Only USDN is accepted!") | |
451 | 465 | else toBase58String(value(payment.assetId)) | |
452 | 466 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
453 | 467 | if (!(acceptedAssetIds(assetId))) | |
454 | 468 | then throw("asset not accepted") | |
455 | 469 | else if (!(validateMinSell(assetId, amount))) | |
456 | 470 | then throw("Wrong min sell") | |
457 | 471 | else { | |
458 | 472 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
459 | 473 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
460 | 474 | if ((0 >= maxCanSell)) | |
461 | 475 | then throw("No max edition set for this artwork") | |
462 | 476 | else if ((amountSold >= maxCanSell)) | |
463 | 477 | then throw("Sold out, you cannot bid") | |
464 | 478 | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
465 | 479 | } | |
466 | 480 | } | |
467 | 481 | ||
468 | 482 | ||
469 | 483 | func setBidTraditional (i,artId,issuer) = { | |
470 | 484 | let endHeight = getIntegerByKey(keyEndHeight(issuer, artId)) | |
471 | 485 | let highestBid = getAmountHighestBidByArtId(artId) | |
472 | 486 | if ((height > endHeight)) | |
473 | 487 | then throw("This auction is finished already!") | |
474 | 488 | else { | |
475 | 489 | let callderData = idCallerDate(i) | |
476 | 490 | let id = callderData._1 | |
477 | 491 | let caller = callderData._2 | |
478 | 492 | let date = callderData._3 | |
479 | 493 | let isPaymentVar = isPayment(i) | |
480 | 494 | let payment = isPaymentVar._1 | |
481 | 495 | let amount = isPaymentVar._2 | |
482 | 496 | if ((highestBid >= amount)) | |
483 | - | then throw(("Please place a bid higher | |
497 | + | then throw(("Please place a bid higher than: " + toString(highestBid))) | |
484 | 498 | else { | |
485 | 499 | let assetId = if (!(isDefined(payment.assetId))) | |
486 | 500 | then throw("Only USDN is accepted!") | |
487 | 501 | else toBase58String(value(payment.assetId)) | |
488 | 502 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
489 | 503 | if (!(acceptedAssetIds(assetId))) | |
490 | 504 | then throw("asset not accepted") | |
491 | 505 | else if (!(validateMinSell(assetId, amount))) | |
492 | 506 | then throw("Wrong min sell") | |
493 | 507 | else { | |
494 | 508 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
495 | 509 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
496 | 510 | if ((0 >= maxCanSell)) | |
497 | 511 | then throw("No max edition set for this artwork") | |
498 | 512 | else if ((amountSold >= maxCanSell)) | |
499 | 513 | then throw("Sold out, you cannot bid") | |
500 | 514 | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1)), StringEntry(keyHighestBidBidId(artId), toBase58String(i.transactionId)), IntegerEntry(keyBidId(toBase58String(i.transactionId)), amount)] | |
501 | 515 | } | |
502 | 516 | } | |
503 | 517 | } | |
504 | 518 | } | |
505 | 519 | ||
506 | 520 | ||
507 | 521 | func acceptBidNonTraditional (i,artId,issuer,bidId,bidOwner) = { | |
508 | 522 | let caller = toBase58String(i.caller.bytes) | |
509 | 523 | if ((caller != issuer)) | |
510 | 524 | then throw("You cannot do this action") | |
511 | 525 | else buyMint(i, artId, issuer, bidId, bidOwner, true) | |
512 | 526 | } | |
513 | 527 | ||
514 | 528 | ||
515 | 529 | func restartAuction (artId,issuer) = { | |
516 | 530 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
517 | 531 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
518 | 532 | let oldEndHeight = getIntegerByKey(keyEndHeight(issuer, artId)) | |
519 | 533 | let duration = getIntegerByKey(keyDuration(issuer, artId)) | |
520 | 534 | let endHeight = (duration + height) | |
521 | 535 | if ((height > oldEndHeight)) | |
522 | 536 | then if ((amountSold == maxCanSell)) | |
523 | 537 | then throw("Can't restart auction, max amount sold") | |
524 | 538 | else [IntegerEntry(keyEndHeight(issuer, artId), endHeight), DeleteEntry(keyHighestBidBidId(artId))] | |
525 | 539 | else throw("Previous auction isn't completed yet") | |
526 | 540 | } | |
527 | 541 | ||
528 | 542 | ||
529 | 543 | func acceptBidTraditional (i,artId,issuer,bidId,bidOwner) = { | |
530 | 544 | let endHeight = getIntegerByKey(keyEndHeight(issuer, artId)) | |
531 | 545 | let highestBidId = getStringByKey(keyHighestBidBidId(artId)) | |
532 | 546 | if ((height > endHeight)) | |
533 | 547 | then if ((bidId == highestBidId)) | |
534 | 548 | then { | |
535 | 549 | let buyMintData = buyMint(i, artId, issuer, bidId, bidOwner, true) | |
536 | 550 | let restartAuctionData = restartAuction(artId, issuer) | |
537 | 551 | (restartAuctionData ++ buyMintData) | |
538 | 552 | } | |
539 | 553 | else throw("This is not the winning bid!") | |
540 | 554 | else throw("This auction is not yet finished!") | |
541 | 555 | } | |
542 | 556 | ||
543 | 557 | ||
544 | 558 | func cancelBidImpl (i,artId,issuer,bidId) = { | |
545 | 559 | let t02894229094 = idCallerDate(i) | |
546 | 560 | let id = t02894229094._1 | |
547 | 561 | let caller = t02894229094._2 | |
548 | 562 | let date = t02894229094._3 | |
549 | 563 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
550 | 564 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
551 | - | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
552 | - | if ((bidData == "")) | |
553 | - | then throw("Bid not found") | |
554 | - | else { | |
555 | - | let bidDataArr = split(bidData, "_") | |
556 | - | let assetId = getBidAssetId(bidDataArr[0]) | |
557 | - | let bidStatus = "CANCELED" | |
565 | + | let bidData = getStringByKeyOrError((bidDataKey + "_OPEN"), "Bid not found") | |
566 | + | let bidDataArr = split(bidData, "_") | |
567 | + | let assetId = getBidAssetId(bidDataArr[0]) | |
568 | + | let bidStatus = "CANCELED" | |
558 | 569 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
559 | - | } | |
560 | 570 | } | |
561 | 571 | ||
562 | 572 | ||
563 | 573 | func cancelBidImplTraditional (i,artId,issuer,bidId) = { | |
564 | 574 | let t02894229094 = idCallerDate(i) | |
565 | 575 | let id = t02894229094._1 | |
566 | 576 | let caller = t02894229094._2 | |
567 | 577 | let date = t02894229094._3 | |
568 | 578 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
569 | 579 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
570 | - | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
571 | - | if ((bidData == "")) | |
572 | - | then throw("Bid not found") | |
573 | - | else { | |
574 | - | let bidDataArr = split(bidData, "_") | |
575 | - | let assetId = getBidAssetId(bidDataArr[0]) | |
576 | - | let bidStatus = "CANCELED" | |
577 | - | let bidAmount = parseIntValue(bidDataArr[1]) | |
578 | - | let highestBidId = getStringByKey(keyHighestBidBidId(artId)) | |
579 | - | if ((bidId == highestBidId)) | |
580 | - | then throw("You can't cancel the highest bid!") | |
581 | - | else [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), bidAmount, assetId)] | |
582 | - | } | |
580 | + | let bidData = getStringByKeyOrError((bidDataKey + "_OPEN"), "Bid not found") | |
581 | + | let bidDataArr = split(bidData, "_") | |
582 | + | let assetId = getBidAssetId(bidDataArr[0]) | |
583 | + | let bidStatus = "CANCELED" | |
584 | + | let bidAmount = parseIntValue(bidDataArr[1]) | |
585 | + | let highestBidId = getStringByKey(keyHighestBidBidId(artId)) | |
586 | + | if ((bidId == highestBidId)) | |
587 | + | then throw("You can't cancel the highest bid!") | |
588 | + | else [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), bidAmount, assetId)] | |
583 | 589 | } | |
584 | 590 | ||
585 | 591 | ||
586 | 592 | @Callable(i) | |
587 | 593 | func mintNft (totalNFT,issueMeta,receiveNFT) = if ((i.caller == this)) | |
588 | 594 | then { | |
589 | 595 | let receiveNFTAddy = Address(fromBase58String(receiveNFT)) | |
590 | 596 | let issueNFT = Issue(("SCONEX_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
591 | 597 | let idNFT = calculateAssetId(issueNFT) | |
592 | 598 | $Tuple2([issueNFT, ScriptTransfer(receiveNFTAddy, 1, idNFT)], toBase58String(idNFT)) | |
593 | 599 | } | |
594 | - | else throw("Only the | |
600 | + | else throw("Only the dApp can mint NFT's") | |
595 | 601 | ||
596 | 602 | ||
597 | 603 | ||
598 | 604 | @Callable(i) | |
599 | 605 | func addArtwork (sha256Hash,name,description,tags,type,cidDisplay,entitlement) = { | |
600 | 606 | let t01774017781 = idCallerDate(i) | |
601 | 607 | let artId = t01774017781._1 | |
602 | 608 | let caller = t01774017781._2 | |
603 | 609 | let date = t01774017781._3 | |
604 | 610 | let validateArtwork = validateArtworkData(caller, cidDisplay, name, description, tags) | |
605 | 611 | if ((validateArtwork != "")) | |
606 | 612 | then throw("Something went wrong!") | |
607 | 613 | else { | |
608 | 614 | let t01817018212 = validatePayment(i) | |
609 | 615 | let amount = t01817018212._1 | |
610 | 616 | let assetId = t01817018212._2 | |
611 | 617 | if (!(isDefined(amount))) | |
612 | 618 | then throw("Something went wrong") | |
613 | 619 | else { | |
614 | 620 | let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller)) | |
615 | 621 | if ((entryExist != "")) | |
616 | 622 | then throw("You already added it") | |
617 | 623 | else { | |
618 | 624 | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
619 | 625 | if ((hashExist != "")) | |
620 | - | then throw(" | |
626 | + | then throw("This hash is already registered") | |
621 | 627 | else [StringEntry(keyOwnerByHash(sha256Hash), caller), StringEntry(keyTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyHashByTxidAddr(caller, artId), sha256Hash), StringEntry(keyEntitlement(caller, artId), entitlement), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
622 | 628 | } | |
623 | 629 | } | |
624 | 630 | } | |
625 | 631 | } | |
626 | 632 | ||
627 | 633 | ||
628 | 634 | ||
629 | 635 | @Callable(i) | |
630 | - | func sellArtwork (artId,price,maxMint,assetId,auctionType, | |
636 | + | func sellArtwork (artId,price,maxMint,assetId,auctionType,duration) = { | |
631 | 637 | let t02571425747 = idCallerDate(i) | |
632 | 638 | let id = t02571425747._1 | |
633 | 639 | let caller = t02571425747._2 | |
634 | 640 | let artworkName = getStringByKey(keyName(caller, artId)) | |
635 | - | if (!(containsElement([auctionType1, auctionType2], auctionType))) | |
636 | - | then throw("We | |
641 | + | if (!(containsElement([auctionType1, auctionType2, auctionType3], auctionType))) | |
642 | + | then throw("We don't know this auction type") | |
637 | 643 | else if ((artworkName == "")) | |
638 | 644 | then throw("This art doesn't match your account") | |
639 | 645 | else { | |
640 | 646 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
641 | 647 | if (!(acceptedAssetIds(assetId))) | |
642 | 648 | then throw("Something went wrong!") | |
643 | 649 | else if (!(validateMinSell(assetId, price))) | |
644 | 650 | then throw("Something went wrong!") | |
645 | 651 | else { | |
646 | 652 | let checkUser = validateUser(caller) | |
647 | 653 | if ((checkUser != "")) | |
648 | 654 | then throw(checkUser) | |
649 | 655 | else { | |
650 | 656 | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
651 | 657 | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
652 | - | if ((maxMint > | |
653 | - | then throw(" | |
658 | + | if ((maxMint > 5000)) | |
659 | + | then throw("5000 editions max per artwork") | |
654 | 660 | else if (if ((amountSold != 0)) | |
655 | 661 | then (amountSold == maxCanSell) | |
656 | 662 | else false) | |
657 | 663 | then throw("Max edition reached.") | |
658 | 664 | else if (if ((amountSold > 0)) | |
659 | 665 | then (maxCanSell != maxMint) | |
660 | 666 | else false) | |
661 | 667 | then throw("Cannot change maximum issuable anymore") | |
662 | 668 | else if (if ((bidNbr > 0)) | |
663 | 669 | then (maxCanSell != maxMint) | |
664 | 670 | else false) | |
665 | 671 | then throw("Cannot change maximum issuable with active orders") | |
666 | 672 | else { | |
667 | 673 | let sellStatus = if (if ((price > 0)) | |
668 | 674 | then (maxMint > 0) | |
669 | 675 | else false) | |
670 | 676 | then true | |
671 | 677 | else false | |
672 | 678 | let endHeight = (duration + height) | |
673 | - | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint | |
679 | + | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), IntegerEntry(keyDuration(caller, artId), duration), IntegerEntry(keyEndHeight(caller, artId), endHeight), StringEntry(keyAssetIdAccepted(caller, artId), assetId), StringEntry(keyAuctionType(caller, artId), auctionType)] | |
674 | 680 | } | |
675 | 681 | } | |
676 | 682 | } | |
677 | 683 | } | |
678 | 684 | } | |
679 | 685 | ||
680 | 686 | ||
681 | 687 | ||
682 | 688 | @Callable(i) | |
683 | - | func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "", false) | |
689 | + | func buyArtwork (artId,issuer) = { | |
690 | + | let auctionType = getStringByKey(keyAuctionType(issuer, artId)) | |
691 | + | if ((auctionType == auctionType3)) | |
692 | + | then buyMint(i, artId, issuer, "", "", false) | |
693 | + | else throw("Direct buy only allowed when no auction type is set!") | |
694 | + | } | |
684 | 695 | ||
685 | 696 | ||
686 | 697 | ||
687 | 698 | @Callable(i) | |
688 | 699 | func deleteEntry (entry) = { | |
689 | 700 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
690 | 701 | if (containsElement(owners, caller)) | |
691 | 702 | then [DeleteEntry(entry)] | |
692 | 703 | else throw("no") | |
693 | 704 | } | |
694 | 705 | ||
695 | 706 | ||
696 | 707 | ||
697 | 708 | @Callable(i) | |
698 | 709 | func setBid (artId,issuer) = { | |
699 | 710 | let auctionType = getStringByKey(keyAuctionType(issuer, artId)) | |
700 | 711 | if ((auctionType == auctionType1)) | |
701 | 712 | then setBidNonTraditional(i, artId, issuer) | |
702 | 713 | else if ((auctionType == auctionType2)) | |
703 | 714 | then setBidTraditional(i, artId, issuer) | |
704 | 715 | else throw((("Unknown auction type :" + auctionType) + ", please contact the admins")) | |
705 | 716 | } | |
706 | 717 | ||
707 | 718 | ||
708 | 719 | ||
709 | 720 | @Callable(i) | |
710 | 721 | func acceptBid (artId,issuer,bidId,bidOwner) = { | |
711 | 722 | let auctionType = getStringByKey(keyAuctionType(issuer, artId)) | |
712 | 723 | if ((auctionType == auctionType1)) | |
713 | 724 | then acceptBidNonTraditional(i, artId, issuer, bidId, bidOwner) | |
714 | 725 | else if ((auctionType == auctionType2)) | |
715 | 726 | then acceptBidTraditional(i, artId, issuer, bidId, bidOwner) | |
716 | 727 | else throw((("Unknown auction type :" + auctionType) + ", please contact the admins")) | |
717 | 728 | } | |
718 | 729 | ||
719 | 730 | ||
720 | 731 | ||
721 | 732 | @Callable(i) | |
722 | 733 | func cancelBid (artId,issuer,bidId) = { | |
723 | 734 | let auctionType = getStringByKey(keyAuctionType(issuer, artId)) | |
724 | 735 | if ((auctionType == auctionType1)) | |
725 | 736 | then cancelBidImpl(i, artId, issuer, bidId) | |
726 | 737 | else cancelBidImplTraditional(i, artId, issuer, bidId) | |
727 | 738 | } | |
728 | 739 | ||
729 | 740 |
github/deemru/w8io/026f985 97.34 ms ◑