tx · 2u5sHiaMmydfZDL3tV6RstoJv4f1ZcBhRtbv8qyCanCD 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p: -0.01700000 Waves 2023.10.10 12:20 [2792339] smart account 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p > SELF 0.00000000 Waves
{ "type": 13, "id": "2u5sHiaMmydfZDL3tV6RstoJv4f1ZcBhRtbv8qyCanCD", "fee": 1700000, "feeAssetId": null, "timestamp": 1696929672542, "version": 2, "chainId": 84, "sender": "3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p", "senderPublicKey": "Hh3eFP2XFetZSfTxQiM1Ps96f68zi8Zh5ghhCZdjgdFs", "proofs": [ "2gEEgunXUHBSH5evAwMCdjsKqiQUoYvvYAnvDZQmfEYiMLbnGtpWT7wdjS6gq3H76GLrFYkrWt9rvTDqiXnHZe6H" ], "script": "base64:BgI5CAISBAoCCAgSBAoCBAgSBAoCAQgSBQoDCAEIEgMKAQgSAwoBCBIDCgEIEgUKAwgICBIGCgQICAgIRwAHVkVSU0lPTgIFMi4wLjABCWdldFN0ckJ5SwEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAAh1bml0VGVzdAcACW9yYWNsZUZlZQkBBXZhbHVlAQkApggBCQEJZ2V0U3RyQnlLAQIPY29uZl9vcmFjbGVfZmVlAAhzaWduRGFwcAkBBXZhbHVlAQkApggBCQEJZ2V0U3RyQnlLAQIRY29uZl9zaWdud2ViX2RhcHAAC2ZlZVJlY2VpdmVyCQEJZ2V0U3RyQnlLAQIRY29uZl9mZWVfcmVjZWl2ZXIADGFydHdvcmtzRGFwcAkBBXZhbHVlAQkApggBCQEJZ2V0U3RyQnlLAQISY29uZl9hcnR3b3Jrc19kYXBwAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmC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dtGsPWcu5Ai Next: 9bxRgqbELnnbmS5r9QgNxikCPBdzV8mwJDKqP55sPT83 Diff:
Old | New | Differences | |
---|---|---|---|
221 | 221 | ||
222 | 222 | func checkNFTInfo (assetId) = { | |
223 | 223 | let nftData = split(getArtStrByK(keyNFTData(assetId)), "_") | |
224 | - | let artSignID = | |
224 | + | let artSignID = getStrByK(((("art_name_" + nftData[5]) + "_") + nftData[6])) | |
225 | 225 | if (if (!(checkArtStatus(nftData[6], nftData[5]))) | |
226 | 226 | then !(checkArtistStatus(nftData[6])) | |
227 | 227 | else false) | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func provideBaseData (i,nftId) = { | |
306 | - | let $ | |
307 | - | let id = $ | |
308 | - | let caller = $ | |
309 | - | let date = $ | |
310 | - | let $ | |
311 | - | let isValidNFT = $ | |
312 | - | let artId = $ | |
313 | - | let creatorAddr = $ | |
314 | - | let artSignID = $ | |
306 | + | let $t01213212172 = idCallerDate(i) | |
307 | + | let id = $t01213212172._1 | |
308 | + | let caller = $t01213212172._2 | |
309 | + | let date = $t01213212172._3 | |
310 | + | let $t01217512244 = checkNFTInfo(nftId) | |
311 | + | let isValidNFT = $t01217512244._1 | |
312 | + | let artId = $t01217512244._2 | |
313 | + | let creatorAddr = $t01217512244._3 | |
314 | + | let artSignID = $t01217512244._4 | |
315 | 315 | $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID) | |
316 | 316 | } | |
317 | 317 | ||
347 | 347 | ||
348 | 348 | @Callable(i) | |
349 | 349 | func sellNFT (price,asset) = { | |
350 | - | let $ | |
351 | - | let payment = $ | |
352 | - | let amount = $ | |
350 | + | let $t01330913345 = isPayment(i) | |
351 | + | let payment = $t01330913345._1 | |
352 | + | let amount = $t01330913345._2 | |
353 | 353 | if ((amount != 1)) | |
354 | 354 | then throw("No NFT attached") | |
355 | 355 | else { | |
358 | 358 | else false) | |
359 | 359 | then toBase58String(value(payment.assetId)) | |
360 | 360 | else throw("Only SIGN Art NFT accepted.") | |
361 | - | let $ | |
362 | - | let id = $ | |
363 | - | let caller = $ | |
364 | - | let date = $ | |
365 | - | let isValidNFT = $ | |
366 | - | let artId = $ | |
367 | - | let creatorAddr = $ | |
368 | - | let artSignID = $ | |
361 | + | let $t01357913672 = provideBaseData(i, nftId) | |
362 | + | let id = $t01357913672._1 | |
363 | + | let caller = $t01357913672._2 | |
364 | + | let date = $t01357913672._3 | |
365 | + | let isValidNFT = $t01357913672._4 | |
366 | + | let artId = $t01357913672._5 | |
367 | + | let creatorAddr = $t01357913672._6 | |
368 | + | let artSignID = $t01357913672._7 | |
369 | 369 | if ((size(artSignID) == 0)) | |
370 | 370 | then throw("Artwork not found on SIGN Art") | |
371 | 371 | else if (!(isValidNFT)) | |
382 | 382 | ||
383 | 383 | @Callable(i) | |
384 | 384 | func updateSalePrice (nftId,price,asset) = { | |
385 | - | let $ | |
386 | - | let id = $ | |
387 | - | let caller = $ | |
388 | - | let date = $ | |
389 | - | let isValidNFT = $ | |
390 | - | let artId = $ | |
391 | - | let creatorAddr = $ | |
392 | - | let artSignID = $ | |
385 | + | let $t01454914642 = provideBaseData(i, nftId) | |
386 | + | let id = $t01454914642._1 | |
387 | + | let caller = $t01454914642._2 | |
388 | + | let date = $t01454914642._3 | |
389 | + | let isValidNFT = $t01454914642._4 | |
390 | + | let artId = $t01454914642._5 | |
391 | + | let creatorAddr = $t01454914642._6 | |
392 | + | let artSignID = $t01454914642._7 | |
393 | 393 | if ((size(artSignID) == 0)) | |
394 | 394 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
395 | 395 | else if (!(isValidNFT)) | |
419 | 419 | ||
420 | 420 | @Callable(i) | |
421 | 421 | func cancelSale (nftId) = { | |
422 | - | let $ | |
423 | - | let id = $ | |
424 | - | let caller = $ | |
425 | - | let date = $ | |
426 | - | let isValidNFT = $ | |
427 | - | let artId = $ | |
428 | - | let creatorAddr = $ | |
429 | - | let artSignID = $ | |
422 | + | let $t01578316024 = provideBaseData(i, nftId) | |
423 | + | let id = $t01578316024._1 | |
424 | + | let caller = $t01578316024._2 | |
425 | + | let date = $t01578316024._3 | |
426 | + | let isValidNFT = $t01578316024._4 | |
427 | + | let artId = $t01578316024._5 | |
428 | + | let creatorAddr = $t01578316024._6 | |
429 | + | let artSignID = $t01578316024._7 | |
430 | 430 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
431 | 431 | if ((saleOwner != caller)) | |
432 | 432 | then throw("You don't own this NFT") | |
446 | 446 | ||
447 | 447 | @Callable(i) | |
448 | 448 | func buyNFT (nftId) = { | |
449 | - | let $ | |
450 | - | let id = $ | |
451 | - | let caller = $ | |
452 | - | let date = $ | |
453 | - | let isValidNFT = $ | |
454 | - | let artId = $ | |
455 | - | let creatorAddr = $ | |
456 | - | let artSignID = $ | |
449 | + | let $t01685516948 = provideBaseData(i, nftId) | |
450 | + | let id = $t01685516948._1 | |
451 | + | let caller = $t01685516948._2 | |
452 | + | let date = $t01685516948._3 | |
453 | + | let isValidNFT = $t01685516948._4 | |
454 | + | let artId = $t01685516948._5 | |
455 | + | let creatorAddr = $t01685516948._6 | |
456 | + | let artSignID = $t01685516948._7 | |
457 | 457 | if ((size(artSignID) == 0)) | |
458 | 458 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
459 | 459 | else if (!(isValidNFT)) | |
469 | 469 | if ((parseInt(saleInfoArray[1]) == 0)) | |
470 | 470 | then throw("Offer only") | |
471 | 471 | else { | |
472 | - | let $ | |
473 | - | let payment = $ | |
474 | - | let amount = $ | |
472 | + | let $t01744517481 = isPayment(i) | |
473 | + | let payment = $t01744517481._1 | |
474 | + | let amount = $t01744517481._2 | |
475 | 475 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
476 | 476 | then toBase58String(value(payment.assetId)) | |
477 | 477 | else "" | |
480 | 480 | else (saleInfoArray[2] != paymentAssetStr)) | |
481 | 481 | then throw("Payment infos don't match.") | |
482 | 482 | else { | |
483 | - | let $ | |
484 | - | let commissions = $ | |
485 | - | let creatorFee = $ | |
486 | - | let ownerFee = $ | |
487 | - | let collectorNFT = $ | |
483 | + | let $t01799418133 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller, artId) | |
484 | + | let commissions = $t01799418133._1 | |
485 | + | let creatorFee = $t01799418133._2 | |
486 | + | let ownerFee = $t01799418133._3 | |
487 | + | let collectorNFT = $t01799418133._4 | |
488 | 488 | (([DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((saleInfo + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), updateNumSales(), ownerFee, collectorNFT] ++ creatorFee) ++ commissions) | |
489 | 489 | } | |
490 | 490 | } | |
496 | 496 | ||
497 | 497 | @Callable(i) | |
498 | 498 | func setOffer (nftId) = { | |
499 | - | let $ | |
500 | - | let id = $ | |
501 | - | let offerOwner = $ | |
502 | - | let date = $ | |
503 | - | let isValidNFT = $ | |
504 | - | let artId = $ | |
505 | - | let creatorAddr = $ | |
506 | - | let artSignID = $ | |
499 | + | let $t01854418641 = provideBaseData(i, nftId) | |
500 | + | let id = $t01854418641._1 | |
501 | + | let offerOwner = $t01854418641._2 | |
502 | + | let date = $t01854418641._3 | |
503 | + | let isValidNFT = $t01854418641._4 | |
504 | + | let artId = $t01854418641._5 | |
505 | + | let creatorAddr = $t01854418641._6 | |
506 | + | let artSignID = $t01854418641._7 | |
507 | 507 | if (!(isValidNFT)) | |
508 | 508 | then throw("Not a valid nft") | |
509 | 509 | else { | |
510 | - | let $ | |
511 | - | let payment = $ | |
512 | - | let amount = $ | |
510 | + | let $t01870218738 = isPayment(i) | |
511 | + | let payment = $t01870218738._1 | |
512 | + | let amount = $t01870218738._2 | |
513 | 513 | let assetId = if (!(isDefined(payment.assetId))) | |
514 | 514 | then "WAVES" | |
515 | 515 | else toBase58String(value(payment.assetId)) | |
530 | 530 | ||
531 | 531 | @Callable(i) | |
532 | 532 | func acceptOffer (nftId,offerId,offerOwner) = { | |
533 | - | let $ | |
534 | - | let id = $ | |
535 | - | let caller = $ | |
536 | - | let date = $ | |
537 | - | let isValidNFT = $ | |
538 | - | let artId = $ | |
539 | - | let creatorAddr = $ | |
540 | - | let artSignID = $ | |
533 | + | let $t01953119624 = provideBaseData(i, nftId) | |
534 | + | let id = $t01953119624._1 | |
535 | + | let caller = $t01953119624._2 | |
536 | + | let date = $t01953119624._3 | |
537 | + | let isValidNFT = $t01953119624._4 | |
538 | + | let artId = $t01953119624._5 | |
539 | + | let creatorAddr = $t01953119624._6 | |
540 | + | let artSignID = $t01953119624._7 | |
541 | 541 | if (!(isValidNFT)) | |
542 | 542 | then throw("Not a valid nft") | |
543 | 543 | else { | |
546 | 546 | then throw("Only sale owner can accept offer") | |
547 | 547 | else { | |
548 | 548 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
549 | - | let $ | |
550 | - | let bidDataArr = $ | |
551 | - | let assetId = $ | |
552 | - | let bidData = $ | |
549 | + | let $t01987819933 = getBidData(bidKey) | |
550 | + | let bidDataArr = $t01987819933._1 | |
551 | + | let assetId = $t01987819933._2 | |
552 | + | let bidData = $t01987819933._3 | |
553 | 553 | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
554 | 554 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
555 | 555 | if ((size(saleInfo) == 0)) | |
556 | 556 | then throw("Sale Not found!") | |
557 | 557 | else { | |
558 | 558 | let amount = value(parseInt(bidDataArr[1])) | |
559 | - | let $ | |
560 | - | let commissions = $ | |
561 | - | let creatorFee = $ | |
562 | - | let ownerFee = $ | |
563 | - | let collectorNFT = $ | |
559 | + | let $t02016920307 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6], artId) | |
560 | + | let commissions = $t02016920307._1 | |
561 | + | let creatorFee = $t02016920307._2 | |
562 | + | let ownerFee = $t02016920307._3 | |
563 | + | let collectorNFT = $t02016920307._4 | |
564 | 564 | let assetIdStr = if (isDefined(assetId)) | |
565 | 565 | then toBase58String(value(assetId)) | |
566 | 566 | else "WAVES" | |
574 | 574 | ||
575 | 575 | @Callable(i) | |
576 | 576 | func cancelOffer (nftId,offerId,offerOwner,saleOwner) = { | |
577 | - | let $ | |
578 | - | let id = $ | |
579 | - | let caller = $ | |
580 | - | let date = $ | |
577 | + | let $t02110721181 = idCallerDate(i) | |
578 | + | let id = $t02110721181._1 | |
579 | + | let caller = $t02110721181._2 | |
580 | + | let date = $t02110721181._3 | |
581 | 581 | if (if ((caller != offerOwner)) | |
582 | 582 | then (caller != saleOwner) | |
583 | 583 | else false) | |
584 | 584 | then throw("You cannot cancel this offer.") | |
585 | 585 | else { | |
586 | 586 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
587 | - | let $ | |
588 | - | let bidDataArr = $ | |
589 | - | let assetId = $ | |
590 | - | let bidData = $ | |
587 | + | let $t02135321408 = getBidData(bidKey) | |
588 | + | let bidDataArr = $t02135321408._1 | |
589 | + | let assetId = $t02135321408._2 | |
590 | + | let bidData = $t02135321408._3 | |
591 | 591 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
592 | 592 | } | |
593 | 593 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let VERSION = "2.0.0" | |
5 | 5 | ||
6 | 6 | func getStrByK (key) = valueOrElse(getString(this, key), "") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | let unitTest = false | |
10 | 10 | ||
11 | 11 | let oracleFee = value(addressFromString(getStrByK("conf_oracle_fee"))) | |
12 | 12 | ||
13 | 13 | let signDapp = value(addressFromString(getStrByK("conf_signweb_dapp"))) | |
14 | 14 | ||
15 | 15 | let feeReceiver = getStrByK("conf_fee_receiver") | |
16 | 16 | ||
17 | 17 | let artworksDapp = value(addressFromString(getStrByK("conf_artworks_dapp"))) | |
18 | 18 | ||
19 | 19 | let userDapp = if (unitTest) | |
20 | 20 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
21 | 21 | else value(addressFromString(getStrByK("conf_users_dapp"))) | |
22 | 22 | ||
23 | 23 | let whitelistDapp = value(addressFromString(getStrByK("conf_whitelist_dapp"))) | |
24 | 24 | ||
25 | 25 | let puzzle_art_pool = getStrByK("conf_puzzle_art_pool") | |
26 | 26 | ||
27 | 27 | let usdtPPAssetId_str = getStrByK("conf_accepted_asset_USDT_PP") | |
28 | 28 | ||
29 | 29 | let artAssetId_str = getStrByK("conf_accepted_asset_ART") | |
30 | 30 | ||
31 | 31 | let usdcPPAssetId_str = getStrByK("conf_accepted_asset_USDC_PP") | |
32 | 32 | ||
33 | 33 | let eastAssetId_str = getStrByK("conf_accepted_asset_EAST") | |
34 | 34 | ||
35 | 35 | let puzzleAssetId_str = getStrByK("conf_accepted_asset_PUZZLE") | |
36 | 36 | ||
37 | 37 | let ethPPAssetId_str = getStrByK("conf_accepted_asset_ETH_PP") | |
38 | 38 | ||
39 | 39 | let wavesAssetId_str = "WAVES" | |
40 | 40 | ||
41 | 41 | let usdtPPAssetId = fromBase58String(usdtPPAssetId_str) | |
42 | 42 | ||
43 | 43 | let artAssetId = fromBase58String(artAssetId_str) | |
44 | 44 | ||
45 | 45 | let usdcPPAssetId = fromBase58String(usdcPPAssetId_str) | |
46 | 46 | ||
47 | 47 | let eastAssetId = fromBase58String(eastAssetId_str) | |
48 | 48 | ||
49 | 49 | let puzzleAssetId = fromBase58String(puzzleAssetId_str) | |
50 | 50 | ||
51 | 51 | let ethPPAssetId = fromBase58String(ethPPAssetId_str) | |
52 | 52 | ||
53 | 53 | let wavesAssetId = base58'' | |
54 | 54 | ||
55 | 55 | let all_accepted_assets = [usdtPPAssetId_str, artAssetId_str, usdcPPAssetId_str, eastAssetId_str, puzzleAssetId_str, wavesAssetId_str, ethPPAssetId_str] | |
56 | 56 | ||
57 | 57 | let chris = getStrByK("conf_admin_1") | |
58 | 58 | ||
59 | 59 | let commission_fee = 3 | |
60 | 60 | ||
61 | 61 | let userSuspended = "SUSPENDED" | |
62 | 62 | ||
63 | 63 | let userRemoved = "REMOVED" | |
64 | 64 | ||
65 | 65 | let artIllegal = "ILLEGAL" | |
66 | 66 | ||
67 | 67 | let artSuspended = "SUSPENDED" | |
68 | 68 | ||
69 | 69 | let dappRunningKey = "conf_dapp_is_running" | |
70 | 70 | ||
71 | 71 | let maintenanceMSGKey = "conf_maintenance_msg" | |
72 | 72 | ||
73 | 73 | let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true) | |
74 | 74 | ||
75 | 75 | let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "") | |
76 | 76 | ||
77 | 77 | let numSalesK = "num_sales" | |
78 | 78 | ||
79 | 79 | func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error") | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getArtworkRoyalties (key) = valueOrElse(getInteger(artworksDapp, key), 1000) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getIntByK (key) = valueOrElse(getInteger(this, key), 0) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyUserStatus (addr) = ("user_status_" + addr) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyArtworkRoyalties (caller,artId) = ((("art_royalties_" + artId) + "_") + caller) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keyNFTData (id) = ("nft_" + id) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(artAssetId))) | |
116 | 116 | ||
117 | 117 | func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keySecondaryShareAgent (artistAddr) = ("artist_agent_secondary_" + artistAddr) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyArtistPublicAgentAddr (artistAddr) = ("artist_public_agent_" + artistAddr) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keySecondarySharePublicAgent (artistAddr) = ("artist_public_agent_secondary_" + artistAddr) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func idCallerDate (i) = if (!(dappRunning)) | |
130 | 130 | then throw(maintenanceMSG) | |
131 | 131 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func isPayment (i) = if ((size(i.payments) == 0)) | |
135 | 135 | then throw("No payment attached") | |
136 | 136 | else { | |
137 | 137 | let payment = value(i.payments[0]) | |
138 | 138 | let amount = value(payment.amount) | |
139 | 139 | $Tuple2(payment, amount) | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1)) | |
144 | 144 | then (assetDetails.decimals == 0) | |
145 | 145 | else false) | |
146 | 146 | then (assetDetails.reissuable == false) | |
147 | 147 | else false) | |
148 | 148 | then (assetDetails.issuer == artworksDapp) | |
149 | 149 | else false | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func isSignArtNFT (id) = { | |
153 | 153 | let assetDetails = value(assetInfo(id)) | |
154 | 154 | assetIsValid(assetDetails) | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func acceptedAssetIds (assetId) = if (!(containsElement(all_accepted_assets, assetId))) | |
159 | 159 | then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted") | |
160 | 160 | else true | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
164 | 164 | then unit | |
165 | 165 | else fromBase58String(assetId) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func getSaleOwnerAndStatus (nftid) = { | |
169 | 169 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
170 | 170 | if ((size(saleOwner) == 0)) | |
171 | 171 | then throw("NFT not found") | |
172 | 172 | else { | |
173 | 173 | let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid)) | |
174 | 174 | if ((saleStatus != "OPEN")) | |
175 | 175 | then throw("NFT not for sale") | |
176 | 176 | else saleOwner | |
177 | 177 | } | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func getBidData (key) = { | |
182 | 182 | let bidData = getStrByK((key + "_OPEN")) | |
183 | 183 | if ((bidData == "")) | |
184 | 184 | then throw("Offer not found") | |
185 | 185 | else { | |
186 | 186 | let bidDataArr = split(bidData, "_") | |
187 | 187 | let assetId = getBidAssetId(bidDataArr[2]) | |
188 | 188 | $Tuple3(bidDataArr, assetId, bidData) | |
189 | 189 | } | |
190 | 190 | } | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func getBalance (assetId) = match assetId { | |
194 | 194 | case b: ByteVector => | |
195 | 195 | assetBalance(this, b) | |
196 | 196 | case _ => | |
197 | 197 | wavesBalance(this).available | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func artIsValid (artStatus) = if ((artStatus != artIllegal)) | |
202 | 202 | then (artStatus != artSuspended) | |
203 | 203 | else false | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func checkArtStatus (addr,id) = { | |
207 | 207 | let artStatus = getArtStrByK(keyFlag(addr, id)) | |
208 | 208 | if (artIsValid(artStatus)) | |
209 | 209 | then true | |
210 | 210 | else throw(("Original Artwork flagged as " + artStatus)) | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func checkArtistStatus (addr) = { | |
215 | 215 | let artistStatus = getUserStrByK(keyUserStatus(addr)) | |
216 | 216 | if (containsElement([userSuspended, userRemoved], artistStatus)) | |
217 | 217 | then throw(("Original Artist " + artistStatus)) | |
218 | 218 | else true | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func checkNFTInfo (assetId) = { | |
223 | 223 | let nftData = split(getArtStrByK(keyNFTData(assetId)), "_") | |
224 | - | let artSignID = | |
224 | + | let artSignID = getStrByK(((("art_name_" + nftData[5]) + "_") + nftData[6])) | |
225 | 225 | if (if (!(checkArtStatus(nftData[6], nftData[5]))) | |
226 | 226 | then !(checkArtistStatus(nftData[6])) | |
227 | 227 | else false) | |
228 | 228 | then $Tuple4(false, nftData[5], nftData[6], artSignID) | |
229 | 229 | else $Tuple4(true, nftData[5], nftData[6], artSignID) | |
230 | 230 | } | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func checkARTExist (artId,creatorAddr) = { | |
234 | 234 | let artSignID = getArtStrByK(keySignID(creatorAddr, artId)) | |
235 | 235 | if ((size(artSignID) == 0)) | |
236 | 236 | then throw("Artwork not found on SIGN Art") | |
237 | 237 | else if (if (!(checkArtStatus(creatorAddr, artId))) | |
238 | 238 | then !(checkArtistStatus(creatorAddr)) | |
239 | 239 | else false) | |
240 | 240 | then false | |
241 | 241 | else true | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller,artId) = { | |
246 | 246 | let creatorCut = getArtworkRoyalties(keyArtworkRoyalties(creatorAddr, artId)) | |
247 | 247 | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver) | |
248 | 248 | let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShareAgent(creatorAddr)), 0) | |
249 | 249 | let publicAgent = valueOrElse(getString(userDapp, keyArtistPublicAgentAddr(creatorAddr)), feeReceiver) | |
250 | 250 | let publicAgentShare = valueOrElse(getInteger(userDapp, keySecondarySharePublicAgent(creatorAddr)), 0) | |
251 | 251 | let amountForSign = fraction(amount, commission_fee, 100) | |
252 | 252 | let amountForCreator = fraction(amount, creatorCut, 10000) | |
253 | 253 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
254 | 254 | let amountForAgent = if (if ((agent != feeReceiver)) | |
255 | 255 | then (agentShare > 0) | |
256 | 256 | else false) | |
257 | 257 | then fraction(amount, agentShare, 10000) | |
258 | 258 | else 0 | |
259 | 259 | let amountForPublicAgent = if (if ((publicAgent != feeReceiver)) | |
260 | 260 | then (publicAgentShare > 0) | |
261 | 261 | else false) | |
262 | 262 | then fraction(amount, publicAgentShare, 10000) | |
263 | 263 | else 0 | |
264 | 264 | let amount_commission_for_sign_to_swap = if ((amountForAgent != 0)) | |
265 | 265 | then (amountForSign - amountForAgent) | |
266 | 266 | else amountForSign | |
267 | 267 | let amount_art_before = getBalance(artAssetId) | |
268 | 268 | if ((amount_art_before == amount_art_before)) | |
269 | 269 | then { | |
270 | 270 | let swap_fee_to_art = if ((assetId != artAssetId)) | |
271 | 271 | then invoke(Address(fromBase58String(puzzle_art_pool)), "swap", [artAssetId_str, 1], [AttachedPayment(assetId, amount_commission_for_sign_to_swap)]) | |
272 | 272 | else unit | |
273 | 273 | if ((swap_fee_to_art == swap_fee_to_art)) | |
274 | 274 | then { | |
275 | 275 | let amount_art_after = getBalance(artAssetId) | |
276 | 276 | if ((amount_art_after == amount_art_after)) | |
277 | 277 | then { | |
278 | 278 | let commissions = if ((amountForAgent != 0)) | |
279 | 279 | then [ScriptTransfer(Address(fromBase58String(feeReceiver)), if ((assetId == artAssetId)) | |
280 | 280 | then (amountForSign - amountForAgent) | |
281 | 281 | else (amount_art_after - amount_art_before), artAssetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)] | |
282 | 282 | else [ScriptTransfer(Address(fromBase58String(feeReceiver)), if ((assetId == artAssetId)) | |
283 | 283 | then amountForSign | |
284 | 284 | else (amount_art_after - amount_art_before), artAssetId)] | |
285 | 285 | let creatorFee = if ((amountForPublicAgent != 0)) | |
286 | 286 | then [ScriptTransfer(Address(fromBase58String(publicAgent)), amountForPublicAgent, assetId), ScriptTransfer(Address(fromBase58String(creatorAddr)), (amountForCreator - amountForPublicAgent), assetId)] | |
287 | 287 | else [ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)] | |
288 | 288 | let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId) | |
289 | 289 | let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid)) | |
290 | 290 | $Tuple4(commissions, creatorFee, ownerFee, collectorNFT) | |
291 | 291 | } | |
292 | 292 | else throw("Strict value is not equal to itself.") | |
293 | 293 | } | |
294 | 294 | else throw("Strict value is not equal to itself.") | |
295 | 295 | } | |
296 | 296 | else throw("Strict value is not equal to itself.") | |
297 | 297 | } | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | func validateMinSell (price) = if ((0 >= price)) | |
301 | 301 | then throw("Wrong minimum sell price") | |
302 | 302 | else true | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func provideBaseData (i,nftId) = { | |
306 | - | let $ | |
307 | - | let id = $ | |
308 | - | let caller = $ | |
309 | - | let date = $ | |
310 | - | let $ | |
311 | - | let isValidNFT = $ | |
312 | - | let artId = $ | |
313 | - | let creatorAddr = $ | |
314 | - | let artSignID = $ | |
306 | + | let $t01213212172 = idCallerDate(i) | |
307 | + | let id = $t01213212172._1 | |
308 | + | let caller = $t01213212172._2 | |
309 | + | let date = $t01213212172._3 | |
310 | + | let $t01217512244 = checkNFTInfo(nftId) | |
311 | + | let isValidNFT = $t01217512244._1 | |
312 | + | let artId = $t01217512244._2 | |
313 | + | let creatorAddr = $t01217512244._3 | |
314 | + | let artSignID = $t01217512244._4 | |
315 | 315 | $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID) | |
316 | 316 | } | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | func updateNumSales () = { | |
320 | 320 | let numSales = getIntByK(numSalesK) | |
321 | 321 | IntegerEntry(numSalesK, (numSales + 1)) | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | @Callable(invoke) | |
326 | 326 | func setConf (key,val) = { | |
327 | 327 | let caller = toString(invoke.caller) | |
328 | 328 | if (containsElement([chris, toString(this)], caller)) | |
329 | 329 | then if (contains(key, "conf_")) | |
330 | 330 | then [StringEntry(key, val)] | |
331 | 331 | else throw("Entries starting with conf_ only") | |
332 | 332 | else throw("You are not allowed to change this") | |
333 | 333 | } | |
334 | 334 | ||
335 | 335 | ||
336 | 336 | ||
337 | 337 | @Callable(invoke) | |
338 | 338 | func appRunning (isLive,message) = { | |
339 | 339 | let caller = toString(invoke.caller) | |
340 | 340 | let id = toBase58String(invoke.transactionId) | |
341 | 341 | if (containsElement([chris, toString(this)], caller)) | |
342 | 342 | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
343 | 343 | else throw("You are not allowed to change this") | |
344 | 344 | } | |
345 | 345 | ||
346 | 346 | ||
347 | 347 | ||
348 | 348 | @Callable(i) | |
349 | 349 | func sellNFT (price,asset) = { | |
350 | - | let $ | |
351 | - | let payment = $ | |
352 | - | let amount = $ | |
350 | + | let $t01330913345 = isPayment(i) | |
351 | + | let payment = $t01330913345._1 | |
352 | + | let amount = $t01330913345._2 | |
353 | 353 | if ((amount != 1)) | |
354 | 354 | then throw("No NFT attached") | |
355 | 355 | else { | |
356 | 356 | let nftId = if (if (isDefined(payment.assetId)) | |
357 | 357 | then isSignArtNFT(value(payment.assetId)) | |
358 | 358 | else false) | |
359 | 359 | then toBase58String(value(payment.assetId)) | |
360 | 360 | else throw("Only SIGN Art NFT accepted.") | |
361 | - | let $ | |
362 | - | let id = $ | |
363 | - | let caller = $ | |
364 | - | let date = $ | |
365 | - | let isValidNFT = $ | |
366 | - | let artId = $ | |
367 | - | let creatorAddr = $ | |
368 | - | let artSignID = $ | |
361 | + | let $t01357913672 = provideBaseData(i, nftId) | |
362 | + | let id = $t01357913672._1 | |
363 | + | let caller = $t01357913672._2 | |
364 | + | let date = $t01357913672._3 | |
365 | + | let isValidNFT = $t01357913672._4 | |
366 | + | let artId = $t01357913672._5 | |
367 | + | let creatorAddr = $t01357913672._6 | |
368 | + | let artSignID = $t01357913672._7 | |
369 | 369 | if ((size(artSignID) == 0)) | |
370 | 370 | then throw("Artwork not found on SIGN Art") | |
371 | 371 | else if (!(isValidNFT)) | |
372 | 372 | then throw("Not a valid nft") | |
373 | 373 | else if (!(acceptedAssetIds(asset))) | |
374 | 374 | then throw("Only SIGN, USDN, USDT or WAVES accepted") | |
375 | 375 | else if (!(validateMinSell(price))) | |
376 | 376 | then throw("Wrong minimum sell price") | |
377 | 377 | else [StringEntry((getSaleKey(caller, nftId, artId, creatorAddr) + "_OPEN"), ((((((((((((toString(date) + "_") + toString(price)) + "_") + asset) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + id)), StringEntry(((("sale2nd_status_" + caller) + "_") + nftId), "OPEN"), StringEntry(("current_owner_on_dapp_" + nftId), caller)] | |
378 | 378 | } | |
379 | 379 | } | |
380 | 380 | ||
381 | 381 | ||
382 | 382 | ||
383 | 383 | @Callable(i) | |
384 | 384 | func updateSalePrice (nftId,price,asset) = { | |
385 | - | let $ | |
386 | - | let id = $ | |
387 | - | let caller = $ | |
388 | - | let date = $ | |
389 | - | let isValidNFT = $ | |
390 | - | let artId = $ | |
391 | - | let creatorAddr = $ | |
392 | - | let artSignID = $ | |
385 | + | let $t01454914642 = provideBaseData(i, nftId) | |
386 | + | let id = $t01454914642._1 | |
387 | + | let caller = $t01454914642._2 | |
388 | + | let date = $t01454914642._3 | |
389 | + | let isValidNFT = $t01454914642._4 | |
390 | + | let artId = $t01454914642._5 | |
391 | + | let creatorAddr = $t01454914642._6 | |
392 | + | let artSignID = $t01454914642._7 | |
393 | 393 | if ((size(artSignID) == 0)) | |
394 | 394 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
395 | 395 | else if (!(isValidNFT)) | |
396 | 396 | then throw("Not a valid nft") | |
397 | 397 | else { | |
398 | 398 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
399 | 399 | if ((saleOwner != caller)) | |
400 | 400 | then throw("You don't own this NFT") | |
401 | 401 | else { | |
402 | 402 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
403 | 403 | if ((saleStatus != "OPEN")) | |
404 | 404 | then throw("Sale not active") | |
405 | 405 | else if (!(acceptedAssetIds(asset))) | |
406 | 406 | then throw("Only SIGN, USDN, USDT or WAVES accepted") | |
407 | 407 | else if (!(validateMinSell(price))) | |
408 | 408 | then throw("Wrong minimum sell price") | |
409 | 409 | else { | |
410 | 410 | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
411 | 411 | let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_") | |
412 | 412 | [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))] | |
413 | 413 | } | |
414 | 414 | } | |
415 | 415 | } | |
416 | 416 | } | |
417 | 417 | ||
418 | 418 | ||
419 | 419 | ||
420 | 420 | @Callable(i) | |
421 | 421 | func cancelSale (nftId) = { | |
422 | - | let $ | |
423 | - | let id = $ | |
424 | - | let caller = $ | |
425 | - | let date = $ | |
426 | - | let isValidNFT = $ | |
427 | - | let artId = $ | |
428 | - | let creatorAddr = $ | |
429 | - | let artSignID = $ | |
422 | + | let $t01578316024 = provideBaseData(i, nftId) | |
423 | + | let id = $t01578316024._1 | |
424 | + | let caller = $t01578316024._2 | |
425 | + | let date = $t01578316024._3 | |
426 | + | let isValidNFT = $t01578316024._4 | |
427 | + | let artId = $t01578316024._5 | |
428 | + | let creatorAddr = $t01578316024._6 | |
429 | + | let artSignID = $t01578316024._7 | |
430 | 430 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
431 | 431 | if ((saleOwner != caller)) | |
432 | 432 | then throw("You don't own this NFT") | |
433 | 433 | else { | |
434 | 434 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
435 | 435 | if ((saleStatus != "OPEN")) | |
436 | 436 | then throw("Sale not active") | |
437 | 437 | else { | |
438 | 438 | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
439 | 439 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
440 | 440 | [DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + caller) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((((saleKey + "_") + id) + "_CANCELLED"), ((((saleInfo + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftId))] | |
441 | 441 | } | |
442 | 442 | } | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | ||
447 | 447 | @Callable(i) | |
448 | 448 | func buyNFT (nftId) = { | |
449 | - | let $ | |
450 | - | let id = $ | |
451 | - | let caller = $ | |
452 | - | let date = $ | |
453 | - | let isValidNFT = $ | |
454 | - | let artId = $ | |
455 | - | let creatorAddr = $ | |
456 | - | let artSignID = $ | |
449 | + | let $t01685516948 = provideBaseData(i, nftId) | |
450 | + | let id = $t01685516948._1 | |
451 | + | let caller = $t01685516948._2 | |
452 | + | let date = $t01685516948._3 | |
453 | + | let isValidNFT = $t01685516948._4 | |
454 | + | let artId = $t01685516948._5 | |
455 | + | let creatorAddr = $t01685516948._6 | |
456 | + | let artSignID = $t01685516948._7 | |
457 | 457 | if ((size(artSignID) == 0)) | |
458 | 458 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
459 | 459 | else if (!(isValidNFT)) | |
460 | 460 | then throw("Not a valid nft") | |
461 | 461 | else { | |
462 | 462 | let saleOwner = getSaleOwnerAndStatus(nftId) | |
463 | 463 | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
464 | 464 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
465 | 465 | if ((size(saleInfo) == 0)) | |
466 | 466 | then throw("Sale Not found!") | |
467 | 467 | else { | |
468 | 468 | let saleInfoArray = split(saleInfo, "_") | |
469 | 469 | if ((parseInt(saleInfoArray[1]) == 0)) | |
470 | 470 | then throw("Offer only") | |
471 | 471 | else { | |
472 | - | let $ | |
473 | - | let payment = $ | |
474 | - | let amount = $ | |
472 | + | let $t01744517481 = isPayment(i) | |
473 | + | let payment = $t01744517481._1 | |
474 | + | let amount = $t01744517481._2 | |
475 | 475 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
476 | 476 | then toBase58String(value(payment.assetId)) | |
477 | 477 | else "" | |
478 | 478 | if (if ((saleInfoArray[1] != toString(amount))) | |
479 | 479 | then true | |
480 | 480 | else (saleInfoArray[2] != paymentAssetStr)) | |
481 | 481 | then throw("Payment infos don't match.") | |
482 | 482 | else { | |
483 | - | let $ | |
484 | - | let commissions = $ | |
485 | - | let creatorFee = $ | |
486 | - | let ownerFee = $ | |
487 | - | let collectorNFT = $ | |
483 | + | let $t01799418133 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller, artId) | |
484 | + | let commissions = $t01799418133._1 | |
485 | + | let creatorFee = $t01799418133._2 | |
486 | + | let ownerFee = $t01799418133._3 | |
487 | + | let collectorNFT = $t01799418133._4 | |
488 | 488 | (([DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((saleInfo + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), updateNumSales(), ownerFee, collectorNFT] ++ creatorFee) ++ commissions) | |
489 | 489 | } | |
490 | 490 | } | |
491 | 491 | } | |
492 | 492 | } | |
493 | 493 | } | |
494 | 494 | ||
495 | 495 | ||
496 | 496 | ||
497 | 497 | @Callable(i) | |
498 | 498 | func setOffer (nftId) = { | |
499 | - | let $ | |
500 | - | let id = $ | |
501 | - | let offerOwner = $ | |
502 | - | let date = $ | |
503 | - | let isValidNFT = $ | |
504 | - | let artId = $ | |
505 | - | let creatorAddr = $ | |
506 | - | let artSignID = $ | |
499 | + | let $t01854418641 = provideBaseData(i, nftId) | |
500 | + | let id = $t01854418641._1 | |
501 | + | let offerOwner = $t01854418641._2 | |
502 | + | let date = $t01854418641._3 | |
503 | + | let isValidNFT = $t01854418641._4 | |
504 | + | let artId = $t01854418641._5 | |
505 | + | let creatorAddr = $t01854418641._6 | |
506 | + | let artSignID = $t01854418641._7 | |
507 | 507 | if (!(isValidNFT)) | |
508 | 508 | then throw("Not a valid nft") | |
509 | 509 | else { | |
510 | - | let $ | |
511 | - | let payment = $ | |
512 | - | let amount = $ | |
510 | + | let $t01870218738 = isPayment(i) | |
511 | + | let payment = $t01870218738._1 | |
512 | + | let amount = $t01870218738._2 | |
513 | 513 | let assetId = if (!(isDefined(payment.assetId))) | |
514 | 514 | then "WAVES" | |
515 | 515 | else toBase58String(value(payment.assetId)) | |
516 | 516 | if (!(acceptedAssetIds(assetId))) | |
517 | 517 | then throw("asset not accepted") | |
518 | 518 | else if ((amount == 0)) | |
519 | 519 | then throw("Offer of 0 not allowed") | |
520 | 520 | else if (!(validateMinSell(amount))) | |
521 | 521 | then throw("Wrong minimum sell price") | |
522 | 522 | else { | |
523 | 523 | let saleOwner = getSaleOwnerAndStatus(nftId) | |
524 | 524 | [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
525 | 525 | } | |
526 | 526 | } | |
527 | 527 | } | |
528 | 528 | ||
529 | 529 | ||
530 | 530 | ||
531 | 531 | @Callable(i) | |
532 | 532 | func acceptOffer (nftId,offerId,offerOwner) = { | |
533 | - | let $ | |
534 | - | let id = $ | |
535 | - | let caller = $ | |
536 | - | let date = $ | |
537 | - | let isValidNFT = $ | |
538 | - | let artId = $ | |
539 | - | let creatorAddr = $ | |
540 | - | let artSignID = $ | |
533 | + | let $t01953119624 = provideBaseData(i, nftId) | |
534 | + | let id = $t01953119624._1 | |
535 | + | let caller = $t01953119624._2 | |
536 | + | let date = $t01953119624._3 | |
537 | + | let isValidNFT = $t01953119624._4 | |
538 | + | let artId = $t01953119624._5 | |
539 | + | let creatorAddr = $t01953119624._6 | |
540 | + | let artSignID = $t01953119624._7 | |
541 | 541 | if (!(isValidNFT)) | |
542 | 542 | then throw("Not a valid nft") | |
543 | 543 | else { | |
544 | 544 | let saleOwner = getSaleOwnerAndStatus(nftId) | |
545 | 545 | if ((caller != saleOwner)) | |
546 | 546 | then throw("Only sale owner can accept offer") | |
547 | 547 | else { | |
548 | 548 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
549 | - | let $ | |
550 | - | let bidDataArr = $ | |
551 | - | let assetId = $ | |
552 | - | let bidData = $ | |
549 | + | let $t01987819933 = getBidData(bidKey) | |
550 | + | let bidDataArr = $t01987819933._1 | |
551 | + | let assetId = $t01987819933._2 | |
552 | + | let bidData = $t01987819933._3 | |
553 | 553 | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
554 | 554 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
555 | 555 | if ((size(saleInfo) == 0)) | |
556 | 556 | then throw("Sale Not found!") | |
557 | 557 | else { | |
558 | 558 | let amount = value(parseInt(bidDataArr[1])) | |
559 | - | let $ | |
560 | - | let commissions = $ | |
561 | - | let creatorFee = $ | |
562 | - | let ownerFee = $ | |
563 | - | let collectorNFT = $ | |
559 | + | let $t02016920307 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6], artId) | |
560 | + | let commissions = $t02016920307._1 | |
561 | + | let creatorFee = $t02016920307._2 | |
562 | + | let ownerFee = $t02016920307._3 | |
563 | + | let collectorNFT = $t02016920307._4 | |
564 | 564 | let assetIdStr = if (isDefined(assetId)) | |
565 | 565 | then toBase58String(value(assetId)) | |
566 | 566 | else "WAVES" | |
567 | 567 | (([DeleteEntry((saleKey + "_OPEN")), DeleteEntry((bidKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((bidKey + "_CLOSED"), ((((bidData + "_CLOSED_") + toString(date)) + "_") + id)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((((((saleInfo + "_CLOSED-OFFER_") + toString(date)) + "_") + id) + "_") + offerOwner) + "_") + toString(amount)) + "_") + assetIdStr)), updateNumSales(), ownerFee, collectorNFT] ++ creatorFee) ++ commissions) | |
568 | 568 | } | |
569 | 569 | } | |
570 | 570 | } | |
571 | 571 | } | |
572 | 572 | ||
573 | 573 | ||
574 | 574 | ||
575 | 575 | @Callable(i) | |
576 | 576 | func cancelOffer (nftId,offerId,offerOwner,saleOwner) = { | |
577 | - | let $ | |
578 | - | let id = $ | |
579 | - | let caller = $ | |
580 | - | let date = $ | |
577 | + | let $t02110721181 = idCallerDate(i) | |
578 | + | let id = $t02110721181._1 | |
579 | + | let caller = $t02110721181._2 | |
580 | + | let date = $t02110721181._3 | |
581 | 581 | if (if ((caller != offerOwner)) | |
582 | 582 | then (caller != saleOwner) | |
583 | 583 | else false) | |
584 | 584 | then throw("You cannot cancel this offer.") | |
585 | 585 | else { | |
586 | 586 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
587 | - | let $ | |
588 | - | let bidDataArr = $ | |
589 | - | let assetId = $ | |
590 | - | let bidData = $ | |
587 | + | let $t02135321408 = getBidData(bidKey) | |
588 | + | let bidDataArr = $t02135321408._1 | |
589 | + | let assetId = $t02135321408._2 | |
590 | + | let bidData = $t02135321408._3 | |
591 | 591 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
592 | 592 | } | |
593 | 593 | } | |
594 | 594 | ||
595 | 595 |
github/deemru/w8io/169f3d6 128.60 ms ◑