tx · GARX1sUMfwnJRBPF4DxCPxc5riSnjsrFj7P3P5iRFD4Q

3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p:  -0.01500000 Waves

2022.11.23 12:36 [2329569] smart account 3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p > SELF 0.00000000 Waves

{ "type": 13, "id": "GARX1sUMfwnJRBPF4DxCPxc5riSnjsrFj7P3P5iRFD4Q", "fee": 1500000, "feeAssetId": null, "timestamp": 1669196230517, "version": 2, "chainId": 84, "sender": "3N2eA4yzXa4wTj7pP8r6G144RRxZW7cmq4p", "senderPublicKey": "Hh3eFP2XFetZSfTxQiM1Ps96f68zi8Zh5ghhCZdjgdFs", "proofs": [ "3ug4BmT69ZY2Ce5BSmJJkk74uxCCdzpQLif55ATMhhh58y2Rg7oyyCPY9SxpnRzoXRVeSuPabemVdo95YqGvZj7R" ], "script": "base64:BgI5CAISBAoCCAgSBAoCBAgSBAoCAQgSBQoDCAEIEgMKAQgSAwoBCBIDCgEIEgUKAwgICBIGCgQICAgIMwEJZ2V0U3RyQnlLAQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgAACHVuaXRUZXN0BwAJb3JhY2xlRmVlCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX29yYWNsZV9mZWUAC2ZlZVJlY2VpdmVyCQEJZ2V0U3RyQnlLAQIRY29uZl9mZWVfcmVjZWl2ZXIADGFydHdvcmtzRGFwcAkBBXZhbHVlAQkApggBCQEJZ2V0U3RyQnlLAQISY29uZl9hcnR3b3Jrc19kYXBwAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmCAEJAQlnZXRTdHJCeUsBAg9jb25mX3VzZXJzX2RhcHAAC3NpZ25Bc3NldElkCQDZBAEJAQlnZXRTdHJCeUsBAhh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ZXJPd25lcglzYWxlT3duZXIEDSR0MDE4NDk0MTg1NjkJAQxpZENhbGxlckRhdGUBBQFpBAJpZAgFDSR0MDE4NDk0MTg1NjkCXzEEBmNhbGxlcggFDSR0MDE4NDk0MTg1NjkCXzIEBGRhdGUIBQ0kdDAxODQ5NDE4NTY5Al8zAwMJAQIhPQIFBmNhbGxlcgUKb2ZmZXJPd25lcgkBAiE9AgUGY2FsbGVyBQlzYWxlT3duZXIHCQACAQIdWW91IGNhbm5vdCBjYW5jZWwgdGhpcyBvZmZlci4EBmJpZEtleQkBCWdldEJpZEtleQQFCm9mZmVyT3duZXIFBW5mdElkBQlzYWxlT3duZXIFB29mZmVySWQEDSR0MDE4NzQzMTg3OTgJAQpnZXRCaWREYXRhAQUGYmlkS2V5BApiaWREYXRhQXJyCAUNJHQwMTg3NDMxODc5OAJfMQQHYXNzZXRJZAgFDSR0MDE4NzQzMTg3OTgCXzIEB2JpZERhdGEIBQ0kdDAxODc0MzE4Nzk4Al8zCQDMCAIJAQtEZWxldGVFbnRyeQEJAKwCAgUGYmlkS2V5AgVfT1BFTgkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBmJpZEtleQIKX0NBTkNFTExFRAkArAICCQCsAgIJAKwCAgkArAICBQdiaWREYXRhAgtfQ0FOQ0VMTEVEXwkApAMBBQRkYXRlAgFfBQJpZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUGY2FsbGVyCQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUKYmlkRGF0YUFycgABBQdhc3NldElkBQNuaWwAfN+5aQ==", "height": 2329569, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4CJtpADESBy9AqfrcAqKgRsZonsyqcpsvw5wzRrvf8uw Next: EnUCkh4DYVqfZuJs9GpfrRvASJscXVedWWoftG5b3AfE Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let VERSION = 111
5-
64 func getStrByK (key) = valueOrElse(getString(this, key), "")
75
86
97 let unitTest = false
108
119 let oracleFee = value(addressFromString(getStrByK("conf_oracle_fee")))
12-
13-let signDapp = value(addressFromString(getStrByK("conf_signweb_dapp")))
1410
1511 let feeReceiver = getStrByK("conf_fee_receiver")
1612
2016 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
2117 else value(addressFromString(getStrByK("conf_users_dapp")))
2218
23-let whitelistDapp = value(addressFromString(getStrByK("conf_whitelist_dapp")))
24-
2519 let signAssetId = fromBase58String(getStrByK("conf_accepted_asset_SIGN"))
2620
2721 let usdnAssetId = fromBase58String(getStrByK("conf_accepted_asset_USDN"))
22+
23+let usdtAssetId = fromBase58String(getStrByK("conf_accepted_asset_USDT"))
2824
2925 let wavesAssetId = base58''
3026
119115 }
120116
121117
122-func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId)))
118+func acceptedAssetIds (assetId) = if (if (if (if (if ((assetId != toBase58String(signAssetId)))
123119 then (assetId != toBase58String(wavesAssetId))
124120 else false)
125121 then (assetId != "WAVES")
126122 else false)
127123 then (assetId != toBase58String(usdnAssetId))
124+ else false)
125+ then (assetId != toBase58String(usdtAssetId))
128126 else false)
129127 then false
130128 else true
192190 }
193191
194192
195-func checkARTExist (artId,creatorAddr) = {
196- let artSignID = getArtStrByK(keySignID(creatorAddr, artId))
197- if ((size(artSignID) == 0))
198- then throw("Artwork not found on SIGN Art")
199- else if (if (!(checkArtStatus(creatorAddr, artId)))
200- then !(checkArtistStatus(creatorAddr))
201- else false)
202- then false
203- else true
204- }
205-
206-
207193 func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = {
208194 let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
209195 let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
233219 let minSellSign = if (unitTest)
234220 then 1
235221 else (currentCertificationPrice * 2)
236- if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
222+ if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
237223 then (minSellUsdn > price)
238224 else false)
239225 then (price != 0)
240226 else false)
227+ then true
228+ else if (if ((assetId == toBase58String(usdtAssetId)))
229+ then (minSellUsdn > price)
230+ else false)
231+ then (price != 0)
232+ else false)
241233 then true
242234 else if (if ((assetId == toBase58String(signAssetId)))
243235 then (minSellSign > price)
258250
259251
260252 func provideBaseData (i,nftId) = {
261- let $t088018840 = idCallerDate(i)
262- let id = $t088018840._1
263- let caller = $t088018840._2
264- let date = $t088018840._3
265- let $t088438912 = checkNFTInfo(nftId)
266- let isValidNFT = $t088438912._1
267- let artId = $t088438912._2
268- let creatorAddr = $t088438912._3
269- let artSignID = $t088438912._4
253+ let $t093049344 = idCallerDate(i)
254+ let id = $t093049344._1
255+ let caller = $t093049344._2
256+ let date = $t093049344._3
257+ let $t093489417 = checkNFTInfo(nftId)
258+ let isValidNFT = $t093489417._1
259+ let artId = $t093489417._2
260+ let creatorAddr = $t093489417._3
261+ let artSignID = $t093489417._4
270262 $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
271263 }
272264
302294
303295 @Callable(i)
304296 func sellNFT (price,asset) = {
305- let $t0997710013 = isPayment(i)
306- let payment = $t0997710013._1
307- let amount = $t0997710013._2
297+ let $t01052210558 = isPayment(i)
298+ let payment = $t01052210558._1
299+ let amount = $t01052210558._2
308300 if ((amount != 1))
309301 then throw("No NFT attached")
310302 else {
313305 else false)
314306 then toBase58String(value(payment.assetId))
315307 else throw("Only SIGN Art NFT accepted.")
316- let $t01024710339 = provideBaseData(i, nftId)
317- let id = $t01024710339._1
318- let caller = $t01024710339._2
319- let date = $t01024710339._3
320- let isValidNFT = $t01024710339._4
321- let artId = $t01024710339._5
322- let creatorAddr = $t01024710339._6
323- let artSignID = $t01024710339._7
308+ let $t01079610889 = provideBaseData(i, nftId)
309+ let id = $t01079610889._1
310+ let caller = $t01079610889._2
311+ let date = $t01079610889._3
312+ let isValidNFT = $t01079610889._4
313+ let artId = $t01079610889._5
314+ let creatorAddr = $t01079610889._6
315+ let artSignID = $t01079610889._7
324316 if ((size(artSignID) == 0))
325317 then throw("Artwork not found on SIGN Art")
326318 else if (!(isValidNFT))
327319 then throw("Not a valid nft")
328320 else if (!(acceptedAssetIds(asset)))
329- then throw("Only SIGN, USDN or WAVES accepted")
321+ then throw("Only SIGN, USDN, USDT or WAVES accepted")
330322 else if (!(validateMinSell(asset, price)))
331323 then throw("Wrong minimum sell price")
332324 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)]
337329
338330 @Callable(i)
339331 func updateSalePrice (nftId,price,asset) = {
340- let $t01121311305 = provideBaseData(i, nftId)
341- let id = $t01121311305._1
342- let caller = $t01121311305._2
343- let date = $t01121311305._3
344- let isValidNFT = $t01121311305._4
345- let artId = $t01121311305._5
346- let creatorAddr = $t01121311305._6
347- let artSignID = $t01121311305._7
332+ let $t01179311886 = provideBaseData(i, nftId)
333+ let id = $t01179311886._1
334+ let caller = $t01179311886._2
335+ let date = $t01179311886._3
336+ let isValidNFT = $t01179311886._4
337+ let artId = $t01179311886._5
338+ let creatorAddr = $t01179311886._6
339+ let artSignID = $t01179311886._7
348340 if ((size(artSignID) == 0))
349341 then throw("Artwork not found on SIGN Art, cancel your sale.")
350342 else if (!(isValidNFT))
358350 if ((saleStatus != "OPEN"))
359351 then throw("Sale not active")
360352 else if (!(acceptedAssetIds(asset)))
361- then throw("Only SIGN, USDN or WAVES accepted")
353+ then throw("Only SIGN, USDN, USDT or WAVES accepted")
362354 else if (!(validateMinSell(asset, price)))
363355 then throw("Wrong minimum sell price")
364356 else {
374366
375367 @Callable(i)
376368 func cancelSale (nftId) = {
377- let $t01244712687 = provideBaseData(i, nftId)
378- let id = $t01244712687._1
379- let caller = $t01244712687._2
380- let date = $t01244712687._3
381- let isValidNFT = $t01244712687._4
382- let artId = $t01244712687._5
383- let creatorAddr = $t01244712687._6
384- let artSignID = $t01244712687._7
369+ let $t01306313307 = provideBaseData(i, nftId)
370+ let id = $t01306313307._1
371+ let caller = $t01306313307._2
372+ let date = $t01306313307._3
373+ let isValidNFT = $t01306313307._4
374+ let artId = $t01306313307._5
375+ let creatorAddr = $t01306313307._6
376+ let artSignID = $t01306313307._7
385377 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
386378 if ((saleOwner != caller))
387379 then throw("You don't own this NFT")
401393
402394 @Callable(i)
403395 func buyNFT (nftId) = {
404- let $t01351813610 = provideBaseData(i, nftId)
405- let id = $t01351813610._1
406- let caller = $t01351813610._2
407- let date = $t01351813610._3
408- let isValidNFT = $t01351813610._4
409- let artId = $t01351813610._5
410- let creatorAddr = $t01351813610._6
411- let artSignID = $t01351813610._7
396+ let $t01416114254 = provideBaseData(i, nftId)
397+ let id = $t01416114254._1
398+ let caller = $t01416114254._2
399+ let date = $t01416114254._3
400+ let isValidNFT = $t01416114254._4
401+ let artId = $t01416114254._5
402+ let creatorAddr = $t01416114254._6
403+ let artSignID = $t01416114254._7
412404 if ((size(artSignID) == 0))
413405 then throw("Artwork not found on SIGN Art, cancel your sale.")
414406 else if (!(isValidNFT))
424416 if ((parseInt(saleInfoArray[1]) == 0))
425417 then throw("Offer only")
426418 else {
427- let $t01410714143 = isPayment(i)
428- let payment = $t01410714143._1
429- let amount = $t01410714143._2
419+ let $t01476314799 = isPayment(i)
420+ let payment = $t01476314799._1
421+ let amount = $t01476314799._2
430422 let paymentAssetStr = if (isDefined(payment.assetId))
431423 then toBase58String(value(payment.assetId))
432424 else ""
435427 else (saleInfoArray[2] != paymentAssetStr))
436428 then throw("Payment infos don't match.")
437429 else {
438- let $t01464914781 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
439- let commissions = $t01464914781._1
440- let creatorFee = $t01464914781._2
441- let ownerFee = $t01464914781._3
442- let collectorNFT = $t01464914781._4
430+ let $t01531315445 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
431+ let commissions = $t01531315445._1
432+ let creatorFee = $t01531315445._2
433+ let ownerFee = $t01531315445._3
434+ let collectorNFT = $t01531315445._4
443435 ([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(), creatorFee, ownerFee, collectorNFT] ++ commissions)
444436 }
445437 }
451443
452444 @Callable(i)
453445 func setOffer (nftId) = {
454- let $t01519215288 = provideBaseData(i, nftId)
455- let id = $t01519215288._1
456- let offerOwner = $t01519215288._2
457- let date = $t01519215288._3
458- let isValidNFT = $t01519215288._4
459- let artId = $t01519215288._5
460- let creatorAddr = $t01519215288._6
461- let artSignID = $t01519215288._7
446+ let $t01587315970 = provideBaseData(i, nftId)
447+ let id = $t01587315970._1
448+ let offerOwner = $t01587315970._2
449+ let date = $t01587315970._3
450+ let isValidNFT = $t01587315970._4
451+ let artId = $t01587315970._5
452+ let creatorAddr = $t01587315970._6
453+ let artSignID = $t01587315970._7
462454 if (!(isValidNFT))
463455 then throw("Not a valid nft")
464456 else {
465- let $t01534915385 = isPayment(i)
466- let payment = $t01534915385._1
467- let amount = $t01534915385._2
457+ let $t01603416070 = isPayment(i)
458+ let payment = $t01603416070._1
459+ let amount = $t01603416070._2
468460 let assetId = if (!(isDefined(payment.assetId)))
469461 then "WAVES"
470462 else toBase58String(value(payment.assetId))
485477
486478 @Callable(i)
487479 func acceptOffer (nftId,offerId,offerOwner) = {
488- let $t01618716279 = provideBaseData(i, nftId)
489- let id = $t01618716279._1
490- let caller = $t01618716279._2
491- let date = $t01618716279._3
492- let isValidNFT = $t01618716279._4
493- let artId = $t01618716279._5
494- let creatorAddr = $t01618716279._6
495- let artSignID = $t01618716279._7
480+ let $t01689116984 = provideBaseData(i, nftId)
481+ let id = $t01689116984._1
482+ let caller = $t01689116984._2
483+ let date = $t01689116984._3
484+ let isValidNFT = $t01689116984._4
485+ let artId = $t01689116984._5
486+ let creatorAddr = $t01689116984._6
487+ let artSignID = $t01689116984._7
496488 if (!(isValidNFT))
497489 then throw("Not a valid nft")
498490 else {
501493 then throw("Only sale owner can accept offer")
502494 else {
503495 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
504- let $t01653316588 = getBidData(bidKey)
505- let bidDataArr = $t01653316588._1
506- let assetId = $t01653316588._2
507- let bidData = $t01653316588._3
496+ let $t01724517300 = getBidData(bidKey)
497+ let bidDataArr = $t01724517300._1
498+ let assetId = $t01724517300._2
499+ let bidData = $t01724517300._3
508500 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
509501 let saleInfo = getStrByK((saleKey + "_OPEN"))
510502 if ((size(saleInfo) == 0))
511503 then throw("Sale Not found!")
512504 else {
513505 let amount = value(parseInt(bidDataArr[1]))
514- let $t01682416955 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
515- let commissions = $t01682416955._1
516- let creatorFee = $t01682416955._2
517- let ownerFee = $t01682416955._3
518- let collectorNFT = $t01682416955._4
506+ let $t01754317674 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
507+ let commissions = $t01754317674._1
508+ let creatorFee = $t01754317674._2
509+ let ownerFee = $t01754317674._3
510+ let collectorNFT = $t01754317674._4
519511 let assetIdStr = if (isDefined(assetId))
520512 then toBase58String(value(assetId))
521513 else "WAVES"
529521
530522 @Callable(i)
531523 func cancelOffer (nftId,offerId,offerOwner,saleOwner) = {
532- let $t01775517827 = idCallerDate(i)
533- let id = $t01775517827._1
534- let caller = $t01775517827._2
535- let date = $t01775517827._3
524+ let $t01849418569 = idCallerDate(i)
525+ let id = $t01849418569._1
526+ let caller = $t01849418569._2
527+ let date = $t01849418569._3
536528 if (if ((caller != offerOwner))
537529 then (caller != saleOwner)
538530 else false)
539531 then throw("You cannot cancel this offer.")
540532 else {
541533 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
542- let $t01799918054 = getBidData(bidKey)
543- let bidDataArr = $t01799918054._1
544- let assetId = $t01799918054._2
545- let bidData = $t01799918054._3
534+ let $t01874318798 = getBidData(bidKey)
535+ let bidDataArr = $t01874318798._1
536+ let assetId = $t01874318798._2
537+ let bidData = $t01874318798._3
546538 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
547539 }
548540 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let VERSION = 111
5-
64 func getStrByK (key) = valueOrElse(getString(this, key), "")
75
86
97 let unitTest = false
108
119 let oracleFee = value(addressFromString(getStrByK("conf_oracle_fee")))
12-
13-let signDapp = value(addressFromString(getStrByK("conf_signweb_dapp")))
1410
1511 let feeReceiver = getStrByK("conf_fee_receiver")
1612
1713 let artworksDapp = value(addressFromString(getStrByK("conf_artworks_dapp")))
1814
1915 let userDapp = if (unitTest)
2016 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
2117 else value(addressFromString(getStrByK("conf_users_dapp")))
2218
23-let whitelistDapp = value(addressFromString(getStrByK("conf_whitelist_dapp")))
24-
2519 let signAssetId = fromBase58String(getStrByK("conf_accepted_asset_SIGN"))
2620
2721 let usdnAssetId = fromBase58String(getStrByK("conf_accepted_asset_USDN"))
22+
23+let usdtAssetId = fromBase58String(getStrByK("conf_accepted_asset_USDT"))
2824
2925 let wavesAssetId = base58''
3026
3127 let chris = getStrByK("conf_admin_1")
3228
3329 let signCut = 3
3430
3531 let creatorCut = 10
3632
3733 let userSuspended = "SUSPENDED"
3834
3935 let userRemoved = "REMOVED"
4036
4137 let artIllegal = "ILLEGAL"
4238
4339 let artSuspended = "SUSPENDED"
4440
4541 let dappRunningKey = "conf_dapp_is_running"
4642
4743 let maintenanceMSGKey = "conf_maintenance_msg"
4844
4945 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
5046
5147 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
5248
5349 let numSalesK = "num_sales"
5450
5551 func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error")
5652
5753
5854 func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "")
5955
6056
6157 func getIntByK (key) = valueOrElse(getInteger(this, key), 0)
6258
6359
6460 func keyUserStatus (addr) = ("user_status_" + addr)
6561
6662
6763 func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr)
6864
6965
7066 func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr)
7167
7268
7369 func keyNFTData (id) = ("nft_" + id)
7470
7571
7672 func getSaleKey (caller,nftId,artId,creatorAddr) = ((((((("sale2nd_info_" + caller) + "_") + nftId) + "_") + artId) + "_") + creatorAddr)
7773
7874
7975 func getBidKey (offerOwner,nftId,saleOwner,offerId) = ((((((("offer2nd_" + offerOwner) + "_") + nftId) + "_") + saleOwner) + "_") + offerId)
8076
8177
8278 func getIntByKFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
8379
8480
8581 let currentCertificationPrice = getIntByKFromOracle(("certification_fee_" + toBase58String(signAssetId)))
8682
8783 func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
8884
8985
9086 func keySecondaryShare (artistAddr) = ("artist_agent_secondary_" + artistAddr)
9187
9288
9389 func idCallerDate (i) = if (!(dappRunning))
9490 then throw(maintenanceMSG)
9591 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
9692
9793
9894 func isPayment (i) = if ((size(i.payments) == 0))
9995 then throw("No payment attached")
10096 else {
10197 let payment = value(i.payments[0])
10298 let amount = value(payment.amount)
10399 $Tuple2(payment, amount)
104100 }
105101
106102
107103 func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
108104 then (assetDetails.decimals == 0)
109105 else false)
110106 then (assetDetails.reissuable == false)
111107 else false)
112108 then (assetDetails.issuer == artworksDapp)
113109 else false
114110
115111
116112 func isSignArtNFT (id) = {
117113 let assetDetails = value(assetInfo(id))
118114 assetIsValid(assetDetails)
119115 }
120116
121117
122-func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId)))
118+func acceptedAssetIds (assetId) = if (if (if (if (if ((assetId != toBase58String(signAssetId)))
123119 then (assetId != toBase58String(wavesAssetId))
124120 else false)
125121 then (assetId != "WAVES")
126122 else false)
127123 then (assetId != toBase58String(usdnAssetId))
124+ else false)
125+ then (assetId != toBase58String(usdtAssetId))
128126 else false)
129127 then false
130128 else true
131129
132130
133131 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
134132 then unit
135133 else fromBase58String(assetId)
136134
137135
138136 func getSaleOwnerAndStatus (nftid) = {
139137 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
140138 if ((size(saleOwner) == 0))
141139 then throw("NFT not found")
142140 else {
143141 let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid))
144142 if ((saleStatus != "OPEN"))
145143 then throw("NFT not for sale")
146144 else saleOwner
147145 }
148146 }
149147
150148
151149 func getBidData (key) = {
152150 let bidData = getStrByK((key + "_OPEN"))
153151 if ((bidData == ""))
154152 then throw("Offer not found")
155153 else {
156154 let bidDataArr = split(bidData, "_")
157155 let assetId = getBidAssetId(bidDataArr[2])
158156 $Tuple3(bidDataArr, assetId, bidData)
159157 }
160158 }
161159
162160
163161 func artIsValid (artStatus) = if ((artStatus != artIllegal))
164162 then (artStatus != artSuspended)
165163 else false
166164
167165
168166 func checkArtStatus (addr,id) = {
169167 let artStatus = getArtStrByK(keyFlag(addr, id))
170168 if (artIsValid(artStatus))
171169 then true
172170 else throw(("Original Artwork flagged as " + artStatus))
173171 }
174172
175173
176174 func checkArtistStatus (addr) = {
177175 let artistStatus = getUserStrByK(keyUserStatus(addr))
178176 if (containsElement([userSuspended, userRemoved], artistStatus))
179177 then throw(("Original Artist " + artistStatus))
180178 else true
181179 }
182180
183181
184182 func checkNFTInfo (assetId) = {
185183 let nftData = split(getArtStrByK(keyNFTData(assetId)), "_")
186184 let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5]))
187185 if (if (!(checkArtStatus(nftData[6], nftData[5])))
188186 then !(checkArtistStatus(nftData[6]))
189187 else false)
190188 then $Tuple4(false, nftData[5], nftData[6], artSignID)
191189 else $Tuple4(true, nftData[5], nftData[6], artSignID)
192190 }
193191
194192
195-func checkARTExist (artId,creatorAddr) = {
196- let artSignID = getArtStrByK(keySignID(creatorAddr, artId))
197- if ((size(artSignID) == 0))
198- then throw("Artwork not found on SIGN Art")
199- else if (if (!(checkArtStatus(creatorAddr, artId)))
200- then !(checkArtistStatus(creatorAddr))
201- else false)
202- then false
203- else true
204- }
205-
206-
207193 func setTransfers (amount,assetId,nftid,creatorAddr,saleOwner,caller) = {
208194 let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(creatorAddr)), feeReceiver)
209195 let agentShare = valueOrElse(getInteger(userDapp, keySecondaryShare(creatorAddr)), 0)
210196 let amountForSign = fraction(amount, signCut, 100)
211197 let amountForCreator = fraction(amount, creatorCut, 100)
212198 let amountForOwner = (amount - (amountForSign + amountForCreator))
213199 let amountForAgent = if (if ((agent != feeReceiver))
214200 then (agentShare > 0)
215201 else false)
216202 then fraction(amount, agentShare, 100)
217203 else 0
218204 let commissions = if ((amountForAgent != 0))
219205 then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
220206 else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
221207 let creatorFee = ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId)
222208 let ownerFee = ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId)
223209 let collectorNFT = ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))
224210 $Tuple4(commissions, creatorFee, ownerFee, collectorNFT)
225211 }
226212
227213
228214 func validateMinSell (assetId,price) = {
229215 let minSellWaves = if (unitTest)
230216 then 10
231217 else getIntByKFromOracle("waves_min_sell")
232218 let minSellUsdn = 1000000
233219 let minSellSign = if (unitTest)
234220 then 1
235221 else (currentCertificationPrice * 2)
236- if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
222+ if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
237223 then (minSellUsdn > price)
238224 else false)
239225 then (price != 0)
240226 else false)
227+ then true
228+ else if (if ((assetId == toBase58String(usdtAssetId)))
229+ then (minSellUsdn > price)
230+ else false)
231+ then (price != 0)
232+ else false)
241233 then true
242234 else if (if ((assetId == toBase58String(signAssetId)))
243235 then (minSellSign > price)
244236 else false)
245237 then (price != 0)
246238 else false)
247239 then true
248240 else if (if (if ((assetId == toBase58String(wavesAssetId)))
249241 then true
250242 else (assetId == "WAVES"))
251243 then (minSellWaves > price)
252244 else false)
253245 then (price != 0)
254246 else false)
255247 then false
256248 else true
257249 }
258250
259251
260252 func provideBaseData (i,nftId) = {
261- let $t088018840 = idCallerDate(i)
262- let id = $t088018840._1
263- let caller = $t088018840._2
264- let date = $t088018840._3
265- let $t088438912 = checkNFTInfo(nftId)
266- let isValidNFT = $t088438912._1
267- let artId = $t088438912._2
268- let creatorAddr = $t088438912._3
269- let artSignID = $t088438912._4
253+ let $t093049344 = idCallerDate(i)
254+ let id = $t093049344._1
255+ let caller = $t093049344._2
256+ let date = $t093049344._3
257+ let $t093489417 = checkNFTInfo(nftId)
258+ let isValidNFT = $t093489417._1
259+ let artId = $t093489417._2
260+ let creatorAddr = $t093489417._3
261+ let artSignID = $t093489417._4
270262 $Tuple7(id, caller, date, isValidNFT, artId, creatorAddr, artSignID)
271263 }
272264
273265
274266 func updateNumSales () = {
275267 let numSales = getIntByK(numSalesK)
276268 IntegerEntry(numSalesK, (numSales + 1))
277269 }
278270
279271
280272 @Callable(invoke)
281273 func setConf (key,val) = {
282274 let caller = toString(invoke.caller)
283275 if (containsElement([chris, toString(this)], caller))
284276 then if (contains(key, "conf_"))
285277 then [StringEntry(key, val)]
286278 else throw("Entries starting with conf_ only")
287279 else throw("You are not allowed to change this")
288280 }
289281
290282
291283
292284 @Callable(invoke)
293285 func appRunning (isLive,message) = {
294286 let caller = toString(invoke.caller)
295287 let id = toBase58String(invoke.transactionId)
296288 if (containsElement([chris, toString(this)], caller))
297289 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
298290 else throw("You are not allowed to change this")
299291 }
300292
301293
302294
303295 @Callable(i)
304296 func sellNFT (price,asset) = {
305- let $t0997710013 = isPayment(i)
306- let payment = $t0997710013._1
307- let amount = $t0997710013._2
297+ let $t01052210558 = isPayment(i)
298+ let payment = $t01052210558._1
299+ let amount = $t01052210558._2
308300 if ((amount != 1))
309301 then throw("No NFT attached")
310302 else {
311303 let nftId = if (if (isDefined(payment.assetId))
312304 then isSignArtNFT(value(payment.assetId))
313305 else false)
314306 then toBase58String(value(payment.assetId))
315307 else throw("Only SIGN Art NFT accepted.")
316- let $t01024710339 = provideBaseData(i, nftId)
317- let id = $t01024710339._1
318- let caller = $t01024710339._2
319- let date = $t01024710339._3
320- let isValidNFT = $t01024710339._4
321- let artId = $t01024710339._5
322- let creatorAddr = $t01024710339._6
323- let artSignID = $t01024710339._7
308+ let $t01079610889 = provideBaseData(i, nftId)
309+ let id = $t01079610889._1
310+ let caller = $t01079610889._2
311+ let date = $t01079610889._3
312+ let isValidNFT = $t01079610889._4
313+ let artId = $t01079610889._5
314+ let creatorAddr = $t01079610889._6
315+ let artSignID = $t01079610889._7
324316 if ((size(artSignID) == 0))
325317 then throw("Artwork not found on SIGN Art")
326318 else if (!(isValidNFT))
327319 then throw("Not a valid nft")
328320 else if (!(acceptedAssetIds(asset)))
329- then throw("Only SIGN, USDN or WAVES accepted")
321+ then throw("Only SIGN, USDN, USDT or WAVES accepted")
330322 else if (!(validateMinSell(asset, price)))
331323 then throw("Wrong minimum sell price")
332324 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)]
333325 }
334326 }
335327
336328
337329
338330 @Callable(i)
339331 func updateSalePrice (nftId,price,asset) = {
340- let $t01121311305 = provideBaseData(i, nftId)
341- let id = $t01121311305._1
342- let caller = $t01121311305._2
343- let date = $t01121311305._3
344- let isValidNFT = $t01121311305._4
345- let artId = $t01121311305._5
346- let creatorAddr = $t01121311305._6
347- let artSignID = $t01121311305._7
332+ let $t01179311886 = provideBaseData(i, nftId)
333+ let id = $t01179311886._1
334+ let caller = $t01179311886._2
335+ let date = $t01179311886._3
336+ let isValidNFT = $t01179311886._4
337+ let artId = $t01179311886._5
338+ let creatorAddr = $t01179311886._6
339+ let artSignID = $t01179311886._7
348340 if ((size(artSignID) == 0))
349341 then throw("Artwork not found on SIGN Art, cancel your sale.")
350342 else if (!(isValidNFT))
351343 then throw("Not a valid nft")
352344 else {
353345 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
354346 if ((saleOwner != caller))
355347 then throw("You don't own this NFT")
356348 else {
357349 let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
358350 if ((saleStatus != "OPEN"))
359351 then throw("Sale not active")
360352 else if (!(acceptedAssetIds(asset)))
361- then throw("Only SIGN, USDN or WAVES accepted")
353+ then throw("Only SIGN, USDN, USDT or WAVES accepted")
362354 else if (!(validateMinSell(asset, price)))
363355 then throw("Wrong minimum sell price")
364356 else {
365357 let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
366358 let saleInfo = split(getStrByK((saleKey + "_OPEN")), "_")
367359 [StringEntry((saleKey + "_OPEN"), ((((((((((((saleInfo[0] + "_") + toString(price)) + "_") + asset) + "_") + saleInfo[3]) + "_") + saleInfo[4]) + "_") + saleInfo[5]) + "_") + saleInfo[6]))]
368360 }
369361 }
370362 }
371363 }
372364
373365
374366
375367 @Callable(i)
376368 func cancelSale (nftId) = {
377- let $t01244712687 = provideBaseData(i, nftId)
378- let id = $t01244712687._1
379- let caller = $t01244712687._2
380- let date = $t01244712687._3
381- let isValidNFT = $t01244712687._4
382- let artId = $t01244712687._5
383- let creatorAddr = $t01244712687._6
384- let artSignID = $t01244712687._7
369+ let $t01306313307 = provideBaseData(i, nftId)
370+ let id = $t01306313307._1
371+ let caller = $t01306313307._2
372+ let date = $t01306313307._3
373+ let isValidNFT = $t01306313307._4
374+ let artId = $t01306313307._5
375+ let creatorAddr = $t01306313307._6
376+ let artSignID = $t01306313307._7
385377 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftId))
386378 if ((saleOwner != caller))
387379 then throw("You don't own this NFT")
388380 else {
389381 let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftId))
390382 if ((saleStatus != "OPEN"))
391383 then throw("Sale not active")
392384 else {
393385 let saleKey = getSaleKey(caller, nftId, artId, creatorAddr)
394386 let saleInfo = getStrByK((saleKey + "_OPEN"))
395387 [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))]
396388 }
397389 }
398390 }
399391
400392
401393
402394 @Callable(i)
403395 func buyNFT (nftId) = {
404- let $t01351813610 = provideBaseData(i, nftId)
405- let id = $t01351813610._1
406- let caller = $t01351813610._2
407- let date = $t01351813610._3
408- let isValidNFT = $t01351813610._4
409- let artId = $t01351813610._5
410- let creatorAddr = $t01351813610._6
411- let artSignID = $t01351813610._7
396+ let $t01416114254 = provideBaseData(i, nftId)
397+ let id = $t01416114254._1
398+ let caller = $t01416114254._2
399+ let date = $t01416114254._3
400+ let isValidNFT = $t01416114254._4
401+ let artId = $t01416114254._5
402+ let creatorAddr = $t01416114254._6
403+ let artSignID = $t01416114254._7
412404 if ((size(artSignID) == 0))
413405 then throw("Artwork not found on SIGN Art, cancel your sale.")
414406 else if (!(isValidNFT))
415407 then throw("Not a valid nft")
416408 else {
417409 let saleOwner = getSaleOwnerAndStatus(nftId)
418410 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
419411 let saleInfo = getStrByK((saleKey + "_OPEN"))
420412 if ((size(saleInfo) == 0))
421413 then throw("Sale Not found!")
422414 else {
423415 let saleInfoArray = split(saleInfo, "_")
424416 if ((parseInt(saleInfoArray[1]) == 0))
425417 then throw("Offer only")
426418 else {
427- let $t01410714143 = isPayment(i)
428- let payment = $t01410714143._1
429- let amount = $t01410714143._2
419+ let $t01476314799 = isPayment(i)
420+ let payment = $t01476314799._1
421+ let amount = $t01476314799._2
430422 let paymentAssetStr = if (isDefined(payment.assetId))
431423 then toBase58String(value(payment.assetId))
432424 else ""
433425 if (if ((saleInfoArray[1] != toString(amount)))
434426 then true
435427 else (saleInfoArray[2] != paymentAssetStr))
436428 then throw("Payment infos don't match.")
437429 else {
438- let $t01464914781 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
439- let commissions = $t01464914781._1
440- let creatorFee = $t01464914781._2
441- let ownerFee = $t01464914781._3
442- let collectorNFT = $t01464914781._4
430+ let $t01531315445 = setTransfers(amount, payment.assetId, nftId, creatorAddr, saleOwner, caller)
431+ let commissions = $t01531315445._1
432+ let creatorFee = $t01531315445._2
433+ let ownerFee = $t01531315445._3
434+ let collectorNFT = $t01531315445._4
443435 ([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(), creatorFee, ownerFee, collectorNFT] ++ commissions)
444436 }
445437 }
446438 }
447439 }
448440 }
449441
450442
451443
452444 @Callable(i)
453445 func setOffer (nftId) = {
454- let $t01519215288 = provideBaseData(i, nftId)
455- let id = $t01519215288._1
456- let offerOwner = $t01519215288._2
457- let date = $t01519215288._3
458- let isValidNFT = $t01519215288._4
459- let artId = $t01519215288._5
460- let creatorAddr = $t01519215288._6
461- let artSignID = $t01519215288._7
446+ let $t01587315970 = provideBaseData(i, nftId)
447+ let id = $t01587315970._1
448+ let offerOwner = $t01587315970._2
449+ let date = $t01587315970._3
450+ let isValidNFT = $t01587315970._4
451+ let artId = $t01587315970._5
452+ let creatorAddr = $t01587315970._6
453+ let artSignID = $t01587315970._7
462454 if (!(isValidNFT))
463455 then throw("Not a valid nft")
464456 else {
465- let $t01534915385 = isPayment(i)
466- let payment = $t01534915385._1
467- let amount = $t01534915385._2
457+ let $t01603416070 = isPayment(i)
458+ let payment = $t01603416070._1
459+ let amount = $t01603416070._2
468460 let assetId = if (!(isDefined(payment.assetId)))
469461 then "WAVES"
470462 else toBase58String(value(payment.assetId))
471463 if (!(acceptedAssetIds(assetId)))
472464 then throw("asset not accepted")
473465 else if ((amount == 0))
474466 then throw("Offer of 0 not allowed")
475467 else if (!(validateMinSell(assetId, amount)))
476468 then throw("Wrong minimum sell price")
477469 else {
478470 let saleOwner = getSaleOwnerAndStatus(nftId)
479471 [StringEntry((getBidKey(offerOwner, nftId, saleOwner, id) + "_OPEN"), ((((((((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + nftId) + "_") + artId) + "_") + creatorAddr) + "_") + offerOwner) + "_") + id))]
480472 }
481473 }
482474 }
483475
484476
485477
486478 @Callable(i)
487479 func acceptOffer (nftId,offerId,offerOwner) = {
488- let $t01618716279 = provideBaseData(i, nftId)
489- let id = $t01618716279._1
490- let caller = $t01618716279._2
491- let date = $t01618716279._3
492- let isValidNFT = $t01618716279._4
493- let artId = $t01618716279._5
494- let creatorAddr = $t01618716279._6
495- let artSignID = $t01618716279._7
480+ let $t01689116984 = provideBaseData(i, nftId)
481+ let id = $t01689116984._1
482+ let caller = $t01689116984._2
483+ let date = $t01689116984._3
484+ let isValidNFT = $t01689116984._4
485+ let artId = $t01689116984._5
486+ let creatorAddr = $t01689116984._6
487+ let artSignID = $t01689116984._7
496488 if (!(isValidNFT))
497489 then throw("Not a valid nft")
498490 else {
499491 let saleOwner = getSaleOwnerAndStatus(nftId)
500492 if ((caller != saleOwner))
501493 then throw("Only sale owner can accept offer")
502494 else {
503495 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
504- let $t01653316588 = getBidData(bidKey)
505- let bidDataArr = $t01653316588._1
506- let assetId = $t01653316588._2
507- let bidData = $t01653316588._3
496+ let $t01724517300 = getBidData(bidKey)
497+ let bidDataArr = $t01724517300._1
498+ let assetId = $t01724517300._2
499+ let bidData = $t01724517300._3
508500 let saleKey = getSaleKey(saleOwner, nftId, artId, creatorAddr)
509501 let saleInfo = getStrByK((saleKey + "_OPEN"))
510502 if ((size(saleInfo) == 0))
511503 then throw("Sale Not found!")
512504 else {
513505 let amount = value(parseInt(bidDataArr[1]))
514- let $t01682416955 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
515- let commissions = $t01682416955._1
516- let creatorFee = $t01682416955._2
517- let ownerFee = $t01682416955._3
518- let collectorNFT = $t01682416955._4
506+ let $t01754317674 = setTransfers(amount, assetId, nftId, creatorAddr, saleOwner, bidDataArr[6])
507+ let commissions = $t01754317674._1
508+ let creatorFee = $t01754317674._2
509+ let ownerFee = $t01754317674._3
510+ let collectorNFT = $t01754317674._4
519511 let assetIdStr = if (isDefined(assetId))
520512 then toBase58String(value(assetId))
521513 else "WAVES"
522514 ([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(), creatorFee, ownerFee, collectorNFT] ++ commissions)
523515 }
524516 }
525517 }
526518 }
527519
528520
529521
530522 @Callable(i)
531523 func cancelOffer (nftId,offerId,offerOwner,saleOwner) = {
532- let $t01775517827 = idCallerDate(i)
533- let id = $t01775517827._1
534- let caller = $t01775517827._2
535- let date = $t01775517827._3
524+ let $t01849418569 = idCallerDate(i)
525+ let id = $t01849418569._1
526+ let caller = $t01849418569._2
527+ let date = $t01849418569._3
536528 if (if ((caller != offerOwner))
537529 then (caller != saleOwner)
538530 else false)
539531 then throw("You cannot cancel this offer.")
540532 else {
541533 let bidKey = getBidKey(offerOwner, nftId, saleOwner, offerId)
542- let $t01799918054 = getBidData(bidKey)
543- let bidDataArr = $t01799918054._1
544- let assetId = $t01799918054._2
545- let bidData = $t01799918054._3
534+ let $t01874318798 = getBidData(bidKey)
535+ let bidDataArr = $t01874318798._1
536+ let assetId = $t01874318798._2
537+ let bidData = $t01874318798._3
546538 [DeleteEntry((bidKey + "_OPEN")), StringEntry((bidKey + "_CANCELLED"), ((((bidData + "_CANCELLED_") + toString(date)) + "_") + id)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
547539 }
548540 }
549541
550542

github/deemru/w8io/026f985 
107.38 ms