tx · BYfHbe3ZnUDTCmJvdv1kjEf2dB7skXZi4q3KRrm9kBMV 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p: -0.01400000 Waves 2022.01.27 12:56 [1897210] smart account 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p > SELF 0.00000000 Waves
{ "type": 13, "id": "BYfHbe3ZnUDTCmJvdv1kjEf2dB7skXZi4q3KRrm9kBMV", "fee": 1400000, "feeAssetId": null, "timestamp": 1643277409562, "version": 2, "chainId": 84, "sender": "3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p", "senderPublicKey": "Hh3eFP2XFetZSfTxQiM1Ps96f68zi8Zh5ghhCZdjgdFs", "proofs": [ "ST4UmoDjFjwWJQWJhWMYDWEzLQ3RxSTR3Q8qsApZpe3k5odqqCLEHdKpXFB4uVPRpbWvFXwHQkA8f2mvi3Ae2A2" ], "script": "base64:AAIFAAAAAAAAADIIAhIECgIECBIECgIBCBIFCgMIAQgSAwoBCBIDCgEIEgMKAQgSBQoDCAgIEgUKAwgICAAAADMAAAAACHVuaXRUZXN0BwAAAAAJb3JhY2xlRmVlCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOMnM1UnRhSFBCZW5Dc3gyRUNjb0ZSYllIeDNub1poWFcxAAAAAAhzaWduRGFwcAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTkMyOGhTaXZybXNUVVhhWUQxeDZMMzYySjRacFVub1RkQgAAAAAMYXJ0d29ya3NEYXBwCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQnluZmJYQzJLYXN0VXhodWtjTVVhRTU4SzljQmRCOVVZAAAAAAtmZWVSZWNlaXZlcgIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAAACHVzZXJEYXBwAwUAAAAIdW5pdFRlc3QJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM010NFJHTUV5alNXWUFvY1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29mZmVySWQEAAAADSR0MDE3MTI4MTcxODMJAQAAAApnZXRCaWREYXRhAAAAAQUAAAAGYmlkS2V5BAAAAApiaWREYXRhQXJyCAUAAAANJHQwMTcxMjgxNzE4MwAAAAJfMQQAAAAHYXNzZXRJZAgFAAAADSR0MDE3MTI4MTcxODMAAAACXzIEAAAAB2JpZERhdGEIBQAAAA0kdDAxNzEyODE3MTgzAAAAAl8zCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgUAAAAGYmlkS2V5AgAAAAVfT1BFTgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAABmJpZEtleQIAAAAKX0NBTkNFTExFRAkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAdiaWREYXRhAgAAAAtfQ0FOQ0VMTEVEXwkAAaQAAAABBQAAAARkYXRlAgAAAAFfBQAAAAJpZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUAAAAGY2FsbGVyCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgUAAAAKYmlkRGF0YUFycgAAAAAAAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAKqSNa4=", "height": 1897210, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DCujGG8XkELWk45tzZvPEXb6WPJzW7wSvdoRVRfQGN5V Next: CRvKzGEymcewArLXX3WBr8mbTUkgsL4zqwKiTefCUZ7m Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) | |
75 | + | ||
76 | + | ||
77 | + | func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId) | |
75 | 78 | ||
76 | 79 | ||
77 | 80 | func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
238 | 241 | ||
239 | 242 | ||
240 | 243 | func provideBaseData (i,nftId) = { | |
241 | - | let $ | |
242 | - | let id = $ | |
243 | - | let caller = $ | |
244 | - | let date = $ | |
245 | - | let $ | |
246 | - | let isValidNFT = $ | |
247 | - | let artId = $ | |
248 | - | let creatorAddr = $ | |
249 | - | let artSignID = $ | |
244 | + | let $t085728611 = idCallerDate(i) | |
245 | + | let id = $t085728611._1 | |
246 | + | let caller = $t085728611._2 | |
247 | + | let date = $t085728611._3 | |
248 | + | let $t086148683 = checkNFTInfo(nftId) | |
249 | + | let isValidNFT = $t086148683._1 | |
250 | + | let artId = $t086148683._2 | |
251 | + | let creatorAddr = $t086148683._3 | |
252 | + | let artSignID = $t086148683._4 | |
250 | 253 | $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID) | |
251 | 254 | } | |
252 | 255 | ||
270 | 273 | ||
271 | 274 | @Callable(i) | |
272 | 275 | func sellNFT (price,asset) = { | |
273 | - | let $ | |
274 | - | let payment = $ | |
275 | - | let amount = $ | |
276 | + | let $t093969432 = isPayment(i) | |
277 | + | let payment = $t093969432._1 | |
278 | + | let amount = $t093969432._2 | |
276 | 279 | let nftId = if (if (isDefined(payment.assetId)) | |
277 | 280 | then isSignArtNFT(value(payment.assetId)) | |
278 | 281 | else false) | |
279 | 282 | then toBase58String(value(payment.assetId)) | |
280 | 283 | else throw("Only SIGN Art NFT accepted.") | |
281 | - | let $ | |
282 | - | let id = $ | |
283 | - | let caller = $ | |
284 | - | let date = $ | |
285 | - | let isValidNFT = $ | |
286 | - | let artId = $ | |
287 | - | let creatorAddr = $ | |
288 | - | let artSignID = $ | |
284 | + | let $t096119703 = provideBaseData(i, nftId) | |
285 | + | let id = $t096119703._1 | |
286 | + | let caller = $t096119703._2 | |
287 | + | let date = $t096119703._3 | |
288 | + | let isValidNFT = $t096119703._4 | |
289 | + | let artId = $t096119703._5 | |
290 | + | let creatorAddr = $t096119703._6 | |
291 | + | let artSignID = $t096119703._7 | |
289 | 292 | if ((size(artSignID) == 0)) | |
290 | 293 | then throw("Artwork not found on SIGN Art") | |
291 | 294 | else if (!(isValidNFT)) | |
303 | 306 | ||
304 | 307 | @Callable(i) | |
305 | 308 | func updateSalePrice (nftId,price,asset) = { | |
306 | - | let $ | |
307 | - | let id = $ | |
308 | - | let caller = $ | |
309 | - | let date = $ | |
310 | - | let isValidNFT = $ | |
311 | - | let artId = $ | |
312 | - | let creatorAddr = $ | |
313 | - | let artSignID = $ | |
309 | + | let $t01057610668 = provideBaseData(i, nftId) | |
310 | + | let id = $t01057610668._1 | |
311 | + | let caller = $t01057610668._2 | |
312 | + | let date = $t01057610668._3 | |
313 | + | let isValidNFT = $t01057610668._4 | |
314 | + | let artId = $t01057610668._5 | |
315 | + | let creatorAddr = $t01057610668._6 | |
316 | + | let artSignID = $t01057610668._7 | |
314 | 317 | if ((size(artSignID) == 0)) | |
315 | 318 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
316 | 319 | else if (!(isValidNFT)) | |
342 | 345 | ||
343 | 346 | @Callable(i) | |
344 | 347 | func cancelSale (nftId) = { | |
345 | - | let $ | |
346 | - | let id = $ | |
347 | - | let caller = $ | |
348 | - | let date = $ | |
349 | - | let isValidNFT = $ | |
350 | - | let artId = $ | |
351 | - | let creatorAddr = $ | |
352 | - | let artSignID = $ | |
348 | + | let $t01180812048 = provideBaseData(i, nftId) | |
349 | + | let id = $t01180812048._1 | |
350 | + | let caller = $t01180812048._2 | |
351 | + | let date = $t01180812048._3 | |
352 | + | let isValidNFT = $t01180812048._4 | |
353 | + | let artId = $t01180812048._5 | |
354 | + | let creatorAddr = $t01180812048._6 | |
355 | + | let artSignID = $t01180812048._7 | |
353 | 356 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
354 | 357 | if ((saleOwner != caller)) | |
355 | 358 | then throw("You don't own this NFT") | |
369 | 372 | ||
370 | 373 | @Callable(i) | |
371 | 374 | func buyNFT (nftId) = { | |
372 | - | let $ | |
373 | - | let id = $ | |
374 | - | let caller = $ | |
375 | - | let date = $ | |
376 | - | let isValidNFT = $ | |
377 | - | let artId = $ | |
378 | - | let creatorAddr = $ | |
379 | - | let artSignID = $ | |
375 | + | let $t01287912971 = provideBaseData(i, nftId) | |
376 | + | let id = $t01287912971._1 | |
377 | + | let caller = $t01287912971._2 | |
378 | + | let date = $t01287912971._3 | |
379 | + | let isValidNFT = $t01287912971._4 | |
380 | + | let artId = $t01287912971._5 | |
381 | + | let creatorAddr = $t01287912971._6 | |
382 | + | let artSignID = $t01287912971._7 | |
380 | 383 | if ((size(artSignID) == 0)) | |
381 | 384 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
382 | 385 | else if (!(isValidNFT)) | |
392 | 395 | if ((parseInt(saleInfoArray[1]) == 0)) | |
393 | 396 | then throw("Offer only") | |
394 | 397 | else { | |
395 | - | let $ | |
396 | - | let payment = $ | |
397 | - | let amount = $ | |
398 | + | let $t01346813504 = isPayment(i) | |
399 | + | let payment = $t01346813504._1 | |
400 | + | let amount = $t01346813504._2 | |
398 | 401 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
399 | 402 | then toBase58String(value(payment.assetId)) | |
400 | 403 | else "" | |
406 | 409 | let amountForSign = fraction(amount, signCut, 100) | |
407 | 410 | let amountForCreator = fraction(amount, creatorCut, 100) | |
408 | 411 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
409 | - | let $ | |
410 | - | let signFee = $ | |
411 | - | let creatorFee = $ | |
412 | - | let ownerFee = $ | |
413 | - | let collectorNFT = $ | |
412 | + | let $t01400714135 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller) | |
413 | + | let signFee = $t01400714135._1 | |
414 | + | let creatorFee = $t01400714135._2 | |
415 | + | let ownerFee = $t01400714135._3 | |
416 | + | let collectorNFT = $t01400714135._4 | |
414 | 417 | [DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((saleInfo + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT] | |
415 | 418 | } | |
416 | 419 | } | |
419 | 422 | } | |
420 | 423 | ||
421 | 424 | ||
425 | + | ||
426 | + | @Callable(i) | |
427 | + | func setOffer (nftId) = { | |
428 | + | let $t01454314639 = provideBaseData(i, nftId) | |
429 | + | let id = $t01454314639._1 | |
430 | + | let offerOwner = $t01454314639._2 | |
431 | + | let date = $t01454314639._3 | |
432 | + | let isValidNFT = $t01454314639._4 | |
433 | + | let artId = $t01454314639._5 | |
434 | + | let creatorAddr = $t01454314639._6 | |
435 | + | let artSignID = $t01454314639._7 | |
436 | + | if (!(isValidNFT)) | |
437 | + | then throw("Not a valid nft") | |
438 | + | else { | |
439 | + | let $t01470014736 = isPayment(i) | |
440 | + | let payment = $t01470014736._1 | |
441 | + | let amount = $t01470014736._2 | |
442 | + | let assetId = if (!(isDefined(payment.assetId))) | |
443 | + | then "WAVES" | |
444 | + | else toBase58String(value(payment.assetId)) | |
445 | + | if (!(acceptedAssetIds(assetId))) | |
446 | + | then throw("asset not accepted") | |
447 | + | else if ((amount == 0)) | |
448 | + | then throw("Offer of 0 not allowed") | |
449 | + | else if (!(validateMinSell(assetId, amount))) | |
450 | + | then throw("Wrong minimum sell price") | |
451 | + | else { | |
452 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
453 | + | [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
454 | + | } | |
455 | + | } | |
456 | + | } | |
457 | + | ||
458 | + | ||
459 | + | ||
460 | + | @Callable(i) | |
461 | + | func acceptOffer (nftId,offerId,offerOwner) = { | |
462 | + | let $t01553815630 = provideBaseData(i, nftId) | |
463 | + | let id = $t01553815630._1 | |
464 | + | let caller = $t01553815630._2 | |
465 | + | let date = $t01553815630._3 | |
466 | + | let isValidNFT = $t01553815630._4 | |
467 | + | let artId = $t01553815630._5 | |
468 | + | let creatorAddr = $t01553815630._6 | |
469 | + | let artSignID = $t01553815630._7 | |
470 | + | if (!(isValidNFT)) | |
471 | + | then throw("Not a valid nft") | |
472 | + | else { | |
473 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
474 | + | if ((caller != saleOwner)) | |
475 | + | then throw("Only sale owner can accept offer") | |
476 | + | else { | |
477 | + | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
478 | + | let $t01588415939 = getBidData(bidKey) | |
479 | + | let bidDataArr = $t01588415939._1 | |
480 | + | let assetId = $t01588415939._2 | |
481 | + | let bidData = $t01588415939._3 | |
482 | + | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
483 | + | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
484 | + | if ((size(saleInfo) == 0)) | |
485 | + | then throw("Sale Not found!") | |
486 | + | else { | |
487 | + | let amount = value(parseInt(bidDataArr[1])) | |
488 | + | let $t01617116298 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6]) | |
489 | + | let signFee = $t01617116298._1 | |
490 | + | let creatorFee = $t01617116298._2 | |
491 | + | let ownerFee = $t01617116298._3 | |
492 | + | let collectorNFT = $t01617116298._4 | |
493 | + | [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] | |
494 | + | } | |
495 | + | } | |
496 | + | } | |
497 | + | } | |
498 | + | ||
499 | + | ||
500 | + | ||
501 | + | @Callable(i) | |
502 | + | func cancelOffer (nftId,offerId,saleOwner) = { | |
503 | + | let $t01700317064 = idCallerDate(i) | |
504 | + | let id = $t01700317064._1 | |
505 | + | let caller = $t01700317064._2 | |
506 | + | let date = $t01700317064._3 | |
507 | + | let bidKey = getBidKey(caller, nftId, saleOwner, offerId) | |
508 | + | let $t01712817183 = getBidData(bidKey) | |
509 | + | let bidDataArr = $t01712817183._1 | |
510 | + | let assetId = $t01712817183._2 | |
511 | + | let bidData = $t01712817183._3 | |
512 | + | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
513 | + | } | |
514 | + | ||
515 | + |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
5 | 5 | ||
6 | 6 | let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
7 | 7 | ||
8 | 8 | let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let artworksDapp = value(addressFromString("3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY")) | |
11 | 11 | ||
12 | 12 | let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
13 | 13 | ||
14 | 14 | let userDapp = if (unitTest) | |
15 | 15 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
16 | 16 | else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj")) | |
17 | 17 | ||
18 | 18 | let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq")) | |
19 | 19 | ||
20 | 20 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
21 | 21 | ||
22 | 22 | let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
23 | 23 | ||
24 | 24 | let wavesAssetId = base58'' | |
25 | 25 | ||
26 | 26 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
27 | 27 | ||
28 | 28 | let signCut = 3 | |
29 | 29 | ||
30 | 30 | let creatorCut = 10 | |
31 | 31 | ||
32 | 32 | let userSuspended = "SUSPENDED" | |
33 | 33 | ||
34 | 34 | let userRemoved = "REMOVED" | |
35 | 35 | ||
36 | 36 | let artIllegal = "ILLEGAL" | |
37 | 37 | ||
38 | 38 | let artSuspended = "SUSPENDED" | |
39 | 39 | ||
40 | 40 | let dappRunningKey = "conf_dapp_is_running" | |
41 | 41 | ||
42 | 42 | let maintenanceMSGKey = "conf_maintenance_msg" | |
43 | 43 | ||
44 | 44 | let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true) | |
45 | 45 | ||
46 | 46 | let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "") | |
47 | 47 | ||
48 | 48 | let numSalesK = "num_sales" | |
49 | 49 | ||
50 | 50 | func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error") | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "") | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func getStrByK (key) = valueOrElse(getString(this, key), "") | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getIntByK (key) = valueOrElse(getInteger(this, key), 0) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyUserStatus (addr) = ("user_status_" + addr) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func keyNFTData (id) = ("nft_" + id) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) | |
75 | + | ||
76 | + | ||
77 | + | func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId) | |
75 | 78 | ||
76 | 79 | ||
77 | 80 | func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
78 | 81 | ||
79 | 82 | ||
80 | 83 | let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
81 | 84 | ||
82 | 85 | func idCallerDate (i) = if (!(dappRunning)) | |
83 | 86 | then throw(maintenanceMSG) | |
84 | 87 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
85 | 88 | ||
86 | 89 | ||
87 | 90 | func isPayment (i) = if ((size(i.payments) == 0)) | |
88 | 91 | then throw("No payment attached") | |
89 | 92 | else { | |
90 | 93 | let payment = value(i.payments[0]) | |
91 | 94 | let amount = value(payment.amount) | |
92 | 95 | $Tuple2(payment, amount) | |
93 | 96 | } | |
94 | 97 | ||
95 | 98 | ||
96 | 99 | func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1)) | |
97 | 100 | then (assetDetails.decimals == 0) | |
98 | 101 | else false) | |
99 | 102 | then (assetDetails.reissuable == false) | |
100 | 103 | else false) | |
101 | 104 | then (assetDetails.issuer == artworksDapp) | |
102 | 105 | else false | |
103 | 106 | ||
104 | 107 | ||
105 | 108 | func isSignArtNFT (id) = { | |
106 | 109 | let assetDetails = value(assetInfo(id)) | |
107 | 110 | assetIsValid(assetDetails) | |
108 | 111 | } | |
109 | 112 | ||
110 | 113 | ||
111 | 114 | func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId))) | |
112 | 115 | then (assetId != toBase58String(wavesAssetId)) | |
113 | 116 | else false) | |
114 | 117 | then (assetId != "WAVES") | |
115 | 118 | else false) | |
116 | 119 | then (assetId != toBase58String(usdnAssetId)) | |
117 | 120 | else false) | |
118 | 121 | then false | |
119 | 122 | else true | |
120 | 123 | ||
121 | 124 | ||
122 | 125 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
123 | 126 | then unit | |
124 | 127 | else fromBase58String(assetId) | |
125 | 128 | ||
126 | 129 | ||
127 | 130 | func getSaleOwnerAndStatus (nftid) = { | |
128 | 131 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
129 | 132 | if ((size(saleOwner) == 0)) | |
130 | 133 | then throw("NFT not found") | |
131 | 134 | else { | |
132 | 135 | let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid)) | |
133 | 136 | if ((saleStatus != "OPEN")) | |
134 | 137 | then throw("NFT not for sale") | |
135 | 138 | else saleOwner | |
136 | 139 | } | |
137 | 140 | } | |
138 | 141 | ||
139 | 142 | ||
140 | 143 | func getBidData (key) = { | |
141 | 144 | let bidData = getStrByK((key + "_OPEN")) | |
142 | 145 | if ((bidData == "")) | |
143 | 146 | then throw("Offer not found") | |
144 | 147 | else { | |
145 | 148 | let bidDataArr = split(bidData, "_") | |
146 | 149 | let assetId = getBidAssetId(bidDataArr[2]) | |
147 | 150 | $Tuple3(bidDataArr, assetId, bidData) | |
148 | 151 | } | |
149 | 152 | } | |
150 | 153 | ||
151 | 154 | ||
152 | 155 | func artIsValid (artStatus) = if ((artStatus != artIllegal)) | |
153 | 156 | then (artStatus != artSuspended) | |
154 | 157 | else false | |
155 | 158 | ||
156 | 159 | ||
157 | 160 | func checkArtStatus (addr,id) = { | |
158 | 161 | let artStatus = getArtStrByK(keyFlag(addr, id)) | |
159 | 162 | if (artIsValid(artStatus)) | |
160 | 163 | then true | |
161 | 164 | else throw(("Original Artwork flagged as " + artStatus)) | |
162 | 165 | } | |
163 | 166 | ||
164 | 167 | ||
165 | 168 | func checkArtistStatus (addr) = { | |
166 | 169 | let artistStatus = getUserStrByK(keyUserStatus(addr)) | |
167 | 170 | if (containsElement([userSuspended, userRemoved], artistStatus)) | |
168 | 171 | then throw(("Original Artist " + artistStatus)) | |
169 | 172 | else true | |
170 | 173 | } | |
171 | 174 | ||
172 | 175 | ||
173 | 176 | func checkNFTInfo (assetId) = { | |
174 | 177 | let nftData = split(getArtStrByK(keyNFTData(assetId)), "_") | |
175 | 178 | let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5])) | |
176 | 179 | if (if (!(checkArtStatus(nftData[6], nftData[5]))) | |
177 | 180 | then !(checkArtistStatus(nftData[6])) | |
178 | 181 | else false) | |
179 | 182 | then $Tuple4(false, nftData[5], nftData[6], artSignID) | |
180 | 183 | else $Tuple4(true, nftData[5], nftData[6], artSignID) | |
181 | 184 | } | |
182 | 185 | ||
183 | 186 | ||
184 | 187 | func checkARTExist (artId,creatorAddr) = { | |
185 | 188 | let artSignID = getArtStrByK(keySignID(creatorAddr, artId)) | |
186 | 189 | if ((size(artSignID) == 0)) | |
187 | 190 | then throw("Artwork not found on SIGN Art") | |
188 | 191 | else if (if (!(checkArtStatus(creatorAddr, artId))) | |
189 | 192 | then !(checkArtistStatus(creatorAddr)) | |
190 | 193 | else false) | |
191 | 194 | then false | |
192 | 195 | else true | |
193 | 196 | } | |
194 | 197 | ||
195 | 198 | ||
196 | 199 | func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = { | |
197 | 200 | let amountForSign = fraction(amount, signCut, 100) | |
198 | 201 | let amountForCreator = fraction(amount, creatorCut, 100) | |
199 | 202 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
200 | 203 | let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId) | |
201 | 204 | let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId) | |
202 | 205 | let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId) | |
203 | 206 | let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid)) | |
204 | 207 | $Tuple4(signFee, creatorFee, ownerFee, collectorNFT) | |
205 | 208 | } | |
206 | 209 | ||
207 | 210 | ||
208 | 211 | func validateMinSell (assetId,price) = { | |
209 | 212 | let minSellWaves = if (unitTest) | |
210 | 213 | then 10 | |
211 | 214 | else getIntByKFromOracle("waves_min_sell") | |
212 | 215 | let minSellUsdn = 1000000 | |
213 | 216 | let minSellSign = if (unitTest) | |
214 | 217 | then 1 | |
215 | 218 | else (currentCertificationPrice * 2) | |
216 | 219 | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
217 | 220 | then (minSellUsdn > price) | |
218 | 221 | else false) | |
219 | 222 | then (price != 0) | |
220 | 223 | else false) | |
221 | 224 | then true | |
222 | 225 | else if (if ((assetId == toBase58String(signAssetId))) | |
223 | 226 | then (minSellSign > price) | |
224 | 227 | else false) | |
225 | 228 | then (price != 0) | |
226 | 229 | else false) | |
227 | 230 | then true | |
228 | 231 | else if (if (if ((assetId == toBase58String(wavesAssetId))) | |
229 | 232 | then true | |
230 | 233 | else (assetId == "WAVES")) | |
231 | 234 | then (minSellWaves > price) | |
232 | 235 | else false) | |
233 | 236 | then (price != 0) | |
234 | 237 | else false) | |
235 | 238 | then false | |
236 | 239 | else true | |
237 | 240 | } | |
238 | 241 | ||
239 | 242 | ||
240 | 243 | func provideBaseData (i,nftId) = { | |
241 | - | let $ | |
242 | - | let id = $ | |
243 | - | let caller = $ | |
244 | - | let date = $ | |
245 | - | let $ | |
246 | - | let isValidNFT = $ | |
247 | - | let artId = $ | |
248 | - | let creatorAddr = $ | |
249 | - | let artSignID = $ | |
244 | + | let $t085728611 = idCallerDate(i) | |
245 | + | let id = $t085728611._1 | |
246 | + | let caller = $t085728611._2 | |
247 | + | let date = $t085728611._3 | |
248 | + | let $t086148683 = checkNFTInfo(nftId) | |
249 | + | let isValidNFT = $t086148683._1 | |
250 | + | let artId = $t086148683._2 | |
251 | + | let creatorAddr = $t086148683._3 | |
252 | + | let artSignID = $t086148683._4 | |
250 | 253 | $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID) | |
251 | 254 | } | |
252 | 255 | ||
253 | 256 | ||
254 | 257 | func updateNumSales () = { | |
255 | 258 | let numSales = getIntByK(numSalesK) | |
256 | 259 | IntegerEntry(numSalesK, (numSales + 1)) | |
257 | 260 | } | |
258 | 261 | ||
259 | 262 | ||
260 | 263 | @Callable(invoke) | |
261 | 264 | func appRunning (isLive,message) = { | |
262 | 265 | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
263 | 266 | let id = toBase58String(invoke.transactionId) | |
264 | 267 | if (containsElement([chris, toString(this)], caller)) | |
265 | 268 | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
266 | 269 | else throw("You are not allowed to change this") | |
267 | 270 | } | |
268 | 271 | ||
269 | 272 | ||
270 | 273 | ||
271 | 274 | @Callable(i) | |
272 | 275 | func sellNFT (price,asset) = { | |
273 | - | let $ | |
274 | - | let payment = $ | |
275 | - | let amount = $ | |
276 | + | let $t093969432 = isPayment(i) | |
277 | + | let payment = $t093969432._1 | |
278 | + | let amount = $t093969432._2 | |
276 | 279 | let nftId = if (if (isDefined(payment.assetId)) | |
277 | 280 | then isSignArtNFT(value(payment.assetId)) | |
278 | 281 | else false) | |
279 | 282 | then toBase58String(value(payment.assetId)) | |
280 | 283 | else throw("Only SIGN Art NFT accepted.") | |
281 | - | let $ | |
282 | - | let id = $ | |
283 | - | let caller = $ | |
284 | - | let date = $ | |
285 | - | let isValidNFT = $ | |
286 | - | let artId = $ | |
287 | - | let creatorAddr = $ | |
288 | - | let artSignID = $ | |
284 | + | let $t096119703 = provideBaseData(i, nftId) | |
285 | + | let id = $t096119703._1 | |
286 | + | let caller = $t096119703._2 | |
287 | + | let date = $t096119703._3 | |
288 | + | let isValidNFT = $t096119703._4 | |
289 | + | let artId = $t096119703._5 | |
290 | + | let creatorAddr = $t096119703._6 | |
291 | + | let artSignID = $t096119703._7 | |
289 | 292 | if ((size(artSignID) == 0)) | |
290 | 293 | then throw("Artwork not found on SIGN Art") | |
291 | 294 | else if (!(isValidNFT)) | |
292 | 295 | then throw("Not a valid nft") | |
293 | 296 | else if (!(acceptedAssetIds(asset))) | |
294 | 297 | then throw("Only SIGN, USDN or WAVES accepted") | |
295 | 298 | else if ((price == 0)) | |
296 | 299 | then throw("Wrong minimum sell price") | |
297 | 300 | else if (!(validateMinSell(asset, price))) | |
298 | 301 | then throw("Wrong minimum sell price") | |
299 | 302 | 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)] | |
300 | 303 | } | |
301 | 304 | ||
302 | 305 | ||
303 | 306 | ||
304 | 307 | @Callable(i) | |
305 | 308 | func updateSalePrice (nftId,price,asset) = { | |
306 | - | let $ | |
307 | - | let id = $ | |
308 | - | let caller = $ | |
309 | - | let date = $ | |
310 | - | let isValidNFT = $ | |
311 | - | let artId = $ | |
312 | - | let creatorAddr = $ | |
313 | - | let artSignID = $ | |
309 | + | let $t01057610668 = provideBaseData(i, nftId) | |
310 | + | let id = $t01057610668._1 | |
311 | + | let caller = $t01057610668._2 | |
312 | + | let date = $t01057610668._3 | |
313 | + | let isValidNFT = $t01057610668._4 | |
314 | + | let artId = $t01057610668._5 | |
315 | + | let creatorAddr = $t01057610668._6 | |
316 | + | let artSignID = $t01057610668._7 | |
314 | 317 | if ((size(artSignID) == 0)) | |
315 | 318 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
316 | 319 | else if (!(isValidNFT)) | |
317 | 320 | then throw("Not a valid nft") | |
318 | 321 | else { | |
319 | 322 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
320 | 323 | if ((saleOwner != caller)) | |
321 | 324 | then throw("You don't own this NFT") | |
322 | 325 | else { | |
323 | 326 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
324 | 327 | if ((saleStatus != "OPEN")) | |
325 | 328 | then throw("Sale not active") | |
326 | 329 | else if (!(acceptedAssetIds(asset))) | |
327 | 330 | then throw("Only SIGN, USDN or WAVES accepted") | |
328 | 331 | else if ((price == 0)) | |
329 | 332 | then throw("Wrong minimum sell price") | |
330 | 333 | else if (!(validateMinSell(asset, price))) | |
331 | 334 | then throw("Wrong minimum sell price") | |
332 | 335 | else { | |
333 | 336 | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
334 | 337 | let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_") | |
335 | 338 | [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))] | |
336 | 339 | } | |
337 | 340 | } | |
338 | 341 | } | |
339 | 342 | } | |
340 | 343 | ||
341 | 344 | ||
342 | 345 | ||
343 | 346 | @Callable(i) | |
344 | 347 | func cancelSale (nftId) = { | |
345 | - | let $ | |
346 | - | let id = $ | |
347 | - | let caller = $ | |
348 | - | let date = $ | |
349 | - | let isValidNFT = $ | |
350 | - | let artId = $ | |
351 | - | let creatorAddr = $ | |
352 | - | let artSignID = $ | |
348 | + | let $t01180812048 = provideBaseData(i, nftId) | |
349 | + | let id = $t01180812048._1 | |
350 | + | let caller = $t01180812048._2 | |
351 | + | let date = $t01180812048._3 | |
352 | + | let isValidNFT = $t01180812048._4 | |
353 | + | let artId = $t01180812048._5 | |
354 | + | let creatorAddr = $t01180812048._6 | |
355 | + | let artSignID = $t01180812048._7 | |
353 | 356 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId)) | |
354 | 357 | if ((saleOwner != caller)) | |
355 | 358 | then throw("You don't own this NFT") | |
356 | 359 | else { | |
357 | 360 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId)) | |
358 | 361 | if ((saleStatus != "OPEN")) | |
359 | 362 | then throw("Sale not active") | |
360 | 363 | else { | |
361 | 364 | let saleKey = getSaleKey(caller, nftId, artId, creatorAddr) | |
362 | 365 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
363 | 366 | [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))] | |
364 | 367 | } | |
365 | 368 | } | |
366 | 369 | } | |
367 | 370 | ||
368 | 371 | ||
369 | 372 | ||
370 | 373 | @Callable(i) | |
371 | 374 | func buyNFT (nftId) = { | |
372 | - | let $ | |
373 | - | let id = $ | |
374 | - | let caller = $ | |
375 | - | let date = $ | |
376 | - | let isValidNFT = $ | |
377 | - | let artId = $ | |
378 | - | let creatorAddr = $ | |
379 | - | let artSignID = $ | |
375 | + | let $t01287912971 = provideBaseData(i, nftId) | |
376 | + | let id = $t01287912971._1 | |
377 | + | let caller = $t01287912971._2 | |
378 | + | let date = $t01287912971._3 | |
379 | + | let isValidNFT = $t01287912971._4 | |
380 | + | let artId = $t01287912971._5 | |
381 | + | let creatorAddr = $t01287912971._6 | |
382 | + | let artSignID = $t01287912971._7 | |
380 | 383 | if ((size(artSignID) == 0)) | |
381 | 384 | then throw("Artwork not found on SIGN Art, cancel your sale.") | |
382 | 385 | else if (!(isValidNFT)) | |
383 | 386 | then throw("Not a valid nft") | |
384 | 387 | else { | |
385 | 388 | let saleOwner = getSaleOwnerAndStatus(nftId) | |
386 | 389 | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
387 | 390 | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
388 | 391 | if ((size(saleInfo) == 0)) | |
389 | 392 | then throw("Sale Not found!") | |
390 | 393 | else { | |
391 | 394 | let saleInfoArray = split(saleInfo, "_") | |
392 | 395 | if ((parseInt(saleInfoArray[1]) == 0)) | |
393 | 396 | then throw("Offer only") | |
394 | 397 | else { | |
395 | - | let $ | |
396 | - | let payment = $ | |
397 | - | let amount = $ | |
398 | + | let $t01346813504 = isPayment(i) | |
399 | + | let payment = $t01346813504._1 | |
400 | + | let amount = $t01346813504._2 | |
398 | 401 | let paymentAssetStr = if (isDefined(payment.assetId)) | |
399 | 402 | then toBase58String(value(payment.assetId)) | |
400 | 403 | else "" | |
401 | 404 | if (if ((saleInfoArray[1] != toString(amount))) | |
402 | 405 | then true | |
403 | 406 | else (saleInfoArray[2] != paymentAssetStr)) | |
404 | 407 | then throw("Payment infos don't match.") | |
405 | 408 | else { | |
406 | 409 | let amountForSign = fraction(amount, signCut, 100) | |
407 | 410 | let amountForCreator = fraction(amount, creatorCut, 100) | |
408 | 411 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
409 | - | let $ | |
410 | - | let signFee = $ | |
411 | - | let creatorFee = $ | |
412 | - | let ownerFee = $ | |
413 | - | let collectorNFT = $ | |
412 | + | let $t01400714135 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller) | |
413 | + | let signFee = $t01400714135._1 | |
414 | + | let creatorFee = $t01400714135._2 | |
415 | + | let ownerFee = $t01400714135._3 | |
416 | + | let collectorNFT = $t01400714135._4 | |
414 | 417 | [DeleteEntry((saleKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((saleInfo + "_CLOSED_") + toString(date)) + "_") + id) + "_") + caller)), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT] | |
415 | 418 | } | |
416 | 419 | } | |
417 | 420 | } | |
418 | 421 | } | |
419 | 422 | } | |
420 | 423 | ||
421 | 424 | ||
425 | + | ||
426 | + | @Callable(i) | |
427 | + | func setOffer (nftId) = { | |
428 | + | let $t01454314639 = provideBaseData(i, nftId) | |
429 | + | let id = $t01454314639._1 | |
430 | + | let offerOwner = $t01454314639._2 | |
431 | + | let date = $t01454314639._3 | |
432 | + | let isValidNFT = $t01454314639._4 | |
433 | + | let artId = $t01454314639._5 | |
434 | + | let creatorAddr = $t01454314639._6 | |
435 | + | let artSignID = $t01454314639._7 | |
436 | + | if (!(isValidNFT)) | |
437 | + | then throw("Not a valid nft") | |
438 | + | else { | |
439 | + | let $t01470014736 = isPayment(i) | |
440 | + | let payment = $t01470014736._1 | |
441 | + | let amount = $t01470014736._2 | |
442 | + | let assetId = if (!(isDefined(payment.assetId))) | |
443 | + | then "WAVES" | |
444 | + | else toBase58String(value(payment.assetId)) | |
445 | + | if (!(acceptedAssetIds(assetId))) | |
446 | + | then throw("asset not accepted") | |
447 | + | else if ((amount == 0)) | |
448 | + | then throw("Offer of 0 not allowed") | |
449 | + | else if (!(validateMinSell(assetId, amount))) | |
450 | + | then throw("Wrong minimum sell price") | |
451 | + | else { | |
452 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
453 | + | [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))] | |
454 | + | } | |
455 | + | } | |
456 | + | } | |
457 | + | ||
458 | + | ||
459 | + | ||
460 | + | @Callable(i) | |
461 | + | func acceptOffer (nftId,offerId,offerOwner) = { | |
462 | + | let $t01553815630 = provideBaseData(i, nftId) | |
463 | + | let id = $t01553815630._1 | |
464 | + | let caller = $t01553815630._2 | |
465 | + | let date = $t01553815630._3 | |
466 | + | let isValidNFT = $t01553815630._4 | |
467 | + | let artId = $t01553815630._5 | |
468 | + | let creatorAddr = $t01553815630._6 | |
469 | + | let artSignID = $t01553815630._7 | |
470 | + | if (!(isValidNFT)) | |
471 | + | then throw("Not a valid nft") | |
472 | + | else { | |
473 | + | let saleOwner = getSaleOwnerAndStatus(nftId) | |
474 | + | if ((caller != saleOwner)) | |
475 | + | then throw("Only sale owner can accept offer") | |
476 | + | else { | |
477 | + | let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId) | |
478 | + | let $t01588415939 = getBidData(bidKey) | |
479 | + | let bidDataArr = $t01588415939._1 | |
480 | + | let assetId = $t01588415939._2 | |
481 | + | let bidData = $t01588415939._3 | |
482 | + | let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr) | |
483 | + | let saleInfo = getStrByK((saleKey + "_OPEN")) | |
484 | + | if ((size(saleInfo) == 0)) | |
485 | + | then throw("Sale Not found!") | |
486 | + | else { | |
487 | + | let amount = value(parseInt(bidDataArr[1])) | |
488 | + | let $t01617116298 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6]) | |
489 | + | let signFee = $t01617116298._1 | |
490 | + | let creatorFee = $t01617116298._2 | |
491 | + | let ownerFee = $t01617116298._3 | |
492 | + | let collectorNFT = $t01617116298._4 | |
493 | + | [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] | |
494 | + | } | |
495 | + | } | |
496 | + | } | |
497 | + | } | |
498 | + | ||
499 | + | ||
500 | + | ||
501 | + | @Callable(i) | |
502 | + | func cancelOffer (nftId,offerId,saleOwner) = { | |
503 | + | let $t01700317064 = idCallerDate(i) | |
504 | + | let id = $t01700317064._1 | |
505 | + | let caller = $t01700317064._2 | |
506 | + | let date = $t01700317064._3 | |
507 | + | let bidKey = getBidKey(caller, nftId, saleOwner, offerId) | |
508 | + | let $t01712817183 = getBidData(bidKey) | |
509 | + | let bidDataArr = $t01712817183._1 | |
510 | + | let assetId = $t01712817183._2 | |
511 | + | let bidData = $t01712817183._3 | |
512 | + | [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
513 | + | } | |
514 | + | ||
515 | + |
github/deemru/w8io/169f3d6 136.53 ms ◑