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