tx · 6Dr21qBzTkXzyFZxtsfNaXWRgENG1nZGtP58oPHm5TXv

3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p:  -0.01400000 Waves

2022.02.24 02:36 [1937159] smart account 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p > SELF 0.00000000 Waves

{ "type": 13, "id": "6Dr21qBzTkXzyFZxtsfNaXWRgENG1nZGtP58oPHm5TXv", "fee": 1400000, "feeAssetId": null, "timestamp": 1645670201561, "version": 2, "chainId": 84, "sender": "3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p", "senderPublicKey": "Hh3eFP2XFetZSfTxQiM1Ps96f68zi8Zh5ghhCZdjgdFs", "proofs": [ "H93T8acRgEf46Yc3aqCaRGBdAD5Y9ZzJGGbCBFDsa2cBvkocWvrr9hBz8A2oqQkXYw4BuFsBoVxZRS9qWDSngjv" ], "script": "base64:AAIFAAAAAAAAADMIAhIECgIECBIECgIBCBIFCgMIAQgSAwoBCBIDCgEIEgMKAQgSBQoDCAgIEgYKBAgICAgAAAA1AAAAAAh1bml0VGVzdAcAAAAACW9yYWNsZUZlZQkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAIc2lnbkRhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM05DMjhoU2l2cm1zVFVYYVlEMXg2TDM2Mko0WnBVbm9UZEIAAAAADGFydHdvcmtzRGFwcAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTkJ5bmZiWEMyS2FzdFV4aHVrY01VYUU1OEs5Y0JkQjlVWQAAAAALZmVlUmVjZWl2ZXICAAAAIzNOMUU2dFhkZFJvVmFSZlE5ZFEzdmc1TGFXMmZzZDhIS3ViAAAAAAh1c2VyRGFwcAMFAAAACHVuaXRUZXN0CQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNNdDRSR01FeWpTV1lB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yMTE4Mjc2AAAAAl8xBAAAAAdhc3NldElkCAUAAAANJHQwMTgyMjExODI3NgAAAAJfMgQAAAAHYmlkRGF0YQgFAAAADSR0MDE4MjIxMTgyNzYAAAACXzMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAAZiaWRLZXkCAAAABV9PUEVOCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgUAAAAGYmlkS2V5AgAAAApfQ0FOQ0VMTEVECQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAAB2JpZERhdGECAAAAC19DQU5DRUxMRURfCQABpAAAAAEFAAAABGRhdGUCAAAAAV8FAAAAAmlkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAAZjYWxsZXIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAApiaWREYXRhQXJyAAAAAAAAAAABBQAAAAdhc3NldElkBQAAAANuaWwAAAAAaElXug==", "height": 1937159, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4oXDru48RPaXCQZtC4YXVYkrqG53pQsXbwXn8gBXFctj Next: 9CVWPL3rJxdUrhyZPug5dEXRr3yMxpzvJRn7ibVB9Kp3 Diff:
OldNewDifferences
8181
8282
8383 let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId)))
84+
85+func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
86+
87+
88+func keySecondaryShare (artistAddr) = ("artist_agent_secondary" + artistAddr)
89+
8490
8591 func idCallerDate (i) = if (!(dappRunning))
8692 then throw(maintenanceMSG)
197203
198204
199205 func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = {
206+ let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
207+ let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
200208 let amountForSign = fraction(amount, signCut, 100)
201209 let amountForCreator = fraction(amount, creatorCut, 100)
202210 let amountForOwner = (amount - (amountForSign + amountForCreator))
203- let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)
211+ let amountForAgent = if (if ((agent != feeReceiver))
212+ then (agentShare > 0)
213+ else false)
214+ then fraction(amount, agentShare, 100)
215+ else 0
216+ let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId)
217+ let agentFee = ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)
204218 let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
205219 let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
206220 let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
207- $Tuple4(signFee, creatorFee, ownerFee, collectorNFT)
221+ $Tuple5(signFee, creatorFee, ownerFee, collectorNFT, agentFee)
208222 }
209223
210224
241255
242256
243257 func provideBaseData (i,nftId) = {
244- let $t085778616 = idCallerDate(i)
245- let id = $t085778616._1
246- let caller = $t085778616._2
247- let date = $t085778616._3
248- let $t086198688 = checkNFTInfo(nftId)
249- let isValidNFT = $t086198688._1
250- let artId = $t086198688._2
251- let creatorAddr = $t086198688._3
252- let artSignID = $t086198688._4
258+ let $t093499388 = idCallerDate(i)
259+ let id = $t093499388._1
260+ let caller = $t093499388._2
261+ let date = $t093499388._3
262+ let $t093919460 = checkNFTInfo(nftId)
263+ let isValidNFT = $t093919460._1
264+ let artId = $t093919460._2
265+ let creatorAddr = $t093919460._3
266+ let artSignID = $t093919460._4
253267 $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
254268 }
255269
273287
274288 @Callable(i)
275289 func sellNFT (price,asset) = {
276- let $t094019437 = isPayment(i)
277- let payment = $t094019437._1
278- let amount = $t094019437._2
290+ let $t01017310209 = isPayment(i)
291+ let payment = $t01017310209._1
292+ let amount = $t01017310209._2
279293 if ((amount != 1))
280294 then throw("No NFT attached")
281295 else {
284298 else false)
285299 then toBase58String(value(payment.assetId))
286300 else throw("Only SIGN Art NFT accepted.")
287- let $t096699761 = provideBaseData(i, nftId)
288- let id = $t096699761._1
289- let caller = $t096699761._2
290- let date = $t096699761._3
291- let isValidNFT = $t096699761._4
292- let artId = $t096699761._5
293- let creatorAddr = $t096699761._6
294- let artSignID = $t096699761._7
301+ let $t01044310535 = provideBaseData(i, nftId)
302+ let id = $t01044310535._1
303+ let caller = $t01044310535._2
304+ let date = $t01044310535._3
305+ let isValidNFT = $t01044310535._4
306+ let artId = $t01044310535._5
307+ let creatorAddr = $t01044310535._6
308+ let artSignID = $t01044310535._7
295309 if ((size(artSignID) == 0))
296310 then throw("Artwork not found on SIGN Art")
297311 else if (!(isValidNFT))
308322
309323 @Callable(i)
310324 func updateSalePrice (nftId,price,asset) = {
311- let $t01063510727 = provideBaseData(i, nftId)
312- let id = $t01063510727._1
313- let caller = $t01063510727._2
314- let date = $t01063510727._3
315- let isValidNFT = $t01063510727._4
316- let artId = $t01063510727._5
317- let creatorAddr = $t01063510727._6
318- let artSignID = $t01063510727._7
325+ let $t01140911501 = provideBaseData(i, nftId)
326+ let id = $t01140911501._1
327+ let caller = $t01140911501._2
328+ let date = $t01140911501._3
329+ let isValidNFT = $t01140911501._4
330+ let artId = $t01140911501._5
331+ let creatorAddr = $t01140911501._6
332+ let artSignID = $t01140911501._7
319333 if ((size(artSignID) == 0))
320334 then throw("Artwork not found on SIGN Art, cancel your sale.")
321335 else if (!(isValidNFT))
345359
346360 @Callable(i)
347361 func cancelSale (nftId) = {
348- let $t01186912109 = provideBaseData(i, nftId)
349- let id = $t01186912109._1
350- let caller = $t01186912109._2
351- let date = $t01186912109._3
352- let isValidNFT = $t01186912109._4
353- let artId = $t01186912109._5
354- let creatorAddr = $t01186912109._6
355- let artSignID = $t01186912109._7
362+ let $t01264312883 = provideBaseData(i, nftId)
363+ let id = $t01264312883._1
364+ let caller = $t01264312883._2
365+ let date = $t01264312883._3
366+ let isValidNFT = $t01264312883._4
367+ let artId = $t01264312883._5
368+ let creatorAddr = $t01264312883._6
369+ let artSignID = $t01264312883._7
356370 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
357371 if ((saleOwner != caller))
358372 then throw("You don't own this NFT")
372386
373387 @Callable(i)
374388 func buyNFT (nftId) = {
375- let $t01294013032 = provideBaseData(i, nftId)
376- let id = $t01294013032._1
377- let caller = $t01294013032._2
378- let date = $t01294013032._3
379- let isValidNFT = $t01294013032._4
380- let artId = $t01294013032._5
381- let creatorAddr = $t01294013032._6
382- let artSignID = $t01294013032._7
389+ let $t01371413806 = provideBaseData(i, nftId)
390+ let id = $t01371413806._1
391+ let caller = $t01371413806._2
392+ let date = $t01371413806._3
393+ let isValidNFT = $t01371413806._4
394+ let artId = $t01371413806._5
395+ let creatorAddr = $t01371413806._6
396+ let artSignID = $t01371413806._7
383397 if ((size(artSignID) == 0))
384398 then throw("Artwork not found on SIGN Art, cancel your sale.")
385399 else if (!(isValidNFT))
395409 if ((parseInt(saleInfoArray[1]) == 0))
396410 then throw("Offer only")
397411 else {
398- let $t01352913565 = isPayment(i)
399- let payment = $t01352913565._1
400- let amount = $t01352913565._2
412+ let $t01430314339 = isPayment(i)
413+ let payment = $t01430314339._1
414+ let amount = $t01430314339._2
401415 let paymentAssetStr = if (isDefined(payment.assetId))
402416 then toBase58String(value(payment.assetId))
403417 else ""
406420 else (saleInfoArray[2] != paymentAssetStr))
407421 then throw("Payment infos don't match.")
408422 else {
409- let amountForSign = fraction(amount, signCut, 100)
410- let amountForCreator = fraction(amount, creatorCut, 100)
411- let amountForOwner = (amount - (amountForSign + amountForCreator))
412- let $t01406814196 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
413- let signFee = $t01406814196._1
414- let creatorFee = $t01406814196._2
415- let ownerFee = $t01406814196._3
416- let collectorNFT = $t01406814196._4
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]
423+ let $t01484514983 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
424+ let signFee = $t01484514983._1
425+ let creatorFee = $t01484514983._2
426+ let ownerFee = $t01484514983._3
427+ let collectorNFT = $t01484514983._4
428+ let agentFee = $t01484514983._5
429+[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, agentFee]
418430 }
419431 }
420432 }
425437
426438 @Callable(i)
427439 func setOffer (nftId) = {
428- let $t01460414700 = provideBaseData(i, nftId)
429- let id = $t01460414700._1
430- let offerOwner = $t01460414700._2
431- let date = $t01460414700._3
432- let isValidNFT = $t01460414700._4
433- let artId = $t01460414700._5
434- let creatorAddr = $t01460414700._6
435- let artSignID = $t01460414700._7
440+ let $t01540115497 = provideBaseData(i, nftId)
441+ let id = $t01540115497._1
442+ let offerOwner = $t01540115497._2
443+ let date = $t01540115497._3
444+ let isValidNFT = $t01540115497._4
445+ let artId = $t01540115497._5
446+ let creatorAddr = $t01540115497._6
447+ let artSignID = $t01540115497._7
436448 if (!(isValidNFT))
437449 then throw("Not a valid nft")
438450 else {
439- let $t01476114797 = isPayment(i)
440- let payment = $t01476114797._1
441- let amount = $t01476114797._2
451+ let $t01555815594 = isPayment(i)
452+ let payment = $t01555815594._1
453+ let amount = $t01555815594._2
442454 let assetId = if (!(isDefined(payment.assetId)))
443455 then "WAVES"
444456 else toBase58String(value(payment.assetId))
459471
460472 @Callable(i)
461473 func acceptOffer (nftId,offerId,offerOwner) = {
462- let $t01559915691 = provideBaseData(i, nftId)
463- let id = $t01559915691._1
464- let caller = $t01559915691._2
465- let date = $t01559915691._3
466- let isValidNFT = $t01559915691._4
467- let artId = $t01559915691._5
468- let creatorAddr = $t01559915691._6
469- let artSignID = $t01559915691._7
474+ let $t01639616488 = provideBaseData(i, nftId)
475+ let id = $t01639616488._1
476+ let caller = $t01639616488._2
477+ let date = $t01639616488._3
478+ let isValidNFT = $t01639616488._4
479+ let artId = $t01639616488._5
480+ let creatorAddr = $t01639616488._6
481+ let artSignID = $t01639616488._7
470482 if (!(isValidNFT))
471483 then throw("Not a valid nft")
472484 else {
475487 then throw("Only sale owner can accept offer")
476488 else {
477489 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
478- let $t01594516000 = getBidData(bidKey)
479- let bidDataArr = $t01594516000._1
480- let assetId = $t01594516000._2
481- let bidData = $t01594516000._3
490+ let $t01674216797 = getBidData(bidKey)
491+ let bidDataArr = $t01674216797._1
492+ let assetId = $t01674216797._2
493+ let bidData = $t01674216797._3
482494 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
483495 let saleInfo = getStrByK((saleKey + "_OPEN"))
484496 if ((size(saleInfo) == 0))
485497 then throw("Sale Not found!")
486498 else {
487499 let amount = value(parseInt(bidDataArr[1]))
488- let $t01623616363 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
489- let signFee = $t01623616363._1
490- let creatorFee = $t01623616363._2
491- let ownerFee = $t01623616363._3
492- let collectorNFT = $t01623616363._4
500+ let $t01703317170 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
501+ let signFee = $t01703317170._1
502+ let creatorFee = $t01703317170._2
503+ let ownerFee = $t01703317170._3
504+ let collectorNFT = $t01703317170._4
505+ let agentFee = $t01703317170._5
493506 let assetIdStr = if (isDefined(assetId))
494507 then toBase58String(value(assetId))
495508 else "WAVES"
496-[DeleteEntry((saleKey + "_OPEN")), DeleteEntry((bidKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((bidKey + "_CLOSED"), ((((bidData + "_CLOSED_") + toString(date)) + "_") + id)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((((((saleInfo + "_CLOSED-OFFER_") + toString(date)) + "_") + id) + "_") + offerOwner) + "_") + toString(amount)) + "_") + assetIdStr)), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT]
509+[DeleteEntry((saleKey + "_OPEN")), DeleteEntry((bidKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((bidKey + "_CLOSED"), ((((bidData + "_CLOSED_") + toString(date)) + "_") + id)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((((((saleInfo + "_CLOSED-OFFER_") + toString(date)) + "_") + id) + "_") + offerOwner) + "_") + toString(amount)) + "_") + assetIdStr)), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT, agentFee]
497510 }
498511 }
499512 }
503516
504517 @Callable(i)
505518 func cancelOffer (nftId,offerId,offerOwner,saleOwner) = {
506- let $t01716017232 = idCallerDate(i)
507- let id = $t01716017232._1
508- let caller = $t01716017232._2
509- let date = $t01716017232._3
519+ let $t01797718049 = idCallerDate(i)
520+ let id = $t01797718049._1
521+ let caller = $t01797718049._2
522+ let date = $t01797718049._3
510523 if (if ((caller != offerOwner))
511524 then (caller != saleOwner)
512525 else false)
513526 then throw("You cannot cancel this offer.")
514527 else {
515528 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
516- let $t01740417459 = getBidData(bidKey)
517- let bidDataArr = $t01740417459._1
518- let assetId = $t01740417459._2
519- let bidData = $t01740417459._3
529+ let $t01822118276 = getBidData(bidKey)
530+ let bidDataArr = $t01822118276._1
531+ let assetId = $t01822118276._2
532+ let bidData = $t01822118276._3
520533 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
521534 }
522535 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let unitTest = false
55
66 let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
77
88 let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB"))
99
1010 let artworksDapp = value(addressFromString("3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY"))
1111
1212 let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
1313
1414 let userDapp = if (unitTest)
1515 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
1616 else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj"))
1717
1818 let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq"))
1919
2020 let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
2121
2222 let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
2323
2424 let wavesAssetId = base58''
2525
2626 let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
2727
2828 let signCut = 3
2929
3030 let creatorCut = 10
3131
3232 let userSuspended = "SUSPENDED"
3333
3434 let userRemoved = "REMOVED"
3535
3636 let artIllegal = "ILLEGAL"
3737
3838 let artSuspended = "SUSPENDED"
3939
4040 let dappRunningKey = "conf_dapp_is_running"
4141
4242 let maintenanceMSGKey = "conf_maintenance_msg"
4343
4444 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
4545
4646 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
4747
4848 let numSalesK = "num_sales"
4949
5050 func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error")
5151
5252
5353 func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "")
5454
5555
5656 func getStrByK (key) = valueOrElse(getString(this, key), "")
5757
5858
5959 func getIntByK (key) = valueOrElse(getInteger(this, key), 0)
6060
6161
6262 func keyUserStatus (addr) = ("user_status_" + addr)
6363
6464
6565 func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr)
6666
6767
6868 func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr)
6969
7070
7171 func keyNFTData (id) = ("nft_" + id)
7272
7373
7474 func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr)
7575
7676
7777 func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId)
7878
7979
8080 func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
8181
8282
8383 let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId)))
84+
85+func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
86+
87+
88+func keySecondaryShare (artistAddr) = ("artist_agent_secondary" + artistAddr)
89+
8490
8591 func idCallerDate (i) = if (!(dappRunning))
8692 then throw(maintenanceMSG)
8793 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
8894
8995
9096 func isPayment (i) = if ((size(i.payments) == 0))
9197 then throw("No payment attached")
9298 else {
9399 let payment = value(i.payments[0])
94100 let amount = value(payment.amount)
95101 $Tuple2(payment, amount)
96102 }
97103
98104
99105 func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
100106 then (assetDetails.decimals == 0)
101107 else false)
102108 then (assetDetails.reissuable == false)
103109 else false)
104110 then (assetDetails.issuer == artworksDapp)
105111 else false
106112
107113
108114 func isSignArtNFT (id) = {
109115 let assetDetails = value(assetInfo(id))
110116 assetIsValid(assetDetails)
111117 }
112118
113119
114120 func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId)))
115121 then (assetId != toBase58String(wavesAssetId))
116122 else false)
117123 then (assetId != "WAVES")
118124 else false)
119125 then (assetId != toBase58String(usdnAssetId))
120126 else false)
121127 then false
122128 else true
123129
124130
125131 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
126132 then unit
127133 else fromBase58String(assetId)
128134
129135
130136 func getSaleOwnerAndStatus (nftid) = {
131137 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
132138 if ((size(saleOwner) == 0))
133139 then throw("NFT not found")
134140 else {
135141 let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid))
136142 if ((saleStatus != "OPEN"))
137143 then throw("NFT not for sale")
138144 else saleOwner
139145 }
140146 }
141147
142148
143149 func getBidData (key) = {
144150 let bidData = getStrByK((key + "_OPEN"))
145151 if ((bidData == ""))
146152 then throw("Offer not found")
147153 else {
148154 let bidDataArr = split(bidData, "_")
149155 let assetId = getBidAssetId(bidDataArr[2])
150156 $Tuple3(bidDataArr, assetId, bidData)
151157 }
152158 }
153159
154160
155161 func artIsValid (artStatus) = if ((artStatus != artIllegal))
156162 then (artStatus != artSuspended)
157163 else false
158164
159165
160166 func checkArtStatus (addr,id) = {
161167 let artStatus = getArtStrByK(keyFlag(addr, id))
162168 if (artIsValid(artStatus))
163169 then true
164170 else throw(("Original Artwork flagged as " + artStatus))
165171 }
166172
167173
168174 func checkArtistStatus (addr) = {
169175 let artistStatus = getUserStrByK(keyUserStatus(addr))
170176 if (containsElement([userSuspended, userRemoved], artistStatus))
171177 then throw(("Original Artist " + artistStatus))
172178 else true
173179 }
174180
175181
176182 func checkNFTInfo (assetId) = {
177183 let nftData = split(getArtStrByK(keyNFTData(assetId)), "_")
178184 let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5]))
179185 if (if (!(checkArtStatus(nftData[6], nftData[5])))
180186 then !(checkArtistStatus(nftData[6]))
181187 else false)
182188 then $Tuple4(false, nftData[5], nftData[6], artSignID)
183189 else $Tuple4(true, nftData[5], nftData[6], artSignID)
184190 }
185191
186192
187193 func checkARTExist (artId,creatorAddr) = {
188194 let artSignID = getArtStrByK(keySignID(creatorAddr, artId))
189195 if ((size(artSignID) == 0))
190196 then throw("Artwork not found on SIGN Art")
191197 else if (if (!(checkArtStatus(creatorAddr, artId)))
192198 then !(checkArtistStatus(creatorAddr))
193199 else false)
194200 then false
195201 else true
196202 }
197203
198204
199205 func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = {
206+ let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
207+ let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
200208 let amountForSign = fraction(amount, signCut, 100)
201209 let amountForCreator = fraction(amount, creatorCut, 100)
202210 let amountForOwner = (amount - (amountForSign + amountForCreator))
203- let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)
211+ let amountForAgent = if (if ((agent != feeReceiver))
212+ then (agentShare > 0)
213+ else false)
214+ then fraction(amount, agentShare, 100)
215+ else 0
216+ let signFee = ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId)
217+ let agentFee = ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)
204218 let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
205219 let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
206220 let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
207- $Tuple4(signFee, creatorFee, ownerFee, collectorNFT)
221+ $Tuple5(signFee, creatorFee, ownerFee, collectorNFT, agentFee)
208222 }
209223
210224
211225 func validateMinSell (assetId,price) = {
212226 let minSellWaves = if (unitTest)
213227 then 10
214228 else getIntByKFromOracle("waves_min_sell")
215229 let minSellUsdn = 1000000
216230 let minSellSign = if (unitTest)
217231 then 1
218232 else (currentCertificationPrice * 2)
219233 if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
220234 then (minSellUsdn > price)
221235 else false)
222236 then (price != 0)
223237 else false)
224238 then true
225239 else if (if ((assetId == toBase58String(signAssetId)))
226240 then (minSellSign > price)
227241 else false)
228242 then (price != 0)
229243 else false)
230244 then true
231245 else if (if (if ((assetId == toBase58String(wavesAssetId)))
232246 then true
233247 else (assetId == "WAVES"))
234248 then (minSellWaves > price)
235249 else false)
236250 then (price != 0)
237251 else false)
238252 then false
239253 else true
240254 }
241255
242256
243257 func provideBaseData (i,nftId) = {
244- let $t085778616 = idCallerDate(i)
245- let id = $t085778616._1
246- let caller = $t085778616._2
247- let date = $t085778616._3
248- let $t086198688 = checkNFTInfo(nftId)
249- let isValidNFT = $t086198688._1
250- let artId = $t086198688._2
251- let creatorAddr = $t086198688._3
252- let artSignID = $t086198688._4
258+ let $t093499388 = idCallerDate(i)
259+ let id = $t093499388._1
260+ let caller = $t093499388._2
261+ let date = $t093499388._3
262+ let $t093919460 = checkNFTInfo(nftId)
263+ let isValidNFT = $t093919460._1
264+ let artId = $t093919460._2
265+ let creatorAddr = $t093919460._3
266+ let artSignID = $t093919460._4
253267 $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
254268 }
255269
256270
257271 func updateNumSales () = {
258272 let numSales = getIntByK(numSalesK)
259273 IntegerEntry(numSalesK, (numSales + 1))
260274 }
261275
262276
263277 @Callable(invoke)
264278 func appRunning (isLive,message) = {
265279 let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
266280 let id = toBase58String(invoke.transactionId)
267281 if (containsElement([chris, toString(this)], caller))
268282 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
269283 else throw("You are not allowed to change this")
270284 }
271285
272286
273287
274288 @Callable(i)
275289 func sellNFT (price,asset) = {
276- let $t094019437 = isPayment(i)
277- let payment = $t094019437._1
278- let amount = $t094019437._2
290+ let $t01017310209 = isPayment(i)
291+ let payment = $t01017310209._1
292+ let amount = $t01017310209._2
279293 if ((amount != 1))
280294 then throw("No NFT attached")
281295 else {
282296 let nftId = if (if (isDefined(payment.assetId))
283297 then isSignArtNFT(value(payment.assetId))
284298 else false)
285299 then toBase58String(value(payment.assetId))
286300 else throw("Only SIGN Art NFT accepted.")
287- let $t096699761 = provideBaseData(i, nftId)
288- let id = $t096699761._1
289- let caller = $t096699761._2
290- let date = $t096699761._3
291- let isValidNFT = $t096699761._4
292- let artId = $t096699761._5
293- let creatorAddr = $t096699761._6
294- let artSignID = $t096699761._7
301+ let $t01044310535 = provideBaseData(i, nftId)
302+ let id = $t01044310535._1
303+ let caller = $t01044310535._2
304+ let date = $t01044310535._3
305+ let isValidNFT = $t01044310535._4
306+ let artId = $t01044310535._5
307+ let creatorAddr = $t01044310535._6
308+ let artSignID = $t01044310535._7
295309 if ((size(artSignID) == 0))
296310 then throw("Artwork not found on SIGN Art")
297311 else if (!(isValidNFT))
298312 then throw("Not a valid nft")
299313 else if (!(acceptedAssetIds(asset)))
300314 then throw("Only SIGN, USDN or WAVES accepted")
301315 else if (!(validateMinSell(asset, price)))
302316 then throw("Wrong minimum sell price")
303317 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)]
304318 }
305319 }
306320
307321
308322
309323 @Callable(i)
310324 func updateSalePrice (nftId,price,asset) = {
311- let $t01063510727 = provideBaseData(i, nftId)
312- let id = $t01063510727._1
313- let caller = $t01063510727._2
314- let date = $t01063510727._3
315- let isValidNFT = $t01063510727._4
316- let artId = $t01063510727._5
317- let creatorAddr = $t01063510727._6
318- let artSignID = $t01063510727._7
325+ let $t01140911501 = provideBaseData(i, nftId)
326+ let id = $t01140911501._1
327+ let caller = $t01140911501._2
328+ let date = $t01140911501._3
329+ let isValidNFT = $t01140911501._4
330+ let artId = $t01140911501._5
331+ let creatorAddr = $t01140911501._6
332+ let artSignID = $t01140911501._7
319333 if ((size(artSignID) == 0))
320334 then throw("Artwork not found on SIGN Art, cancel your sale.")
321335 else if (!(isValidNFT))
322336 then throw("Not a valid nft")
323337 else {
324338 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
325339 if ((saleOwner != caller))
326340 then throw("You don't own this NFT")
327341 else {
328342 let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
329343 if ((saleStatus != "OPEN"))
330344 then throw("Sale not active")
331345 else if (!(acceptedAssetIds(asset)))
332346 then throw("Only SIGN, USDN or WAVES accepted")
333347 else if (!(validateMinSell(asset, price)))
334348 then throw("Wrong minimum sell price")
335349 else {
336350 let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
337351 let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_")
338352 [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))]
339353 }
340354 }
341355 }
342356 }
343357
344358
345359
346360 @Callable(i)
347361 func cancelSale (nftId) = {
348- let $t01186912109 = provideBaseData(i, nftId)
349- let id = $t01186912109._1
350- let caller = $t01186912109._2
351- let date = $t01186912109._3
352- let isValidNFT = $t01186912109._4
353- let artId = $t01186912109._5
354- let creatorAddr = $t01186912109._6
355- let artSignID = $t01186912109._7
362+ let $t01264312883 = provideBaseData(i, nftId)
363+ let id = $t01264312883._1
364+ let caller = $t01264312883._2
365+ let date = $t01264312883._3
366+ let isValidNFT = $t01264312883._4
367+ let artId = $t01264312883._5
368+ let creatorAddr = $t01264312883._6
369+ let artSignID = $t01264312883._7
356370 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
357371 if ((saleOwner != caller))
358372 then throw("You don't own this NFT")
359373 else {
360374 let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
361375 if ((saleStatus != "OPEN"))
362376 then throw("Sale not active")
363377 else {
364378 let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
365379 let saleInfo = getStrByK((saleKey + "_OPEN"))
366380 [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))]
367381 }
368382 }
369383 }
370384
371385
372386
373387 @Callable(i)
374388 func buyNFT (nftId) = {
375- let $t01294013032 = provideBaseData(i, nftId)
376- let id = $t01294013032._1
377- let caller = $t01294013032._2
378- let date = $t01294013032._3
379- let isValidNFT = $t01294013032._4
380- let artId = $t01294013032._5
381- let creatorAddr = $t01294013032._6
382- let artSignID = $t01294013032._7
389+ let $t01371413806 = provideBaseData(i, nftId)
390+ let id = $t01371413806._1
391+ let caller = $t01371413806._2
392+ let date = $t01371413806._3
393+ let isValidNFT = $t01371413806._4
394+ let artId = $t01371413806._5
395+ let creatorAddr = $t01371413806._6
396+ let artSignID = $t01371413806._7
383397 if ((size(artSignID) == 0))
384398 then throw("Artwork not found on SIGN Art, cancel your sale.")
385399 else if (!(isValidNFT))
386400 then throw("Not a valid nft")
387401 else {
388402 let saleOwner = getSaleOwnerAndStatus(nftId)
389403 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
390404 let saleInfo = getStrByK((saleKey + "_OPEN"))
391405 if ((size(saleInfo) == 0))
392406 then throw("Sale Not found!")
393407 else {
394408 let saleInfoArray = split(saleInfo, "_")
395409 if ((parseInt(saleInfoArray[1]) == 0))
396410 then throw("Offer only")
397411 else {
398- let $t01352913565 = isPayment(i)
399- let payment = $t01352913565._1
400- let amount = $t01352913565._2
412+ let $t01430314339 = isPayment(i)
413+ let payment = $t01430314339._1
414+ let amount = $t01430314339._2
401415 let paymentAssetStr = if (isDefined(payment.assetId))
402416 then toBase58String(value(payment.assetId))
403417 else ""
404418 if (if ((saleInfoArray[1] != toString(amount)))
405419 then true
406420 else (saleInfoArray[2] != paymentAssetStr))
407421 then throw("Payment infos don't match.")
408422 else {
409- let amountForSign = fraction(amount, signCut, 100)
410- let amountForCreator = fraction(amount, creatorCut, 100)
411- let amountForOwner = (amount - (amountForSign + amountForCreator))
412- let $t01406814196 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
413- let signFee = $t01406814196._1
414- let creatorFee = $t01406814196._2
415- let ownerFee = $t01406814196._3
416- let collectorNFT = $t01406814196._4
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]
423+ let $t01484514983 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
424+ let signFee = $t01484514983._1
425+ let creatorFee = $t01484514983._2
426+ let ownerFee = $t01484514983._3
427+ let collectorNFT = $t01484514983._4
428+ let agentFee = $t01484514983._5
429+[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, agentFee]
418430 }
419431 }
420432 }
421433 }
422434 }
423435
424436
425437
426438 @Callable(i)
427439 func setOffer (nftId) = {
428- let $t01460414700 = provideBaseData(i, nftId)
429- let id = $t01460414700._1
430- let offerOwner = $t01460414700._2
431- let date = $t01460414700._3
432- let isValidNFT = $t01460414700._4
433- let artId = $t01460414700._5
434- let creatorAddr = $t01460414700._6
435- let artSignID = $t01460414700._7
440+ let $t01540115497 = provideBaseData(i, nftId)
441+ let id = $t01540115497._1
442+ let offerOwner = $t01540115497._2
443+ let date = $t01540115497._3
444+ let isValidNFT = $t01540115497._4
445+ let artId = $t01540115497._5
446+ let creatorAddr = $t01540115497._6
447+ let artSignID = $t01540115497._7
436448 if (!(isValidNFT))
437449 then throw("Not a valid nft")
438450 else {
439- let $t01476114797 = isPayment(i)
440- let payment = $t01476114797._1
441- let amount = $t01476114797._2
451+ let $t01555815594 = isPayment(i)
452+ let payment = $t01555815594._1
453+ let amount = $t01555815594._2
442454 let assetId = if (!(isDefined(payment.assetId)))
443455 then "WAVES"
444456 else toBase58String(value(payment.assetId))
445457 if (!(acceptedAssetIds(assetId)))
446458 then throw("asset not accepted")
447459 else if ((amount == 0))
448460 then throw("Offer of 0 not allowed")
449461 else if (!(validateMinSell(assetId, amount)))
450462 then throw("Wrong minimum sell price")
451463 else {
452464 let saleOwner = getSaleOwnerAndStatus(nftId)
453465 [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))]
454466 }
455467 }
456468 }
457469
458470
459471
460472 @Callable(i)
461473 func acceptOffer (nftId,offerId,offerOwner) = {
462- let $t01559915691 = provideBaseData(i, nftId)
463- let id = $t01559915691._1
464- let caller = $t01559915691._2
465- let date = $t01559915691._3
466- let isValidNFT = $t01559915691._4
467- let artId = $t01559915691._5
468- let creatorAddr = $t01559915691._6
469- let artSignID = $t01559915691._7
474+ let $t01639616488 = provideBaseData(i, nftId)
475+ let id = $t01639616488._1
476+ let caller = $t01639616488._2
477+ let date = $t01639616488._3
478+ let isValidNFT = $t01639616488._4
479+ let artId = $t01639616488._5
480+ let creatorAddr = $t01639616488._6
481+ let artSignID = $t01639616488._7
470482 if (!(isValidNFT))
471483 then throw("Not a valid nft")
472484 else {
473485 let saleOwner = getSaleOwnerAndStatus(nftId)
474486 if ((caller != saleOwner))
475487 then throw("Only sale owner can accept offer")
476488 else {
477489 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
478- let $t01594516000 = getBidData(bidKey)
479- let bidDataArr = $t01594516000._1
480- let assetId = $t01594516000._2
481- let bidData = $t01594516000._3
490+ let $t01674216797 = getBidData(bidKey)
491+ let bidDataArr = $t01674216797._1
492+ let assetId = $t01674216797._2
493+ let bidData = $t01674216797._3
482494 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
483495 let saleInfo = getStrByK((saleKey + "_OPEN"))
484496 if ((size(saleInfo) == 0))
485497 then throw("Sale Not found!")
486498 else {
487499 let amount = value(parseInt(bidDataArr[1]))
488- let $t01623616363 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
489- let signFee = $t01623616363._1
490- let creatorFee = $t01623616363._2
491- let ownerFee = $t01623616363._3
492- let collectorNFT = $t01623616363._4
500+ let $t01703317170 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
501+ let signFee = $t01703317170._1
502+ let creatorFee = $t01703317170._2
503+ let ownerFee = $t01703317170._3
504+ let collectorNFT = $t01703317170._4
505+ let agentFee = $t01703317170._5
493506 let assetIdStr = if (isDefined(assetId))
494507 then toBase58String(value(assetId))
495508 else "WAVES"
496-[DeleteEntry((saleKey + "_OPEN")), DeleteEntry((bidKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((bidKey + "_CLOSED"), ((((bidData + "_CLOSED_") + toString(date)) + "_") + id)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((((((saleInfo + "_CLOSED-OFFER_") + toString(date)) + "_") + id) + "_") + offerOwner) + "_") + toString(amount)) + "_") + assetIdStr)), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT]
509+[DeleteEntry((saleKey + "_OPEN")), DeleteEntry((bidKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftId)), DeleteEntry(("current_owner_on_dapp_" + nftId)), StringEntry((bidKey + "_CLOSED"), ((((bidData + "_CLOSED_") + toString(date)) + "_") + id)), StringEntry((((saleKey + "_") + id) + "_CLOSED"), ((((((((((saleInfo + "_CLOSED-OFFER_") + toString(date)) + "_") + id) + "_") + offerOwner) + "_") + toString(amount)) + "_") + assetIdStr)), updateNumSales(), signFee, creatorFee, ownerFee, collectorNFT, agentFee]
497510 }
498511 }
499512 }
500513 }
501514
502515
503516
504517 @Callable(i)
505518 func cancelOffer (nftId,offerId,offerOwner,saleOwner) = {
506- let $t01716017232 = idCallerDate(i)
507- let id = $t01716017232._1
508- let caller = $t01716017232._2
509- let date = $t01716017232._3
519+ let $t01797718049 = idCallerDate(i)
520+ let id = $t01797718049._1
521+ let caller = $t01797718049._2
522+ let date = $t01797718049._3
510523 if (if ((caller != offerOwner))
511524 then (caller != saleOwner)
512525 else false)
513526 then throw("You cannot cancel this offer.")
514527 else {
515528 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
516- let $t01740417459 = getBidData(bidKey)
517- let bidDataArr = $t01740417459._1
518- let assetId = $t01740417459._2
519- let bidData = $t01740417459._3
529+ let $t01822118276 = getBidData(bidKey)
530+ let bidDataArr = $t01822118276._1
531+ let assetId = $t01822118276._2
532+ let bidData = $t01822118276._3
520533 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
521534 }
522535 }
523536
524537

github/deemru/w8io/169f3d6 
92.09 ms