tx · 5ZjUJx9tuqDyKNjWBK3CSg9vr5ni5P7HT3gFvZFwY2t9

3MyZojSHcQ6HX9w5G5WEixHkn6huVhPE24y:  -0.01400000 Waves

2021.06.24 17:11 [1584562] smart account 3MyZojSHcQ6HX9w5G5WEixHkn6huVhPE24y > SELF 0.00000000 Waves

{ "type": 13, "id": "5ZjUJx9tuqDyKNjWBK3CSg9vr5ni5P7HT3gFvZFwY2t9", "fee": 1400000, "feeAssetId": null, "timestamp": 1624543936229, "version": 2, "chainId": 84, "sender": "3MyZojSHcQ6HX9w5G5WEixHkn6huVhPE24y", "senderPublicKey": "3qeBPCwzp2Z4ed5WHqoSxuLnkwVQpqkVYgxnj2MDRbgf", "proofs": [ "67NXa8fUkJmBt6TU6GKrNEcszDK9JQd8YYps8fkxqP9EA9vZExxcdVNcRdJHxvkFDqcztUgtvDM5dQEyLo37Nn92" ], "script": "base64:AAIEAAAAAAAAAEAIAhIECgIBCBIFCgMIAQgSAwoBCBIDCgEIEgMKAQgSBQoDCAgIEgUKAwgICBIECgIICBIFCgMICAgSBQoDCAgIAAAAMgAAAAAIdW5pdFRlc3QHAAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEAAAAACHNpZ25EYXBwCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQzI4aFNpdnJtc1RVWGFZRDF4NkwzNjJKNFpwVW5vVGRCAAAAAAxhcnR3b3Jrc0RhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM05CeW5mYlhDMkthc3RVeGh1a2NNVWFFNThLOWNCZEI5VVkAAAAAC2ZlZVJlY2VpdmVyAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAAIdXNlckRhcHADBQAAAAh1bml0VGVzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAg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AETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAAxyZXF1ZXN0T3duZXIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAA5yZXF1ZXN0RGF0YUFycgAAAAAAAAAAAQkAAlkAAAABCQABkQAAAAIFAAAADnJlcXVlc3REYXRhQXJyAAAAAAAAAAACBQAAAANuaWwAAAAAOi5tGA==", "height": 1584562, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 774GnEpNjts7UyQwc9LotQmfJK2nqk49spNAAz9Hf6w5 Next: rYP3r4izph4MCsVztBC4weMuYDpvgYvPPsfBmYk4eFF Diff:
OldNewDifferences
2525
2626 let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
2727
28-let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
29-
3028 let signCut = 3
3129
3230 let creatorCut = 10
4240 let artIllegal = "ILLEGAL"
4341
4442 let artSuspended = "SUSPENDED"
43+
44+let numSalesK = "num_sales"
4545
4646 func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error")
4747
6767 func keyNFTData (id) = ("nft_" + id)
6868
6969
70+func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr)
71+
72+
73+func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId)
74+
75+
76+func getRequestKey (requestOwner,creatorAddr,artId,id) = ((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id)
77+
78+
7079 func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
7180
7281
8695 }
8796
8897
98+func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
99+ then (assetDetails.decimals == 0)
100+ else false)
101+ then (assetDetails.reissuable == false)
102+ else false)
103+ then (assetDetails.issuer == artworksDapp)
104+ else false
105+
106+
89107 func isSignArtNFT (id) = {
90108 let assetDetails = value(assetInfo(id))
91- if (if (if (if ((assetDetails.quantity != 1))
92- then true
93- else (assetDetails.decimals != 0))
94- then true
95- else (assetDetails.reissuable != false))
96- then true
97- else (assetDetails.issuer != artworksDapp))
98- then false
99- else true
109+ assetIsValid(assetDetails)
100110 }
101111
102112
141151 }
142152
143153
154+func artIsValid (artStatus) = if ((artStatus != artIllegal))
155+ then (artStatus != artSuspended)
156+ else false
157+
158+
144159 func checkArtStatus (addr,id) = {
145160 let artStatus = getArtStrByK(keyFlag(addr, id))
146- if (if ((artStatus == artIllegal))
161+ if (artIsValid(artStatus))
147162 then true
148- else (artStatus == artSuspended))
149- then throw(("Original Artwork flagged as " + artStatus))
150- else true
163+ else throw(("Original Artwork flagged as " + artStatus))
151164 }
152165
153166
226239 }
227240
228241
242+func provideBaseData (i,nftId) = {
243+ let $t085558594 = idCallerDate(i)
244+ let id = $t085558594._1
245+ let caller = $t085558594._2
246+ let date = $t085558594._3
247+ let $t085978666 = checkNFTInfo(nftId)
248+ let isValidNFT = $t085978666._1
249+ let artId = $t085978666._2
250+ let creatorAddr = $t085978666._3
251+ let artSignID = $t085978666._4
252+ $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
253+ }
254+
255+
256+func updateNumSales () = {
257+ let numSales = getIntByK(numSalesK)
258+ IntegerEntry(numSalesK, (numSales + 1))
259+ }
260+
261+
229262 @Callable(i)
230263 func sellNFT (price,asset) = {
231- let $t081048143 = idCallerDate(i)
232- let id = $t081048143._1
233- let caller = $t081048143._2
234- let date = $t081048143._3
235- let $t081498185 = isPayment(i)
236- let payment = $t081498185._1
237- let amount = $t081498185._2
264+ let $t089198955 = isPayment(i)
265+ let payment = $t089198955._1
266+ let amount = $t089198955._2
238267 let nftId = if (if (isDefined(payment.assetId))
239268 then isSignArtNFT(value(payment.assetId))
240269 else false)
241270 then toBase58String(value(payment.assetId))
242271 else throw("Only SIGN Art NFT accepted.")
243- let $t083648433 = checkNFTInfo(nftId)
244- let isValidNFT = $t083648433._1
245- let artId = $t083648433._2
246- let creatorAddr = $t083648433._3
247- let artSignID = $t083648433._4
272+ let $t091349226 = provideBaseData(i, nftId)
273+ let id = $t091349226._1
274+ let caller = $t091349226._2
275+ let date = $t091349226._3
276+ let isValidNFT = $t091349226._4
277+ let artId = $t091349226._5
278+ let creatorAddr = $t091349226._6
279+ let artSignID = $t091349226._7
248280 if ((size(artSignID) == 0))
249281 then throw("Artwork not found on SIGN Art")
250282 else if (!(isValidNFT))
251- then throw("Something went wrong")
283+ then throw("Not a valid nft")
252284 else if (!(acceptedAssetIds(asset)))
253285 then throw("Only SIGN, USDN or WAVES accepted")
254286 else if ((price == 0))
255287 then throw("Wrong minimum sell price")
256288 else if (!(validateMinSell(asset, price)))
257289 then throw("Wrong minimum sell price")
258- else [StringEntry((((((((("sale2nd_info_" + 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)]
290+ 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)]
259291 }
260292
261293
262294
263295 @Callable(i)
264-func updateSalePrice (nftid,price,asset) = {
265- let $t093259364 = idCallerDate(i)
266- let id = $t093259364._1
267- let caller = $t093259364._2
268- let date = $t093259364._3
269- let $t093709439 = checkNFTInfo(nftid)
270- let isValidNFT = $t093709439._1
271- let artId = $t093709439._2
272- let creatorAddr = $t093709439._3
273- let artSignID = $t093709439._4
296+func updateSalePrice (nftId,price,asset) = {
297+ let $t01009910191 = provideBaseData(i, nftId)
298+ let id = $t01009910191._1
299+ let caller = $t01009910191._2
300+ let date = $t01009910191._3
301+ let isValidNFT = $t01009910191._4
302+ let artId = $t01009910191._5
303+ let creatorAddr = $t01009910191._6
304+ let artSignID = $t01009910191._7
274305 if ((size(artSignID) == 0))
275306 then throw("Artwork not found on SIGN Art, cancel your sale.")
276307 else if (!(isValidNFT))
277- then throw("Something went wrong")
308+ then throw("Not a valid nft")
278309 else {
279- let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
310+ let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
280311 if ((saleOwner != caller))
281312 then throw("You don't own this NFT")
282313 else {
283- let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid))
314+ let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
284315 if ((saleStatus != "OPEN"))
285316 then throw("Sale not active")
286317 else if (!(acceptedAssetIds(asset)))
290321 else if (!(validateMinSell(asset, price)))
291322 then throw("Wrong minimum sell price")
292323 else {
293- let saleKey = ((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
324+ let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
294325 let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_")
295326 [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))]
296327 }
301332
302333
303334 @Callable(i)
304-func cancelSale (nftid) = {
305- let $t01058910628 = idCallerDate(i)
306- let id = $t01058910628._1
307- let caller = $t01058910628._2
308- let date = $t01058910628._3
309- let $t01063410856 = checkNFTInfo(nftid)
310- let isValidNFT = $t01063410856._1
311- let artId = $t01063410856._2
312- let creatorAddr = $t01063410856._3
313- let artSignID = $t01063410856._4
314- let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
335+func cancelSale (nftId) = {
336+ let $t01133111571 = provideBaseData(i, nftId)
337+ let id = $t01133111571._1
338+ let caller = $t01133111571._2
339+ let date = $t01133111571._3
340+ let isValidNFT = $t01133111571._4
341+ let artId = $t01133111571._5
342+ let creatorAddr = $t01133111571._6
343+ let artSignID = $t01133111571._7
344+ let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
315345 if ((saleOwner != caller))
316346 then throw("You don't own this NFT")
317347 else {
318- let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid))
348+ let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
319349 if ((saleStatus != "OPEN"))
320350 then throw("Sale not active")
321351 else {
322- let saleKey = ((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
352+ let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
323353 let saleInfo = getStrByK((saleKey + "_OPEN"))
324-[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))]
354+[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))]
325355 }
326356 }
327357 }
329359
330360
331361 @Callable(i)
332-func buyNFT (nftid) = {
333- let $t01166911708 = idCallerDate(i)
334- let id = $t01166911708._1
335- let caller = $t01166911708._2
336- let date = $t01166911708._3
337- let saleOwner = getSaleOwnerAndStatus(nftid)
338- let $t01176211831 = checkNFTInfo(nftid)
339- let isValidNFT = $t01176211831._1
340- let artId = $t01176211831._2
341- let creatorAddr = $t01176211831._3
342- let artSignID = $t01176211831._4
362+func buyNFT (nftId) = {
363+ let $t01240212494 = provideBaseData(i, nftId)
364+ let id = $t01240212494._1
365+ let caller = $t01240212494._2
366+ let date = $t01240212494._3
367+ let isValidNFT = $t01240212494._4
368+ let artId = $t01240212494._5
369+ let creatorAddr = $t01240212494._6
370+ let artSignID = $t01240212494._7
343371 if ((size(artSignID) == 0))
344372 then throw("Artwork not found on SIGN Art, cancel your sale.")
345373 else if (!(isValidNFT))
346- then throw("Something went wrong")
374+ then throw("Not a valid nft")
347375 else {
348- let saleKey = ((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
376+ let saleOwner = getSaleOwnerAndStatus(nftId)
377+ let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
349378 let saleInfo = getStrByK((saleKey + "_OPEN"))
350379 if ((size(saleInfo) == 0))
351380 then throw("Sale Not found!")
354383 if ((parseInt(saleInfoArray[1]) == 0))
355384 then throw("Offer only")
356385 else {
357- let $t01229912335 = isPayment(i)
358- let payment = $t01229912335._1
359- let amount = $t01229912335._2
386+ let $t01299113027 = isPayment(i)
387+ let payment = $t01299113027._1
388+ let amount = $t01299113027._2
360389 let paymentAssetStr = if (isDefined(payment.assetId))
361390 then toBase58String(value(payment.assetId))
362391 else ""
368397 let amountForSign = fraction(amount, signCut, 100)
369398 let amountForCreator = fraction(amount, creatorCut, 100)
370399 let amountForOwner = (amount - (amountForSign + amountForCreator))
371- let $t01283812966 = setTransfers(amount, payment.assetId, nftid, creatorAddr, saleOwner, caller)
372- let signFee = $t01283812966._1
373- let creatorFee = $t01283812966._2
374- let ownerFee = $t01283812966._3
375- let collectorNFT = $t01283812966._4
376-[DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((makeString(saleInfoArray, "_") + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), signFee, creatorFee, ownerFee, collectorNFT]
400+ let $t01353013658 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
401+ let signFee = $t01353013658._1
402+ let creatorFee = $t01353013658._2
403+ let ownerFee = $t01353013658._3
404+ let collectorNFT = $t01353013658._4
405+[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]
377406 }
378407 }
379408 }
383412
384413
385414 @Callable(i)
386-func setOffer (nftid) = {
387- let $t01336913411 = idCallerDate(i)
388- let id = $t01336913411._1
389- let offerOwner = $t01336913411._2
390- let date = $t01336913411._3
391- let $t01341713453 = isPayment(i)
392- let payment = $t01341713453._1
393- let amount = $t01341713453._2
394- let assetId = if (!(isDefined(payment.assetId)))
395- then "WAVES"
396- else toBase58String(value(payment.assetId))
397- if (!(acceptedAssetIds(assetId)))
398- then throw("asset not accepted")
399- else if ((amount == 0))
400- then throw("Offer of 0 not allowed")
401- else if (!(validateMinSell(assetId, amount)))
402- then throw("Wrong minimum sell price")
403- else {
404- let $t01378713845 = checkNFTInfo(nftid)
405- let isValidNFT = $t01378713845._1
406- let artId = $t01378713845._2
407- let creatorAddr = $t01378713845._3
408- if (!(isValidNFT))
409- then throw("Something went wrong")
415+func setOffer (nftId) = {
416+ let $t01406614162 = provideBaseData(i, nftId)
417+ let id = $t01406614162._1
418+ let offerOwner = $t01406614162._2
419+ let date = $t01406614162._3
420+ let isValidNFT = $t01406614162._4
421+ let artId = $t01406614162._5
422+ let creatorAddr = $t01406614162._6
423+ let artSignID = $t01406614162._7
424+ if (!(isValidNFT))
425+ then throw("Not a valid nft")
426+ else {
427+ let $t01422314259 = isPayment(i)
428+ let payment = $t01422314259._1
429+ let amount = $t01422314259._2
430+ let assetId = if (!(isDefined(payment.assetId)))
431+ then "WAVES"
432+ else toBase58String(value(payment.assetId))
433+ if (!(acceptedAssetIds(assetId)))
434+ then throw("asset not accepted")
435+ else if ((amount == 0))
436+ then throw("Offer of 0 not allowed")
437+ else if (!(validateMinSell(assetId, amount)))
438+ then throw("Wrong minimum sell price")
410439 else {
411- let saleOwner = getSaleOwnerAndStatus(nftid)
412-[StringEntry((((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftid) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))]
440+ let saleOwner = getSaleOwnerAndStatus(nftId)
441+[StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))]
413442 }
414- }
443+ }
415444 }
416445
417446
418447
419448 @Callable(i)
420-func acceptOffer (nftid,offerId,offerOwner) = {
421- let $t01437814447 = idCallerDate(i)
422- let id = $t01437814447._1
423- let caller = $t01437814447._2
424- let date = $t01437814447._3
425- let saleOwner = getSaleOwnerAndStatus(nftid)
426- if ((caller != saleOwner))
427- then throw("You cannot do this action")
449+func acceptOffer (nftId,offerId,offerOwner) = {
450+ let $t01506115153 = provideBaseData(i, nftId)
451+ let id = $t01506115153._1
452+ let caller = $t01506115153._2
453+ let date = $t01506115153._3
454+ let isValidNFT = $t01506115153._4
455+ let artId = $t01506115153._5
456+ let creatorAddr = $t01506115153._6
457+ let artSignID = $t01506115153._7
458+ if (!(isValidNFT))
459+ then throw("Not a valid nft")
428460 else {
429- let bidKey = ((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + offerId)
430- let bidValue = getStrByK((bidKey + "_OPEN"))
431- if ((bidValue == ""))
432- then throw("Offer not found or not for sale")
461+ let saleOwner = getSaleOwnerAndStatus(nftId)
462+ if ((caller != saleOwner))
463+ then throw("Only sale owner can accept offer")
433464 else {
434- let $t01477114829 = checkNFTInfo(nftid)
435- let isValidNFT = $t01477114829._1
436- let artId = $t01477114829._2
437- let creatorAddr = $t01477114829._3
438- if (!(isValidNFT))
439- then throw("Something went wrong")
465+ let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
466+ let $t01540715462 = getBidData(bidKey)
467+ let bidDataArr = $t01540715462._1
468+ let assetId = $t01540715462._2
469+ let bidData = $t01540715462._3
470+ let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
471+ let saleInfo = getStrByK((saleKey + "_OPEN"))
472+ if ((size(saleInfo) == 0))
473+ then throw("Sale Not found!")
440474 else {
441- let saleKey = ((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
442- let saleValue = getStrByK((saleKey + "_OPEN"))
443- if ((size(saleValue) == 0))
444- then throw("Sale Not found!")
445- else {
446- let saleValArr = split(saleValue, "_")
447- let $t01517415229 = getBidData(bidKey)
448- let bidDataArr = $t01517415229._1
449- let assetId = $t01517415229._2
450- let bidData = $t01517415229._3
451- let amount = value(parseInt(bidDataArr[1]))
452- let $t01528315410 = setTransfers(amount, assetId, nftid, creatorAddr, saleOwner, bidDataArr[6])
453- let signFee = $t01528315410._1
454- let creatorFee = $t01528315410._2
455- let ownerFee = $t01528315410._3
456- let collectorNFT = $t01528315410._4
457-[DeleteEntry((saleKey + "_OPEN")), DeleteEntry((bidKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((bidKey + "_CLOSED"), ((((bidValue + "_CLOSED_") + toString(date)) + "_") + id)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((((((makeString(saleValArr, "_") + "_CLOSED-OFFER_") + toString(date)) + "_") + id) + "_") + offerOwner) + "_") + toString(amount)) + "_") + toBase58String(value(assetId)))), signFee, creatorFee, ownerFee, collectorNFT]
458- }
475+ let amount = value(parseInt(bidDataArr[1]))
476+ let $t01569415821 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
477+ let signFee = $t01569415821._1
478+ let creatorFee = $t01569415821._2
479+ let ownerFee = $t01569415821._3
480+ let collectorNFT = $t01569415821._4
481+[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)) + "_") + toBase58String(value(assetId)))), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT]
459482 }
460483 }
461484 }
464487
465488
466489 @Callable(i)
467-func cancelOffer (nftid,offerId,saleOwner) = {
468- let $t01605916120 = idCallerDate(i)
469- let id = $t01605916120._1
470- let caller = $t01605916120._2
471- let date = $t01605916120._3
472- let bidKey = ((((((("offer2nd_" + caller) + "_") + nftid) + "_") + saleOwner) + "_") + offerId)
473- let $t01619716252 = getBidData(bidKey)
474- let bidDataArr = $t01619716252._1
475- let assetId = $t01619716252._2
476- let bidData = $t01619716252._3
490+func cancelOffer (nftId,offerId,saleOwner) = {
491+ let $t01647716538 = idCallerDate(i)
492+ let id = $t01647716538._1
493+ let caller = $t01647716538._2
494+ let date = $t01647716538._3
495+ let bidKey = getBidKey(caller, nftId, saleOwner, offerId)
496+ let $t01660216657 = getBidData(bidKey)
497+ let bidDataArr = $t01660216657._1
498+ let assetId = $t01660216657._2
499+ let bidData = $t01660216657._3
477500 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
478501 }
479502
481504
482505 @Callable(i)
483506 func makeRequest (artId,creatorAddr) = {
484- let $t01657716621 = idCallerDate(i)
485- let id = $t01657716621._1
486- let requestOwner = $t01657716621._2
487- let date = $t01657716621._3
488- let $t01662716663 = isPayment(i)
489- let payment = $t01662716663._1
490- let amount = $t01662716663._2
507+ let $t01698217026 = idCallerDate(i)
508+ let id = $t01698217026._1
509+ let requestOwner = $t01698217026._2
510+ let date = $t01698217026._3
511+ let $t01703217068 = isPayment(i)
512+ let payment = $t01703217068._1
513+ let amount = $t01703217068._2
491514 let assetId = if (!(isDefined(payment.assetId)))
492515 then "WAVES"
493516 else toBase58String(value(payment.assetId))
499522 let isValidART = checkARTExist(artId, creatorAddr)
500523 if (!(isValidART))
501524 then throw("Something went wrong")
502- else [StringEntry((((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))]
525+ else [StringEntry((getRequestKey(requestOwner, creatorAddr, artId, id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))]
503526 }
504527 }
505528
507530
508531 @Callable(i)
509532 func fillRequest (artId,requestOwner,offerId) = {
510- let $t01747017512 = idCallerDate(i)
511- let id = $t01747017512._1
512- let saleOwner = $t01747017512._2
513- let date = $t01747017512._3
514- let $t01751717561 = isPayment(i)
515- let payment = $t01751717561._1
516- let amountAttached = $t01751717561._2
533+ let $t01786417906 = idCallerDate(i)
534+ let id = $t01786417906._1
535+ let saleOwner = $t01786417906._2
536+ let date = $t01786417906._3
537+ let $t01791117955 = isPayment(i)
538+ let payment = $t01791117955._1
539+ let amountAttached = $t01791117955._2
517540 let NFTid = if (if (isDefined(payment.assetId))
518541 then isSignArtNFT(value(payment.assetId))
519542 else false)
523546 if ((size(NFTdata) == 0))
524547 then throw("No NFT found")
525548 else {
526- let requestData = split(getStrByK((((((((("request2nd_" + requestOwner) + "_") + NFTdata[6]) + "_") + artId) + "_") + offerId) + "_OPEN")), "_")
549+ let requestKey = getRequestKey(requestOwner, NFTdata[6], artId, offerId)
550+ let requestData = split(getStrByK((requestKey + "_OPEN")), "_")
527551 if ((size(requestData) == 1))
528552 then throw("No request found")
529553 else if ((requestData[3] != NFTdata[5]))
530554 then throw("This NFT don't match the requested artwork")
531555 else {
532556 let amount = value(parseInt(requestData[1]))
533- let $t01828118456 = setTransfers(amount, fromBase58String(requestData[2]), toBase58String(value(NFTid)), NFTdata[6], saleOwner, requestData[4])
534- let signFee = $t01828118456._1
535- let creatorFee = $t01828118456._2
536- let ownerFee = $t01828118456._3
537- let collectorNFT = $t01828118456._4
538-[DeleteEntry((((((((("request2nd_" + requestOwner) + "_") + NFTdata[6]) + "_") + artId) + "_") + offerId) + "_OPEN")), StringEntry((((((((("request2nd_" + requestOwner) + "_") + NFTdata[6]) + "_") + artId) + "_") + offerId) + "_CLOSED"), ((((((((((((toString(date) + "_") + toString(amount)) + "_") + requestData[2]) + "_") + artId) + "_") + requestOwner) + "_") + saleOwner) + "_") + id)), signFee, creatorFee, ownerFee, collectorNFT]
557+ let $t01869618871 = setTransfers(amount, fromBase58String(requestData[2]), toBase58String(value(NFTid)), NFTdata[6], saleOwner, requestData[4])
558+ let signFee = $t01869618871._1
559+ let creatorFee = $t01869618871._2
560+ let ownerFee = $t01869618871._3
561+ let collectorNFT = $t01869618871._4
562+[DeleteEntry((requestKey + "_OPEN")), updateNumSales(), StringEntry((requestKey + "_CLOSED"), ((((((((((((toString(date) + "_") + toString(amount)) + "_") + requestData[2]) + "_") + artId) + "_") + requestOwner) + "_") + saleOwner) + "_") + id)), signFee, creatorFee, ownerFee, collectorNFT]
539563 }
540564 }
541565 }
544568
545569 @Callable(i)
546570 func cancelRequest (artId,creatorAddr,requestId) = {
547- let $t01900819052 = idCallerDate(i)
548- let id = $t01900819052._1
549- let requestOwner = $t01900819052._2
550- let date = $t01900819052._3
551- let requesDataKey = ((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + requestId)
552- let requestData = getStrByK((requesDataKey + "_OPEN"))
571+ let $t01934719391 = idCallerDate(i)
572+ let id = $t01934719391._1
573+ let requestOwner = $t01934719391._2
574+ let date = $t01934719391._3
575+ let requestKey = getRequestKey(requestOwner, creatorAddr, artId, requestId)
576+ let requestData = getStrByK((requestKey + "_OPEN"))
553577 if ((size(requestData) == 0))
554578 then throw("Request not found")
555579 else {
556580 let requestDataArr = split(requestData, "_")
557-[DeleteEntry((requesDataKey + "_OPEN")), StringEntry((((((requesDataKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((requestData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(requestOwner)), parseIntValue(requestDataArr[1]), fromBase58String(requestDataArr[2]))]
581+[DeleteEntry((requestKey + "_OPEN")), StringEntry((((((requestKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((requestData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(requestOwner)), parseIntValue(requestDataArr[1]), fromBase58String(requestDataArr[2]))]
558582 }
559583 }
560584
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let unitTest = false
55
66 let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
77
88 let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB"))
99
1010 let artworksDapp = value(addressFromString("3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY"))
1111
1212 let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
1313
1414 let userDapp = if (unitTest)
1515 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
1616 else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj"))
1717
1818 let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq"))
1919
2020 let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
2121
2222 let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
2323
2424 let wavesAssetId = base58''
2525
2626 let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
2727
28-let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
29-
3028 let signCut = 3
3129
3230 let creatorCut = 10
3331
3432 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
3533
3634 let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
3735
3836 let userSuspended = "SUSPENDED"
3937
4038 let userRemoved = "REMOVED"
4139
4240 let artIllegal = "ILLEGAL"
4341
4442 let artSuspended = "SUSPENDED"
43+
44+let numSalesK = "num_sales"
4545
4646 func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error")
4747
4848
4949 func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "")
5050
5151
5252 func getStrByK (key) = valueOrElse(getString(this, key), "")
5353
5454
5555 func getIntByK (key) = valueOrElse(getInteger(this, key), 0)
5656
5757
5858 func keyUserStatus (addr) = ("user_status_" + addr)
5959
6060
6161 func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr)
6262
6363
6464 func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr)
6565
6666
6767 func keyNFTData (id) = ("nft_" + id)
6868
6969
70+func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr)
71+
72+
73+func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId)
74+
75+
76+func getRequestKey (requestOwner,creatorAddr,artId,id) = ((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id)
77+
78+
7079 func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
7180
7281
7382 let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId)))
7483
7584 func idCallerDate (i) = if (!(dappRunning))
7685 then throw(maintenanceMSG)
7786 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
7887
7988
8089 func isPayment (i) = if ((size(i.payments) == 0))
8190 then throw("No payment attached")
8291 else {
8392 let payment = value(i.payments[0])
8493 let amount = value(payment.amount)
8594 $Tuple2(payment, amount)
8695 }
8796
8897
98+func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
99+ then (assetDetails.decimals == 0)
100+ else false)
101+ then (assetDetails.reissuable == false)
102+ else false)
103+ then (assetDetails.issuer == artworksDapp)
104+ else false
105+
106+
89107 func isSignArtNFT (id) = {
90108 let assetDetails = value(assetInfo(id))
91- if (if (if (if ((assetDetails.quantity != 1))
92- then true
93- else (assetDetails.decimals != 0))
94- then true
95- else (assetDetails.reissuable != false))
96- then true
97- else (assetDetails.issuer != artworksDapp))
98- then false
99- else true
109+ assetIsValid(assetDetails)
100110 }
101111
102112
103113 func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId)))
104114 then (assetId != toBase58String(wavesAssetId))
105115 else false)
106116 then (assetId != "WAVES")
107117 else false)
108118 then (assetId != toBase58String(usdnAssetId))
109119 else false)
110120 then false
111121 else true
112122
113123
114124 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
115125 then unit
116126 else fromBase58String(assetId)
117127
118128
119129 func getSaleOwnerAndStatus (nftid) = {
120130 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
121131 if ((size(saleOwner) == 0))
122132 then throw("NFT not found")
123133 else {
124134 let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid))
125135 if ((saleStatus != "OPEN"))
126136 then throw("NFT not for sale")
127137 else saleOwner
128138 }
129139 }
130140
131141
132142 func getBidData (key) = {
133143 let bidData = getStrByK((key + "_OPEN"))
134144 if ((bidData == ""))
135145 then throw("Offer not found")
136146 else {
137147 let bidDataArr = split(bidData, "_")
138148 let assetId = getBidAssetId(bidDataArr[2])
139149 $Tuple3(bidDataArr, assetId, bidData)
140150 }
141151 }
142152
143153
154+func artIsValid (artStatus) = if ((artStatus != artIllegal))
155+ then (artStatus != artSuspended)
156+ else false
157+
158+
144159 func checkArtStatus (addr,id) = {
145160 let artStatus = getArtStrByK(keyFlag(addr, id))
146- if (if ((artStatus == artIllegal))
161+ if (artIsValid(artStatus))
147162 then true
148- else (artStatus == artSuspended))
149- then throw(("Original Artwork flagged as " + artStatus))
150- else true
163+ else throw(("Original Artwork flagged as " + artStatus))
151164 }
152165
153166
154167 func checkArtistStatus (addr) = {
155168 let artistStatus = getUserStrByK(keyUserStatus(addr))
156169 if (containsElement([userSuspended, userRemoved], artistStatus))
157170 then throw(("Original Artist " + artistStatus))
158171 else true
159172 }
160173
161174
162175 func checkNFTInfo (assetId) = {
163176 let nftData = split(getArtStrByK(keyNFTData(assetId)), "_")
164177 let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5]))
165178 if (if (!(checkArtStatus(nftData[6], nftData[5])))
166179 then !(checkArtistStatus(nftData[6]))
167180 else false)
168181 then $Tuple4(false, nftData[5], nftData[6], artSignID)
169182 else $Tuple4(true, nftData[5], nftData[6], artSignID)
170183 }
171184
172185
173186 func checkARTExist (artId,creatorAddr) = {
174187 let artSignID = getArtStrByK(keySignID(creatorAddr, artId))
175188 if ((size(artSignID) == 0))
176189 then throw("Artwork not found on SIGN Art")
177190 else if (if (!(checkArtStatus(creatorAddr, artId)))
178191 then !(checkArtistStatus(creatorAddr))
179192 else false)
180193 then false
181194 else true
182195 }
183196
184197
185198 func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = {
186199 let amountForSign = fraction(amount, signCut, 100)
187200 let amountForCreator = fraction(amount, creatorCut, 100)
188201 let amountForOwner = (amount - (amountForSign + amountForCreator))
189202 let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)
190203 let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
191204 let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
192205 let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
193206 $Tuple4(signFee, creatorFee, ownerFee, collectorNFT)
194207 }
195208
196209
197210 func validateMinSell (assetId,price) = {
198211 let minSellWaves = if (unitTest)
199212 then 10
200213 else getIntByKFromOracle("waves_min_sell")
201214 let minSellUsdn = 1000000
202215 let minSellSign = if (unitTest)
203216 then 1
204217 else (currentCertificationPrice * 2)
205218 if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
206219 then (minSellUsdn > price)
207220 else false)
208221 then (price != 0)
209222 else false)
210223 then true
211224 else if (if ((assetId == toBase58String(signAssetId)))
212225 then (minSellSign > price)
213226 else false)
214227 then (price != 0)
215228 else false)
216229 then true
217230 else if (if (if ((assetId == toBase58String(wavesAssetId)))
218231 then true
219232 else (assetId == "WAVES"))
220233 then (minSellWaves > price)
221234 else false)
222235 then (price != 0)
223236 else false)
224237 then false
225238 else true
226239 }
227240
228241
242+func provideBaseData (i,nftId) = {
243+ let $t085558594 = idCallerDate(i)
244+ let id = $t085558594._1
245+ let caller = $t085558594._2
246+ let date = $t085558594._3
247+ let $t085978666 = checkNFTInfo(nftId)
248+ let isValidNFT = $t085978666._1
249+ let artId = $t085978666._2
250+ let creatorAddr = $t085978666._3
251+ let artSignID = $t085978666._4
252+ $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
253+ }
254+
255+
256+func updateNumSales () = {
257+ let numSales = getIntByK(numSalesK)
258+ IntegerEntry(numSalesK, (numSales + 1))
259+ }
260+
261+
229262 @Callable(i)
230263 func sellNFT (price,asset) = {
231- let $t081048143 = idCallerDate(i)
232- let id = $t081048143._1
233- let caller = $t081048143._2
234- let date = $t081048143._3
235- let $t081498185 = isPayment(i)
236- let payment = $t081498185._1
237- let amount = $t081498185._2
264+ let $t089198955 = isPayment(i)
265+ let payment = $t089198955._1
266+ let amount = $t089198955._2
238267 let nftId = if (if (isDefined(payment.assetId))
239268 then isSignArtNFT(value(payment.assetId))
240269 else false)
241270 then toBase58String(value(payment.assetId))
242271 else throw("Only SIGN Art NFT accepted.")
243- let $t083648433 = checkNFTInfo(nftId)
244- let isValidNFT = $t083648433._1
245- let artId = $t083648433._2
246- let creatorAddr = $t083648433._3
247- let artSignID = $t083648433._4
272+ let $t091349226 = provideBaseData(i, nftId)
273+ let id = $t091349226._1
274+ let caller = $t091349226._2
275+ let date = $t091349226._3
276+ let isValidNFT = $t091349226._4
277+ let artId = $t091349226._5
278+ let creatorAddr = $t091349226._6
279+ let artSignID = $t091349226._7
248280 if ((size(artSignID) == 0))
249281 then throw("Artwork not found on SIGN Art")
250282 else if (!(isValidNFT))
251- then throw("Something went wrong")
283+ then throw("Not a valid nft")
252284 else if (!(acceptedAssetIds(asset)))
253285 then throw("Only SIGN, USDN or WAVES accepted")
254286 else if ((price == 0))
255287 then throw("Wrong minimum sell price")
256288 else if (!(validateMinSell(asset, price)))
257289 then throw("Wrong minimum sell price")
258- else [StringEntry((((((((("sale2nd_info_" + 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)]
290+ 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)]
259291 }
260292
261293
262294
263295 @Callable(i)
264-func updateSalePrice (nftid,price,asset) = {
265- let $t093259364 = idCallerDate(i)
266- let id = $t093259364._1
267- let caller = $t093259364._2
268- let date = $t093259364._3
269- let $t093709439 = checkNFTInfo(nftid)
270- let isValidNFT = $t093709439._1
271- let artId = $t093709439._2
272- let creatorAddr = $t093709439._3
273- let artSignID = $t093709439._4
296+func updateSalePrice (nftId,price,asset) = {
297+ let $t01009910191 = provideBaseData(i, nftId)
298+ let id = $t01009910191._1
299+ let caller = $t01009910191._2
300+ let date = $t01009910191._3
301+ let isValidNFT = $t01009910191._4
302+ let artId = $t01009910191._5
303+ let creatorAddr = $t01009910191._6
304+ let artSignID = $t01009910191._7
274305 if ((size(artSignID) == 0))
275306 then throw("Artwork not found on SIGN Art, cancel your sale.")
276307 else if (!(isValidNFT))
277- then throw("Something went wrong")
308+ then throw("Not a valid nft")
278309 else {
279- let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
310+ let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
280311 if ((saleOwner != caller))
281312 then throw("You don't own this NFT")
282313 else {
283- let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid))
314+ let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
284315 if ((saleStatus != "OPEN"))
285316 then throw("Sale not active")
286317 else if (!(acceptedAssetIds(asset)))
287318 then throw("Only SIGN, USDN or WAVES accepted")
288319 else if ((price == 0))
289320 then throw("Wrong minimum sell price")
290321 else if (!(validateMinSell(asset, price)))
291322 then throw("Wrong minimum sell price")
292323 else {
293- let saleKey = ((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
324+ let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
294325 let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_")
295326 [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))]
296327 }
297328 }
298329 }
299330 }
300331
301332
302333
303334 @Callable(i)
304-func cancelSale (nftid) = {
305- let $t01058910628 = idCallerDate(i)
306- let id = $t01058910628._1
307- let caller = $t01058910628._2
308- let date = $t01058910628._3
309- let $t01063410856 = checkNFTInfo(nftid)
310- let isValidNFT = $t01063410856._1
311- let artId = $t01063410856._2
312- let creatorAddr = $t01063410856._3
313- let artSignID = $t01063410856._4
314- let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
335+func cancelSale (nftId) = {
336+ let $t01133111571 = provideBaseData(i, nftId)
337+ let id = $t01133111571._1
338+ let caller = $t01133111571._2
339+ let date = $t01133111571._3
340+ let isValidNFT = $t01133111571._4
341+ let artId = $t01133111571._5
342+ let creatorAddr = $t01133111571._6
343+ let artSignID = $t01133111571._7
344+ let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
315345 if ((saleOwner != caller))
316346 then throw("You don't own this NFT")
317347 else {
318- let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid))
348+ let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
319349 if ((saleStatus != "OPEN"))
320350 then throw("Sale not active")
321351 else {
322- let saleKey = ((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
352+ let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
323353 let saleInfo = getStrByK((saleKey + "_OPEN"))
324-[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))]
354+[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))]
325355 }
326356 }
327357 }
328358
329359
330360
331361 @Callable(i)
332-func buyNFT (nftid) = {
333- let $t01166911708 = idCallerDate(i)
334- let id = $t01166911708._1
335- let caller = $t01166911708._2
336- let date = $t01166911708._3
337- let saleOwner = getSaleOwnerAndStatus(nftid)
338- let $t01176211831 = checkNFTInfo(nftid)
339- let isValidNFT = $t01176211831._1
340- let artId = $t01176211831._2
341- let creatorAddr = $t01176211831._3
342- let artSignID = $t01176211831._4
362+func buyNFT (nftId) = {
363+ let $t01240212494 = provideBaseData(i, nftId)
364+ let id = $t01240212494._1
365+ let caller = $t01240212494._2
366+ let date = $t01240212494._3
367+ let isValidNFT = $t01240212494._4
368+ let artId = $t01240212494._5
369+ let creatorAddr = $t01240212494._6
370+ let artSignID = $t01240212494._7
343371 if ((size(artSignID) == 0))
344372 then throw("Artwork not found on SIGN Art, cancel your sale.")
345373 else if (!(isValidNFT))
346- then throw("Something went wrong")
374+ then throw("Not a valid nft")
347375 else {
348- let saleKey = ((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
376+ let saleOwner = getSaleOwnerAndStatus(nftId)
377+ let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
349378 let saleInfo = getStrByK((saleKey + "_OPEN"))
350379 if ((size(saleInfo) == 0))
351380 then throw("Sale Not found!")
352381 else {
353382 let saleInfoArray = split(saleInfo, "_")
354383 if ((parseInt(saleInfoArray[1]) == 0))
355384 then throw("Offer only")
356385 else {
357- let $t01229912335 = isPayment(i)
358- let payment = $t01229912335._1
359- let amount = $t01229912335._2
386+ let $t01299113027 = isPayment(i)
387+ let payment = $t01299113027._1
388+ let amount = $t01299113027._2
360389 let paymentAssetStr = if (isDefined(payment.assetId))
361390 then toBase58String(value(payment.assetId))
362391 else ""
363392 if (if ((saleInfoArray[1] != toString(amount)))
364393 then true
365394 else (saleInfoArray[2] != paymentAssetStr))
366395 then throw("Payment infos don't match.")
367396 else {
368397 let amountForSign = fraction(amount, signCut, 100)
369398 let amountForCreator = fraction(amount, creatorCut, 100)
370399 let amountForOwner = (amount - (amountForSign + amountForCreator))
371- let $t01283812966 = setTransfers(amount, payment.assetId, nftid, creatorAddr, saleOwner, caller)
372- let signFee = $t01283812966._1
373- let creatorFee = $t01283812966._2
374- let ownerFee = $t01283812966._3
375- let collectorNFT = $t01283812966._4
376-[DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((makeString(saleInfoArray, "_") + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), signFee, creatorFee, ownerFee, collectorNFT]
400+ let $t01353013658 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
401+ let signFee = $t01353013658._1
402+ let creatorFee = $t01353013658._2
403+ let ownerFee = $t01353013658._3
404+ let collectorNFT = $t01353013658._4
405+[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]
377406 }
378407 }
379408 }
380409 }
381410 }
382411
383412
384413
385414 @Callable(i)
386-func setOffer (nftid) = {
387- let $t01336913411 = idCallerDate(i)
388- let id = $t01336913411._1
389- let offerOwner = $t01336913411._2
390- let date = $t01336913411._3
391- let $t01341713453 = isPayment(i)
392- let payment = $t01341713453._1
393- let amount = $t01341713453._2
394- let assetId = if (!(isDefined(payment.assetId)))
395- then "WAVES"
396- else toBase58String(value(payment.assetId))
397- if (!(acceptedAssetIds(assetId)))
398- then throw("asset not accepted")
399- else if ((amount == 0))
400- then throw("Offer of 0 not allowed")
401- else if (!(validateMinSell(assetId, amount)))
402- then throw("Wrong minimum sell price")
403- else {
404- let $t01378713845 = checkNFTInfo(nftid)
405- let isValidNFT = $t01378713845._1
406- let artId = $t01378713845._2
407- let creatorAddr = $t01378713845._3
408- if (!(isValidNFT))
409- then throw("Something went wrong")
415+func setOffer (nftId) = {
416+ let $t01406614162 = provideBaseData(i, nftId)
417+ let id = $t01406614162._1
418+ let offerOwner = $t01406614162._2
419+ let date = $t01406614162._3
420+ let isValidNFT = $t01406614162._4
421+ let artId = $t01406614162._5
422+ let creatorAddr = $t01406614162._6
423+ let artSignID = $t01406614162._7
424+ if (!(isValidNFT))
425+ then throw("Not a valid nft")
426+ else {
427+ let $t01422314259 = isPayment(i)
428+ let payment = $t01422314259._1
429+ let amount = $t01422314259._2
430+ let assetId = if (!(isDefined(payment.assetId)))
431+ then "WAVES"
432+ else toBase58String(value(payment.assetId))
433+ if (!(acceptedAssetIds(assetId)))
434+ then throw("asset not accepted")
435+ else if ((amount == 0))
436+ then throw("Offer of 0 not allowed")
437+ else if (!(validateMinSell(assetId, amount)))
438+ then throw("Wrong minimum sell price")
410439 else {
411- let saleOwner = getSaleOwnerAndStatus(nftid)
412-[StringEntry((((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftid) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))]
440+ let saleOwner = getSaleOwnerAndStatus(nftId)
441+[StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))]
413442 }
414- }
443+ }
415444 }
416445
417446
418447
419448 @Callable(i)
420-func acceptOffer (nftid,offerId,offerOwner) = {
421- let $t01437814447 = idCallerDate(i)
422- let id = $t01437814447._1
423- let caller = $t01437814447._2
424- let date = $t01437814447._3
425- let saleOwner = getSaleOwnerAndStatus(nftid)
426- if ((caller != saleOwner))
427- then throw("You cannot do this action")
449+func acceptOffer (nftId,offerId,offerOwner) = {
450+ let $t01506115153 = provideBaseData(i, nftId)
451+ let id = $t01506115153._1
452+ let caller = $t01506115153._2
453+ let date = $t01506115153._3
454+ let isValidNFT = $t01506115153._4
455+ let artId = $t01506115153._5
456+ let creatorAddr = $t01506115153._6
457+ let artSignID = $t01506115153._7
458+ if (!(isValidNFT))
459+ then throw("Not a valid nft")
428460 else {
429- let bidKey = ((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + offerId)
430- let bidValue = getStrByK((bidKey + "_OPEN"))
431- if ((bidValue == ""))
432- then throw("Offer not found or not for sale")
461+ let saleOwner = getSaleOwnerAndStatus(nftId)
462+ if ((caller != saleOwner))
463+ then throw("Only sale owner can accept offer")
433464 else {
434- let $t01477114829 = checkNFTInfo(nftid)
435- let isValidNFT = $t01477114829._1
436- let artId = $t01477114829._2
437- let creatorAddr = $t01477114829._3
438- if (!(isValidNFT))
439- then throw("Something went wrong")
465+ let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
466+ let $t01540715462 = getBidData(bidKey)
467+ let bidDataArr = $t01540715462._1
468+ let assetId = $t01540715462._2
469+ let bidData = $t01540715462._3
470+ let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
471+ let saleInfo = getStrByK((saleKey + "_OPEN"))
472+ if ((size(saleInfo) == 0))
473+ then throw("Sale Not found!")
440474 else {
441- let saleKey = ((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + artId) + "_") + creatorAddr)
442- let saleValue = getStrByK((saleKey + "_OPEN"))
443- if ((size(saleValue) == 0))
444- then throw("Sale Not found!")
445- else {
446- let saleValArr = split(saleValue, "_")
447- let $t01517415229 = getBidData(bidKey)
448- let bidDataArr = $t01517415229._1
449- let assetId = $t01517415229._2
450- let bidData = $t01517415229._3
451- let amount = value(parseInt(bidDataArr[1]))
452- let $t01528315410 = setTransfers(amount, assetId, nftid, creatorAddr, saleOwner, bidDataArr[6])
453- let signFee = $t01528315410._1
454- let creatorFee = $t01528315410._2
455- let ownerFee = $t01528315410._3
456- let collectorNFT = $t01528315410._4
457-[DeleteEntry((saleKey + "_OPEN")), DeleteEntry((bidKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((bidKey + "_CLOSED"), ((((bidValue + "_CLOSED_") + toString(date)) + "_") + id)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((((((makeString(saleValArr, "_") + "_CLOSED-OFFER_") + toString(date)) + "_") + id) + "_") + offerOwner) + "_") + toString(amount)) + "_") + toBase58String(value(assetId)))), signFee, creatorFee, ownerFee, collectorNFT]
458- }
475+ let amount = value(parseInt(bidDataArr[1]))
476+ let $t01569415821 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
477+ let signFee = $t01569415821._1
478+ let creatorFee = $t01569415821._2
479+ let ownerFee = $t01569415821._3
480+ let collectorNFT = $t01569415821._4
481+[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)) + "_") + toBase58String(value(assetId)))), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT]
459482 }
460483 }
461484 }
462485 }
463486
464487
465488
466489 @Callable(i)
467-func cancelOffer (nftid,offerId,saleOwner) = {
468- let $t01605916120 = idCallerDate(i)
469- let id = $t01605916120._1
470- let caller = $t01605916120._2
471- let date = $t01605916120._3
472- let bidKey = ((((((("offer2nd_" + caller) + "_") + nftid) + "_") + saleOwner) + "_") + offerId)
473- let $t01619716252 = getBidData(bidKey)
474- let bidDataArr = $t01619716252._1
475- let assetId = $t01619716252._2
476- let bidData = $t01619716252._3
490+func cancelOffer (nftId,offerId,saleOwner) = {
491+ let $t01647716538 = idCallerDate(i)
492+ let id = $t01647716538._1
493+ let caller = $t01647716538._2
494+ let date = $t01647716538._3
495+ let bidKey = getBidKey(caller, nftId, saleOwner, offerId)
496+ let $t01660216657 = getBidData(bidKey)
497+ let bidDataArr = $t01660216657._1
498+ let assetId = $t01660216657._2
499+ let bidData = $t01660216657._3
477500 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
478501 }
479502
480503
481504
482505 @Callable(i)
483506 func makeRequest (artId,creatorAddr) = {
484- let $t01657716621 = idCallerDate(i)
485- let id = $t01657716621._1
486- let requestOwner = $t01657716621._2
487- let date = $t01657716621._3
488- let $t01662716663 = isPayment(i)
489- let payment = $t01662716663._1
490- let amount = $t01662716663._2
507+ let $t01698217026 = idCallerDate(i)
508+ let id = $t01698217026._1
509+ let requestOwner = $t01698217026._2
510+ let date = $t01698217026._3
511+ let $t01703217068 = isPayment(i)
512+ let payment = $t01703217068._1
513+ let amount = $t01703217068._2
491514 let assetId = if (!(isDefined(payment.assetId)))
492515 then "WAVES"
493516 else toBase58String(value(payment.assetId))
494517 if (!(acceptedAssetIds(assetId)))
495518 then throw("asset not accepted")
496519 else if (!(validateMinSell(assetId, amount)))
497520 then throw("Wrong minimum sell price")
498521 else {
499522 let isValidART = checkARTExist(artId, creatorAddr)
500523 if (!(isValidART))
501524 then throw("Something went wrong")
502- else [StringEntry((((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))]
525+ else [StringEntry((getRequestKey(requestOwner, creatorAddr, artId, id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))]
503526 }
504527 }
505528
506529
507530
508531 @Callable(i)
509532 func fillRequest (artId,requestOwner,offerId) = {
510- let $t01747017512 = idCallerDate(i)
511- let id = $t01747017512._1
512- let saleOwner = $t01747017512._2
513- let date = $t01747017512._3
514- let $t01751717561 = isPayment(i)
515- let payment = $t01751717561._1
516- let amountAttached = $t01751717561._2
533+ let $t01786417906 = idCallerDate(i)
534+ let id = $t01786417906._1
535+ let saleOwner = $t01786417906._2
536+ let date = $t01786417906._3
537+ let $t01791117955 = isPayment(i)
538+ let payment = $t01791117955._1
539+ let amountAttached = $t01791117955._2
517540 let NFTid = if (if (isDefined(payment.assetId))
518541 then isSignArtNFT(value(payment.assetId))
519542 else false)
520543 then payment.assetId
521544 else throw("No NFT found")
522545 let NFTdata = split(getArtStrByK(("nft_" + toBase58String(value(NFTid)))), "_")
523546 if ((size(NFTdata) == 0))
524547 then throw("No NFT found")
525548 else {
526- let requestData = split(getStrByK((((((((("request2nd_" + requestOwner) + "_") + NFTdata[6]) + "_") + artId) + "_") + offerId) + "_OPEN")), "_")
549+ let requestKey = getRequestKey(requestOwner, NFTdata[6], artId, offerId)
550+ let requestData = split(getStrByK((requestKey + "_OPEN")), "_")
527551 if ((size(requestData) == 1))
528552 then throw("No request found")
529553 else if ((requestData[3] != NFTdata[5]))
530554 then throw("This NFT don't match the requested artwork")
531555 else {
532556 let amount = value(parseInt(requestData[1]))
533- let $t01828118456 = setTransfers(amount, fromBase58String(requestData[2]), toBase58String(value(NFTid)), NFTdata[6], saleOwner, requestData[4])
534- let signFee = $t01828118456._1
535- let creatorFee = $t01828118456._2
536- let ownerFee = $t01828118456._3
537- let collectorNFT = $t01828118456._4
538-[DeleteEntry((((((((("request2nd_" + requestOwner) + "_") + NFTdata[6]) + "_") + artId) + "_") + offerId) + "_OPEN")), StringEntry((((((((("request2nd_" + requestOwner) + "_") + NFTdata[6]) + "_") + artId) + "_") + offerId) + "_CLOSED"), ((((((((((((toString(date) + "_") + toString(amount)) + "_") + requestData[2]) + "_") + artId) + "_") + requestOwner) + "_") + saleOwner) + "_") + id)), signFee, creatorFee, ownerFee, collectorNFT]
557+ let $t01869618871 = setTransfers(amount, fromBase58String(requestData[2]), toBase58String(value(NFTid)), NFTdata[6], saleOwner, requestData[4])
558+ let signFee = $t01869618871._1
559+ let creatorFee = $t01869618871._2
560+ let ownerFee = $t01869618871._3
561+ let collectorNFT = $t01869618871._4
562+[DeleteEntry((requestKey + "_OPEN")), updateNumSales(), StringEntry((requestKey + "_CLOSED"), ((((((((((((toString(date) + "_") + toString(amount)) + "_") + requestData[2]) + "_") + artId) + "_") + requestOwner) + "_") + saleOwner) + "_") + id)), signFee, creatorFee, ownerFee, collectorNFT]
539563 }
540564 }
541565 }
542566
543567
544568
545569 @Callable(i)
546570 func cancelRequest (artId,creatorAddr,requestId) = {
547- let $t01900819052 = idCallerDate(i)
548- let id = $t01900819052._1
549- let requestOwner = $t01900819052._2
550- let date = $t01900819052._3
551- let requesDataKey = ((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + requestId)
552- let requestData = getStrByK((requesDataKey + "_OPEN"))
571+ let $t01934719391 = idCallerDate(i)
572+ let id = $t01934719391._1
573+ let requestOwner = $t01934719391._2
574+ let date = $t01934719391._3
575+ let requestKey = getRequestKey(requestOwner, creatorAddr, artId, requestId)
576+ let requestData = getStrByK((requestKey + "_OPEN"))
553577 if ((size(requestData) == 0))
554578 then throw("Request not found")
555579 else {
556580 let requestDataArr = split(requestData, "_")
557-[DeleteEntry((requesDataKey + "_OPEN")), StringEntry((((((requesDataKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((requestData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(requestOwner)), parseIntValue(requestDataArr[1]), fromBase58String(requestDataArr[2]))]
581+[DeleteEntry((requestKey + "_OPEN")), StringEntry((((((requestKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((requestData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(requestOwner)), parseIntValue(requestDataArr[1]), fromBase58String(requestDataArr[2]))]
558582 }
559583 }
560584
561585

github/deemru/w8io/026f985 
114.40 ms