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