tx · DEwcfARDv4Hf1VUrRLBPgiSnCY9PT51ZMsHkWzKGGWbT 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p: -0.01500000 Waves 2022.11.29 06:41 [2337867] smart account 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p > SELF 0.00000000 Waves
{ "type": 13, "id": "DEwcfARDv4Hf1VUrRLBPgiSnCY9PT51ZMsHkWzKGGWbT", "fee": 1500000, "feeAssetId": null, "timestamp": 1669693307675, "version": 2, "chainId": 84, "sender": "3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p", "senderPublicKey": "Hh3eFP2XFetZSfTxQiM1Ps96f68zi8Zh5ghhCZdjgdFs", "proofs": [ "ideYuxTV1M6yzH7k4DaMTc5rfawbkhT5gYfnzQTC5nn8dDVUGwspPMUYYrTUMAJGKZcNpq4btEyJsNHmdtDQXPM" ], "script": "base64:BgI5CAISBAoCCAgSBAoCBAgSBAoCAQgSBQoDCAEIEgMKAQgSAwoBCBIDCgEIEgUKAwgICBIGCgQICAgINAEJZ2V0U3RyQnlLAQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVuaXRUZXN0BwAJb3JhY2xlRmVlCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX29yYWNsZV9mZWUAC2ZlZVJlY2VpdmVyCQEJZ2V0U3RyQnlLAQIRY29uZl9mZWVfcmVjZWl2ZXIADGFydHdvcmtzRGFwcAkBBXZhbHVlAQkApggBCQEJZ2V0U3RyQnlLAQISY29uZl9hcnR3b3Jrc19kYXBwAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX3VzZXJzX2RhcHAAC3NpZ25Bc3NldElkCQDZBAEJAQlnZXRTdHJCeUsBAhh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 2337867, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EnUCkh4DYVqfZuJs9GpfrRvASJscXVedWWoftG5b3AfE Next: 6oG5vYcVV3wCsopCphmbZsjDT9qjoQSkwXhgSwPk4EvM Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error") | |
50 | 50 | ||
51 | 51 | ||
52 | - | func getUserRoyalties (key) = valueOrElse(getInteger(userDapp, key), | |
52 | + | func getUserRoyalties (key) = valueOrElse(getInteger(userDapp, key), 100) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "") | |
199 | 199 | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver) | |
200 | 200 | let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0) | |
201 | 201 | let amountForSign = fraction(amount, signCut, 100) | |
202 | - | let amountForCreator = fraction(amount, creatorCut, | |
202 | + | let amountForCreator = fraction(amount, creatorCut, 1000) | |
203 | 203 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
204 | 204 | let amountForAgent = if (if ((agent != feeReceiver)) | |
205 | 205 | then (agentShare > 0) | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func provideBaseData (i,nftId) = { | |
258 | - | let $ | |
259 | - | let id = $ | |
260 | - | let caller = $ | |
261 | - | let date = $ | |
262 | - | let $ | |
263 | - | let isValidNFT = $ | |
264 | - | let artId = $ | |
265 | - | let creatorAddr = $ | |
266 | - | let artSignID = $ | |
258 | + | let $t095949634 = idCallerDate(i) | |
259 | + | let id = $t095949634._1 | |
260 | + | let caller = $t095949634._2 | |
261 | + | let date = $t095949634._3 | |
262 | + | let $t096389707 = checkNFTInfo(nftId) | |
263 | + | let isValidNFT = $t096389707._1 | |
264 | + | let artId = $t096389707._2 | |
265 | + | let creatorAddr = $t096389707._3 | |
266 | + | let artSignID = $t096389707._4 | |
267 | 267 | $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID) | |
268 | 268 | } | |
269 | 269 | ||
299 | 299 | ||
300 | 300 | @Callable(i) | |
301 | 301 | func sellNFT (price,asset) = { | |
302 | - | let $ | |
303 | - | let payment = $ | |
304 | - | let amount = $ | |
302 | + | let $t01081210848 = isPayment(i) | |
303 | + | let payment = $t01081210848._1 | |
304 | + | let amount = $t01081210848._2 | |
305 | 305 | if ((amount != 1)) | |
306 | 306 | then throw("No NFT attached") | |
307 | 307 | else { | |
310 | 310 | else false) | |
311 | 311 | then toBase58String(value(payment.assetId)) | |
312 | 312 | else throw("Only SIGN Art NFT accepted.") | |
313 | - | let $ | |
314 | - | let id = $ | |
315 | - | let caller = $ | |
316 | - | let date = $ | |
317 | - | let isValidNFT = $ | |
318 | - | let artId = $ | |
319 | - | let creatorAddr = $ | |
320 | - | let artSignID = $ | |
313 | + | let $t01108611179 = provideBaseData(i, nftId) | |
314 | + | let id = $t01108611179._1 | |
315 | + | let caller = $t01108611179._2 | |
316 | + | let date = $t01108611179._3 | |
317 | + | let isValidNFT = $t01108611179._4 | |
318 | + | let artId = $t01108611179._5 | |
319 | + | let creatorAddr = $t01108611179._6 | |
320 | + | let artSignID = $t01108611179._7 | |
321 | 321 | if ((size(artSignID) == 0)) | |
322 | 322 | then throw("Artwork not found on SIGN Art") | |
323 | 323 | else if (!(isValidNFT)) | |
334 | 334 | ||
335 | 335 | @Callable(i) | |
336 | 336 | func updateSalePrice (nftId,price,asset) = { | |
337 | - | let $ | |
338 | - | let id = $ | |
339 | - | let caller = $ | |
340 | - | let date = $ | |
341 | - | let isValidNFT = $ | |
342 | - | let artId = $ | |
343 | - | let creatorAddr = $ | |
344 | - | let artSignID = $ | |
337 | + | let $t01208312176 = provideBaseData(i, nftId) | |
338 | + | let id = $t01208312176._1 | |
339 | + | let caller = $t01208312176._2 | |
340 | + | let date = $t01208312176._3 | |
341 | + | let isValidNFT = $t01208312176._4 | |
342 | + | let artId = $t01208312176._5 | |
343 | + | let creatorAddr = $t01208312176._6 | |
344 | + | let artSignID = $t01208312176._7 | |
345 | 345 | if ((size(artSignID) == 0)) | |
346 | 346 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
347 | 347 | else if (!(isValidNFT)) | |
371 | 371 | ||
372 | 372 | @Callable(i) | |
373 | 373 | func cancelSale (nftId) = { | |
374 | - | let $ | |
375 | - | let id = $ | |
376 | - | let caller = $ | |
377 | - | let date = $ | |
378 | - | let isValidNFT = $ | |
379 | - | let artId = $ | |
380 | - | let creatorAddr = $ | |
381 | - | let artSignID = $ | |
374 | + | let $t01335313597 = provideBaseData(i, nftId) | |
375 | + | let id = $t01335313597._1 | |
376 | + | let caller = $t01335313597._2 | |
377 | + | let date = $t01335313597._3 | |
378 | + | let isValidNFT = $t01335313597._4 | |
379 | + | let artId = $t01335313597._5 | |
380 | + | let creatorAddr = $t01335313597._6 | |
381 | + | let artSignID = $t01335313597._7 | |
382 | 382 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
383 | 383 | if ((saleOwner != caller)) | |
384 | 384 | then throw("You don't own this NFT") | |
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func buyNFT (nftId) = { | |
401 | - | let $ | |
402 | - | let id = $ | |
403 | - | let caller = $ | |
404 | - | let date = $ | |
405 | - | let isValidNFT = $ | |
406 | - | let artId = $ | |
407 | - | let creatorAddr = $ | |
408 | - | let artSignID = $ | |
401 | + | let $t01445114544 = provideBaseData(i, nftId) | |
402 | + | let id = $t01445114544._1 | |
403 | + | let caller = $t01445114544._2 | |
404 | + | let date = $t01445114544._3 | |
405 | + | let isValidNFT = $t01445114544._4 | |
406 | + | let artId = $t01445114544._5 | |
407 | + | let creatorAddr = $t01445114544._6 | |
408 | + | let artSignID = $t01445114544._7 | |
409 | 409 | if ((size(artSignID) == 0)) | |
410 | 410 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
411 | 411 | else if (!(isValidNFT)) | |
421 | 421 | if ((parseInt(saleInfoArray[1]) == 0)) | |
422 | 422 | then throw("Offer only") | |
423 | 423 | else { | |
424 | - | let $ | |
425 | - | let payment = $ | |
426 | - | let amount = $ | |
424 | + | let $t01505315089 = isPayment(i) | |
425 | + | let payment = $t01505315089._1 | |
426 | + | let amount = $t01505315089._2 | |
427 | 427 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
428 | 428 | then toBase58String(value(payment.assetId)) | |
429 | 429 | else "" | |
432 | 432 | else (saleInfoArray[2] != paymentAssetStr)) | |
433 | 433 | then throw("Payment infos don't match.") | |
434 | 434 | else { | |
435 | - | let $ | |
436 | - | let commissions = $ | |
437 | - | let creatorFee = $ | |
438 | - | let ownerFee = $ | |
439 | - | let collectorNFT = $ | |
435 | + | let $t01560315735 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller) | |
436 | + | let commissions = $t01560315735._1 | |
437 | + | let creatorFee = $t01560315735._2 | |
438 | + | let ownerFee = $t01560315735._3 | |
439 | + | let collectorNFT = $t01560315735._4 | |
440 | 440 | ([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) | |
441 | 441 | } | |
442 | 442 | } | |
448 | 448 | ||
449 | 449 | @Callable(i) | |
450 | 450 | func setOffer (nftId) = { | |
451 | - | let $ | |
452 | - | let id = $ | |
453 | - | let offerOwner = $ | |
454 | - | let date = $ | |
455 | - | let isValidNFT = $ | |
456 | - | let artId = $ | |
457 | - | let creatorAddr = $ | |
458 | - | let artSignID = $ | |
451 | + | let $t01616316260 = provideBaseData(i, nftId) | |
452 | + | let id = $t01616316260._1 | |
453 | + | let offerOwner = $t01616316260._2 | |
454 | + | let date = $t01616316260._3 | |
455 | + | let isValidNFT = $t01616316260._4 | |
456 | + | let artId = $t01616316260._5 | |
457 | + | let creatorAddr = $t01616316260._6 | |
458 | + | let artSignID = $t01616316260._7 | |
459 | 459 | if (!(isValidNFT)) | |
460 | 460 | then throw("Not a valid nft") | |
461 | 461 | else { | |
462 | - | let $ | |
463 | - | let payment = $ | |
464 | - | let amount = $ | |
462 | + | let $t01632416360 = isPayment(i) | |
463 | + | let payment = $t01632416360._1 | |
464 | + | let amount = $t01632416360._2 | |
465 | 465 | let assetId = if (!(isDefined(payment.assetId))) | |
466 | 466 | then "WAVES" | |
467 | 467 | else toBase58String(value(payment.assetId)) | |
482 | 482 | ||
483 | 483 | @Callable(i) | |
484 | 484 | func acceptOffer (nftId,offerId,offerOwner) = { | |
485 | - | let $ | |
486 | - | let id = $ | |
487 | - | let caller = $ | |
488 | - | let date = $ | |
489 | - | let isValidNFT = $ | |
490 | - | let artId = $ | |
491 | - | let creatorAddr = $ | |
492 | - | let artSignID = $ | |
485 | + | let $t01718117274 = provideBaseData(i, nftId) | |
486 | + | let id = $t01718117274._1 | |
487 | + | let caller = $t01718117274._2 | |
488 | + | let date = $t01718117274._3 | |
489 | + | let isValidNFT = $t01718117274._4 | |
490 | + | let artId = $t01718117274._5 | |
491 | + | let creatorAddr = $t01718117274._6 | |
492 | + | let artSignID = $t01718117274._7 | |
493 | 493 | if (!(isValidNFT)) | |
494 | 494 | then throw("Not a valid nft") | |
495 | 495 | else { | |
498 | 498 | then throw("Only sale owner can accept offer") | |
499 | 499 | else { | |
500 | 500 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
501 | - | let $ | |
502 | - | let bidDataArr = $ | |
503 | - | let assetId = $ | |
504 | - | let bidData = $ | |
501 | + | let $t01753517590 = getBidData(bidKey) | |
502 | + | let bidDataArr = $t01753517590._1 | |
503 | + | let assetId = $t01753517590._2 | |
504 | + | let bidData = $t01753517590._3 | |
505 | 505 | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
506 | 506 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
507 | 507 | if ((size(saleInfo) == 0)) | |
508 | 508 | then throw("Sale Not found!") | |
509 | 509 | else { | |
510 | 510 | let amount = value(parseInt(bidDataArr[1])) | |
511 | - | let $ | |
512 | - | let commissions = $ | |
513 | - | let creatorFee = $ | |
514 | - | let ownerFee = $ | |
515 | - | let collectorNFT = $ | |
511 | + | let $t01783317964 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6]) | |
512 | + | let commissions = $t01783317964._1 | |
513 | + | let creatorFee = $t01783317964._2 | |
514 | + | let ownerFee = $t01783317964._3 | |
515 | + | let collectorNFT = $t01783317964._4 | |
516 | 516 | let assetIdStr = if (isDefined(assetId)) | |
517 | 517 | then toBase58String(value(assetId)) | |
518 | 518 | else "WAVES" | |
526 | 526 | ||
527 | 527 | @Callable(i) | |
528 | 528 | func cancelOffer (nftId,offerId,offerOwner,saleOwner) = { | |
529 | - | let $ | |
530 | - | let id = $ | |
531 | - | let caller = $ | |
532 | - | let date = $ | |
529 | + | let $t01878418859 = idCallerDate(i) | |
530 | + | let id = $t01878418859._1 | |
531 | + | let caller = $t01878418859._2 | |
532 | + | let date = $t01878418859._3 | |
533 | 533 | if (if ((caller != offerOwner)) | |
534 | 534 | then (caller != saleOwner) | |
535 | 535 | else false) | |
536 | 536 | then throw("You cannot cancel this offer.") | |
537 | 537 | else { | |
538 | 538 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
539 | - | let $ | |
540 | - | let bidDataArr = $ | |
541 | - | let assetId = $ | |
542 | - | let bidData = $ | |
539 | + | let $t01903319088 = getBidData(bidKey) | |
540 | + | let bidDataArr = $t01903319088._1 | |
541 | + | let assetId = $t01903319088._2 | |
542 | + | let bidData = $t01903319088._3 | |
543 | 543 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
544 | 544 | } | |
545 | 545 | } |
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 | - | func getUserRoyalties (key) = valueOrElse(getInteger(userDapp, key), | |
52 | + | func getUserRoyalties (key) = valueOrElse(getInteger(userDapp, key), 100) | |
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 keyUserRoyalties (addr) = ("user_royalties_" + addr) | |
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 | 197 | func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = { | |
198 | 198 | let creatorCut = getUserRoyalties(keyUserRoyalties(creatorAddr)) | |
199 | 199 | let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver) | |
200 | 200 | let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0) | |
201 | 201 | let amountForSign = fraction(amount, signCut, 100) | |
202 | - | let amountForCreator = fraction(amount, creatorCut, | |
202 | + | let amountForCreator = fraction(amount, creatorCut, 1000) | |
203 | 203 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
204 | 204 | let amountForAgent = if (if ((agent != feeReceiver)) | |
205 | 205 | then (agentShare > 0) | |
206 | 206 | else false) | |
207 | 207 | then fraction(amount, agentShare, 100) | |
208 | 208 | else 0 | |
209 | 209 | let commissions = if ((amountForAgent != 0)) | |
210 | 210 | then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)] | |
211 | 211 | else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)] | |
212 | 212 | let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId) | |
213 | 213 | let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId) | |
214 | 214 | let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid)) | |
215 | 215 | $Tuple4(commissions, creatorFee, ownerFee, collectorNFT) | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func validateMinSell (assetId,price) = { | |
220 | 220 | let minSellWaves = if (unitTest) | |
221 | 221 | then 10 | |
222 | 222 | else getIntByKFromOracle("waves_min_sell") | |
223 | 223 | let minSellUsdn = 1000000 | |
224 | 224 | let minSellSign = if (unitTest) | |
225 | 225 | then 1 | |
226 | 226 | else (currentCertificationPrice * 2) | |
227 | 227 | if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
228 | 228 | then (minSellUsdn > price) | |
229 | 229 | else false) | |
230 | 230 | then (price != 0) | |
231 | 231 | else false) | |
232 | 232 | then true | |
233 | 233 | else if (if ((assetId == toBase58String(usdtAssetId))) | |
234 | 234 | then (minSellUsdn > price) | |
235 | 235 | else false) | |
236 | 236 | then (price != 0) | |
237 | 237 | else false) | |
238 | 238 | then true | |
239 | 239 | else if (if ((assetId == toBase58String(signAssetId))) | |
240 | 240 | then (minSellSign > price) | |
241 | 241 | else false) | |
242 | 242 | then (price != 0) | |
243 | 243 | else false) | |
244 | 244 | then true | |
245 | 245 | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
246 | 246 | then true | |
247 | 247 | else (assetId == "WAVES")) | |
248 | 248 | then (minSellWaves > price) | |
249 | 249 | else false) | |
250 | 250 | then (price != 0) | |
251 | 251 | else false) | |
252 | 252 | then false | |
253 | 253 | else true | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func provideBaseData (i,nftId) = { | |
258 | - | let $ | |
259 | - | let id = $ | |
260 | - | let caller = $ | |
261 | - | let date = $ | |
262 | - | let $ | |
263 | - | let isValidNFT = $ | |
264 | - | let artId = $ | |
265 | - | let creatorAddr = $ | |
266 | - | let artSignID = $ | |
258 | + | let $t095949634 = idCallerDate(i) | |
259 | + | let id = $t095949634._1 | |
260 | + | let caller = $t095949634._2 | |
261 | + | let date = $t095949634._3 | |
262 | + | let $t096389707 = checkNFTInfo(nftId) | |
263 | + | let isValidNFT = $t096389707._1 | |
264 | + | let artId = $t096389707._2 | |
265 | + | let creatorAddr = $t096389707._3 | |
266 | + | let artSignID = $t096389707._4 | |
267 | 267 | $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID) | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func updateNumSales () = { | |
272 | 272 | let numSales = getIntByK(numSalesK) | |
273 | 273 | IntegerEntry(numSalesK, (numSales + 1)) | |
274 | 274 | } | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | @Callable(invoke) | |
278 | 278 | func setConf (key,val) = { | |
279 | 279 | let caller = toString(invoke.caller) | |
280 | 280 | if (containsElement([chris, toString(this)], caller)) | |
281 | 281 | then if (contains(key, "conf_")) | |
282 | 282 | then [StringEntry(key, val)] | |
283 | 283 | else throw("Entries starting with conf_ only") | |
284 | 284 | else throw("You are not allowed to change this") | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(invoke) | |
290 | 290 | func appRunning (isLive,message) = { | |
291 | 291 | let caller = toString(invoke.caller) | |
292 | 292 | let id = toBase58String(invoke.transactionId) | |
293 | 293 | if (containsElement([chris, toString(this)], caller)) | |
294 | 294 | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
295 | 295 | else throw("You are not allowed to change this") | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Callable(i) | |
301 | 301 | func sellNFT (price,asset) = { | |
302 | - | let $ | |
303 | - | let payment = $ | |
304 | - | let amount = $ | |
302 | + | let $t01081210848 = isPayment(i) | |
303 | + | let payment = $t01081210848._1 | |
304 | + | let amount = $t01081210848._2 | |
305 | 305 | if ((amount != 1)) | |
306 | 306 | then throw("No NFT attached") | |
307 | 307 | else { | |
308 | 308 | let nftId = if (if (isDefined(payment.assetId)) | |
309 | 309 | then isSignArtNFT(value(payment.assetId)) | |
310 | 310 | else false) | |
311 | 311 | then toBase58String(value(payment.assetId)) | |
312 | 312 | else throw("Only SIGN Art NFT accepted.") | |
313 | - | let $ | |
314 | - | let id = $ | |
315 | - | let caller = $ | |
316 | - | let date = $ | |
317 | - | let isValidNFT = $ | |
318 | - | let artId = $ | |
319 | - | let creatorAddr = $ | |
320 | - | let artSignID = $ | |
313 | + | let $t01108611179 = provideBaseData(i, nftId) | |
314 | + | let id = $t01108611179._1 | |
315 | + | let caller = $t01108611179._2 | |
316 | + | let date = $t01108611179._3 | |
317 | + | let isValidNFT = $t01108611179._4 | |
318 | + | let artId = $t01108611179._5 | |
319 | + | let creatorAddr = $t01108611179._6 | |
320 | + | let artSignID = $t01108611179._7 | |
321 | 321 | if ((size(artSignID) == 0)) | |
322 | 322 | then throw("Artwork not found on SIGN Art") | |
323 | 323 | else if (!(isValidNFT)) | |
324 | 324 | then throw("Not a valid nft") | |
325 | 325 | else if (!(acceptedAssetIds(asset))) | |
326 | 326 | then throw("Only SIGN, USDN, USDT or WAVES accepted") | |
327 | 327 | else if (!(validateMinSell(asset, price))) | |
328 | 328 | then throw("Wrong minimum sell price") | |
329 | 329 | 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)] | |
330 | 330 | } | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | ||
335 | 335 | @Callable(i) | |
336 | 336 | func updateSalePrice (nftId,price,asset) = { | |
337 | - | let $ | |
338 | - | let id = $ | |
339 | - | let caller = $ | |
340 | - | let date = $ | |
341 | - | let isValidNFT = $ | |
342 | - | let artId = $ | |
343 | - | let creatorAddr = $ | |
344 | - | let artSignID = $ | |
337 | + | let $t01208312176 = provideBaseData(i, nftId) | |
338 | + | let id = $t01208312176._1 | |
339 | + | let caller = $t01208312176._2 | |
340 | + | let date = $t01208312176._3 | |
341 | + | let isValidNFT = $t01208312176._4 | |
342 | + | let artId = $t01208312176._5 | |
343 | + | let creatorAddr = $t01208312176._6 | |
344 | + | let artSignID = $t01208312176._7 | |
345 | 345 | if ((size(artSignID) == 0)) | |
346 | 346 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
347 | 347 | else if (!(isValidNFT)) | |
348 | 348 | then throw("Not a valid nft") | |
349 | 349 | else { | |
350 | 350 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
351 | 351 | if ((saleOwner != caller)) | |
352 | 352 | then throw("You don't own this NFT") | |
353 | 353 | else { | |
354 | 354 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
355 | 355 | if ((saleStatus != "OPEN")) | |
356 | 356 | then throw("Sale not active") | |
357 | 357 | else if (!(acceptedAssetIds(asset))) | |
358 | 358 | then throw("Only SIGN, USDN, USDT or WAVES accepted") | |
359 | 359 | else if (!(validateMinSell(asset, price))) | |
360 | 360 | then throw("Wrong minimum sell price") | |
361 | 361 | else { | |
362 | 362 | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
363 | 363 | let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_") | |
364 | 364 | [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))] | |
365 | 365 | } | |
366 | 366 | } | |
367 | 367 | } | |
368 | 368 | } | |
369 | 369 | ||
370 | 370 | ||
371 | 371 | ||
372 | 372 | @Callable(i) | |
373 | 373 | func cancelSale (nftId) = { | |
374 | - | let $ | |
375 | - | let id = $ | |
376 | - | let caller = $ | |
377 | - | let date = $ | |
378 | - | let isValidNFT = $ | |
379 | - | let artId = $ | |
380 | - | let creatorAddr = $ | |
381 | - | let artSignID = $ | |
374 | + | let $t01335313597 = provideBaseData(i, nftId) | |
375 | + | let id = $t01335313597._1 | |
376 | + | let caller = $t01335313597._2 | |
377 | + | let date = $t01335313597._3 | |
378 | + | let isValidNFT = $t01335313597._4 | |
379 | + | let artId = $t01335313597._5 | |
380 | + | let creatorAddr = $t01335313597._6 | |
381 | + | let artSignID = $t01335313597._7 | |
382 | 382 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
383 | 383 | if ((saleOwner != caller)) | |
384 | 384 | then throw("You don't own this NFT") | |
385 | 385 | else { | |
386 | 386 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
387 | 387 | if ((saleStatus != "OPEN")) | |
388 | 388 | then throw("Sale not active") | |
389 | 389 | else { | |
390 | 390 | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
391 | 391 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
392 | 392 | [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))] | |
393 | 393 | } | |
394 | 394 | } | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func buyNFT (nftId) = { | |
401 | - | let $ | |
402 | - | let id = $ | |
403 | - | let caller = $ | |
404 | - | let date = $ | |
405 | - | let isValidNFT = $ | |
406 | - | let artId = $ | |
407 | - | let creatorAddr = $ | |
408 | - | let artSignID = $ | |
401 | + | let $t01445114544 = provideBaseData(i, nftId) | |
402 | + | let id = $t01445114544._1 | |
403 | + | let caller = $t01445114544._2 | |
404 | + | let date = $t01445114544._3 | |
405 | + | let isValidNFT = $t01445114544._4 | |
406 | + | let artId = $t01445114544._5 | |
407 | + | let creatorAddr = $t01445114544._6 | |
408 | + | let artSignID = $t01445114544._7 | |
409 | 409 | if ((size(artSignID) == 0)) | |
410 | 410 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
411 | 411 | else if (!(isValidNFT)) | |
412 | 412 | then throw("Not a valid nft") | |
413 | 413 | else { | |
414 | 414 | let saleOwner = getSaleOwnerAndStatus(nftId) | |
415 | 415 | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
416 | 416 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
417 | 417 | if ((size(saleInfo) == 0)) | |
418 | 418 | then throw("Sale Not found!") | |
419 | 419 | else { | |
420 | 420 | let saleInfoArray = split(saleInfo, "_") | |
421 | 421 | if ((parseInt(saleInfoArray[1]) == 0)) | |
422 | 422 | then throw("Offer only") | |
423 | 423 | else { | |
424 | - | let $ | |
425 | - | let payment = $ | |
426 | - | let amount = $ | |
424 | + | let $t01505315089 = isPayment(i) | |
425 | + | let payment = $t01505315089._1 | |
426 | + | let amount = $t01505315089._2 | |
427 | 427 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
428 | 428 | then toBase58String(value(payment.assetId)) | |
429 | 429 | else "" | |
430 | 430 | if (if ((saleInfoArray[1] != toString(amount))) | |
431 | 431 | then true | |
432 | 432 | else (saleInfoArray[2] != paymentAssetStr)) | |
433 | 433 | then throw("Payment infos don't match.") | |
434 | 434 | else { | |
435 | - | let $ | |
436 | - | let commissions = $ | |
437 | - | let creatorFee = $ | |
438 | - | let ownerFee = $ | |
439 | - | let collectorNFT = $ | |
435 | + | let $t01560315735 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller) | |
436 | + | let commissions = $t01560315735._1 | |
437 | + | let creatorFee = $t01560315735._2 | |
438 | + | let ownerFee = $t01560315735._3 | |
439 | + | let collectorNFT = $t01560315735._4 | |
440 | 440 | ([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) | |
441 | 441 | } | |
442 | 442 | } | |
443 | 443 | } | |
444 | 444 | } | |
445 | 445 | } | |
446 | 446 | ||
447 | 447 | ||
448 | 448 | ||
449 | 449 | @Callable(i) | |
450 | 450 | func setOffer (nftId) = { | |
451 | - | let $ | |
452 | - | let id = $ | |
453 | - | let offerOwner = $ | |
454 | - | let date = $ | |
455 | - | let isValidNFT = $ | |
456 | - | let artId = $ | |
457 | - | let creatorAddr = $ | |
458 | - | let artSignID = $ | |
451 | + | let $t01616316260 = provideBaseData(i, nftId) | |
452 | + | let id = $t01616316260._1 | |
453 | + | let offerOwner = $t01616316260._2 | |
454 | + | let date = $t01616316260._3 | |
455 | + | let isValidNFT = $t01616316260._4 | |
456 | + | let artId = $t01616316260._5 | |
457 | + | let creatorAddr = $t01616316260._6 | |
458 | + | let artSignID = $t01616316260._7 | |
459 | 459 | if (!(isValidNFT)) | |
460 | 460 | then throw("Not a valid nft") | |
461 | 461 | else { | |
462 | - | let $ | |
463 | - | let payment = $ | |
464 | - | let amount = $ | |
462 | + | let $t01632416360 = isPayment(i) | |
463 | + | let payment = $t01632416360._1 | |
464 | + | let amount = $t01632416360._2 | |
465 | 465 | let assetId = if (!(isDefined(payment.assetId))) | |
466 | 466 | then "WAVES" | |
467 | 467 | else toBase58String(value(payment.assetId)) | |
468 | 468 | if (!(acceptedAssetIds(assetId))) | |
469 | 469 | then throw("asset not accepted") | |
470 | 470 | else if ((amount == 0)) | |
471 | 471 | then throw("Offer of 0 not allowed") | |
472 | 472 | else if (!(validateMinSell(assetId, amount))) | |
473 | 473 | then throw("Wrong minimum sell price") | |
474 | 474 | else { | |
475 | 475 | let saleOwner = getSaleOwnerAndStatus(nftId) | |
476 | 476 | [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
477 | 477 | } | |
478 | 478 | } | |
479 | 479 | } | |
480 | 480 | ||
481 | 481 | ||
482 | 482 | ||
483 | 483 | @Callable(i) | |
484 | 484 | func acceptOffer (nftId,offerId,offerOwner) = { | |
485 | - | let $ | |
486 | - | let id = $ | |
487 | - | let caller = $ | |
488 | - | let date = $ | |
489 | - | let isValidNFT = $ | |
490 | - | let artId = $ | |
491 | - | let creatorAddr = $ | |
492 | - | let artSignID = $ | |
485 | + | let $t01718117274 = provideBaseData(i, nftId) | |
486 | + | let id = $t01718117274._1 | |
487 | + | let caller = $t01718117274._2 | |
488 | + | let date = $t01718117274._3 | |
489 | + | let isValidNFT = $t01718117274._4 | |
490 | + | let artId = $t01718117274._5 | |
491 | + | let creatorAddr = $t01718117274._6 | |
492 | + | let artSignID = $t01718117274._7 | |
493 | 493 | if (!(isValidNFT)) | |
494 | 494 | then throw("Not a valid nft") | |
495 | 495 | else { | |
496 | 496 | let saleOwner = getSaleOwnerAndStatus(nftId) | |
497 | 497 | if ((caller != saleOwner)) | |
498 | 498 | then throw("Only sale owner can accept offer") | |
499 | 499 | else { | |
500 | 500 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
501 | - | let $ | |
502 | - | let bidDataArr = $ | |
503 | - | let assetId = $ | |
504 | - | let bidData = $ | |
501 | + | let $t01753517590 = getBidData(bidKey) | |
502 | + | let bidDataArr = $t01753517590._1 | |
503 | + | let assetId = $t01753517590._2 | |
504 | + | let bidData = $t01753517590._3 | |
505 | 505 | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
506 | 506 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
507 | 507 | if ((size(saleInfo) == 0)) | |
508 | 508 | then throw("Sale Not found!") | |
509 | 509 | else { | |
510 | 510 | let amount = value(parseInt(bidDataArr[1])) | |
511 | - | let $ | |
512 | - | let commissions = $ | |
513 | - | let creatorFee = $ | |
514 | - | let ownerFee = $ | |
515 | - | let collectorNFT = $ | |
511 | + | let $t01783317964 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6]) | |
512 | + | let commissions = $t01783317964._1 | |
513 | + | let creatorFee = $t01783317964._2 | |
514 | + | let ownerFee = $t01783317964._3 | |
515 | + | let collectorNFT = $t01783317964._4 | |
516 | 516 | let assetIdStr = if (isDefined(assetId)) | |
517 | 517 | then toBase58String(value(assetId)) | |
518 | 518 | else "WAVES" | |
519 | 519 | ([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) | |
520 | 520 | } | |
521 | 521 | } | |
522 | 522 | } | |
523 | 523 | } | |
524 | 524 | ||
525 | 525 | ||
526 | 526 | ||
527 | 527 | @Callable(i) | |
528 | 528 | func cancelOffer (nftId,offerId,offerOwner,saleOwner) = { | |
529 | - | let $ | |
530 | - | let id = $ | |
531 | - | let caller = $ | |
532 | - | let date = $ | |
529 | + | let $t01878418859 = idCallerDate(i) | |
530 | + | let id = $t01878418859._1 | |
531 | + | let caller = $t01878418859._2 | |
532 | + | let date = $t01878418859._3 | |
533 | 533 | if (if ((caller != offerOwner)) | |
534 | 534 | then (caller != saleOwner) | |
535 | 535 | else false) | |
536 | 536 | then throw("You cannot cancel this offer.") | |
537 | 537 | else { | |
538 | 538 | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
539 | - | let $ | |
540 | - | let bidDataArr = $ | |
541 | - | let assetId = $ | |
542 | - | let bidData = $ | |
539 | + | let $t01903319088 = getBidData(bidKey) | |
540 | + | let bidDataArr = $t01903319088._1 | |
541 | + | let assetId = $t01903319088._2 | |
542 | + | let bidData = $t01903319088._3 | |
543 | 543 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
544 | 544 | } | |
545 | 545 | } | |
546 | 546 | ||
547 | 547 |
github/deemru/w8io/026f985 86.91 ms ◑