tx · 9wZRxJJs8sKk8MtLPUGqNTbW3aVKVzGecNjXqkPMqECN

3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p:  -0.01500000 Waves

2022.11.30 07:18 [2339357] smart account 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p > SELF 0.00000000 Waves

{ "type": 13, "id": "9wZRxJJs8sKk8MtLPUGqNTbW3aVKVzGecNjXqkPMqECN", "fee": 1500000, "feeAssetId": null, "timestamp": 1669781909424, "version": 2, "chainId": 84, "sender": "3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p", "senderPublicKey": "Hh3eFP2XFetZSfTxQiM1Ps96f68zi8Zh5ghhCZdjgdFs", "proofs": [ "4wZokJWFBhKtmdsFYZXWMtjPSyvB5qGTeSPjcB3mnq3efdLoKVF67ak66aDq7zS78HUvCPFETiktx3iPwdrfiaGG" ], "script": "base64:BgI5CAISBAoCCAgSBAoCBAgSBAoCAQgSBQoDCAEIEgMKAQgSAwoBCBIDCgEIEgUKAwgICBIGCgQICAgINAEJZ2V0U3RyQnlLAQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVuaXRUZXN0BwAJb3JhY2xlRmVlCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX29yYWNsZV9mZWUAC2ZlZVJlY2VpdmVyCQEJZ2V0U3RyQnlLAQIRY29uZl9mZWVfcmVjZWl2ZXIADGFydHdvcmtzRGFwcAkBBXZhbHVlAQkApggBCQEJZ2V0U3RyQnlLAQISY29uZl9hcnR3b3Jrc19kYXBwAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX3VzZXJzX2RhcHAAC3NpZ25Bc3NldElkCQDZBAEJAQlnZXRTdHJCeUsBAhhjb25m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2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUGY2FsbGVyCQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUKYmlkRGF0YUFycgABBQdhc3NldElkBQNuaWwA0jx8rg==", "height": 2339357, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5Lcsh7p6YFtDxz5fktwyXHhWZqkXsW9NVQVSofdENWbR Next: 8XJcRSSKPzAJGhVTbMxdopfJM3XvLhLDgBEqCyjNq8hJ Diff:
OldNewDifferences
196196
197197 func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller,artId) = {
198198 let creatorCut = getArtworkRoyalties(keyArtworkRoyalties(creatorAddr, artId))
199- if (true)
200- then throw(((((keyArtworkRoyalties(creatorAddr, nftid) + " / ") + toString(amount)) + " / ") + toString(creatorCut)))
201- else {
202- let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
203- let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
204- let amountForSign = fraction(amount, signCut, 100)
205- let amountForCreator = fraction(amount, creatorCut, 10000)
206- let amountForOwner = (amount - (amountForSign + amountForCreator))
207- let amountForAgent = if (if ((agent != feeReceiver))
208- then (agentShare > 0)
209- else false)
210- then fraction(amount, agentShare, 100)
211- else 0
212- let commissions = if ((amountForAgent != 0))
213- then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
214- else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
215- let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
216- let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
217- let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
218- $Tuple4(commissions, creatorFee, ownerFee, collectorNFT)
219- }
199+ let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
200+ let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
201+ let amountForSign = fraction(amount, signCut, 100)
202+ let amountForCreator = fraction(amount, creatorCut, 10000)
203+ let amountForOwner = (amount - (amountForSign + amountForCreator))
204+ let amountForAgent = if (if ((agent != feeReceiver))
205+ then (agentShare > 0)
206+ else false)
207+ then fraction(amount, agentShare, 100)
208+ else 0
209+ let commissions = if ((amountForAgent != 0))
210+ then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
211+ else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
212+ let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
213+ let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
214+ let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
215+ $Tuple4(commissions, creatorFee, ownerFee, collectorNFT)
220216 }
221217
222218
259255
260256
261257 func provideBaseData (i,nftId) = {
262- let $t098409880 = idCallerDate(i)
263- let id = $t098409880._1
264- let caller = $t098409880._2
265- let date = $t098409880._3
266- let $t098849953 = checkNFTInfo(nftId)
267- let isValidNFT = $t098849953._1
268- let artId = $t098849953._2
269- let creatorAddr = $t098849953._3
270- let artSignID = $t098849953._4
258+ let $t098419881 = idCallerDate(i)
259+ let id = $t098419881._1
260+ let caller = $t098419881._2
261+ let date = $t098419881._3
262+ let $t098859954 = checkNFTInfo(nftId)
263+ let isValidNFT = $t098859954._1
264+ let artId = $t098859954._2
265+ let creatorAddr = $t098859954._3
266+ let artSignID = $t098859954._4
271267 $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
272268 }
273269
303299
304300 @Callable(i)
305301 func sellNFT (price,asset) = {
306- let $t01105811094 = isPayment(i)
307- let payment = $t01105811094._1
308- let amount = $t01105811094._2
302+ let $t01105911095 = isPayment(i)
303+ let payment = $t01105911095._1
304+ let amount = $t01105911095._2
309305 if ((amount != 1))
310306 then throw("No NFT attached")
311307 else {
314310 else false)
315311 then toBase58String(value(payment.assetId))
316312 else throw("Only SIGN Art NFT accepted.")
317- let $t01133211425 = provideBaseData(i, nftId)
318- let id = $t01133211425._1
319- let caller = $t01133211425._2
320- let date = $t01133211425._3
321- let isValidNFT = $t01133211425._4
322- let artId = $t01133211425._5
323- let creatorAddr = $t01133211425._6
324- let artSignID = $t01133211425._7
313+ let $t01133311426 = provideBaseData(i, nftId)
314+ let id = $t01133311426._1
315+ let caller = $t01133311426._2
316+ let date = $t01133311426._3
317+ let isValidNFT = $t01133311426._4
318+ let artId = $t01133311426._5
319+ let creatorAddr = $t01133311426._6
320+ let artSignID = $t01133311426._7
325321 if ((size(artSignID) == 0))
326322 then throw("Artwork not found on SIGN Art")
327323 else if (!(isValidNFT))
338334
339335 @Callable(i)
340336 func updateSalePrice (nftId,price,asset) = {
341- let $t01232912422 = provideBaseData(i, nftId)
342- let id = $t01232912422._1
343- let caller = $t01232912422._2
344- let date = $t01232912422._3
345- let isValidNFT = $t01232912422._4
346- let artId = $t01232912422._5
347- let creatorAddr = $t01232912422._6
348- let artSignID = $t01232912422._7
337+ let $t01233012423 = provideBaseData(i, nftId)
338+ let id = $t01233012423._1
339+ let caller = $t01233012423._2
340+ let date = $t01233012423._3
341+ let isValidNFT = $t01233012423._4
342+ let artId = $t01233012423._5
343+ let creatorAddr = $t01233012423._6
344+ let artSignID = $t01233012423._7
349345 if ((size(artSignID) == 0))
350346 then throw("Artwork not found on SIGN Art, cancel your sale.")
351347 else if (!(isValidNFT))
375371
376372 @Callable(i)
377373 func cancelSale (nftId) = {
378- let $t01359913843 = provideBaseData(i, nftId)
379- let id = $t01359913843._1
380- let caller = $t01359913843._2
381- let date = $t01359913843._3
382- let isValidNFT = $t01359913843._4
383- let artId = $t01359913843._5
384- let creatorAddr = $t01359913843._6
385- let artSignID = $t01359913843._7
374+ let $t01360013844 = provideBaseData(i, nftId)
375+ let id = $t01360013844._1
376+ let caller = $t01360013844._2
377+ let date = $t01360013844._3
378+ let isValidNFT = $t01360013844._4
379+ let artId = $t01360013844._5
380+ let creatorAddr = $t01360013844._6
381+ let artSignID = $t01360013844._7
386382 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
387383 if ((saleOwner != caller))
388384 then throw("You don't own this NFT")
402398
403399 @Callable(i)
404400 func buyNFT (nftId) = {
405- let $t01469714790 = provideBaseData(i, nftId)
406- let id = $t01469714790._1
407- let caller = $t01469714790._2
408- let date = $t01469714790._3
409- let isValidNFT = $t01469714790._4
410- let artId = $t01469714790._5
411- let creatorAddr = $t01469714790._6
412- let artSignID = $t01469714790._7
401+ let $t01469814791 = provideBaseData(i, nftId)
402+ let id = $t01469814791._1
403+ let caller = $t01469814791._2
404+ let date = $t01469814791._3
405+ let isValidNFT = $t01469814791._4
406+ let artId = $t01469814791._5
407+ let creatorAddr = $t01469814791._6
408+ let artSignID = $t01469814791._7
413409 if ((size(artSignID) == 0))
414410 then throw("Artwork not found on SIGN Art, cancel your sale.")
415411 else if (!(isValidNFT))
425421 if ((parseInt(saleInfoArray[1]) == 0))
426422 then throw("Offer only")
427423 else {
428- let $t01529915335 = isPayment(i)
429- let payment = $t01529915335._1
430- let amount = $t01529915335._2
424+ let $t01530015336 = isPayment(i)
425+ let payment = $t01530015336._1
426+ let amount = $t01530015336._2
431427 let paymentAssetStr = if (isDefined(payment.assetId))
432428 then toBase58String(value(payment.assetId))
433429 else ""
436432 else (saleInfoArray[2] != paymentAssetStr))
437433 then throw("Payment infos don't match.")
438434 else {
439- let $t01584915988 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller, artId)
440- let commissions = $t01584915988._1
441- let creatorFee = $t01584915988._2
442- let ownerFee = $t01584915988._3
443- let collectorNFT = $t01584915988._4
435+ let $t01585015989 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller, artId)
436+ let commissions = $t01585015989._1
437+ let creatorFee = $t01585015989._2
438+ let ownerFee = $t01585015989._3
439+ let collectorNFT = $t01585015989._4
444440 ([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)
445441 }
446442 }
452448
453449 @Callable(i)
454450 func setOffer (nftId) = {
455- let $t01641616513 = provideBaseData(i, nftId)
456- let id = $t01641616513._1
457- let offerOwner = $t01641616513._2
458- let date = $t01641616513._3
459- let isValidNFT = $t01641616513._4
460- let artId = $t01641616513._5
461- let creatorAddr = $t01641616513._6
462- let artSignID = $t01641616513._7
451+ let $t01641716514 = provideBaseData(i, nftId)
452+ let id = $t01641716514._1
453+ let offerOwner = $t01641716514._2
454+ let date = $t01641716514._3
455+ let isValidNFT = $t01641716514._4
456+ let artId = $t01641716514._5
457+ let creatorAddr = $t01641716514._6
458+ let artSignID = $t01641716514._7
463459 if (!(isValidNFT))
464460 then throw("Not a valid nft")
465461 else {
466- let $t01657716613 = isPayment(i)
467- let payment = $t01657716613._1
468- let amount = $t01657716613._2
462+ let $t01657816614 = isPayment(i)
463+ let payment = $t01657816614._1
464+ let amount = $t01657816614._2
469465 let assetId = if (!(isDefined(payment.assetId)))
470466 then "WAVES"
471467 else toBase58String(value(payment.assetId))
486482
487483 @Callable(i)
488484 func acceptOffer (nftId,offerId,offerOwner) = {
489- let $t01743417527 = provideBaseData(i, nftId)
490- let id = $t01743417527._1
491- let caller = $t01743417527._2
492- let date = $t01743417527._3
493- let isValidNFT = $t01743417527._4
494- let artId = $t01743417527._5
495- let creatorAddr = $t01743417527._6
496- let artSignID = $t01743417527._7
485+ let $t01743517528 = provideBaseData(i, nftId)
486+ let id = $t01743517528._1
487+ let caller = $t01743517528._2
488+ let date = $t01743517528._3
489+ let isValidNFT = $t01743517528._4
490+ let artId = $t01743517528._5
491+ let creatorAddr = $t01743517528._6
492+ let artSignID = $t01743517528._7
497493 if (!(isValidNFT))
498494 then throw("Not a valid nft")
499495 else {
502498 then throw("Only sale owner can accept offer")
503499 else {
504500 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
505- let $t01778817843 = getBidData(bidKey)
506- let bidDataArr = $t01778817843._1
507- let assetId = $t01778817843._2
508- let bidData = $t01778817843._3
501+ let $t01778917844 = getBidData(bidKey)
502+ let bidDataArr = $t01778917844._1
503+ let assetId = $t01778917844._2
504+ let bidData = $t01778917844._3
509505 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
510506 let saleInfo = getStrByK((saleKey + "_OPEN"))
511507 if ((size(saleInfo) == 0))
512508 then throw("Sale Not found!")
513509 else {
514510 let amount = value(parseInt(bidDataArr[1]))
515- let $t01808618224 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6], artId)
516- let commissions = $t01808618224._1
517- let creatorFee = $t01808618224._2
518- let ownerFee = $t01808618224._3
519- let collectorNFT = $t01808618224._4
511+ let $t01808718225 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6], artId)
512+ let commissions = $t01808718225._1
513+ let creatorFee = $t01808718225._2
514+ let ownerFee = $t01808718225._3
515+ let collectorNFT = $t01808718225._4
520516 let assetIdStr = if (isDefined(assetId))
521517 then toBase58String(value(assetId))
522518 else "WAVES"
530526
531527 @Callable(i)
532528 func cancelOffer (nftId,offerId,offerOwner,saleOwner) = {
533- let $t01904419119 = idCallerDate(i)
534- let id = $t01904419119._1
535- let caller = $t01904419119._2
536- let date = $t01904419119._3
529+ let $t01904519120 = idCallerDate(i)
530+ let id = $t01904519120._1
531+ let caller = $t01904519120._2
532+ let date = $t01904519120._3
537533 if (if ((caller != offerOwner))
538534 then (caller != saleOwner)
539535 else false)
540536 then throw("You cannot cancel this offer.")
541537 else {
542538 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
543- let $t01929319348 = getBidData(bidKey)
544- let bidDataArr = $t01929319348._1
545- let assetId = $t01929319348._2
546- let bidData = $t01929319348._3
539+ let $t01929419349 = getBidData(bidKey)
540+ let bidDataArr = $t01929419349._1
541+ let assetId = $t01929419349._2
542+ let bidData = $t01929419349._3
547543 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
548544 }
549545 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStrByK (key) = valueOrElse(getString(this, key), "")
55
66
77 let unitTest = false
88
99 let oracleFee = value(addressFromString(getStrByK("conf_oracle_fee")))
1010
1111 let feeReceiver = getStrByK("conf_fee_receiver")
1212
1313 let artworksDapp = value(addressFromString(getStrByK("conf_artworks_dapp")))
1414
1515 let userDapp = if (unitTest)
1616 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
1717 else value(addressFromString(getStrByK("conf_users_dapp")))
1818
1919 let signAssetId = fromBase58String(getStrByK("conf_accepted_asset_SIGN"))
2020
2121 let usdnAssetId = fromBase58String(getStrByK("conf_accepted_asset_USDN"))
2222
2323 let usdtAssetId = fromBase58String(getStrByK("conf_accepted_asset_USDT"))
2424
2525 let wavesAssetId = base58''
2626
2727 let chris = getStrByK("conf_admin_1")
2828
2929 let signCut = 3
3030
3131 let userSuspended = "SUSPENDED"
3232
3333 let userRemoved = "REMOVED"
3434
3535 let artIllegal = "ILLEGAL"
3636
3737 let artSuspended = "SUSPENDED"
3838
3939 let dappRunningKey = "conf_dapp_is_running"
4040
4141 let maintenanceMSGKey = "conf_maintenance_msg"
4242
4343 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
4444
4545 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
4646
4747 let numSalesK = "num_sales"
4848
4949 func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error")
5050
5151
5252 func getArtworkRoyalties (key) = valueOrElse(getInteger(artworksDapp, key), 1000)
5353
5454
5555 func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "")
5656
5757
5858 func getIntByK (key) = valueOrElse(getInteger(this, key), 0)
5959
6060
6161 func keyUserStatus (addr) = ("user_status_" + addr)
6262
6363
6464 func keyArtworkRoyalties (caller,artId) = ((("art_royalties_" + artId) + "_") + caller)
6565
6666
6767 func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr)
6868
6969
7070 func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr)
7171
7272
7373 func keyNFTData (id) = ("nft_" + id)
7474
7575
7676 func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr)
7777
7878
7979 func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId)
8080
8181
8282 func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
8383
8484
8585 let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId)))
8686
8787 func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
8888
8989
9090 func keySecondaryShare (artistAddr) = ("artist_agent_secondary_" + artistAddr)
9191
9292
9393 func idCallerDate (i) = if (!(dappRunning))
9494 then throw(maintenanceMSG)
9595 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
9696
9797
9898 func isPayment (i) = if ((size(i.payments) == 0))
9999 then throw("No payment attached")
100100 else {
101101 let payment = value(i.payments[0])
102102 let amount = value(payment.amount)
103103 $Tuple2(payment, amount)
104104 }
105105
106106
107107 func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
108108 then (assetDetails.decimals == 0)
109109 else false)
110110 then (assetDetails.reissuable == false)
111111 else false)
112112 then (assetDetails.issuer == artworksDapp)
113113 else false
114114
115115
116116 func isSignArtNFT (id) = {
117117 let assetDetails = value(assetInfo(id))
118118 assetIsValid(assetDetails)
119119 }
120120
121121
122122 func acceptedAssetIds (assetId) = if (if (if (if (if ((assetId != toBase58String(signAssetId)))
123123 then (assetId != toBase58String(wavesAssetId))
124124 else false)
125125 then (assetId != "WAVES")
126126 else false)
127127 then (assetId != toBase58String(usdnAssetId))
128128 else false)
129129 then (assetId != toBase58String(usdtAssetId))
130130 else false)
131131 then false
132132 else true
133133
134134
135135 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
136136 then unit
137137 else fromBase58String(assetId)
138138
139139
140140 func getSaleOwnerAndStatus (nftid) = {
141141 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
142142 if ((size(saleOwner) == 0))
143143 then throw("NFT not found")
144144 else {
145145 let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid))
146146 if ((saleStatus != "OPEN"))
147147 then throw("NFT not for sale")
148148 else saleOwner
149149 }
150150 }
151151
152152
153153 func getBidData (key) = {
154154 let bidData = getStrByK((key + "_OPEN"))
155155 if ((bidData == ""))
156156 then throw("Offer not found")
157157 else {
158158 let bidDataArr = split(bidData, "_")
159159 let assetId = getBidAssetId(bidDataArr[2])
160160 $Tuple3(bidDataArr, assetId, bidData)
161161 }
162162 }
163163
164164
165165 func artIsValid (artStatus) = if ((artStatus != artIllegal))
166166 then (artStatus != artSuspended)
167167 else false
168168
169169
170170 func checkArtStatus (addr,id) = {
171171 let artStatus = getArtStrByK(keyFlag(addr, id))
172172 if (artIsValid(artStatus))
173173 then true
174174 else throw(("Original Artwork flagged as " + artStatus))
175175 }
176176
177177
178178 func checkArtistStatus (addr) = {
179179 let artistStatus = getUserStrByK(keyUserStatus(addr))
180180 if (containsElement([userSuspended, userRemoved], artistStatus))
181181 then throw(("Original Artist " + artistStatus))
182182 else true
183183 }
184184
185185
186186 func checkNFTInfo (assetId) = {
187187 let nftData = split(getArtStrByK(keyNFTData(assetId)), "_")
188188 let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5]))
189189 if (if (!(checkArtStatus(nftData[6], nftData[5])))
190190 then !(checkArtistStatus(nftData[6]))
191191 else false)
192192 then $Tuple4(false, nftData[5], nftData[6], artSignID)
193193 else $Tuple4(true, nftData[5], nftData[6], artSignID)
194194 }
195195
196196
197197 func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller,artId) = {
198198 let creatorCut = getArtworkRoyalties(keyArtworkRoyalties(creatorAddr, artId))
199- if (true)
200- then throw(((((keyArtworkRoyalties(creatorAddr, nftid) + " / ") + toString(amount)) + " / ") + toString(creatorCut)))
201- else {
202- let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
203- let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
204- let amountForSign = fraction(amount, signCut, 100)
205- let amountForCreator = fraction(amount, creatorCut, 10000)
206- let amountForOwner = (amount - (amountForSign + amountForCreator))
207- let amountForAgent = if (if ((agent != feeReceiver))
208- then (agentShare > 0)
209- else false)
210- then fraction(amount, agentShare, 100)
211- else 0
212- let commissions = if ((amountForAgent != 0))
213- then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
214- else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
215- let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
216- let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
217- let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
218- $Tuple4(commissions, creatorFee, ownerFee, collectorNFT)
219- }
199+ let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
200+ let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
201+ let amountForSign = fraction(amount, signCut, 100)
202+ let amountForCreator = fraction(amount, creatorCut, 10000)
203+ let amountForOwner = (amount - (amountForSign + amountForCreator))
204+ let amountForAgent = if (if ((agent != feeReceiver))
205+ then (agentShare > 0)
206+ else false)
207+ then fraction(amount, agentShare, 100)
208+ else 0
209+ let commissions = if ((amountForAgent != 0))
210+ then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
211+ else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
212+ let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
213+ let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
214+ let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
215+ $Tuple4(commissions, creatorFee, ownerFee, collectorNFT)
220216 }
221217
222218
223219 func validateMinSell (assetId,price) = {
224220 let minSellWaves = if (unitTest)
225221 then 10
226222 else getIntByKFromOracle("waves_min_sell")
227223 let minSellUsdn = 1000000
228224 let minSellSign = if (unitTest)
229225 then 1
230226 else (currentCertificationPrice * 2)
231227 if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
232228 then (minSellUsdn > price)
233229 else false)
234230 then (price != 0)
235231 else false)
236232 then true
237233 else if (if ((assetId == toBase58String(usdtAssetId)))
238234 then (minSellUsdn > price)
239235 else false)
240236 then (price != 0)
241237 else false)
242238 then true
243239 else if (if ((assetId == toBase58String(signAssetId)))
244240 then (minSellSign > price)
245241 else false)
246242 then (price != 0)
247243 else false)
248244 then true
249245 else if (if (if ((assetId == toBase58String(wavesAssetId)))
250246 then true
251247 else (assetId == "WAVES"))
252248 then (minSellWaves > price)
253249 else false)
254250 then (price != 0)
255251 else false)
256252 then false
257253 else true
258254 }
259255
260256
261257 func provideBaseData (i,nftId) = {
262- let $t098409880 = idCallerDate(i)
263- let id = $t098409880._1
264- let caller = $t098409880._2
265- let date = $t098409880._3
266- let $t098849953 = checkNFTInfo(nftId)
267- let isValidNFT = $t098849953._1
268- let artId = $t098849953._2
269- let creatorAddr = $t098849953._3
270- let artSignID = $t098849953._4
258+ let $t098419881 = idCallerDate(i)
259+ let id = $t098419881._1
260+ let caller = $t098419881._2
261+ let date = $t098419881._3
262+ let $t098859954 = checkNFTInfo(nftId)
263+ let isValidNFT = $t098859954._1
264+ let artId = $t098859954._2
265+ let creatorAddr = $t098859954._3
266+ let artSignID = $t098859954._4
271267 $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
272268 }
273269
274270
275271 func updateNumSales () = {
276272 let numSales = getIntByK(numSalesK)
277273 IntegerEntry(numSalesK, (numSales + 1))
278274 }
279275
280276
281277 @Callable(invoke)
282278 func setConf (key,val) = {
283279 let caller = toString(invoke.caller)
284280 if (containsElement([chris, toString(this)], caller))
285281 then if (contains(key, "conf_"))
286282 then [StringEntry(key, val)]
287283 else throw("Entries starting with conf_ only")
288284 else throw("You are not allowed to change this")
289285 }
290286
291287
292288
293289 @Callable(invoke)
294290 func appRunning (isLive,message) = {
295291 let caller = toString(invoke.caller)
296292 let id = toBase58String(invoke.transactionId)
297293 if (containsElement([chris, toString(this)], caller))
298294 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
299295 else throw("You are not allowed to change this")
300296 }
301297
302298
303299
304300 @Callable(i)
305301 func sellNFT (price,asset) = {
306- let $t01105811094 = isPayment(i)
307- let payment = $t01105811094._1
308- let amount = $t01105811094._2
302+ let $t01105911095 = isPayment(i)
303+ let payment = $t01105911095._1
304+ let amount = $t01105911095._2
309305 if ((amount != 1))
310306 then throw("No NFT attached")
311307 else {
312308 let nftId = if (if (isDefined(payment.assetId))
313309 then isSignArtNFT(value(payment.assetId))
314310 else false)
315311 then toBase58String(value(payment.assetId))
316312 else throw("Only SIGN Art NFT accepted.")
317- let $t01133211425 = provideBaseData(i, nftId)
318- let id = $t01133211425._1
319- let caller = $t01133211425._2
320- let date = $t01133211425._3
321- let isValidNFT = $t01133211425._4
322- let artId = $t01133211425._5
323- let creatorAddr = $t01133211425._6
324- let artSignID = $t01133211425._7
313+ let $t01133311426 = provideBaseData(i, nftId)
314+ let id = $t01133311426._1
315+ let caller = $t01133311426._2
316+ let date = $t01133311426._3
317+ let isValidNFT = $t01133311426._4
318+ let artId = $t01133311426._5
319+ let creatorAddr = $t01133311426._6
320+ let artSignID = $t01133311426._7
325321 if ((size(artSignID) == 0))
326322 then throw("Artwork not found on SIGN Art")
327323 else if (!(isValidNFT))
328324 then throw("Not a valid nft")
329325 else if (!(acceptedAssetIds(asset)))
330326 then throw("Only SIGN, USDN, USDT or WAVES accepted")
331327 else if (!(validateMinSell(asset, price)))
332328 then throw("Wrong minimum sell price")
333329 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)]
334330 }
335331 }
336332
337333
338334
339335 @Callable(i)
340336 func updateSalePrice (nftId,price,asset) = {
341- let $t01232912422 = provideBaseData(i, nftId)
342- let id = $t01232912422._1
343- let caller = $t01232912422._2
344- let date = $t01232912422._3
345- let isValidNFT = $t01232912422._4
346- let artId = $t01232912422._5
347- let creatorAddr = $t01232912422._6
348- let artSignID = $t01232912422._7
337+ let $t01233012423 = provideBaseData(i, nftId)
338+ let id = $t01233012423._1
339+ let caller = $t01233012423._2
340+ let date = $t01233012423._3
341+ let isValidNFT = $t01233012423._4
342+ let artId = $t01233012423._5
343+ let creatorAddr = $t01233012423._6
344+ let artSignID = $t01233012423._7
349345 if ((size(artSignID) == 0))
350346 then throw("Artwork not found on SIGN Art, cancel your sale.")
351347 else if (!(isValidNFT))
352348 then throw("Not a valid nft")
353349 else {
354350 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
355351 if ((saleOwner != caller))
356352 then throw("You don't own this NFT")
357353 else {
358354 let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
359355 if ((saleStatus != "OPEN"))
360356 then throw("Sale not active")
361357 else if (!(acceptedAssetIds(asset)))
362358 then throw("Only SIGN, USDN, USDT or WAVES accepted")
363359 else if (!(validateMinSell(asset, price)))
364360 then throw("Wrong minimum sell price")
365361 else {
366362 let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
367363 let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_")
368364 [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))]
369365 }
370366 }
371367 }
372368 }
373369
374370
375371
376372 @Callable(i)
377373 func cancelSale (nftId) = {
378- let $t01359913843 = provideBaseData(i, nftId)
379- let id = $t01359913843._1
380- let caller = $t01359913843._2
381- let date = $t01359913843._3
382- let isValidNFT = $t01359913843._4
383- let artId = $t01359913843._5
384- let creatorAddr = $t01359913843._6
385- let artSignID = $t01359913843._7
374+ let $t01360013844 = provideBaseData(i, nftId)
375+ let id = $t01360013844._1
376+ let caller = $t01360013844._2
377+ let date = $t01360013844._3
378+ let isValidNFT = $t01360013844._4
379+ let artId = $t01360013844._5
380+ let creatorAddr = $t01360013844._6
381+ let artSignID = $t01360013844._7
386382 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
387383 if ((saleOwner != caller))
388384 then throw("You don't own this NFT")
389385 else {
390386 let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
391387 if ((saleStatus != "OPEN"))
392388 then throw("Sale not active")
393389 else {
394390 let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
395391 let saleInfo = getStrByK((saleKey + "_OPEN"))
396392 [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))]
397393 }
398394 }
399395 }
400396
401397
402398
403399 @Callable(i)
404400 func buyNFT (nftId) = {
405- let $t01469714790 = provideBaseData(i, nftId)
406- let id = $t01469714790._1
407- let caller = $t01469714790._2
408- let date = $t01469714790._3
409- let isValidNFT = $t01469714790._4
410- let artId = $t01469714790._5
411- let creatorAddr = $t01469714790._6
412- let artSignID = $t01469714790._7
401+ let $t01469814791 = provideBaseData(i, nftId)
402+ let id = $t01469814791._1
403+ let caller = $t01469814791._2
404+ let date = $t01469814791._3
405+ let isValidNFT = $t01469814791._4
406+ let artId = $t01469814791._5
407+ let creatorAddr = $t01469814791._6
408+ let artSignID = $t01469814791._7
413409 if ((size(artSignID) == 0))
414410 then throw("Artwork not found on SIGN Art, cancel your sale.")
415411 else if (!(isValidNFT))
416412 then throw("Not a valid nft")
417413 else {
418414 let saleOwner = getSaleOwnerAndStatus(nftId)
419415 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
420416 let saleInfo = getStrByK((saleKey + "_OPEN"))
421417 if ((size(saleInfo) == 0))
422418 then throw("Sale Not found!")
423419 else {
424420 let saleInfoArray = split(saleInfo, "_")
425421 if ((parseInt(saleInfoArray[1]) == 0))
426422 then throw("Offer only")
427423 else {
428- let $t01529915335 = isPayment(i)
429- let payment = $t01529915335._1
430- let amount = $t01529915335._2
424+ let $t01530015336 = isPayment(i)
425+ let payment = $t01530015336._1
426+ let amount = $t01530015336._2
431427 let paymentAssetStr = if (isDefined(payment.assetId))
432428 then toBase58String(value(payment.assetId))
433429 else ""
434430 if (if ((saleInfoArray[1] != toString(amount)))
435431 then true
436432 else (saleInfoArray[2] != paymentAssetStr))
437433 then throw("Payment infos don't match.")
438434 else {
439- let $t01584915988 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller, artId)
440- let commissions = $t01584915988._1
441- let creatorFee = $t01584915988._2
442- let ownerFee = $t01584915988._3
443- let collectorNFT = $t01584915988._4
435+ let $t01585015989 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller, artId)
436+ let commissions = $t01585015989._1
437+ let creatorFee = $t01585015989._2
438+ let ownerFee = $t01585015989._3
439+ let collectorNFT = $t01585015989._4
444440 ([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)
445441 }
446442 }
447443 }
448444 }
449445 }
450446
451447
452448
453449 @Callable(i)
454450 func setOffer (nftId) = {
455- let $t01641616513 = provideBaseData(i, nftId)
456- let id = $t01641616513._1
457- let offerOwner = $t01641616513._2
458- let date = $t01641616513._3
459- let isValidNFT = $t01641616513._4
460- let artId = $t01641616513._5
461- let creatorAddr = $t01641616513._6
462- let artSignID = $t01641616513._7
451+ let $t01641716514 = provideBaseData(i, nftId)
452+ let id = $t01641716514._1
453+ let offerOwner = $t01641716514._2
454+ let date = $t01641716514._3
455+ let isValidNFT = $t01641716514._4
456+ let artId = $t01641716514._5
457+ let creatorAddr = $t01641716514._6
458+ let artSignID = $t01641716514._7
463459 if (!(isValidNFT))
464460 then throw("Not a valid nft")
465461 else {
466- let $t01657716613 = isPayment(i)
467- let payment = $t01657716613._1
468- let amount = $t01657716613._2
462+ let $t01657816614 = isPayment(i)
463+ let payment = $t01657816614._1
464+ let amount = $t01657816614._2
469465 let assetId = if (!(isDefined(payment.assetId)))
470466 then "WAVES"
471467 else toBase58String(value(payment.assetId))
472468 if (!(acceptedAssetIds(assetId)))
473469 then throw("asset not accepted")
474470 else if ((amount == 0))
475471 then throw("Offer of 0 not allowed")
476472 else if (!(validateMinSell(assetId, amount)))
477473 then throw("Wrong minimum sell price")
478474 else {
479475 let saleOwner = getSaleOwnerAndStatus(nftId)
480476 [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))]
481477 }
482478 }
483479 }
484480
485481
486482
487483 @Callable(i)
488484 func acceptOffer (nftId,offerId,offerOwner) = {
489- let $t01743417527 = provideBaseData(i, nftId)
490- let id = $t01743417527._1
491- let caller = $t01743417527._2
492- let date = $t01743417527._3
493- let isValidNFT = $t01743417527._4
494- let artId = $t01743417527._5
495- let creatorAddr = $t01743417527._6
496- let artSignID = $t01743417527._7
485+ let $t01743517528 = provideBaseData(i, nftId)
486+ let id = $t01743517528._1
487+ let caller = $t01743517528._2
488+ let date = $t01743517528._3
489+ let isValidNFT = $t01743517528._4
490+ let artId = $t01743517528._5
491+ let creatorAddr = $t01743517528._6
492+ let artSignID = $t01743517528._7
497493 if (!(isValidNFT))
498494 then throw("Not a valid nft")
499495 else {
500496 let saleOwner = getSaleOwnerAndStatus(nftId)
501497 if ((caller != saleOwner))
502498 then throw("Only sale owner can accept offer")
503499 else {
504500 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
505- let $t01778817843 = getBidData(bidKey)
506- let bidDataArr = $t01778817843._1
507- let assetId = $t01778817843._2
508- let bidData = $t01778817843._3
501+ let $t01778917844 = getBidData(bidKey)
502+ let bidDataArr = $t01778917844._1
503+ let assetId = $t01778917844._2
504+ let bidData = $t01778917844._3
509505 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
510506 let saleInfo = getStrByK((saleKey + "_OPEN"))
511507 if ((size(saleInfo) == 0))
512508 then throw("Sale Not found!")
513509 else {
514510 let amount = value(parseInt(bidDataArr[1]))
515- let $t01808618224 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6], artId)
516- let commissions = $t01808618224._1
517- let creatorFee = $t01808618224._2
518- let ownerFee = $t01808618224._3
519- let collectorNFT = $t01808618224._4
511+ let $t01808718225 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6], artId)
512+ let commissions = $t01808718225._1
513+ let creatorFee = $t01808718225._2
514+ let ownerFee = $t01808718225._3
515+ let collectorNFT = $t01808718225._4
520516 let assetIdStr = if (isDefined(assetId))
521517 then toBase58String(value(assetId))
522518 else "WAVES"
523519 ([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)
524520 }
525521 }
526522 }
527523 }
528524
529525
530526
531527 @Callable(i)
532528 func cancelOffer (nftId,offerId,offerOwner,saleOwner) = {
533- let $t01904419119 = idCallerDate(i)
534- let id = $t01904419119._1
535- let caller = $t01904419119._2
536- let date = $t01904419119._3
529+ let $t01904519120 = idCallerDate(i)
530+ let id = $t01904519120._1
531+ let caller = $t01904519120._2
532+ let date = $t01904519120._3
537533 if (if ((caller != offerOwner))
538534 then (caller != saleOwner)
539535 else false)
540536 then throw("You cannot cancel this offer.")
541537 else {
542538 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
543- let $t01929319348 = getBidData(bidKey)
544- let bidDataArr = $t01929319348._1
545- let assetId = $t01929319348._2
546- let bidData = $t01929319348._3
539+ let $t01929419349 = getBidData(bidKey)
540+ let bidDataArr = $t01929419349._1
541+ let assetId = $t01929419349._2
542+ let bidData = $t01929419349._3
547543 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
548544 }
549545 }
550546
551547

github/deemru/w8io/026f985 
91.29 ms