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