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