tx · FvdEHiHjd2UMD4uipGkkEHCXjXXGeQJyubHMaWKXsC5Y 3N2c38oS2z4k4t4VKEwqoKLQTsbQoM4Ke9H: -0.01400000 Waves 2021.06.07 14:28 [1559883] smart account 3N2c38oS2z4k4t4VKEwqoKLQTsbQoM4Ke9H > SELF 0.00000000 Waves
{ "type": 13, "id": "FvdEHiHjd2UMD4uipGkkEHCXjXXGeQJyubHMaWKXsC5Y", "fee": 1400000, "feeAssetId": null, "timestamp": 1623065407808, "version": 2, "chainId": 84, "sender": "3N2c38oS2z4k4t4VKEwqoKLQTsbQoM4Ke9H", "senderPublicKey": "BzfS7SAnfHHWF9MwvLE52diURPKozXxTitzcz3FEkduL", "proofs": [ "ryurWMBBcSWSuy6Z5uQaJHPVkVmNeVC2TBGdVDchpBvJjbq617ab1CCBw3MWHtwu9EyMbDu6VdaFhomTBYGTo1w" ], "script": "base64:AAIEAAAAAAAAAEAIAhIECgIBCBIFCgMIAQgSAwoBCBIDCgEIEgMKAQgSBQoDCAgIEgUKAwgICBIECgIICBIFCgMICAgSBQoDCAgIAAAAKwAAAAAIdW5pdFRlc3QHAAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEAAAAACHNpZ25EYXBwCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQzI4aFNpdnJtc1RVWGFZRDF4NkwzNjJKNFpwVW5vVGRCAAAAAAxhcnR3b3Jrc0RhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM05CeW5mYlhDMkthc3RVeGh1a2NNVWFFNThLOWNCZEI5VVkAAAAAC2ZlZVJlY2VpdmVyAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAAIdXNlckRhcHADBQAAAAh1bml0VGVzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAAC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N0RGF0YQAAAAAAAAAAAAkAAAIAAAABAgAAABFSZXF1ZXN0IG5vdCBmb3VuZAQAAAAOcmVxdWVzdERhdGFBcnIJAAS1AAAAAgUAAAALcmVxdWVzdERhdGECAAAAAV8JAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAA1yZXF1ZXNEYXRhS2V5AgAAAAVfT1BFTgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAANcmVxdWVzRGF0YUtleQIAAAABXwkAAaQAAAABBQAAAARkYXRlAgAAAAFfBQAAAAJpZAIAAAAKX0NBTkNFTExFRAkAASwAAAACCQABLAAAAAIFAAAAC3JlcXVlc3REYXRhAgAAAAFfCQABpAAAAAEFAAAABGRhdGUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAADHJlcXVlc3RPd25lcgkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIFAAAADnJlcXVlc3REYXRhQXJyAAAAAAAAAAABCQACWQAAAAEJAAGRAAAAAgUAAAAOcmVxdWVzdERhdGFBcnIAAAAAAAAAAAIFAAAAA25pbAAAAABRsvn4", "height": 1559883, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 24ekCwZerUtXnyVgCVLcGmsWjbnpw3fwVZcU8dptAGRM Next: none Diff:
Old | New | Differences | |
---|---|---|---|
223 | 223 | else false) | |
224 | 224 | then (price != 0) | |
225 | 225 | else false) | |
226 | - | then | |
226 | + | then false | |
227 | 227 | else true | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | @Callable(i) | |
232 | 232 | func sellNFT (price,asset) = { | |
233 | - | let $t079277966 = idCallerDate(i) | |
234 | - | let id = $t079277966._1 | |
235 | - | let caller = $t079277966._2 | |
236 | - | let date = $t079277966._3 | |
237 | - | let $t079718007 = isPayment(i) | |
238 | - | let payment = $t079718007._1 | |
239 | - | let amount = $t079718007._2 | |
240 | - | let nftId = if (if (isDefined(payment.assetId)) | |
241 | - | then isSignArtNFT(value(payment.assetId)) | |
242 | - | else false) | |
243 | - | then toBase58String(value(payment.assetId)) | |
244 | - | else throw("Only SIGN Art NFT accepted.") | |
233 | + | let $t078957934 = idCallerDate(i) | |
234 | + | let id = $t078957934._1 | |
235 | + | let caller = $t078957934._2 | |
236 | + | let date = $t078957934._3 | |
237 | + | let $t079397975 = isPayment(i) | |
238 | + | let payment = $t079397975._1 | |
239 | + | let amount = $t079397975._2 | |
245 | 240 | if (!(acceptedAssetIds(asset))) | |
246 | 241 | then throw("Only SIGN, USDN or WAVES accepted") | |
247 | 242 | else if (!(validateMinSell(asset, price))) | |
248 | - | then throw(" | |
243 | + | then throw("Wrong minimum sell price") | |
249 | 244 | else { | |
250 | - | let $t083808438 = checkNFTInfo(nftId) | |
251 | - | let isValidNFT = $t083808438._1 | |
252 | - | let artId = $t083808438._2 | |
253 | - | let creatorAddr = $t083808438._3 | |
245 | + | let nftId = if (if (isDefined(payment.assetId)) | |
246 | + | then isSignArtNFT(value(payment.assetId)) | |
247 | + | else false) | |
248 | + | then toBase58String(value(payment.assetId)) | |
249 | + | else throw("Only SIGN Art NFT accepted.") | |
250 | + | let $t083288386 = checkNFTInfo(nftId) | |
251 | + | let isValidNFT = $t083288386._1 | |
252 | + | let artId = $t083288386._2 | |
253 | + | let creatorAddr = $t083288386._3 | |
254 | 254 | if (!(isValidNFT)) | |
255 | 255 | then throw("Something went wrong") | |
256 | 256 | else [StringEntry((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + creatorAddr) + "_OPEN"), ((((((((((((toString(date) + "_") + toString(price)) + "_") + asset) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + id)), StringEntry(((("sale2nd_status_" + caller) + "_") + nftId), "OPEN"), StringEntry(("current_owner_on_dapp_" + nftId), caller)] | |
261 | 261 | ||
262 | 262 | @Callable(i) | |
263 | 263 | func updateSalePrice (nftid,price,asset) = { | |
264 | - | let $ | |
265 | - | let id = $ | |
266 | - | let caller = $ | |
267 | - | let date = $ | |
264 | + | let $t088928931 = idCallerDate(i) | |
265 | + | let id = $t088928931._1 | |
266 | + | let caller = $t088928931._2 | |
267 | + | let date = $t088928931._3 | |
268 | 268 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
269 | 269 | if ((saleOwner != caller)) | |
270 | 270 | then throw("You don't own this NFT") | |
274 | 274 | then throw("Sale not active") | |
275 | 275 | else if (!(acceptedAssetIds(asset))) | |
276 | 276 | then throw("Only SIGN, USDN or WAVES accepted") | |
277 | - | else { | |
278 | - | let creatorAddr = split(getArtStrByK(keyNFTData(nftid)), "_")[6] | |
279 | - | let saleInfo = split(getStrByK(((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + saleStatus)), "_") | |
277 | + | else if (!(validateMinSell(asset, price))) | |
278 | + | then throw("Wrong minimum sell price") | |
279 | + | else { | |
280 | + | let creatorAddr = split(getArtStrByK(keyNFTData(nftid)), "_")[6] | |
281 | + | let saleInfo = split(getStrByK(((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + saleStatus)), "_") | |
280 | 282 | [StringEntry((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))] | |
281 | - | } | |
283 | + | } | |
282 | 284 | } | |
283 | 285 | } | |
284 | 286 | ||
286 | 288 | ||
287 | 289 | @Callable(i) | |
288 | 290 | func cancelSale (nftid) = { | |
289 | - | let $ | |
290 | - | let id = $ | |
291 | - | let caller = $ | |
292 | - | let date = $ | |
291 | + | let $t098819920 = idCallerDate(i) | |
292 | + | let id = $t098819920._1 | |
293 | + | let caller = $t098819920._2 | |
294 | + | let date = $t098819920._3 | |
293 | 295 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
294 | 296 | if ((saleOwner != caller)) | |
295 | 297 | then throw("You don't own this NFT") | |
309 | 311 | ||
310 | 312 | @Callable(i) | |
311 | 313 | func buyNFT (nftid) = { | |
312 | - | let $ | |
313 | - | let id = $ | |
314 | - | let caller = $ | |
315 | - | let date = $ | |
314 | + | let $t01106611105 = idCallerDate(i) | |
315 | + | let id = $t01106611105._1 | |
316 | + | let caller = $t01106611105._2 | |
317 | + | let date = $t01106611105._3 | |
316 | 318 | let saleOwner = getSaleOwnerAndStatus(nftid) | |
317 | - | let $ | |
318 | - | let isValidNFT = $ | |
319 | - | let artId = $ | |
320 | - | let creatorAddr = $ | |
319 | + | let $t01115911217 = checkNFTInfo(nftid) | |
320 | + | let isValidNFT = $t01115911217._1 | |
321 | + | let artId = $t01115911217._2 | |
322 | + | let creatorAddr = $t01115911217._3 | |
321 | 323 | if (!(isValidNFT)) | |
322 | 324 | then throw("Something went wrong") | |
323 | 325 | else { | |
329 | 331 | if ((parseInt(saleInfoArray[1]) == 0)) | |
330 | 332 | then throw("Offer only") | |
331 | 333 | else { | |
332 | - | let $ | |
333 | - | let payment = $ | |
334 | - | let amount = $ | |
334 | + | let $t01155111587 = isPayment(i) | |
335 | + | let payment = $t01155111587._1 | |
336 | + | let amount = $t01155111587._2 | |
335 | 337 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
336 | 338 | then toBase58String(value(payment.assetId)) | |
337 | 339 | else "" | |
343 | 345 | let amountForSign = fraction(amount, signCut, 100) | |
344 | 346 | let amountForCreator = fraction(amount, creatorCut, 100) | |
345 | 347 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
346 | - | let $ | |
347 | - | let signFee = $ | |
348 | - | let creatorFee = $ | |
349 | - | let ownerFee = $ | |
350 | - | let collectorFee = $ | |
348 | + | let $t01209012218 = setTransfers(amount, payment.assetId, nftid, creatorAddr, saleOwner, caller) | |
349 | + | let signFee = $t01209012218._1 | |
350 | + | let creatorFee = $t01209012218._2 | |
351 | + | let ownerFee = $t01209012218._3 | |
352 | + | let collectorFee = $t01209012218._4 | |
351 | 353 | [DeleteEntry((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_") + id) + "_CLOSED"), ((((((makeString(saleInfoArray, "_") + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), signFee, creatorFee, ownerFee, collectorFee] | |
352 | 354 | } | |
353 | 355 | } | |
359 | 361 | ||
360 | 362 | @Callable(i) | |
361 | 363 | func setOffer (nftid) = { | |
362 | - | let $ | |
363 | - | let id = $ | |
364 | - | let offerOwner = $ | |
365 | - | let date = $ | |
366 | - | let $ | |
367 | - | let payment = $ | |
368 | - | let amount = $ | |
364 | + | let $t01270912751 = idCallerDate(i) | |
365 | + | let id = $t01270912751._1 | |
366 | + | let offerOwner = $t01270912751._2 | |
367 | + | let date = $t01270912751._3 | |
368 | + | let $t01275712793 = isPayment(i) | |
369 | + | let payment = $t01275712793._1 | |
370 | + | let amount = $t01275712793._2 | |
369 | 371 | let assetId = if (!(isDefined(payment.assetId))) | |
370 | 372 | then "WAVES" | |
371 | 373 | else toBase58String(value(payment.assetId)) | |
372 | 374 | if (!(acceptedAssetIds(assetId))) | |
373 | 375 | then throw("asset not accepted") | |
374 | - | else { | |
375 | - | let $t01298113039 = checkNFTInfo(nftid) | |
376 | - | let isValidNFT = $t01298113039._1 | |
377 | - | let artId = $t01298113039._2 | |
378 | - | let creatorAddr = $t01298113039._3 | |
379 | - | if (!(isValidNFT)) | |
380 | - | then throw("Something went wrong") | |
376 | + | else if ((amount == 0)) | |
377 | + | then throw("Offer of 0 not allowed") | |
378 | + | else if (!(validateMinSell(assetId, amount))) | |
379 | + | then throw("Wrong minimum sell price") | |
381 | 380 | else { | |
382 | - | let saleOwner = getSaleOwnerAndStatus(nftid) | |
381 | + | let $t01312713185 = checkNFTInfo(nftid) | |
382 | + | let isValidNFT = $t01312713185._1 | |
383 | + | let artId = $t01312713185._2 | |
384 | + | let creatorAddr = $t01312713185._3 | |
385 | + | if (!(isValidNFT)) | |
386 | + | then throw("Something went wrong") | |
387 | + | else { | |
388 | + | let saleOwner = getSaleOwnerAndStatus(nftid) | |
383 | 389 | [StringEntry((((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftid) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
390 | + | } | |
384 | 391 | } | |
385 | - | } | |
386 | 392 | } | |
387 | 393 | ||
388 | 394 | ||
389 | 395 | ||
390 | 396 | @Callable(i) | |
391 | 397 | func acceptOffer (nftid,offerId,offerOwner) = { | |
392 | - | let $ | |
393 | - | let id = $ | |
394 | - | let caller = $ | |
395 | - | let date = $ | |
398 | + | let $t01371813787 = idCallerDate(i) | |
399 | + | let id = $t01371813787._1 | |
400 | + | let caller = $t01371813787._2 | |
401 | + | let date = $t01371813787._3 | |
396 | 402 | let saleOwner = getSaleOwnerAndStatus(nftid) | |
397 | 403 | if ((caller != saleOwner)) | |
398 | 404 | then throw("You cannot do this action") | |
402 | 408 | if ((bidValue == "")) | |
403 | 409 | then throw("Offer not found or not for sale") | |
404 | 410 | else { | |
405 | - | let $ | |
406 | - | let isValidNFT = $ | |
407 | - | let artId = $ | |
408 | - | let creatorAddr = $ | |
411 | + | let $t01411114169 = checkNFTInfo(nftid) | |
412 | + | let isValidNFT = $t01411114169._1 | |
413 | + | let artId = $t01411114169._2 | |
414 | + | let creatorAddr = $t01411114169._3 | |
409 | 415 | if (!(isValidNFT)) | |
410 | 416 | then throw("Something went wrong") | |
411 | 417 | else { | |
415 | 421 | then throw("Sale Not found!") | |
416 | 422 | else { | |
417 | 423 | let saleValArr = split(saleValue, "_") | |
418 | - | let $ | |
419 | - | let bidDataArr = $ | |
420 | - | let assetId = $ | |
421 | - | let bidData = $ | |
424 | + | let $t01450414559 = getBidData(bidKey) | |
425 | + | let bidDataArr = $t01450414559._1 | |
426 | + | let assetId = $t01450414559._2 | |
427 | + | let bidData = $t01450414559._3 | |
422 | 428 | let amount = value(parseInt(bidDataArr[1])) | |
423 | - | let $ | |
424 | - | let signFee = $ | |
425 | - | let creatorFee = $ | |
426 | - | let ownerFee = $ | |
427 | - | let collectorFee = $ | |
429 | + | let $t01461314740 = setTransfers(amount, assetId, nftid, creatorAddr, saleOwner, bidDataArr[6]) | |
430 | + | let signFee = $t01461314740._1 | |
431 | + | let creatorFee = $t01461314740._2 | |
432 | + | let ownerFee = $t01461314740._3 | |
433 | + | let collectorFee = $t01461314740._4 | |
428 | 434 | [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, collectorFee] | |
429 | 435 | } | |
430 | 436 | } | |
436 | 442 | ||
437 | 443 | @Callable(i) | |
438 | 444 | func cancelOffer (nftid,offerId,saleOwner) = { | |
439 | - | let $ | |
440 | - | let id = $ | |
441 | - | let caller = $ | |
442 | - | let date = $ | |
445 | + | let $t01538915450 = idCallerDate(i) | |
446 | + | let id = $t01538915450._1 | |
447 | + | let caller = $t01538915450._2 | |
448 | + | let date = $t01538915450._3 | |
443 | 449 | let bidKey = ((((((("offer2nd_" + caller) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) | |
444 | - | let $ | |
445 | - | let bidDataArr = $ | |
446 | - | let assetId = $ | |
447 | - | let bidData = $ | |
450 | + | let $t01552715582 = getBidData(bidKey) | |
451 | + | let bidDataArr = $t01552715582._1 | |
452 | + | let assetId = $t01552715582._2 | |
453 | + | let bidData = $t01552715582._3 | |
448 | 454 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
449 | 455 | } | |
450 | 456 | ||
452 | 458 | ||
453 | 459 | @Callable(i) | |
454 | 460 | func makeRequest (artId,creatorAddr) = { | |
455 | - | let $ | |
456 | - | let id = $ | |
457 | - | let requestOwner = $ | |
458 | - | let date = $ | |
459 | - | let $ | |
460 | - | let payment = $ | |
461 | - | let amount = $ | |
461 | + | let $t01590715951 = idCallerDate(i) | |
462 | + | let id = $t01590715951._1 | |
463 | + | let requestOwner = $t01590715951._2 | |
464 | + | let date = $t01590715951._3 | |
465 | + | let $t01595715993 = isPayment(i) | |
466 | + | let payment = $t01595715993._1 | |
467 | + | let amount = $t01595715993._2 | |
462 | 468 | let assetId = if (!(isDefined(payment.assetId))) | |
463 | 469 | then "WAVES" | |
464 | 470 | else toBase58String(value(payment.assetId)) | |
465 | 471 | if (!(acceptedAssetIds(assetId))) | |
466 | 472 | then throw("asset not accepted") | |
467 | - | else { | |
468 | - | let isValidART = checkARTExist(artId, creatorAddr) | |
469 | - | if (!(isValidART)) | |
470 | - | then throw("Something went wrong") | |
471 | - | else [StringEntry((((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))] | |
472 | - | } | |
473 | + | else if (!(validateMinSell(assetId, amount))) | |
474 | + | then throw("Wrong minimum sell price") | |
475 | + | else { | |
476 | + | let isValidART = checkARTExist(artId, creatorAddr) | |
477 | + | if (!(isValidART)) | |
478 | + | then throw("Something went wrong") | |
479 | + | else [StringEntry((((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))] | |
480 | + | } | |
473 | 481 | } | |
474 | 482 | ||
475 | 483 | ||
476 | 484 | ||
477 | 485 | @Callable(i) | |
478 | 486 | func fillRequest (artId,requestOwner,offerId) = { | |
479 | - | let $ | |
480 | - | let id = $ | |
481 | - | let saleOwner = $ | |
482 | - | let date = $ | |
483 | - | let $ | |
484 | - | let payment = $ | |
485 | - | let amountAttached = $ | |
487 | + | let $t01680016842 = idCallerDate(i) | |
488 | + | let id = $t01680016842._1 | |
489 | + | let saleOwner = $t01680016842._2 | |
490 | + | let date = $t01680016842._3 | |
491 | + | let $t01684716891 = isPayment(i) | |
492 | + | let payment = $t01684716891._1 | |
493 | + | let amountAttached = $t01684716891._2 | |
486 | 494 | let NFTid = if (if (isDefined(payment.assetId)) | |
487 | 495 | then isSignArtNFT(value(payment.assetId)) | |
488 | 496 | else false) | |
499 | 507 | then throw("This NFT don't match the requested artwork") | |
500 | 508 | else { | |
501 | 509 | let amount = value(parseInt(requestData[1])) | |
502 | - | let $ | |
503 | - | let signFee = $ | |
504 | - | let creatorFee = $ | |
505 | - | let ownerFee = $ | |
506 | - | let collectorFee = $ | |
510 | + | let $t01761117786 = setTransfers(amount, fromBase58String(requestData[2]), toBase58String(value(NFTid)), NFTdata[6], saleOwner, requestData[4]) | |
511 | + | let signFee = $t01761117786._1 | |
512 | + | let creatorFee = $t01761117786._2 | |
513 | + | let ownerFee = $t01761117786._3 | |
514 | + | let collectorFee = $t01761117786._4 | |
507 | 515 | [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, collectorFee] | |
508 | 516 | } | |
509 | 517 | } | |
513 | 521 | ||
514 | 522 | @Callable(i) | |
515 | 523 | func cancelRequest (artId,creatorAddr,requestId) = { | |
516 | - | let $ | |
517 | - | let id = $ | |
518 | - | let requestOwner = $ | |
519 | - | let date = $ | |
524 | + | let $t01824618290 = idCallerDate(i) | |
525 | + | let id = $t01824618290._1 | |
526 | + | let requestOwner = $t01824618290._2 | |
527 | + | let date = $t01824618290._3 | |
520 | 528 | let requesDataKey = ((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + requestId) | |
521 | 529 | let requestData = getStrByK((requesDataKey + "_OPEN")) | |
522 | 530 | if ((size(requestData) == 0)) |
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 | 28 | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
29 | 29 | ||
30 | 30 | let signCut = 3 | |
31 | 31 | ||
32 | 32 | let creatorCut = 10 | |
33 | 33 | ||
34 | 34 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
35 | 35 | ||
36 | 36 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
37 | 37 | ||
38 | 38 | let userSuspended = "SUSPENDED" | |
39 | 39 | ||
40 | 40 | let userRemoved = "REMOVED" | |
41 | 41 | ||
42 | 42 | let artIllegal = "ILLEGAL" | |
43 | 43 | ||
44 | 44 | let artSuspended = "SUSPENDED" | |
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 | 70 | func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
74 | 74 | ||
75 | 75 | func idCallerDate (i) = if (!(dappRunning)) | |
76 | 76 | then throw(maintenanceMSG) | |
77 | 77 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func isPayment (i) = if ((size(i.payments) == 0)) | |
81 | 81 | then throw("No payment attached") | |
82 | 82 | else { | |
83 | 83 | let payment = value(i.payments[0]) | |
84 | 84 | let amount = value(payment.amount) | |
85 | 85 | $Tuple2(payment, amount) | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func isSignArtNFT (id) = { | |
90 | 90 | let assetDetails = value(assetInfo(id)) | |
91 | 91 | if (if (if (if ((assetDetails.quantity != 1)) | |
92 | 92 | then true | |
93 | 93 | else (assetDetails.decimals != 0)) | |
94 | 94 | then true | |
95 | 95 | else (assetDetails.reissuable != false)) | |
96 | 96 | then true | |
97 | 97 | else (assetDetails.issuer != artworksDapp)) | |
98 | 98 | then false | |
99 | 99 | else true | |
100 | 100 | } | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId))) | |
104 | 104 | then (assetId != toBase58String(wavesAssetId)) | |
105 | 105 | else false) | |
106 | 106 | then (assetId != "WAVES") | |
107 | 107 | else false) | |
108 | 108 | then (assetId != toBase58String(usdnAssetId)) | |
109 | 109 | else false) | |
110 | 110 | then false | |
111 | 111 | else true | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
115 | 115 | then unit | |
116 | 116 | else fromBase58String(assetId) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getSaleOwnerAndStatus (nftid) = { | |
120 | 120 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
121 | 121 | if ((size(saleOwner) == 0)) | |
122 | 122 | then throw("NFT not found") | |
123 | 123 | else { | |
124 | 124 | let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid)) | |
125 | 125 | if ((saleStatus != "OPEN")) | |
126 | 126 | then throw("NFT not for sale") | |
127 | 127 | else saleOwner | |
128 | 128 | } | |
129 | 129 | } | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getBidData (key) = { | |
133 | 133 | let bidData = getStrByK((key + "_OPEN")) | |
134 | 134 | if ((bidData == "")) | |
135 | 135 | then throw("Offer not found") | |
136 | 136 | else { | |
137 | 137 | let bidDataArr = split(bidData, "_") | |
138 | 138 | let assetId = getBidAssetId(bidDataArr[2]) | |
139 | 139 | $Tuple3(bidDataArr, assetId, bidData) | |
140 | 140 | } | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func checkArtStatus (addr,id) = { | |
145 | 145 | let artStatus = getArtStrByK(keyFlag(addr, id)) | |
146 | 146 | if (if ((artStatus == artIllegal)) | |
147 | 147 | then true | |
148 | 148 | else (artStatus == artSuspended)) | |
149 | 149 | then throw(("Original Artwork flagged as " + artStatus)) | |
150 | 150 | else true | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func checkArtistStatus (addr) = { | |
155 | 155 | let artistStatus = getUserStrByK(keyUserStatus(addr)) | |
156 | 156 | if (containsElement([userSuspended, userRemoved], artistStatus)) | |
157 | 157 | then throw(("Original Artist " + artistStatus)) | |
158 | 158 | else true | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func checkNFTInfo (assetId) = { | |
163 | 163 | let nftData = split(getArtStrByK(keyNFTData(assetId)), "_") | |
164 | 164 | let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5])) | |
165 | 165 | if ((size(artSignID) == 0)) | |
166 | 166 | then throw("Artwork not found on SIGN Art") | |
167 | 167 | else if (if (!(checkArtStatus(nftData[6], nftData[5]))) | |
168 | 168 | then !(checkArtistStatus(nftData[6])) | |
169 | 169 | else false) | |
170 | 170 | then $Tuple3(false, nftData[5], nftData[6]) | |
171 | 171 | else $Tuple3(true, nftData[5], nftData[6]) | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func checkARTExist (artId,creatorAddr) = { | |
176 | 176 | let artSignID = getArtStrByK(keySignID(creatorAddr, artId)) | |
177 | 177 | if ((size(artSignID) == 0)) | |
178 | 178 | then throw("Artwork not found on SIGN Art") | |
179 | 179 | else if (if (!(checkArtStatus(creatorAddr, artId))) | |
180 | 180 | then !(checkArtistStatus(creatorAddr)) | |
181 | 181 | else false) | |
182 | 182 | then false | |
183 | 183 | else true | |
184 | 184 | } | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = { | |
188 | 188 | let amountForSign = fraction(amount, signCut, 100) | |
189 | 189 | let amountForCreator = fraction(amount, creatorCut, 100) | |
190 | 190 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
191 | 191 | let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId) | |
192 | 192 | let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId) | |
193 | 193 | let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId) | |
194 | 194 | let collectorFee = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid)) | |
195 | 195 | $Tuple4(signFee, creatorFee, ownerFee, collectorFee) | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func validateMinSell (assetId,price) = { | |
200 | 200 | let minSellWaves = if (unitTest) | |
201 | 201 | then 10 | |
202 | 202 | else getIntByKFromOracle("waves_min_sell") | |
203 | 203 | let minSellUsdn = 1000000 | |
204 | 204 | let minSellSign = if (unitTest) | |
205 | 205 | then 1 | |
206 | 206 | else (currentCertificationPrice * 2) | |
207 | 207 | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
208 | 208 | then (minSellUsdn > price) | |
209 | 209 | else false) | |
210 | 210 | then (price != 0) | |
211 | 211 | else false) | |
212 | 212 | then true | |
213 | 213 | else if (if ((assetId == toBase58String(signAssetId))) | |
214 | 214 | then (minSellSign > price) | |
215 | 215 | else false) | |
216 | 216 | then (price != 0) | |
217 | 217 | else false) | |
218 | 218 | then true | |
219 | 219 | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
220 | 220 | then true | |
221 | 221 | else (assetId == "WAVES")) | |
222 | 222 | then (minSellWaves > price) | |
223 | 223 | else false) | |
224 | 224 | then (price != 0) | |
225 | 225 | else false) | |
226 | - | then | |
226 | + | then false | |
227 | 227 | else true | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | @Callable(i) | |
232 | 232 | func sellNFT (price,asset) = { | |
233 | - | let $t079277966 = idCallerDate(i) | |
234 | - | let id = $t079277966._1 | |
235 | - | let caller = $t079277966._2 | |
236 | - | let date = $t079277966._3 | |
237 | - | let $t079718007 = isPayment(i) | |
238 | - | let payment = $t079718007._1 | |
239 | - | let amount = $t079718007._2 | |
240 | - | let nftId = if (if (isDefined(payment.assetId)) | |
241 | - | then isSignArtNFT(value(payment.assetId)) | |
242 | - | else false) | |
243 | - | then toBase58String(value(payment.assetId)) | |
244 | - | else throw("Only SIGN Art NFT accepted.") | |
233 | + | let $t078957934 = idCallerDate(i) | |
234 | + | let id = $t078957934._1 | |
235 | + | let caller = $t078957934._2 | |
236 | + | let date = $t078957934._3 | |
237 | + | let $t079397975 = isPayment(i) | |
238 | + | let payment = $t079397975._1 | |
239 | + | let amount = $t079397975._2 | |
245 | 240 | if (!(acceptedAssetIds(asset))) | |
246 | 241 | then throw("Only SIGN, USDN or WAVES accepted") | |
247 | 242 | else if (!(validateMinSell(asset, price))) | |
248 | - | then throw(" | |
243 | + | then throw("Wrong minimum sell price") | |
249 | 244 | else { | |
250 | - | let $t083808438 = checkNFTInfo(nftId) | |
251 | - | let isValidNFT = $t083808438._1 | |
252 | - | let artId = $t083808438._2 | |
253 | - | let creatorAddr = $t083808438._3 | |
245 | + | let nftId = if (if (isDefined(payment.assetId)) | |
246 | + | then isSignArtNFT(value(payment.assetId)) | |
247 | + | else false) | |
248 | + | then toBase58String(value(payment.assetId)) | |
249 | + | else throw("Only SIGN Art NFT accepted.") | |
250 | + | let $t083288386 = checkNFTInfo(nftId) | |
251 | + | let isValidNFT = $t083288386._1 | |
252 | + | let artId = $t083288386._2 | |
253 | + | let creatorAddr = $t083288386._3 | |
254 | 254 | if (!(isValidNFT)) | |
255 | 255 | then throw("Something went wrong") | |
256 | 256 | else [StringEntry((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + creatorAddr) + "_OPEN"), ((((((((((((toString(date) + "_") + toString(price)) + "_") + asset) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + id)), StringEntry(((("sale2nd_status_" + caller) + "_") + nftId), "OPEN"), StringEntry(("current_owner_on_dapp_" + nftId), caller)] | |
257 | 257 | } | |
258 | 258 | } | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | ||
262 | 262 | @Callable(i) | |
263 | 263 | func updateSalePrice (nftid,price,asset) = { | |
264 | - | let $ | |
265 | - | let id = $ | |
266 | - | let caller = $ | |
267 | - | let date = $ | |
264 | + | let $t088928931 = idCallerDate(i) | |
265 | + | let id = $t088928931._1 | |
266 | + | let caller = $t088928931._2 | |
267 | + | let date = $t088928931._3 | |
268 | 268 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
269 | 269 | if ((saleOwner != caller)) | |
270 | 270 | then throw("You don't own this NFT") | |
271 | 271 | else { | |
272 | 272 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid)) | |
273 | 273 | if ((saleStatus != "OPEN")) | |
274 | 274 | then throw("Sale not active") | |
275 | 275 | else if (!(acceptedAssetIds(asset))) | |
276 | 276 | then throw("Only SIGN, USDN or WAVES accepted") | |
277 | - | else { | |
278 | - | let creatorAddr = split(getArtStrByK(keyNFTData(nftid)), "_")[6] | |
279 | - | let saleInfo = split(getStrByK(((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + saleStatus)), "_") | |
277 | + | else if (!(validateMinSell(asset, price))) | |
278 | + | then throw("Wrong minimum sell price") | |
279 | + | else { | |
280 | + | let creatorAddr = split(getArtStrByK(keyNFTData(nftid)), "_")[6] | |
281 | + | let saleInfo = split(getStrByK(((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + saleStatus)), "_") | |
280 | 282 | [StringEntry((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))] | |
281 | - | } | |
283 | + | } | |
282 | 284 | } | |
283 | 285 | } | |
284 | 286 | ||
285 | 287 | ||
286 | 288 | ||
287 | 289 | @Callable(i) | |
288 | 290 | func cancelSale (nftid) = { | |
289 | - | let $ | |
290 | - | let id = $ | |
291 | - | let caller = $ | |
292 | - | let date = $ | |
291 | + | let $t098819920 = idCallerDate(i) | |
292 | + | let id = $t098819920._1 | |
293 | + | let caller = $t098819920._2 | |
294 | + | let date = $t098819920._3 | |
293 | 295 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
294 | 296 | if ((saleOwner != caller)) | |
295 | 297 | then throw("You don't own this NFT") | |
296 | 298 | else { | |
297 | 299 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid)) | |
298 | 300 | if ((saleStatus != "OPEN")) | |
299 | 301 | then throw("Sale not active") | |
300 | 302 | else { | |
301 | 303 | let creatorAddr = split(getArtStrByK(keyNFTData(nftid)), "_")[6] | |
302 | 304 | let saleInfo = getStrByK(((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + saleStatus)) | |
303 | 305 | [DeleteEntry((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + caller) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + id) + "_CANCELLED"), ((((saleInfo + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))] | |
304 | 306 | } | |
305 | 307 | } | |
306 | 308 | } | |
307 | 309 | ||
308 | 310 | ||
309 | 311 | ||
310 | 312 | @Callable(i) | |
311 | 313 | func buyNFT (nftid) = { | |
312 | - | let $ | |
313 | - | let id = $ | |
314 | - | let caller = $ | |
315 | - | let date = $ | |
314 | + | let $t01106611105 = idCallerDate(i) | |
315 | + | let id = $t01106611105._1 | |
316 | + | let caller = $t01106611105._2 | |
317 | + | let date = $t01106611105._3 | |
316 | 318 | let saleOwner = getSaleOwnerAndStatus(nftid) | |
317 | - | let $ | |
318 | - | let isValidNFT = $ | |
319 | - | let artId = $ | |
320 | - | let creatorAddr = $ | |
319 | + | let $t01115911217 = checkNFTInfo(nftid) | |
320 | + | let isValidNFT = $t01115911217._1 | |
321 | + | let artId = $t01115911217._2 | |
322 | + | let creatorAddr = $t01115911217._3 | |
321 | 323 | if (!(isValidNFT)) | |
322 | 324 | then throw("Something went wrong") | |
323 | 325 | else { | |
324 | 326 | let saleInfo = getStrByK((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")) | |
325 | 327 | if ((size(saleInfo) == 0)) | |
326 | 328 | then throw("Sale Not found!") | |
327 | 329 | else { | |
328 | 330 | let saleInfoArray = split(saleInfo, "_") | |
329 | 331 | if ((parseInt(saleInfoArray[1]) == 0)) | |
330 | 332 | then throw("Offer only") | |
331 | 333 | else { | |
332 | - | let $ | |
333 | - | let payment = $ | |
334 | - | let amount = $ | |
334 | + | let $t01155111587 = isPayment(i) | |
335 | + | let payment = $t01155111587._1 | |
336 | + | let amount = $t01155111587._2 | |
335 | 337 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
336 | 338 | then toBase58String(value(payment.assetId)) | |
337 | 339 | else "" | |
338 | 340 | if (if ((saleInfoArray[1] != toString(amount))) | |
339 | 341 | then true | |
340 | 342 | else (saleInfoArray[2] != paymentAssetStr)) | |
341 | 343 | then throw("Payment infos don't match.") | |
342 | 344 | else { | |
343 | 345 | let amountForSign = fraction(amount, signCut, 100) | |
344 | 346 | let amountForCreator = fraction(amount, creatorCut, 100) | |
345 | 347 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
346 | - | let $ | |
347 | - | let signFee = $ | |
348 | - | let creatorFee = $ | |
349 | - | let ownerFee = $ | |
350 | - | let collectorFee = $ | |
348 | + | let $t01209012218 = setTransfers(amount, payment.assetId, nftid, creatorAddr, saleOwner, caller) | |
349 | + | let signFee = $t01209012218._1 | |
350 | + | let creatorFee = $t01209012218._2 | |
351 | + | let ownerFee = $t01209012218._3 | |
352 | + | let collectorFee = $t01209012218._4 | |
351 | 353 | [DeleteEntry((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_") + id) + "_CLOSED"), ((((((makeString(saleInfoArray, "_") + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), signFee, creatorFee, ownerFee, collectorFee] | |
352 | 354 | } | |
353 | 355 | } | |
354 | 356 | } | |
355 | 357 | } | |
356 | 358 | } | |
357 | 359 | ||
358 | 360 | ||
359 | 361 | ||
360 | 362 | @Callable(i) | |
361 | 363 | func setOffer (nftid) = { | |
362 | - | let $ | |
363 | - | let id = $ | |
364 | - | let offerOwner = $ | |
365 | - | let date = $ | |
366 | - | let $ | |
367 | - | let payment = $ | |
368 | - | let amount = $ | |
364 | + | let $t01270912751 = idCallerDate(i) | |
365 | + | let id = $t01270912751._1 | |
366 | + | let offerOwner = $t01270912751._2 | |
367 | + | let date = $t01270912751._3 | |
368 | + | let $t01275712793 = isPayment(i) | |
369 | + | let payment = $t01275712793._1 | |
370 | + | let amount = $t01275712793._2 | |
369 | 371 | let assetId = if (!(isDefined(payment.assetId))) | |
370 | 372 | then "WAVES" | |
371 | 373 | else toBase58String(value(payment.assetId)) | |
372 | 374 | if (!(acceptedAssetIds(assetId))) | |
373 | 375 | then throw("asset not accepted") | |
374 | - | else { | |
375 | - | let $t01298113039 = checkNFTInfo(nftid) | |
376 | - | let isValidNFT = $t01298113039._1 | |
377 | - | let artId = $t01298113039._2 | |
378 | - | let creatorAddr = $t01298113039._3 | |
379 | - | if (!(isValidNFT)) | |
380 | - | then throw("Something went wrong") | |
376 | + | else if ((amount == 0)) | |
377 | + | then throw("Offer of 0 not allowed") | |
378 | + | else if (!(validateMinSell(assetId, amount))) | |
379 | + | then throw("Wrong minimum sell price") | |
381 | 380 | else { | |
382 | - | let saleOwner = getSaleOwnerAndStatus(nftid) | |
381 | + | let $t01312713185 = checkNFTInfo(nftid) | |
382 | + | let isValidNFT = $t01312713185._1 | |
383 | + | let artId = $t01312713185._2 | |
384 | + | let creatorAddr = $t01312713185._3 | |
385 | + | if (!(isValidNFT)) | |
386 | + | then throw("Something went wrong") | |
387 | + | else { | |
388 | + | let saleOwner = getSaleOwnerAndStatus(nftid) | |
383 | 389 | [StringEntry((((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftid) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
390 | + | } | |
384 | 391 | } | |
385 | - | } | |
386 | 392 | } | |
387 | 393 | ||
388 | 394 | ||
389 | 395 | ||
390 | 396 | @Callable(i) | |
391 | 397 | func acceptOffer (nftid,offerId,offerOwner) = { | |
392 | - | let $ | |
393 | - | let id = $ | |
394 | - | let caller = $ | |
395 | - | let date = $ | |
398 | + | let $t01371813787 = idCallerDate(i) | |
399 | + | let id = $t01371813787._1 | |
400 | + | let caller = $t01371813787._2 | |
401 | + | let date = $t01371813787._3 | |
396 | 402 | let saleOwner = getSaleOwnerAndStatus(nftid) | |
397 | 403 | if ((caller != saleOwner)) | |
398 | 404 | then throw("You cannot do this action") | |
399 | 405 | else { | |
400 | 406 | let bidKey = ((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) | |
401 | 407 | let bidValue = getStrByK((bidKey + "_OPEN")) | |
402 | 408 | if ((bidValue == "")) | |
403 | 409 | then throw("Offer not found or not for sale") | |
404 | 410 | else { | |
405 | - | let $ | |
406 | - | let isValidNFT = $ | |
407 | - | let artId = $ | |
408 | - | let creatorAddr = $ | |
411 | + | let $t01411114169 = checkNFTInfo(nftid) | |
412 | + | let isValidNFT = $t01411114169._1 | |
413 | + | let artId = $t01411114169._2 | |
414 | + | let creatorAddr = $t01411114169._3 | |
409 | 415 | if (!(isValidNFT)) | |
410 | 416 | then throw("Something went wrong") | |
411 | 417 | else { | |
412 | 418 | let saleKey = ((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) | |
413 | 419 | let saleValue = getStrByK((saleKey + "_OPEN")) | |
414 | 420 | if ((size(saleValue) == 0)) | |
415 | 421 | then throw("Sale Not found!") | |
416 | 422 | else { | |
417 | 423 | let saleValArr = split(saleValue, "_") | |
418 | - | let $ | |
419 | - | let bidDataArr = $ | |
420 | - | let assetId = $ | |
421 | - | let bidData = $ | |
424 | + | let $t01450414559 = getBidData(bidKey) | |
425 | + | let bidDataArr = $t01450414559._1 | |
426 | + | let assetId = $t01450414559._2 | |
427 | + | let bidData = $t01450414559._3 | |
422 | 428 | let amount = value(parseInt(bidDataArr[1])) | |
423 | - | let $ | |
424 | - | let signFee = $ | |
425 | - | let creatorFee = $ | |
426 | - | let ownerFee = $ | |
427 | - | let collectorFee = $ | |
429 | + | let $t01461314740 = setTransfers(amount, assetId, nftid, creatorAddr, saleOwner, bidDataArr[6]) | |
430 | + | let signFee = $t01461314740._1 | |
431 | + | let creatorFee = $t01461314740._2 | |
432 | + | let ownerFee = $t01461314740._3 | |
433 | + | let collectorFee = $t01461314740._4 | |
428 | 434 | [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, collectorFee] | |
429 | 435 | } | |
430 | 436 | } | |
431 | 437 | } | |
432 | 438 | } | |
433 | 439 | } | |
434 | 440 | ||
435 | 441 | ||
436 | 442 | ||
437 | 443 | @Callable(i) | |
438 | 444 | func cancelOffer (nftid,offerId,saleOwner) = { | |
439 | - | let $ | |
440 | - | let id = $ | |
441 | - | let caller = $ | |
442 | - | let date = $ | |
445 | + | let $t01538915450 = idCallerDate(i) | |
446 | + | let id = $t01538915450._1 | |
447 | + | let caller = $t01538915450._2 | |
448 | + | let date = $t01538915450._3 | |
443 | 449 | let bidKey = ((((((("offer2nd_" + caller) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) | |
444 | - | let $ | |
445 | - | let bidDataArr = $ | |
446 | - | let assetId = $ | |
447 | - | let bidData = $ | |
450 | + | let $t01552715582 = getBidData(bidKey) | |
451 | + | let bidDataArr = $t01552715582._1 | |
452 | + | let assetId = $t01552715582._2 | |
453 | + | let bidData = $t01552715582._3 | |
448 | 454 | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
449 | 455 | } | |
450 | 456 | ||
451 | 457 | ||
452 | 458 | ||
453 | 459 | @Callable(i) | |
454 | 460 | func makeRequest (artId,creatorAddr) = { | |
455 | - | let $ | |
456 | - | let id = $ | |
457 | - | let requestOwner = $ | |
458 | - | let date = $ | |
459 | - | let $ | |
460 | - | let payment = $ | |
461 | - | let amount = $ | |
461 | + | let $t01590715951 = idCallerDate(i) | |
462 | + | let id = $t01590715951._1 | |
463 | + | let requestOwner = $t01590715951._2 | |
464 | + | let date = $t01590715951._3 | |
465 | + | let $t01595715993 = isPayment(i) | |
466 | + | let payment = $t01595715993._1 | |
467 | + | let amount = $t01595715993._2 | |
462 | 468 | let assetId = if (!(isDefined(payment.assetId))) | |
463 | 469 | then "WAVES" | |
464 | 470 | else toBase58String(value(payment.assetId)) | |
465 | 471 | if (!(acceptedAssetIds(assetId))) | |
466 | 472 | then throw("asset not accepted") | |
467 | - | else { | |
468 | - | let isValidART = checkARTExist(artId, creatorAddr) | |
469 | - | if (!(isValidART)) | |
470 | - | then throw("Something went wrong") | |
471 | - | else [StringEntry((((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))] | |
472 | - | } | |
473 | + | else if (!(validateMinSell(assetId, amount))) | |
474 | + | then throw("Wrong minimum sell price") | |
475 | + | else { | |
476 | + | let isValidART = checkARTExist(artId, creatorAddr) | |
477 | + | if (!(isValidART)) | |
478 | + | then throw("Something went wrong") | |
479 | + | else [StringEntry((((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + id) + "_OPEN"), ((((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_") + artId) + "_") + requestOwner) + "_") + id))] | |
480 | + | } | |
473 | 481 | } | |
474 | 482 | ||
475 | 483 | ||
476 | 484 | ||
477 | 485 | @Callable(i) | |
478 | 486 | func fillRequest (artId,requestOwner,offerId) = { | |
479 | - | let $ | |
480 | - | let id = $ | |
481 | - | let saleOwner = $ | |
482 | - | let date = $ | |
483 | - | let $ | |
484 | - | let payment = $ | |
485 | - | let amountAttached = $ | |
487 | + | let $t01680016842 = idCallerDate(i) | |
488 | + | let id = $t01680016842._1 | |
489 | + | let saleOwner = $t01680016842._2 | |
490 | + | let date = $t01680016842._3 | |
491 | + | let $t01684716891 = isPayment(i) | |
492 | + | let payment = $t01684716891._1 | |
493 | + | let amountAttached = $t01684716891._2 | |
486 | 494 | let NFTid = if (if (isDefined(payment.assetId)) | |
487 | 495 | then isSignArtNFT(value(payment.assetId)) | |
488 | 496 | else false) | |
489 | 497 | then payment.assetId | |
490 | 498 | else throw("No NFT found") | |
491 | 499 | let NFTdata = split(getArtStrByK(("nft_" + toBase58String(value(NFTid)))), "_") | |
492 | 500 | if ((size(NFTdata) == 0)) | |
493 | 501 | then throw("No NFT found") | |
494 | 502 | else { | |
495 | 503 | let requestData = split(getStrByK((((((((("request2nd_" + requestOwner) + "_") + NFTdata[6]) + "_") + artId) + "_") + offerId) + "_OPEN")), "_") | |
496 | 504 | if ((size(requestData) == 1)) | |
497 | 505 | then throw("No request found") | |
498 | 506 | else if ((requestData[3] != NFTdata[5])) | |
499 | 507 | then throw("This NFT don't match the requested artwork") | |
500 | 508 | else { | |
501 | 509 | let amount = value(parseInt(requestData[1])) | |
502 | - | let $ | |
503 | - | let signFee = $ | |
504 | - | let creatorFee = $ | |
505 | - | let ownerFee = $ | |
506 | - | let collectorFee = $ | |
510 | + | let $t01761117786 = setTransfers(amount, fromBase58String(requestData[2]), toBase58String(value(NFTid)), NFTdata[6], saleOwner, requestData[4]) | |
511 | + | let signFee = $t01761117786._1 | |
512 | + | let creatorFee = $t01761117786._2 | |
513 | + | let ownerFee = $t01761117786._3 | |
514 | + | let collectorFee = $t01761117786._4 | |
507 | 515 | [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, collectorFee] | |
508 | 516 | } | |
509 | 517 | } | |
510 | 518 | } | |
511 | 519 | ||
512 | 520 | ||
513 | 521 | ||
514 | 522 | @Callable(i) | |
515 | 523 | func cancelRequest (artId,creatorAddr,requestId) = { | |
516 | - | let $ | |
517 | - | let id = $ | |
518 | - | let requestOwner = $ | |
519 | - | let date = $ | |
524 | + | let $t01824618290 = idCallerDate(i) | |
525 | + | let id = $t01824618290._1 | |
526 | + | let requestOwner = $t01824618290._2 | |
527 | + | let date = $t01824618290._3 | |
520 | 528 | let requesDataKey = ((((((("request2nd_" + requestOwner) + "_") + creatorAddr) + "_") + artId) + "_") + requestId) | |
521 | 529 | let requestData = getStrByK((requesDataKey + "_OPEN")) | |
522 | 530 | if ((size(requestData) == 0)) | |
523 | 531 | then throw("Request not found") | |
524 | 532 | else { | |
525 | 533 | let requestDataArr = split(requestData, "_") | |
526 | 534 | [DeleteEntry((requesDataKey + "_OPEN")), StringEntry((((((requesDataKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((requestData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(requestOwner)), parseIntValue(requestDataArr[1]), fromBase58String(requestDataArr[2]))] | |
527 | 535 | } | |
528 | 536 | } | |
529 | 537 | ||
530 | 538 |
github/deemru/w8io/026f985 94.61 ms ◑