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