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:AAIEAAAAAAAAAEAIAhIECgIBCBIFCgMIAQgSAwoBCBIDCgEIEgMKAQgSBQoDCAgIEgUKAwgICBIECgIICBIFCgMICAgSBQoDCAgIAAAAMgAAAAAIdW5pdFRlc3QHAAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEAAAAACHNpZ25EYXBwCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQzI4aFNpdnJtc1RVWGFZRDF4NkwzNjJKNFpwVW5vVGRCAAAAAAxhcnR3b3Jrc0RhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM05CeW5mYlhDMkthc3RVeGh1a2NNVWFFNThLOWNCZEI5VVkAAAAAC2ZlZVJlY2VpdmVyAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAAIdXNlckRhcHADBQAAAAh1bml0VGVzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgA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ETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAAxyZXF1ZXN0T3duZXIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAA5yZXF1ZXN0RGF0YUFycgAAAAAAAAAAAQkAAlkAAAABCQABkQAAAAIFAAAADnJlcXVlc3REYXRhQXJyAAAAAAAAAAACBQAAAANuaWwAAAAAOi5tGA==", "height": 1584562, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 774GnEpNjts7UyQwc9LotQmfJK2nqk49spNAAz9Hf6w5 Next: rYP3r4izph4MCsVztBC4weMuYDpvgYvPPsfBmYk4eFF Diff:
Old | New | Differences | |
---|---|---|---|
25 | 25 | ||
26 | 26 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
27 | 27 | ||
28 | - | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
29 | - | ||
30 | 28 | let signCut = 3 | |
31 | 29 | ||
32 | 30 | let creatorCut = 10 | |
42 | 40 | let artIllegal = "ILLEGAL" | |
43 | 41 | ||
44 | 42 | let artSuspended = "SUSPENDED" | |
43 | + | ||
44 | + | let numSalesK = "num_sales" | |
45 | 45 | ||
46 | 46 | func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error") | |
47 | 47 | ||
67 | 67 | func keyNFTData (id) = ("nft_" + id) | |
68 | 68 | ||
69 | 69 | ||
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 | + | ||
70 | 79 | func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
71 | 80 | ||
72 | 81 | ||
86 | 95 | } | |
87 | 96 | ||
88 | 97 | ||
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 | + | ||
89 | 107 | func isSignArtNFT (id) = { | |
90 | 108 | 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) | |
100 | 110 | } | |
101 | 111 | ||
102 | 112 | ||
141 | 151 | } | |
142 | 152 | ||
143 | 153 | ||
154 | + | func artIsValid (artStatus) = if ((artStatus != artIllegal)) | |
155 | + | then (artStatus != artSuspended) | |
156 | + | else false | |
157 | + | ||
158 | + | ||
144 | 159 | func checkArtStatus (addr,id) = { | |
145 | 160 | let artStatus = getArtStrByK(keyFlag(addr, id)) | |
146 | - | if ( | |
161 | + | if (artIsValid(artStatus)) | |
147 | 162 | 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)) | |
151 | 164 | } | |
152 | 165 | ||
153 | 166 | ||
226 | 239 | } | |
227 | 240 | ||
228 | 241 | ||
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 | + | ||
229 | 262 | @Callable(i) | |
230 | 263 | 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 | |
238 | 267 | let nftId = if (if (isDefined(payment.assetId)) | |
239 | 268 | then isSignArtNFT(value(payment.assetId)) | |
240 | 269 | else false) | |
241 | 270 | then toBase58String(value(payment.assetId)) | |
242 | 271 | 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 | |
248 | 280 | if ((size(artSignID) == 0)) | |
249 | 281 | then throw("Artwork not found on SIGN Art") | |
250 | 282 | else if (!(isValidNFT)) | |
251 | - | then throw(" | |
283 | + | then throw("Not a valid nft") | |
252 | 284 | else if (!(acceptedAssetIds(asset))) | |
253 | 285 | then throw("Only SIGN, USDN or WAVES accepted") | |
254 | 286 | else if ((price == 0)) | |
255 | 287 | then throw("Wrong minimum sell price") | |
256 | 288 | else if (!(validateMinSell(asset, price))) | |
257 | 289 | then throw("Wrong minimum sell price") | |
258 | - | else [StringEntry((( | |
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)] | |
259 | 291 | } | |
260 | 292 | ||
261 | 293 | ||
262 | 294 | ||
263 | 295 | @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 | |
274 | 305 | if ((size(artSignID) == 0)) | |
275 | 306 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
276 | 307 | else if (!(isValidNFT)) | |
277 | - | then throw(" | |
308 | + | then throw("Not a valid nft") | |
278 | 309 | else { | |
279 | - | let saleOwner = getStrByK(("current_owner_on_dapp_" + | |
310 | + | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
280 | 311 | if ((saleOwner != caller)) | |
281 | 312 | then throw("You don't own this NFT") | |
282 | 313 | else { | |
283 | - | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + | |
314 | + | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
284 | 315 | if ((saleStatus != "OPEN")) | |
285 | 316 | then throw("Sale not active") | |
286 | 317 | else if (!(acceptedAssetIds(asset))) | |
290 | 321 | else if (!(validateMinSell(asset, price))) | |
291 | 322 | then throw("Wrong minimum sell price") | |
292 | 323 | else { | |
293 | - | let saleKey = ( | |
324 | + | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
294 | 325 | let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_") | |
295 | 326 | [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))] | |
296 | 327 | } | |
301 | 332 | ||
302 | 333 | ||
303 | 334 | @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)) | |
315 | 345 | if ((saleOwner != caller)) | |
316 | 346 | then throw("You don't own this NFT") | |
317 | 347 | else { | |
318 | - | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + | |
348 | + | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
319 | 349 | if ((saleStatus != "OPEN")) | |
320 | 350 | then throw("Sale not active") | |
321 | 351 | else { | |
322 | - | let saleKey = ( | |
352 | + | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
323 | 353 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
324 | - | [DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + caller) + "_") + | |
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))] | |
325 | 355 | } | |
326 | 356 | } | |
327 | 357 | } | |
329 | 359 | ||
330 | 360 | ||
331 | 361 | @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 | |
343 | 371 | if ((size(artSignID) == 0)) | |
344 | 372 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
345 | 373 | else if (!(isValidNFT)) | |
346 | - | then throw(" | |
374 | + | then throw("Not a valid nft") | |
347 | 375 | else { | |
348 | - | let saleKey = ((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + artId) + "_") + creatorAddr) | |
376 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
377 | + | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
349 | 378 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
350 | 379 | if ((size(saleInfo) == 0)) | |
351 | 380 | then throw("Sale Not found!") | |
354 | 383 | if ((parseInt(saleInfoArray[1]) == 0)) | |
355 | 384 | then throw("Offer only") | |
356 | 385 | else { | |
357 | - | let $ | |
358 | - | let payment = $ | |
359 | - | let amount = $ | |
386 | + | let $t01299113027 = isPayment(i) | |
387 | + | let payment = $t01299113027._1 | |
388 | + | let amount = $t01299113027._2 | |
360 | 389 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
361 | 390 | then toBase58String(value(payment.assetId)) | |
362 | 391 | else "" | |
368 | 397 | let amountForSign = fraction(amount, signCut, 100) | |
369 | 398 | let amountForCreator = fraction(amount, creatorCut, 100) | |
370 | 399 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
371 | - | let $ | |
372 | - | let signFee = $ | |
373 | - | let creatorFee = $ | |
374 | - | let ownerFee = $ | |
375 | - | let collectorNFT = $ | |
376 | - | [DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + | |
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] | |
377 | 406 | } | |
378 | 407 | } | |
379 | 408 | } | |
383 | 412 | ||
384 | 413 | ||
385 | 414 | @Callable(i) | |
386 | - | func setOffer ( | |
387 | - | let $ | |
388 | - | let id = $ | |
389 | - | let offerOwner = $ | |
390 | - | let date = $ | |
391 | - | let | |
392 | - | let | |
393 | - | let | |
394 | - | let | |
395 | - | | |
396 | - | | |
397 | - | | |
398 | - | | |
399 | - | | |
400 | - | | |
401 | - | | |
402 | - | then | |
403 | - | else | |
404 | - | | |
405 | - | | |
406 | - | | |
407 | - | | |
408 | - | if (!( | |
409 | - | then throw(" | |
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") | |
410 | 439 | else { | |
411 | - | let saleOwner = getSaleOwnerAndStatus( | |
412 | - | [StringEntry((( | |
440 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
441 | + | [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
413 | 442 | } | |
414 | - | ||
443 | + | } | |
415 | 444 | } | |
416 | 445 | ||
417 | 446 | ||
418 | 447 | ||
419 | 448 | @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") | |
428 | 460 | 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") | |
433 | 464 | 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!") | |
440 | 474 | 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] | |
459 | 482 | } | |
460 | 483 | } | |
461 | 484 | } | |
464 | 487 | ||
465 | 488 | ||
466 | 489 | @Callable(i) | |
467 | - | func cancelOffer ( | |
468 | - | let $ | |
469 | - | let id = $ | |
470 | - | let caller = $ | |
471 | - | let date = $ | |
472 | - | let bidKey = ( | |
473 | - | let $ | |
474 | - | let bidDataArr = $ | |
475 | - | let assetId = $ | |
476 | - | let bidData = $ | |
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 | |
477 | 500 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
478 | 501 | } | |
479 | 502 | ||
481 | 504 | ||
482 | 505 | @Callable(i) | |
483 | 506 | func makeRequest (artId,creatorAddr) = { | |
484 | - | let $ | |
485 | - | let id = $ | |
486 | - | let requestOwner = $ | |
487 | - | let date = $ | |
488 | - | let $ | |
489 | - | let payment = $ | |
490 | - | let amount = $ | |
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 | |
491 | 514 | let assetId = if (!(isDefined(payment.assetId))) | |
492 | 515 | then "WAVES" | |
493 | 516 | else toBase58String(value(payment.assetId)) | |
499 | 522 | let isValidART = checkARTExist(artId, creatorAddr) | |
500 | 523 | if (!(isValidART)) | |
501 | 524 | then throw("Something went wrong") | |
502 | - | else [StringEntry((( | |
525 | + | else [StringEntry((getRequestKey(requestOwner, creatorAddr, artId, id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))] | |
503 | 526 | } | |
504 | 527 | } | |
505 | 528 | ||
507 | 530 | ||
508 | 531 | @Callable(i) | |
509 | 532 | func fillRequest (artId,requestOwner,offerId) = { | |
510 | - | let $ | |
511 | - | let id = $ | |
512 | - | let saleOwner = $ | |
513 | - | let date = $ | |
514 | - | let $ | |
515 | - | let payment = $ | |
516 | - | let amountAttached = $ | |
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 | |
517 | 540 | let NFTid = if (if (isDefined(payment.assetId)) | |
518 | 541 | then isSignArtNFT(value(payment.assetId)) | |
519 | 542 | else false) | |
523 | 546 | if ((size(NFTdata) == 0)) | |
524 | 547 | then throw("No NFT found") | |
525 | 548 | 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")), "_") | |
527 | 551 | if ((size(requestData) == 1)) | |
528 | 552 | then throw("No request found") | |
529 | 553 | else if ((requestData[3] != NFTdata[5])) | |
530 | 554 | then throw("This NFT don't match the requested artwork") | |
531 | 555 | else { | |
532 | 556 | let amount = value(parseInt(requestData[1])) | |
533 | - | let $ | |
534 | - | let signFee = $ | |
535 | - | let creatorFee = $ | |
536 | - | let ownerFee = $ | |
537 | - | let collectorNFT = $ | |
538 | - | [DeleteEntry(( | |
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] | |
539 | 563 | } | |
540 | 564 | } | |
541 | 565 | } | |
544 | 568 | ||
545 | 569 | @Callable(i) | |
546 | 570 | func cancelRequest (artId,creatorAddr,requestId) = { | |
547 | - | let $ | |
548 | - | let id = $ | |
549 | - | let requestOwner = $ | |
550 | - | let date = $ | |
551 | - | let | |
552 | - | let requestData = getStrByK(( | |
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")) | |
553 | 577 | if ((size(requestData) == 0)) | |
554 | 578 | then throw("Request not found") | |
555 | 579 | else { | |
556 | 580 | let requestDataArr = split(requestData, "_") | |
557 | - | [DeleteEntry(( | |
581 | + | [DeleteEntry((requestKey + "_OPEN")), StringEntry((((((requestKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((requestData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(requestOwner)), parseIntValue(requestDataArr[1]), fromBase58String(requestDataArr[2]))] | |
558 | 582 | } | |
559 | 583 | } | |
560 | 584 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
5 | 5 | ||
6 | 6 | let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
7 | 7 | ||
8 | 8 | let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let artworksDapp = value(addressFromString("3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY")) | |
11 | 11 | ||
12 | 12 | let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
13 | 13 | ||
14 | 14 | let userDapp = if (unitTest) | |
15 | 15 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
16 | 16 | else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj")) | |
17 | 17 | ||
18 | 18 | let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq")) | |
19 | 19 | ||
20 | 20 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
21 | 21 | ||
22 | 22 | let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
23 | 23 | ||
24 | 24 | let wavesAssetId = base58'' | |
25 | 25 | ||
26 | 26 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
27 | 27 | ||
28 | - | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
29 | - | ||
30 | 28 | let signCut = 3 | |
31 | 29 | ||
32 | 30 | let creatorCut = 10 | |
33 | 31 | ||
34 | 32 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
35 | 33 | ||
36 | 34 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
37 | 35 | ||
38 | 36 | let userSuspended = "SUSPENDED" | |
39 | 37 | ||
40 | 38 | let userRemoved = "REMOVED" | |
41 | 39 | ||
42 | 40 | let artIllegal = "ILLEGAL" | |
43 | 41 | ||
44 | 42 | let artSuspended = "SUSPENDED" | |
43 | + | ||
44 | + | let numSalesK = "num_sales" | |
45 | 45 | ||
46 | 46 | func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getStrByK (key) = valueOrElse(getString(this, key), "") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getIntByK (key) = valueOrElse(getInteger(this, key), 0) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyUserStatus (addr) = ("user_status_" + addr) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyNFTData (id) = ("nft_" + id) | |
68 | 68 | ||
69 | 69 | ||
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 | + | ||
70 | 79 | func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
71 | 80 | ||
72 | 81 | ||
73 | 82 | let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
74 | 83 | ||
75 | 84 | func idCallerDate (i) = if (!(dappRunning)) | |
76 | 85 | then throw(maintenanceMSG) | |
77 | 86 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
78 | 87 | ||
79 | 88 | ||
80 | 89 | func isPayment (i) = if ((size(i.payments) == 0)) | |
81 | 90 | then throw("No payment attached") | |
82 | 91 | else { | |
83 | 92 | let payment = value(i.payments[0]) | |
84 | 93 | let amount = value(payment.amount) | |
85 | 94 | $Tuple2(payment, amount) | |
86 | 95 | } | |
87 | 96 | ||
88 | 97 | ||
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 | + | ||
89 | 107 | func isSignArtNFT (id) = { | |
90 | 108 | 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) | |
100 | 110 | } | |
101 | 111 | ||
102 | 112 | ||
103 | 113 | func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId))) | |
104 | 114 | then (assetId != toBase58String(wavesAssetId)) | |
105 | 115 | else false) | |
106 | 116 | then (assetId != "WAVES") | |
107 | 117 | else false) | |
108 | 118 | then (assetId != toBase58String(usdnAssetId)) | |
109 | 119 | else false) | |
110 | 120 | then false | |
111 | 121 | else true | |
112 | 122 | ||
113 | 123 | ||
114 | 124 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
115 | 125 | then unit | |
116 | 126 | else fromBase58String(assetId) | |
117 | 127 | ||
118 | 128 | ||
119 | 129 | func getSaleOwnerAndStatus (nftid) = { | |
120 | 130 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
121 | 131 | if ((size(saleOwner) == 0)) | |
122 | 132 | then throw("NFT not found") | |
123 | 133 | else { | |
124 | 134 | let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid)) | |
125 | 135 | if ((saleStatus != "OPEN")) | |
126 | 136 | then throw("NFT not for sale") | |
127 | 137 | else saleOwner | |
128 | 138 | } | |
129 | 139 | } | |
130 | 140 | ||
131 | 141 | ||
132 | 142 | func getBidData (key) = { | |
133 | 143 | let bidData = getStrByK((key + "_OPEN")) | |
134 | 144 | if ((bidData == "")) | |
135 | 145 | then throw("Offer not found") | |
136 | 146 | else { | |
137 | 147 | let bidDataArr = split(bidData, "_") | |
138 | 148 | let assetId = getBidAssetId(bidDataArr[2]) | |
139 | 149 | $Tuple3(bidDataArr, assetId, bidData) | |
140 | 150 | } | |
141 | 151 | } | |
142 | 152 | ||
143 | 153 | ||
154 | + | func artIsValid (artStatus) = if ((artStatus != artIllegal)) | |
155 | + | then (artStatus != artSuspended) | |
156 | + | else false | |
157 | + | ||
158 | + | ||
144 | 159 | func checkArtStatus (addr,id) = { | |
145 | 160 | let artStatus = getArtStrByK(keyFlag(addr, id)) | |
146 | - | if ( | |
161 | + | if (artIsValid(artStatus)) | |
147 | 162 | 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)) | |
151 | 164 | } | |
152 | 165 | ||
153 | 166 | ||
154 | 167 | func checkArtistStatus (addr) = { | |
155 | 168 | let artistStatus = getUserStrByK(keyUserStatus(addr)) | |
156 | 169 | if (containsElement([userSuspended, userRemoved], artistStatus)) | |
157 | 170 | then throw(("Original Artist " + artistStatus)) | |
158 | 171 | else true | |
159 | 172 | } | |
160 | 173 | ||
161 | 174 | ||
162 | 175 | func checkNFTInfo (assetId) = { | |
163 | 176 | let nftData = split(getArtStrByK(keyNFTData(assetId)), "_") | |
164 | 177 | let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5])) | |
165 | 178 | if (if (!(checkArtStatus(nftData[6], nftData[5]))) | |
166 | 179 | then !(checkArtistStatus(nftData[6])) | |
167 | 180 | else false) | |
168 | 181 | then $Tuple4(false, nftData[5], nftData[6], artSignID) | |
169 | 182 | else $Tuple4(true, nftData[5], nftData[6], artSignID) | |
170 | 183 | } | |
171 | 184 | ||
172 | 185 | ||
173 | 186 | func checkARTExist (artId,creatorAddr) = { | |
174 | 187 | let artSignID = getArtStrByK(keySignID(creatorAddr, artId)) | |
175 | 188 | if ((size(artSignID) == 0)) | |
176 | 189 | then throw("Artwork not found on SIGN Art") | |
177 | 190 | else if (if (!(checkArtStatus(creatorAddr, artId))) | |
178 | 191 | then !(checkArtistStatus(creatorAddr)) | |
179 | 192 | else false) | |
180 | 193 | then false | |
181 | 194 | else true | |
182 | 195 | } | |
183 | 196 | ||
184 | 197 | ||
185 | 198 | func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = { | |
186 | 199 | let amountForSign = fraction(amount, signCut, 100) | |
187 | 200 | let amountForCreator = fraction(amount, creatorCut, 100) | |
188 | 201 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
189 | 202 | let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId) | |
190 | 203 | let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId) | |
191 | 204 | let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId) | |
192 | 205 | let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid)) | |
193 | 206 | $Tuple4(signFee, creatorFee, ownerFee, collectorNFT) | |
194 | 207 | } | |
195 | 208 | ||
196 | 209 | ||
197 | 210 | func validateMinSell (assetId,price) = { | |
198 | 211 | let minSellWaves = if (unitTest) | |
199 | 212 | then 10 | |
200 | 213 | else getIntByKFromOracle("waves_min_sell") | |
201 | 214 | let minSellUsdn = 1000000 | |
202 | 215 | let minSellSign = if (unitTest) | |
203 | 216 | then 1 | |
204 | 217 | else (currentCertificationPrice * 2) | |
205 | 218 | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
206 | 219 | then (minSellUsdn > price) | |
207 | 220 | else false) | |
208 | 221 | then (price != 0) | |
209 | 222 | else false) | |
210 | 223 | then true | |
211 | 224 | else if (if ((assetId == toBase58String(signAssetId))) | |
212 | 225 | then (minSellSign > price) | |
213 | 226 | else false) | |
214 | 227 | then (price != 0) | |
215 | 228 | else false) | |
216 | 229 | then true | |
217 | 230 | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
218 | 231 | then true | |
219 | 232 | else (assetId == "WAVES")) | |
220 | 233 | then (minSellWaves > price) | |
221 | 234 | else false) | |
222 | 235 | then (price != 0) | |
223 | 236 | else false) | |
224 | 237 | then false | |
225 | 238 | else true | |
226 | 239 | } | |
227 | 240 | ||
228 | 241 | ||
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 | + | ||
229 | 262 | @Callable(i) | |
230 | 263 | 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 | |
238 | 267 | let nftId = if (if (isDefined(payment.assetId)) | |
239 | 268 | then isSignArtNFT(value(payment.assetId)) | |
240 | 269 | else false) | |
241 | 270 | then toBase58String(value(payment.assetId)) | |
242 | 271 | 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 | |
248 | 280 | if ((size(artSignID) == 0)) | |
249 | 281 | then throw("Artwork not found on SIGN Art") | |
250 | 282 | else if (!(isValidNFT)) | |
251 | - | then throw(" | |
283 | + | then throw("Not a valid nft") | |
252 | 284 | else if (!(acceptedAssetIds(asset))) | |
253 | 285 | then throw("Only SIGN, USDN or WAVES accepted") | |
254 | 286 | else if ((price == 0)) | |
255 | 287 | then throw("Wrong minimum sell price") | |
256 | 288 | else if (!(validateMinSell(asset, price))) | |
257 | 289 | then throw("Wrong minimum sell price") | |
258 | - | else [StringEntry((( | |
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)] | |
259 | 291 | } | |
260 | 292 | ||
261 | 293 | ||
262 | 294 | ||
263 | 295 | @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 | |
274 | 305 | if ((size(artSignID) == 0)) | |
275 | 306 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
276 | 307 | else if (!(isValidNFT)) | |
277 | - | then throw(" | |
308 | + | then throw("Not a valid nft") | |
278 | 309 | else { | |
279 | - | let saleOwner = getStrByK(("current_owner_on_dapp_" + | |
310 | + | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
280 | 311 | if ((saleOwner != caller)) | |
281 | 312 | then throw("You don't own this NFT") | |
282 | 313 | else { | |
283 | - | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + | |
314 | + | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
284 | 315 | if ((saleStatus != "OPEN")) | |
285 | 316 | then throw("Sale not active") | |
286 | 317 | else if (!(acceptedAssetIds(asset))) | |
287 | 318 | then throw("Only SIGN, USDN or WAVES accepted") | |
288 | 319 | else if ((price == 0)) | |
289 | 320 | then throw("Wrong minimum sell price") | |
290 | 321 | else if (!(validateMinSell(asset, price))) | |
291 | 322 | then throw("Wrong minimum sell price") | |
292 | 323 | else { | |
293 | - | let saleKey = ( | |
324 | + | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
294 | 325 | let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_") | |
295 | 326 | [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))] | |
296 | 327 | } | |
297 | 328 | } | |
298 | 329 | } | |
299 | 330 | } | |
300 | 331 | ||
301 | 332 | ||
302 | 333 | ||
303 | 334 | @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)) | |
315 | 345 | if ((saleOwner != caller)) | |
316 | 346 | then throw("You don't own this NFT") | |
317 | 347 | else { | |
318 | - | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + | |
348 | + | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
319 | 349 | if ((saleStatus != "OPEN")) | |
320 | 350 | then throw("Sale not active") | |
321 | 351 | else { | |
322 | - | let saleKey = ( | |
352 | + | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
323 | 353 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
324 | - | [DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + caller) + "_") + | |
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))] | |
325 | 355 | } | |
326 | 356 | } | |
327 | 357 | } | |
328 | 358 | ||
329 | 359 | ||
330 | 360 | ||
331 | 361 | @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 | |
343 | 371 | if ((size(artSignID) == 0)) | |
344 | 372 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
345 | 373 | else if (!(isValidNFT)) | |
346 | - | then throw(" | |
374 | + | then throw("Not a valid nft") | |
347 | 375 | else { | |
348 | - | let saleKey = ((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + artId) + "_") + creatorAddr) | |
376 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
377 | + | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
349 | 378 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
350 | 379 | if ((size(saleInfo) == 0)) | |
351 | 380 | then throw("Sale Not found!") | |
352 | 381 | else { | |
353 | 382 | let saleInfoArray = split(saleInfo, "_") | |
354 | 383 | if ((parseInt(saleInfoArray[1]) == 0)) | |
355 | 384 | then throw("Offer only") | |
356 | 385 | else { | |
357 | - | let $ | |
358 | - | let payment = $ | |
359 | - | let amount = $ | |
386 | + | let $t01299113027 = isPayment(i) | |
387 | + | let payment = $t01299113027._1 | |
388 | + | let amount = $t01299113027._2 | |
360 | 389 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
361 | 390 | then toBase58String(value(payment.assetId)) | |
362 | 391 | else "" | |
363 | 392 | if (if ((saleInfoArray[1] != toString(amount))) | |
364 | 393 | then true | |
365 | 394 | else (saleInfoArray[2] != paymentAssetStr)) | |
366 | 395 | then throw("Payment infos don't match.") | |
367 | 396 | else { | |
368 | 397 | let amountForSign = fraction(amount, signCut, 100) | |
369 | 398 | let amountForCreator = fraction(amount, creatorCut, 100) | |
370 | 399 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
371 | - | let $ | |
372 | - | let signFee = $ | |
373 | - | let creatorFee = $ | |
374 | - | let ownerFee = $ | |
375 | - | let collectorNFT = $ | |
376 | - | [DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + | |
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] | |
377 | 406 | } | |
378 | 407 | } | |
379 | 408 | } | |
380 | 409 | } | |
381 | 410 | } | |
382 | 411 | ||
383 | 412 | ||
384 | 413 | ||
385 | 414 | @Callable(i) | |
386 | - | func setOffer ( | |
387 | - | let $ | |
388 | - | let id = $ | |
389 | - | let offerOwner = $ | |
390 | - | let date = $ | |
391 | - | let | |
392 | - | let | |
393 | - | let | |
394 | - | let | |
395 | - | | |
396 | - | | |
397 | - | | |
398 | - | | |
399 | - | | |
400 | - | | |
401 | - | | |
402 | - | then | |
403 | - | else | |
404 | - | | |
405 | - | | |
406 | - | | |
407 | - | | |
408 | - | if (!( | |
409 | - | then throw(" | |
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") | |
410 | 439 | else { | |
411 | - | let saleOwner = getSaleOwnerAndStatus( | |
412 | - | [StringEntry((( | |
440 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
441 | + | [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
413 | 442 | } | |
414 | - | ||
443 | + | } | |
415 | 444 | } | |
416 | 445 | ||
417 | 446 | ||
418 | 447 | ||
419 | 448 | @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") | |
428 | 460 | 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") | |
433 | 464 | 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!") | |
440 | 474 | 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] | |
459 | 482 | } | |
460 | 483 | } | |
461 | 484 | } | |
462 | 485 | } | |
463 | 486 | ||
464 | 487 | ||
465 | 488 | ||
466 | 489 | @Callable(i) | |
467 | - | func cancelOffer ( | |
468 | - | let $ | |
469 | - | let id = $ | |
470 | - | let caller = $ | |
471 | - | let date = $ | |
472 | - | let bidKey = ( | |
473 | - | let $ | |
474 | - | let bidDataArr = $ | |
475 | - | let assetId = $ | |
476 | - | let bidData = $ | |
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 | |
477 | 500 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
478 | 501 | } | |
479 | 502 | ||
480 | 503 | ||
481 | 504 | ||
482 | 505 | @Callable(i) | |
483 | 506 | func makeRequest (artId,creatorAddr) = { | |
484 | - | let $ | |
485 | - | let id = $ | |
486 | - | let requestOwner = $ | |
487 | - | let date = $ | |
488 | - | let $ | |
489 | - | let payment = $ | |
490 | - | let amount = $ | |
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 | |
491 | 514 | let assetId = if (!(isDefined(payment.assetId))) | |
492 | 515 | then "WAVES" | |
493 | 516 | else toBase58String(value(payment.assetId)) | |
494 | 517 | if (!(acceptedAssetIds(assetId))) | |
495 | 518 | then throw("asset not accepted") | |
496 | 519 | else if (!(validateMinSell(assetId, amount))) | |
497 | 520 | then throw("Wrong minimum sell price") | |
498 | 521 | else { | |
499 | 522 | let isValidART = checkARTExist(artId, creatorAddr) | |
500 | 523 | if (!(isValidART)) | |
501 | 524 | then throw("Something went wrong") | |
502 | - | else [StringEntry((( | |
525 | + | else [StringEntry((getRequestKey(requestOwner, creatorAddr, artId, id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))] | |
503 | 526 | } | |
504 | 527 | } | |
505 | 528 | ||
506 | 529 | ||
507 | 530 | ||
508 | 531 | @Callable(i) | |
509 | 532 | func fillRequest (artId,requestOwner,offerId) = { | |
510 | - | let $ | |
511 | - | let id = $ | |
512 | - | let saleOwner = $ | |
513 | - | let date = $ | |
514 | - | let $ | |
515 | - | let payment = $ | |
516 | - | let amountAttached = $ | |
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 | |
517 | 540 | let NFTid = if (if (isDefined(payment.assetId)) | |
518 | 541 | then isSignArtNFT(value(payment.assetId)) | |
519 | 542 | else false) | |
520 | 543 | then payment.assetId | |
521 | 544 | else throw("No NFT found") | |
522 | 545 | let NFTdata = split(getArtStrByK(("nft_" + toBase58String(value(NFTid)))), "_") | |
523 | 546 | if ((size(NFTdata) == 0)) | |
524 | 547 | then throw("No NFT found") | |
525 | 548 | 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")), "_") | |
527 | 551 | if ((size(requestData) == 1)) | |
528 | 552 | then throw("No request found") | |
529 | 553 | else if ((requestData[3] != NFTdata[5])) | |
530 | 554 | then throw("This NFT don't match the requested artwork") | |
531 | 555 | else { | |
532 | 556 | let amount = value(parseInt(requestData[1])) | |
533 | - | let $ | |
534 | - | let signFee = $ | |
535 | - | let creatorFee = $ | |
536 | - | let ownerFee = $ | |
537 | - | let collectorNFT = $ | |
538 | - | [DeleteEntry(( | |
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] | |
539 | 563 | } | |
540 | 564 | } | |
541 | 565 | } | |
542 | 566 | ||
543 | 567 | ||
544 | 568 | ||
545 | 569 | @Callable(i) | |
546 | 570 | func cancelRequest (artId,creatorAddr,requestId) = { | |
547 | - | let $ | |
548 | - | let id = $ | |
549 | - | let requestOwner = $ | |
550 | - | let date = $ | |
551 | - | let | |
552 | - | let requestData = getStrByK(( | |
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")) | |
553 | 577 | if ((size(requestData) == 0)) | |
554 | 578 | then throw("Request not found") | |
555 | 579 | else { | |
556 | 580 | let requestDataArr = split(requestData, "_") | |
557 | - | [DeleteEntry(( | |
581 | + | [DeleteEntry((requestKey + "_OPEN")), StringEntry((((((requestKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((requestData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(requestOwner)), parseIntValue(requestDataArr[1]), fromBase58String(requestDataArr[2]))] | |
558 | 582 | } | |
559 | 583 | } | |
560 | 584 | ||
561 | 585 |
github/deemru/w8io/026f985 114.40 ms ◑