tx · CmsnHAQ3nK9sECHusTnnVcg34oviHzneKgnVDgW2hPtz

3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY:  -0.02500000 Waves

2023.09.13 12:14 [2753429] smart account 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY > SELF 0.00000000 Waves

{ "type": 13, "id": "CmsnHAQ3nK9sECHusTnnVcg34oviHzneKgnVDgW2hPtz", "fee": 2500000, "feeAssetId": null, "timestamp": 1694596465941, "version": 2, "chainId": 84, "sender": "3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY", "senderPublicKey": "J9DCtJJxJBWZdtDR12BA1U94Q3cZzMi4R6k5hYkAzmzC", "proofs": [ "2csLVH93R2qeukFD1Q4tGggyyYFwYcAf31zBqz5kGk49P9wiQqV7E5Hr9e4uWct7mS1RasMSzndSb1qFKbJ1C5tN" ], "script": "base64:BgJeCAISBAoCCAgSDgoMCAgICAgICAgICAEIEg8KDQgICAgICAgICAgIAQgSBgoECAgICBIECgIICBIICgYIAQEIAQgSBAoCCAgSBAoCCAgSBwoFCAgICAgSBgoECAgICFkAB1ZFUlNJT04CBTIuMC4wAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAAh1bml0VGVzdAcACW9yYWNsZUZlZQkBBXZhbHVlAQkApggBCQEOZ2V0U3RyaW5nQnlLZXkBAg9jb25mX29yYWNsZV9mZWUACHNpZ25EYXBwCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfc2lnbndlYl9kYXBwAAtmZWVSZWNlaXZlcgkBDmdldFN0cmluZ0J5S2V5AQIRY29uZl9mZWVfcmVjZWl2ZXIACHVzZXJEYXBwAwUIdW5pdFRlc3QJAQV2YWx1ZQEJAKYIAQIjM010NFJHTUV5alNXWUFvY1RQcWQ1NXdkSFFRQjNQVTJVQ20JAQV2YWx1ZQEJAKYIAQkBDmdldFN0cmluZ0J5S2V5AQIPY29uZ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4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAsDAwMDCQAAAggFA2ludghmdW5jdGlvbgINdXBkYXRlQXJ0d29yawkAAAIIBQNpbnYEZEFwcAUEdGhpcwcJAAACCAUDaW52A2ZlZQCgwh4HCQAAAggFA2ludgpmZWVBc3NldElkBQR1bml0BwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkA2QQBCQEIYXNTdHJpbmcBCQCRAwIIBQNpbnYEYXJncwAMAwMDAwkAAAIIBQNpbnYIZnVuY3Rpb24CC3NlbGxBcnR3b3JrCQAAAggFA2ludgRkQXBwBQR0aGlzBwkAAAIIBQNpbnYDZmVlAKDCHgcJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAUDAwMDCQAAAggFA2ludghmdW5jdGlvbgIJYWNjZXB0QmlkCQAAAggFA2ludgRkQXBwBQR0aGlzBwkAAAIIBQNpbnYDZmVlAKDCHgcJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHCQDIEwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAQJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmFcW54", "height": 2753429, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CDxpDMUEM8Sha7yAfHJjRsMKNbiSv4bnjU9FpGdo4yQb Next: GsV3nboydm8e3U2tc3Vvc5pxuiWnv1PTNBkMzuwijk5r Diff:
OldNewDifferences
2020
2121 let whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp")))
2222
23-let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN"))
23+let usdtPPAssetId_str = getStringByKey("conf_accepted_asset_USDT_PP")
2424
25-let usdnAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDN"))
25+let artAssetId_str = getStringByKey("conf_accepted_asset_ART")
2626
27-let usdtAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDT"))
27+let usdcPPAssetId_str = getStringByKey("conf_accepted_asset_USDC_PP")
2828
29-let usdtPPAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDT_PP"))
29+let eastAssetId_str = getStringByKey("conf_accepted_asset_EAST")
30+
31+let puzzleAssetId_str = getStringByKey("conf_accepted_asset_PUZZLE")
32+
33+let ethPPAssetId_str = getStringByKey("conf_accepted_asset_ETH_PP")
34+
35+let wavesAssetId_str = "WAVES"
36+
37+let usdtPPAssetId = fromBase58String(usdtPPAssetId_str)
38+
39+let artAssetId = fromBase58String(artAssetId_str)
40+
41+let usdcPPAssetId = fromBase58String(usdcPPAssetId_str)
42+
43+let eastAssetId = fromBase58String(eastAssetId_str)
44+
45+let puzzleAssetId = fromBase58String(puzzleAssetId_str)
46+
47+let ethPPAssetId = fromBase58String(ethPPAssetId_str)
3048
3149 let wavesAssetId = base58''
50+
51+let all_accepted_assets = [usdtPPAssetId_str, artAssetId_str, usdcPPAssetId_str, eastAssetId_str, puzzleAssetId_str, wavesAssetId_str, ethPPAssetId_str]
3252
3353 let chris = getStringByKey("conf_admin_1")
3454
6282
6383 let userAllowed = "ALLOWED"
6484
65-let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId)))
85+let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(artAssetId)))
6686
6787 func getArtworkRoyalties (key) = valueOrElse(getInteger(this, key), 1000)
68-
69-
70-func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) {
71- case a: String =>
72- if (contains(a, sha256Hash))
73- then true
74- else false
75- case _ =>
76- false
77-}
7888
7989
8090 func validateCID (cid) = if (contains(cid, "/"))
176186 func keyidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller)
177187
178188
179-func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller)))))
180-
181-
182189 func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay)))
183190 then throw("Wrong Display CID")
184191 else if (!(validateCID(cidExport)))
263270
264271
265272 func validatePayment (i) = {
266- let $t093529388 = isPayment(i)
267- let payment = $t093529388._1
268- let amount = $t093529388._2
273+ let $t01001410050 = isPayment(i)
274+ let payment = $t01001410050._1
275+ let amount = $t01001410050._2
269276 let assetId = if (if (isDefined(payment.assetId))
270- then (payment.assetId == signAssetId)
277+ then (payment.assetId == artAssetId)
271278 else false)
272279 then payment.assetId
273280 else throw("Only SIGN token accepted as transaction fee")
288295
289296
290297 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
291- let $t0997610012 = isPayment(i)
292- let payment = $t0997610012._1
293- let amount = $t0997610012._2
298+ let $t01063710673 = isPayment(i)
299+ let payment = $t01063710673._1
300+ let amount = $t01063710673._2
294301 let assetId = if (!(isDefined(payment.assetId)))
295302 then unit
296303 else if (if ((size(priceAssetId) > 0))
308315 }
309316
310317
311-func acceptedAssetIds (assetId) = if (if (if (if (if (if ((assetId != toBase58String(signAssetId)))
312- then (assetId != toBase58String(wavesAssetId))
313- else false)
314- then (assetId != "WAVES")
315- else false)
316- then (assetId != toBase58String(usdnAssetId))
317- else false)
318- then (assetId != toBase58String(usdtAssetId))
319- else false)
320- then (assetId != toBase58String(usdtPPAssetId))
321- else false)
322- then throw("Only SIGN, USDN,USDT or WAVES accepted")
318+func acceptedAssetIds (assetId) = if (!(containsElement(all_accepted_assets, assetId)))
319+ then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted")
323320 else true
324321
325322
326-func validateMinSell (assetId,price) = {
327- let minSellWaves = if (unitTest)
328- then 10
329- else getIntegerByKeyFromOracle("waves_min_sell")
330- let minSellUsdn = 1000000
331- let minSellSign = if (unitTest)
332- then 1
333- else (currentCertificationPrice * 2)
334- if (if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
335- then (minSellUsdn > price)
336- else false)
337- then (price != 0)
338- else false)
339- then true
340- else if (if ((assetId == toBase58String(usdtAssetId)))
341- then (minSellUsdn > price)
342- else false)
343- then (price != 0)
344- else false)
345- then true
346- else if (if ((assetId == toBase58String(usdtPPAssetId)))
347- then (minSellUsdn > price)
348- else false)
349- then (price != 0)
350- else false)
351- then true
352- else if (if ((assetId == toBase58String(signAssetId)))
353- then (minSellSign > price)
354- else false)
355- then (price != 0)
356- else false)
357- then true
358- else if (if (if ((assetId == toBase58String(wavesAssetId)))
359- then true
360- else (assetId == "WAVES"))
361- then (minSellWaves > price)
362- else false)
363- then (price != 0)
364- else false)
365- then throw("Wrong minimum sell price")
366- else true
367- }
323+func validateMinSell (price) = if ((0 >= price))
324+ then throw("Wrong minimum sell price")
325+ else true
368326
369327
370328 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
414372 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
415373
416374
375+func getBalance (assetId) = match assetId {
376+ case b: ByteVector =>
377+ assetBalance(this, b)
378+ case _ =>
379+ wavesBalance(this).available
380+}
381+
382+
417383 func buyMint (i,artId,issuer,bidId,bidOwner,pubKey) = {
418- let $t01335013439 = idCallerDateSponsored(i, pubKey)
419- let id = $t01335013439._1
420- let caller = $t01335013439._2
421- let date = $t01335013439._3
422- let isSponsored = $t01335013439._4
384+ let $t01327813367 = idCallerDateSponsored(i, pubKey)
385+ let id = $t01327813367._1
386+ let caller = $t01327813367._2
387+ let date = $t01327813367._3
388+ let isSponsored = $t01327813367._4
423389 let isBid = if (if (if ((caller == issuer))
424390 then (bidOwner != "")
425391 else false)
442408 else {
443409 let callerIsIssuer = (caller == issuer)
444410 let totalNFT = getIntegerByKey("total_nft_issued")
445- let signID = getStringByKey(keySignID(issuer, artId))
446411 let artworkName = getStringByKey(keyName(issuer, artId))
447412 if ((artworkName == ""))
448413 then throw("Art doesn't exist")
453418 then (currentCertificationPrice * 2)
454419 else getIntegerByKey(keyPrice(issuer, artId))
455420 let priceAssetId = if (callerIsIssuer)
456- then toBase58String(signAssetId)
421+ then toBase58String(artAssetId)
457422 else getStringByKey(keyAssetIdAccepted(issuer, artId))
458423 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
459424 if (if (if (!(isBid))
480445 then throw(checkUser)
481446 else {
482447 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
483- let $t01503715229 = if (isBid)
448+ let $t01496515157 = if (isBid)
484449 then getPriceAssetIdFromBid(bidDataKey)
485450 else validatePriceAssetId(i, priceAssetId, artworkPrice)
486- let amount = $t01503715229._1
487- let assetId = $t01503715229._2
451+ let amount = $t01496515157._1
452+ let assetId = $t01496515157._2
488453 let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver)
489454 let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShareAgent(issuer)), 0)
490455 let publicAgent = valueOrElse(getString(userDapp, keyArtistPublicAgentAddr(issuer)), feeReceiver)
510475 then throw("Art sold out")
511476 else {
512477 let newAmountSold = (amountSold + 1)
513- let issueMeta = ((((((((((("Creator: " + issuer) + ",
478+ let issueMeta = ((((((((("Creator: " + issuer) + ",
514479 ArtID: ") + artId) + ",
515- SignID: ") + signID) + ",
516480 Artwork name: ") + artworkName) + ",
517481 Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
518482 let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
583547
584548
585549 @Callable(i)
586-func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = {
587- let $t02047220545 = idCallerDateSponsored(i, pubKey)
588- let artId = $t02047220545._1
589- let caller = $t02047220545._2
590- let date = $t02047220545._3
591- let isSponsored = $t02047220545._4
592- if (!(validateHash(sha256Hash)))
593- then throw("Hash should be 64 characters maximum")
550+func addArtwork (name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = {
551+ let $t02074820821 = idCallerDateSponsored(i, pubKey)
552+ let artId = $t02074820821._1
553+ let caller = $t02074820821._2
554+ let date = $t02074820821._3
555+ let isSponsored = $t02074820821._4
556+ let $t02083120900 = setLIcence(cidLicence, sha256Licence)
557+ let licenceCID = $t02083120900._1
558+ let licenceHash = $t02083120900._2
559+ let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties)
560+ if ((validateArtwork != ""))
561+ then throw("Something went wrong!")
594562 else {
595- let $t02064620715 = setLIcence(cidLicence, sha256Licence)
596- let licenceCID = $t02064620715._1
597- let licenceHash = $t02064620715._2
598- let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties)
599- if ((validateArtwork != ""))
600- then throw("Something went wrong!")
563+ let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0)
564+ let $t02119921287 = if (whitelisted_drop)
565+ then $Tuple2(0, artAssetId)
566+ else validatePayment(i)
567+ let amount = $t02119921287._1
568+ let assetId = $t02119921287._2
569+ if (!(isDefined(amount)))
570+ then throw("Something went wrong")
601571 else {
602- let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0)
603- let $t02101421098 = if (whitelisted_drop)
604- then $Tuple2(0, signID)
605- else validatePayment(i)
606- let amount = $t02101421098._1
607- let assetId = $t02101421098._2
608- if (!(isDefined(amount)))
609- then throw("Something went wrong")
610- else {
611- let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller))
612- if ((entryExist != ""))
613- then throw("You already added it")
614- else {
615- let hashExist = getStringByKey(keyOwnerByHash(sha256Hash))
616- if ((hashExist != ""))
617- then throw("Hash already registered")
618- else {
619- let isSignCertified = checkSignCertificate(signID, caller, sha256Hash)
620- if (!(isSignCertified))
621- then throw("Sign Certificate not found for this address.")
622- else {
623- let decrease_whitelist_drop = if (whitelisted_drop)
624- then invoke(whitelistDapp, "useFreeDrop", [caller], nil)
625- else unit
626- if ((decrease_whitelist_drop == decrease_whitelist_drop))
627- then {
628- let txToCaller = if (isSponsored)
629- then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
630- else nil
631- ([StringEntry(keyOwnerByHash(sha256Hash), caller), StringEntry(keyTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyExportCid(caller, artId), cidExport), StringEntry(keyExportHash(caller, artId), sha256Export), StringEntry(keyLicenceHash(caller, artId), licenceHash), StringEntry(keyLicenceCid(caller, artId), licenceCID), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), StringEntry(keySignID(caller, artId), signID), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyidBySignid(caller, signID), artId), StringEntry(keyHashByTxidAddr(caller, artId), sha256Hash), StringEntry(keyCrawler(caller, artId), crawler), IntegerEntry(keyRoyalties(caller, artId), royalties), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, signAssetId)] ++ txToCaller)
632- }
633- else throw("Strict value is not equal to itself.")
634- }
635- }
636- }
572+ let decrease_whitelist_drop = if (whitelisted_drop)
573+ then invoke(whitelistDapp, "useFreeDrop", [caller], nil)
574+ else unit
575+ if ((decrease_whitelist_drop == decrease_whitelist_drop))
576+ then {
577+ let txToCaller = if (isSponsored)
578+ then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
579+ else nil
580+ ([IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyExportCid(caller, artId), cidExport), StringEntry(keyExportHash(caller, artId), sha256Export), StringEntry(keyLicenceHash(caller, artId), licenceHash), StringEntry(keyLicenceCid(caller, artId), licenceCID), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyCrawler(caller, artId), crawler), IntegerEntry(keyRoyalties(caller, artId), royalties), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, artAssetId)] ++ txToCaller)
637581 }
582+ else throw("Strict value is not equal to itself.")
638583 }
639584 }
640585 }
645590 func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = if (!(dappRunning))
646591 then throw(maintenanceMSG)
647592 else {
648- let $t02413224202 = idCallerDateSponsored(i, pubKey)
649- let id = $t02413224202._1
650- let caller = $t02413224202._2
651- let date = $t02413224202._3
652- let isSponsored = $t02413224202._4
653- let $t02421224281 = setLIcence(cidLicence, sha256Licence)
654- let licenceCID = $t02421224281._1
655- let licenceHash = $t02421224281._2
593+ let $t02320223272 = idCallerDateSponsored(i, pubKey)
594+ let id = $t02320223272._1
595+ let caller = $t02320223272._2
596+ let date = $t02320223272._3
597+ let isSponsored = $t02320223272._4
598+ let $t02328223351 = setLIcence(cidLicence, sha256Licence)
599+ let licenceCID = $t02328223351._1
600+ let licenceHash = $t02328223351._2
656601 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties)
657602 if ((validateArtwork != ""))
658603 then throw("Something went wrong!")
680625
681626 @Callable(i)
682627 func flagArtwork (artId,addr,flag,note) = {
683- let $t02590825942 = idCallerDate(i)
684- let id = $t02590825942._1
685- let caller = $t02590825942._2
628+ let $t02497825012 = idCallerDate(i)
629+ let id = $t02497825012._1
630+ let caller = $t02497825012._2
686631 if (containsElement([chris, toString(this)], caller))
687632 then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
688633 then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)]
694639
695640 @Callable(i)
696641 func deleteArtwork (artId,addr) = {
697- let $t02637826412 = idCallerDate(i)
698- let id = $t02637826412._1
699- let caller = $t02637826412._2
642+ let $t02544825482 = idCallerDate(i)
643+ let id = $t02544825482._1
644+ let caller = $t02544825482._2
700645 let addrToUse = if (containsElement([chris, toString(this)], caller))
701646 then addr
702647 else caller
705650 then throw("No art matching for this address")
706651 else {
707652 let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId))
708- if ((sha256Hash == ""))
709- then throw("No art hash matching for this address")
710- else {
711- let signID = getStringByKey(keySignID(addrToUse, artId))
712- if ((signID == ""))
713- then throw("No SIGN ID matching")
714- else {
715- let dataToDelete = [DeleteEntry(keyDate(addrToUse, artId)), DeleteEntry(keyName(addrToUse, artId)), DeleteEntry(keyDesc(addrToUse, artId)), DeleteEntry(keyDisplayCid(addrToUse, artId)), DeleteEntry(keyExportCid(addrToUse, artId)), DeleteEntry(keyExportHash(addrToUse, artId)), DeleteEntry(keyLicenceHash(addrToUse, artId)), DeleteEntry(keyLicenceCid(addrToUse, artId)), DeleteEntry(keyType(addrToUse, artId)), DeleteEntry(keyTags(addrToUse, artId)), DeleteEntry(keyMaxMint(addrToUse, artId)), DeleteEntry(keySignID(addrToUse, artId)), DeleteEntry(keyIssued(addrToUse, artId)), DeleteEntry(keyOnSale(addrToUse, artId)), DeleteEntry(keyFlag(addrToUse, artId)), DeleteEntry(keyPrice(addrToUse, artId)), DeleteEntry(keyAssetIdAccepted(addrToUse, artId)), DeleteEntry(keyOwnerByHash(sha256Hash)), DeleteEntry(keyidBySignid(addrToUse, signID)), DeleteEntry(keyTxidByHashOwner(sha256Hash, addrToUse)), DeleteEntry(keyEndSale(addrToUse, artId)), DeleteEntry(keyNote(addrToUse, artId)), DeleteEntry(keyCrawler(addrToUse, artId)), DeleteEntry(keyRoyalties(addrToUse, artId))]
716- if (!(isArtMinted(addrToUse, artId)))
717- then if (!(dappRunning))
718- then throw(maintenanceMSG)
719- else dataToDelete
720- else if (containsElement([chris, toString(this)], caller))
721- then dataToDelete
722- else throw("Art already minted, you cannot delete it")
723- }
724- }
653+ let signID = if ((sha256Hash == ""))
654+ then getStringByKey(keySignID(addrToUse, artId))
655+ else ""
656+ let signID_legacy = if ((signID == ""))
657+ then nil
658+ else [DeleteEntry(keyidBySignid(addrToUse, signID))]
659+ let dataToDelete = ([DeleteEntry(keyDate(addrToUse, artId)), DeleteEntry(keyName(addrToUse, artId)), DeleteEntry(keyDesc(addrToUse, artId)), DeleteEntry(keyDisplayCid(addrToUse, artId)), DeleteEntry(keyExportCid(addrToUse, artId)), DeleteEntry(keyExportHash(addrToUse, artId)), DeleteEntry(keyLicenceHash(addrToUse, artId)), DeleteEntry(keyLicenceCid(addrToUse, artId)), DeleteEntry(keyType(addrToUse, artId)), DeleteEntry(keyTags(addrToUse, artId)), DeleteEntry(keyMaxMint(addrToUse, artId)), DeleteEntry(keySignID(addrToUse, artId)), DeleteEntry(keyIssued(addrToUse, artId)), DeleteEntry(keyOnSale(addrToUse, artId)), DeleteEntry(keyFlag(addrToUse, artId)), DeleteEntry(keyPrice(addrToUse, artId)), DeleteEntry(keyAssetIdAccepted(addrToUse, artId)), DeleteEntry(keyOwnerByHash(sha256Hash)), DeleteEntry(keyEndSale(addrToUse, artId)), DeleteEntry(keyNote(addrToUse, artId)), DeleteEntry(keyCrawler(addrToUse, artId)), DeleteEntry(keyRoyalties(addrToUse, artId))] ++ signID_legacy)
660+ if (!(isArtMinted(addrToUse, artId)))
661+ then if (!(dappRunning))
662+ then throw(maintenanceMSG)
663+ else dataToDelete
664+ else if (containsElement([chris, toString(this)], caller))
665+ then dataToDelete
666+ else throw("Art already minted, you cannot delete it")
725667 }
726668 }
727669
729671
730672 @Callable(i)
731673 func sellArtwork (artId,price,maxMint,assetId,blockEnd,pubKey) = {
732- let $t02924829318 = idCallerDateSponsored(i, pubKey)
733- let id = $t02924829318._1
734- let caller = $t02924829318._2
735- let date = $t02924829318._3
736- let isSponsored = $t02924829318._4
674+ let $t02826128331 = idCallerDateSponsored(i, pubKey)
675+ let id = $t02826128331._1
676+ let caller = $t02826128331._2
677+ let date = $t02826128331._3
678+ let isSponsored = $t02826128331._4
737679 let artworkName = getStringByKey(keyName(caller, artId))
738680 if ((artworkName == ""))
739681 then throw("This art doesn't match your account")
757699 else height
758700 if (!(acceptedAssetIds(assetId)))
759701 then throw("Something went wrong!")
760- else if (!(validateMinSell(assetId, price)))
702+ else if (!(validateMinSell(price)))
761703 then throw("Something went wrong!")
762704 else {
763705 let checkUser = validateUser(caller)
807749
808750 @Callable(i)
809751 func setBid (artId,issuer) = {
810- let $t03170031740 = idCallerDate(i)
811- let id = $t03170031740._1
812- let caller = $t03170031740._2
813- let date = $t03170031740._3
814- let $t03174531781 = isPayment(i)
815- let payment = $t03174531781._1
816- let amount = $t03174531781._2
752+ let $t03070430744 = idCallerDate(i)
753+ let id = $t03070430744._1
754+ let caller = $t03070430744._2
755+ let date = $t03070430744._3
756+ let $t03074930785 = isPayment(i)
757+ let payment = $t03074930785._1
758+ let amount = $t03074930785._2
817759 let assetId = if (!(isDefined(payment.assetId)))
818760 then "WAVES"
819761 else toBase58String(value(payment.assetId))
826768 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
827769 if (!(acceptedAssetIds(assetId)))
828770 then throw("asset not accepted")
829- else if (!(validateMinSell(assetId, amount)))
771+ else if (!(validateMinSell(amount)))
830772 then throw("Wrong min sell")
831773 else {
832774 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
849791
850792 @Callable(i)
851793 func cancelBid (artId,issuer,bidId,bidOwner) = {
852- let $t03311433175 = idCallerDate(i)
853- let id = $t03311433175._1
854- let caller = $t03311433175._2
855- let date = $t03311433175._3
794+ let $t03210932170 = idCallerDate(i)
795+ let id = $t03210932170._1
796+ let caller = $t03210932170._2
797+ let date = $t03210932170._3
856798 if (if ((caller != bidOwner))
857799 then (caller != issuer)
858800 else false)
886828 else false)
887829 then (inv.feeAssetId == unit)
888830 else false)
889- then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[13])))
831+ then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[11])))
890832 else if (if (if (if ((inv.function == "updateArtwork"))
891833 then (inv.dApp == this)
892834 else false)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VERSION = "2.0.0"
55
66 func getStringByKey (key) = valueOrElse(getString(this, key), "")
77
88
99 let unitTest = false
1010
1111 let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee")))
1212
1313 let signDapp = value(addressFromString(getStringByKey("conf_signweb_dapp")))
1414
1515 let feeReceiver = getStringByKey("conf_fee_receiver")
1616
1717 let userDapp = if (unitTest)
1818 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
1919 else value(addressFromString(getStringByKey("conf_users_dapp")))
2020
2121 let whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp")))
2222
23-let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN"))
23+let usdtPPAssetId_str = getStringByKey("conf_accepted_asset_USDT_PP")
2424
25-let usdnAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDN"))
25+let artAssetId_str = getStringByKey("conf_accepted_asset_ART")
2626
27-let usdtAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDT"))
27+let usdcPPAssetId_str = getStringByKey("conf_accepted_asset_USDC_PP")
2828
29-let usdtPPAssetId = fromBase58String(getStringByKey("conf_accepted_asset_USDT_PP"))
29+let eastAssetId_str = getStringByKey("conf_accepted_asset_EAST")
30+
31+let puzzleAssetId_str = getStringByKey("conf_accepted_asset_PUZZLE")
32+
33+let ethPPAssetId_str = getStringByKey("conf_accepted_asset_ETH_PP")
34+
35+let wavesAssetId_str = "WAVES"
36+
37+let usdtPPAssetId = fromBase58String(usdtPPAssetId_str)
38+
39+let artAssetId = fromBase58String(artAssetId_str)
40+
41+let usdcPPAssetId = fromBase58String(usdcPPAssetId_str)
42+
43+let eastAssetId = fromBase58String(eastAssetId_str)
44+
45+let puzzleAssetId = fromBase58String(puzzleAssetId_str)
46+
47+let ethPPAssetId = fromBase58String(ethPPAssetId_str)
3048
3149 let wavesAssetId = base58''
50+
51+let all_accepted_assets = [usdtPPAssetId_str, artAssetId_str, usdcPPAssetId_str, eastAssetId_str, puzzleAssetId_str, wavesAssetId_str, ethPPAssetId_str]
3252
3353 let chris = getStringByKey("conf_admin_1")
3454
3555 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
3656
3757
3858 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
3959
4060
4161 func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
4262
4363
4464 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
4565
4666
4767 let commission_fee = 8
4868
4969 let defaultLicence = getStringByKey("conf_default_licence")
5070
5171 let defaultHashLicence = getStringByKey("conf_default_licence_hash")
5272
5373 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
5474
5575 let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
5676
5777 let userSuspended = "SUSPENDED"
5878
5979 let userRemoved = "REMOVED"
6080
6181 let userUnregistered = "UNREGISTERED"
6282
6383 let userAllowed = "ALLOWED"
6484
65-let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId)))
85+let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(artAssetId)))
6686
6787 func getArtworkRoyalties (key) = valueOrElse(getInteger(this, key), 1000)
68-
69-
70-func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) {
71- case a: String =>
72- if (contains(a, sha256Hash))
73- then true
74- else false
75- case _ =>
76- false
77-}
7888
7989
8090 func validateCID (cid) = if (contains(cid, "/"))
8191 then if (if ((76 > size(cid)))
8292 then (size(split(cid, "/")[0]) == 59)
8393 else false)
8494 then (16 > size(split(cid, "/")[1]))
8595 else false
8696 else false
8797
8898
8999 func validateHash (hash) = (size(hash) == 64)
90100
91101
92102 func keyUserStatus (caller) = ("user_status_" + caller)
93103
94104
95105 func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller)
96106
97107
98108 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
99109
100110
101111 func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller)
102112
103113
104114 func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller)
105115
106116
107117 func keyExportHash (caller,artId) = ((("art_export_hash_" + artId) + "_") + caller)
108118
109119
110120 func keyExportCid (caller,artId) = ((("art_export_cid_" + artId) + "_") + caller)
111121
112122
113123 func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller)
114124
115125
116126 func keySignID (caller,artId) = ((("art_signid_" + artId) + "_") + caller)
117127
118128
119129 func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller)
120130
121131
122132 func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller)
123133
124134
125135 func keyLicenceHash (caller,artId) = ((("art_licence_hash_" + artId) + "_") + caller)
126136
127137
128138 func keyLicenceCid (caller,artId) = ((("art_licence_cid_" + artId) + "_") + caller)
129139
130140
131141 func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller)
132142
133143
134144 func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller)
135145
136146
137147 func keyNote (caller,artId) = ((("art_note_" + artId) + "_") + caller)
138148
139149
140150 func keyCrawler (caller,artId) = ((("art_crawler_cid_" + artId) + "_") + caller)
141151
142152
143153 func keyRoyalties (caller,artId) = ((("art_royalties_" + artId) + "_") + caller)
144154
145155
146156 func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller)
147157
148158
149159 func keyEndSale (caller,artId) = ((("art_endsale_" + artId) + "_") + caller)
150160
151161
152162 func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller)
153163
154164
155165 func keyFlag (caller,artId) = ((("art_flag_" + artId) + "_") + caller)
156166
157167
158168 func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
159169
160170
161171 func keyPrimaryShareAgent (artistAddr) = ("artist_agent_primary_" + artistAddr)
162172
163173
164174 func keyArtistPublicAgentAddr (artistAddr) = ("artist_public_agent_" + artistAddr)
165175
166176
167177 func keyPrimarySharePublicAgent (artistAddr) = ("artist_public_agent_primary_" + artistAddr)
168178
169179
170180 func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller)
171181
172182
173183 func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash)
174184
175185
176186 func keyidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller)
177187
178188
179-func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller)))))
180-
181-
182189 func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay)))
183190 then throw("Wrong Display CID")
184191 else if (!(validateCID(cidExport)))
185192 then throw("Wrong Export CID")
186193 else if (if ((cidLicence != ""))
187194 then !(validateCID(cidLicence))
188195 else false)
189196 then throw("Wrong Licence CID")
190197 else true
191198
192199
193200 func validateAllHash (sha256Export,sha256Licence) = if (!(validateHash(sha256Export)))
194201 then throw("Export Hash 64 char. max")
195202 else if (!(validateHash(sha256Licence)))
196203 then throw("Licence Hash 64 char. max")
197204 else true
198205
199206
200207 func validateString (str,max) = if ((size(str) == 0))
201208 then throw("Field cannot be is empty")
202209 else if ((size(str) > max))
203210 then throw((str + " is too long"))
204211 else true
205212
206213
207214 func validateUser (caller) = {
208215 let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
209216 if (if ((userStatus == userUnregistered))
210217 then true
211218 else (userStatus == userAllowed))
212219 then "Register this account first with \"Account\" tab"
213220 else if ((userStatus == userSuspended))
214221 then "Account suspended"
215222 else if ((userStatus == userRemoved))
216223 then "Account removed"
217224 else ""
218225 }
219226
220227
221228 func setLIcence (cidLicence,sha256Licence) = {
222229 let cid = if ((size(cidLicence) == 0))
223230 then defaultLicence
224231 else cidLicence
225232 let hash = if ((size(sha256Licence) == 0))
226233 then defaultHashLicence
227234 else sha256Licence
228235 $Tuple2(cid, hash)
229236 }
230237
231238
232239 func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags,royalties) = {
233240 let checkUser = validateUser(caller)
234241 if ((checkUser != ""))
235242 then throw(checkUser)
236243 else if ((size(cidDisplay) == 0))
237244 then throw("Display CID cannot be empty")
238245 else if (!(validateAllCID(cidDisplay, cidExport, licenceCID)))
239246 then throw("Problem with CID")
240247 else if (!(validateAllHash(sha256Export, licenceHash)))
241248 then throw("Problem with Hashes")
242249 else if (!(validateString(name, 100)))
243250 then throw("100 Char. max name")
244251 else if (!(validateString(description, 1000)))
245252 then throw("1000 Char. max description")
246253 else if (if ((0 > royalties))
247254 then true
248255 else (royalties > 1000))
249256 then throw("Royalties cannot be less than 0% or higher than 10%")
250257 else if ((size(split(tags, ",")) > 5))
251258 then throw("5 tags max.")
252259 else ""
253260 }
254261
255262
256263 func isPayment (i) = if ((size(i.payments) == 0))
257264 then throw("No payment attached")
258265 else {
259266 let payment = value(i.payments[0])
260267 let amount = value(payment.amount)
261268 $Tuple2(payment, amount)
262269 }
263270
264271
265272 func validatePayment (i) = {
266- let $t093529388 = isPayment(i)
267- let payment = $t093529388._1
268- let amount = $t093529388._2
273+ let $t01001410050 = isPayment(i)
274+ let payment = $t01001410050._1
275+ let amount = $t01001410050._2
269276 let assetId = if (if (isDefined(payment.assetId))
270- then (payment.assetId == signAssetId)
277+ then (payment.assetId == artAssetId)
271278 else false)
272279 then payment.assetId
273280 else throw("Only SIGN token accepted as transaction fee")
274281 if ((amount != currentCertificationPrice))
275282 then throw(("Payment amount should be " + toString(currentCertificationPrice)))
276283 else $Tuple2(amount, assetId)
277284 }
278285
279286
280287 func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) {
281288 case b: Int =>
282289 if ((b != 0))
283290 then true
284291 else false
285292 case _ =>
286293 false
287294 }
288295
289296
290297 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
291- let $t0997610012 = isPayment(i)
292- let payment = $t0997610012._1
293- let amount = $t0997610012._2
298+ let $t01063710673 = isPayment(i)
299+ let payment = $t01063710673._1
300+ let amount = $t01063710673._2
294301 let assetId = if (!(isDefined(payment.assetId)))
295302 then unit
296303 else if (if ((size(priceAssetId) > 0))
297304 then (toBase58String(value(payment.assetId)) == priceAssetId)
298305 else false)
299306 then payment.assetId
300307 else throw("Wrong asset id")
301308 if (if ((assetId == unit))
302309 then (priceAssetId != "")
303310 else false)
304311 then throw("Wrong asset id")
305312 else if ((artworkPrice != amount))
306313 then throw("Payment don't match")
307314 else $Tuple2(amount, assetId)
308315 }
309316
310317
311-func acceptedAssetIds (assetId) = if (if (if (if (if (if ((assetId != toBase58String(signAssetId)))
312- then (assetId != toBase58String(wavesAssetId))
313- else false)
314- then (assetId != "WAVES")
315- else false)
316- then (assetId != toBase58String(usdnAssetId))
317- else false)
318- then (assetId != toBase58String(usdtAssetId))
319- else false)
320- then (assetId != toBase58String(usdtPPAssetId))
321- else false)
322- then throw("Only SIGN, USDN,USDT or WAVES accepted")
318+func acceptedAssetIds (assetId) = if (!(containsElement(all_accepted_assets, assetId)))
319+ then throw("Only $ART, USDT-PP, USDC-PP, EAST, PUZZLE, ETH or WAVES accepted")
323320 else true
324321
325322
326-func validateMinSell (assetId,price) = {
327- let minSellWaves = if (unitTest)
328- then 10
329- else getIntegerByKeyFromOracle("waves_min_sell")
330- let minSellUsdn = 1000000
331- let minSellSign = if (unitTest)
332- then 1
333- else (currentCertificationPrice * 2)
334- if (if (if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
335- then (minSellUsdn > price)
336- else false)
337- then (price != 0)
338- else false)
339- then true
340- else if (if ((assetId == toBase58String(usdtAssetId)))
341- then (minSellUsdn > price)
342- else false)
343- then (price != 0)
344- else false)
345- then true
346- else if (if ((assetId == toBase58String(usdtPPAssetId)))
347- then (minSellUsdn > price)
348- else false)
349- then (price != 0)
350- else false)
351- then true
352- else if (if ((assetId == toBase58String(signAssetId)))
353- then (minSellSign > price)
354- else false)
355- then (price != 0)
356- else false)
357- then true
358- else if (if (if ((assetId == toBase58String(wavesAssetId)))
359- then true
360- else (assetId == "WAVES"))
361- then (minSellWaves > price)
362- else false)
363- then (price != 0)
364- else false)
365- then throw("Wrong minimum sell price")
366- else true
367- }
323+func validateMinSell (price) = if ((0 >= price))
324+ then throw("Wrong minimum sell price")
325+ else true
368326
369327
370328 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
371329 then unit
372330 else fromBase58String(assetId)
373331
374332
375333 func getPriceAssetIdFromBid (bidDataKey) = {
376334 let bidData = getStringByKey((bidDataKey + "_OPEN"))
377335 if ((bidData == ""))
378336 then throw("Bid not found")
379337 else {
380338 let bidDataArr = split(bidData, "_")
381339 let bidAmount = parseIntValue(bidDataArr[1])
382340 let bidAssetId = getBidAssetId(bidDataArr[0])
383341 if ((0 >= bidAmount))
384342 then throw("Wrong amount")
385343 else $Tuple2(bidAmount, bidAssetId)
386344 }
387345 }
388346
389347
390348 func idCallerDateSponsored (i,pubKey) = if (!(dappRunning))
391349 then throw(maintenanceMSG)
392350 else {
393351 let isSponsored = if ((pubKey != ""))
394352 then valueOrElse(checkWhitelist((toString(addressFromPublicKey(fromBase58String(pubKey))) + "_free_txs")), 0)
395353 else 0
396354 let caller = if (if ((toBase58String(i.caller.bytes) == toString(this)))
397355 then (isSponsored > 0)
398356 else false)
399357 then toString(addressFromPublicKey(fromBase58String(pubKey)))
400358 else toBase58String(i.caller.bytes)
401359 let get_sponsored_waves = if (if ((pubKey != ""))
402360 then (isSponsored > 0)
403361 else false)
404362 then invoke(whitelistDapp, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(pubKey)))], nil)
405363 else unit
406364 if ((get_sponsored_waves == get_sponsored_waves))
407365 then $Tuple4(toBase58String(i.transactionId), caller, lastBlock.timestamp, (isSponsored > 0))
408366 else throw("Strict value is not equal to itself.")
409367 }
410368
411369
412370 func idCallerDate (i) = if (!(dappRunning))
413371 then throw(maintenanceMSG)
414372 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
415373
416374
375+func getBalance (assetId) = match assetId {
376+ case b: ByteVector =>
377+ assetBalance(this, b)
378+ case _ =>
379+ wavesBalance(this).available
380+}
381+
382+
417383 func buyMint (i,artId,issuer,bidId,bidOwner,pubKey) = {
418- let $t01335013439 = idCallerDateSponsored(i, pubKey)
419- let id = $t01335013439._1
420- let caller = $t01335013439._2
421- let date = $t01335013439._3
422- let isSponsored = $t01335013439._4
384+ let $t01327813367 = idCallerDateSponsored(i, pubKey)
385+ let id = $t01327813367._1
386+ let caller = $t01327813367._2
387+ let date = $t01327813367._3
388+ let isSponsored = $t01327813367._4
423389 let isBid = if (if (if ((caller == issuer))
424390 then (bidOwner != "")
425391 else false)
426392 then (bidId != "")
427393 else false)
428394 then true
429395 else false
430396 if (if (isBid)
431397 then (caller != issuer)
432398 else false)
433399 then throw("You cannot do this action")
434400 else {
435401 let blockEnd = getIntegerByKey(keyEndSale(caller, artId))
436402 if (if (if ((blockEnd != 0))
437403 then (height >= blockEnd)
438404 else false)
439405 then !(isBid)
440406 else false)
441407 then throw("Sale ended.")
442408 else {
443409 let callerIsIssuer = (caller == issuer)
444410 let totalNFT = getIntegerByKey("total_nft_issued")
445- let signID = getStringByKey(keySignID(issuer, artId))
446411 let artworkName = getStringByKey(keyName(issuer, artId))
447412 if ((artworkName == ""))
448413 then throw("Art doesn't exist")
449414 else {
450415 let isOnSale = getBooleanByKey(keyOnSale(issuer, artId))
451416 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
452417 let artworkPrice = if (callerIsIssuer)
453418 then (currentCertificationPrice * 2)
454419 else getIntegerByKey(keyPrice(issuer, artId))
455420 let priceAssetId = if (callerIsIssuer)
456- then toBase58String(signAssetId)
421+ then toBase58String(artAssetId)
457422 else getStringByKey(keyAssetIdAccepted(issuer, artId))
458423 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
459424 if (if (if (!(isBid))
460425 then !(callerIsIssuer)
461426 else false)
462427 then if (if ((0 >= artworkPrice))
463428 then true
464429 else !(isOnSale))
465430 then true
466431 else (0 >= maxCanSell)
467432 else false)
468433 then throw("Art not for sale")
469434 else if (if (if (!(isBid))
470435 then callerIsIssuer
471436 else false)
472437 then (0 >= maxCanSell)
473438 else false)
474439 then throw("Max issuable not set")
475440 else {
476441 let checkUser = validateUser(issuer)
477442 if (if (isBid)
478443 then (checkUser != "")
479444 else false)
480445 then throw(checkUser)
481446 else {
482447 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
483- let $t01503715229 = if (isBid)
448+ let $t01496515157 = if (isBid)
484449 then getPriceAssetIdFromBid(bidDataKey)
485450 else validatePriceAssetId(i, priceAssetId, artworkPrice)
486- let amount = $t01503715229._1
487- let assetId = $t01503715229._2
451+ let amount = $t01496515157._1
452+ let assetId = $t01496515157._2
488453 let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver)
489454 let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShareAgent(issuer)), 0)
490455 let publicAgent = valueOrElse(getString(userDapp, keyArtistPublicAgentAddr(issuer)), feeReceiver)
491456 let publicAgentShare = valueOrElse(getInteger(userDapp, keyPrimarySharePublicAgent(issuer)), 0)
492457 let isWhitelisted = checkWhitelist(issuer)
493458 let amountForSign = fraction(amount, commission_fee, 100)
494459 let amountForAgent = if (if (if ((agent != feeReceiver))
495460 then (agentShare > 0)
496461 else false)
497462 then (height > isWhitelisted)
498463 else false)
499464 then fraction(amount, agentShare, 10000)
500465 else 0
501466 let amountForPublicAgent = if (if (if ((publicAgent != feeReceiver))
502467 then (publicAgentShare > 0)
503468 else false)
504469 then (height > isWhitelisted)
505470 else false)
506471 then fraction(amount, publicAgentShare, 10000)
507472 else 0
508473 let amountForCreator = (amount - amountForSign)
509474 if ((amountSold == maxCanSell))
510475 then throw("Art sold out")
511476 else {
512477 let newAmountSold = (amountSold + 1)
513- let issueMeta = ((((((((((("Creator: " + issuer) + ",
478+ let issueMeta = ((((((((("Creator: " + issuer) + ",
514479 ArtID: ") + artId) + ",
515- SignID: ") + signID) + ",
516480 Artwork name: ") + artworkName) + ",
517481 Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
518482 let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
519483 let idNFT = calculateAssetId(issueNFT)
520484 let sellStatus = if (if ((newAmountSold == maxCanSell))
521485 then true
522486 else !(isOnSale))
523487 then false
524488 else true
525489 let receiveNFT = if (if (if ((caller == issuer))
526490 then (bidOwner != "")
527491 else false)
528492 then (bidId != "")
529493 else false)
530494 then addressFromStringValue(bidOwner)
531495 else i.caller
532496 let assetIdBid = if (!(isDefined(assetId)))
533497 then "WAVES"
534498 else toBase58String(value(assetId))
535499 let bidData = getStringByKey((bidDataKey + "_OPEN"))
536500 let bidDelOld = DeleteEntry((bidDataKey + "_OPEN"))
537501 let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date)))
538502 let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)
539503 let soldValue = if (!(isBid))
540504 then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))
541505 else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT))
542506 let soldData = StringEntry(soldKey, soldValue)
543507 let commissionsWithAgent = if ((amountForAgent != 0))
544508 then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
545509 else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
546510 let commissionsWithPublicAgent = if ((amountForPublicAgent != 0))
547511 then [ScriptTransfer(Address(fromBase58String(publicAgent)), amountForPublicAgent, assetId), ScriptTransfer(Address(fromBase58String(issuer)), (amountForCreator - amountForPublicAgent), assetId)]
548512 else [ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId)]
549513 let txToCaller = if (isSponsored)
550514 then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
551515 else nil
552516 let buyRes = ((([IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), IntegerEntry(keyEndSale(issuer, artId), 0), BooleanEntry(keyOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(receiveNFT, 1, idNFT)] ++ commissionsWithAgent) ++ commissionsWithPublicAgent) ++ txToCaller)
553517 if (isBid)
554518 then [soldData, bidUpdate, bidDelOld] :: buyRes
555519 else soldData :: buyRes
556520 }
557521 }
558522 }
559523 }
560524 }
561525 }
562526 }
563527
564528
565529 func asString (bv) = match bv {
566530 case bv0: String =>
567531 bv0
568532 case _ =>
569533 throw("Sponsored Public Key String expected")
570534 }
571535
572536
573537 @Callable(invoke)
574538 func setConf (key,val) = {
575539 let caller = toString(invoke.caller)
576540 if (containsElement([chris, toString(this)], caller))
577541 then if (contains(key, "conf_"))
578542 then [StringEntry(key, val)]
579543 else throw("Entries starting with conf_ only")
580544 else throw("You are not allowed to change this")
581545 }
582546
583547
584548
585549 @Callable(i)
586-func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = {
587- let $t02047220545 = idCallerDateSponsored(i, pubKey)
588- let artId = $t02047220545._1
589- let caller = $t02047220545._2
590- let date = $t02047220545._3
591- let isSponsored = $t02047220545._4
592- if (!(validateHash(sha256Hash)))
593- then throw("Hash should be 64 characters maximum")
550+func addArtwork (name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = {
551+ let $t02074820821 = idCallerDateSponsored(i, pubKey)
552+ let artId = $t02074820821._1
553+ let caller = $t02074820821._2
554+ let date = $t02074820821._3
555+ let isSponsored = $t02074820821._4
556+ let $t02083120900 = setLIcence(cidLicence, sha256Licence)
557+ let licenceCID = $t02083120900._1
558+ let licenceHash = $t02083120900._2
559+ let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties)
560+ if ((validateArtwork != ""))
561+ then throw("Something went wrong!")
594562 else {
595- let $t02064620715 = setLIcence(cidLicence, sha256Licence)
596- let licenceCID = $t02064620715._1
597- let licenceHash = $t02064620715._2
598- let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties)
599- if ((validateArtwork != ""))
600- then throw("Something went wrong!")
563+ let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0)
564+ let $t02119921287 = if (whitelisted_drop)
565+ then $Tuple2(0, artAssetId)
566+ else validatePayment(i)
567+ let amount = $t02119921287._1
568+ let assetId = $t02119921287._2
569+ if (!(isDefined(amount)))
570+ then throw("Something went wrong")
601571 else {
602- let whitelisted_drop = (checkWhitelist((caller + "_free_drops")) > 0)
603- let $t02101421098 = if (whitelisted_drop)
604- then $Tuple2(0, signID)
605- else validatePayment(i)
606- let amount = $t02101421098._1
607- let assetId = $t02101421098._2
608- if (!(isDefined(amount)))
609- then throw("Something went wrong")
610- else {
611- let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller))
612- if ((entryExist != ""))
613- then throw("You already added it")
614- else {
615- let hashExist = getStringByKey(keyOwnerByHash(sha256Hash))
616- if ((hashExist != ""))
617- then throw("Hash already registered")
618- else {
619- let isSignCertified = checkSignCertificate(signID, caller, sha256Hash)
620- if (!(isSignCertified))
621- then throw("Sign Certificate not found for this address.")
622- else {
623- let decrease_whitelist_drop = if (whitelisted_drop)
624- then invoke(whitelistDapp, "useFreeDrop", [caller], nil)
625- else unit
626- if ((decrease_whitelist_drop == decrease_whitelist_drop))
627- then {
628- let txToCaller = if (isSponsored)
629- then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
630- else nil
631- ([StringEntry(keyOwnerByHash(sha256Hash), caller), StringEntry(keyTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyExportCid(caller, artId), cidExport), StringEntry(keyExportHash(caller, artId), sha256Export), StringEntry(keyLicenceHash(caller, artId), licenceHash), StringEntry(keyLicenceCid(caller, artId), licenceCID), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), StringEntry(keySignID(caller, artId), signID), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyidBySignid(caller, signID), artId), StringEntry(keyHashByTxidAddr(caller, artId), sha256Hash), StringEntry(keyCrawler(caller, artId), crawler), IntegerEntry(keyRoyalties(caller, artId), royalties), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, signAssetId)] ++ txToCaller)
632- }
633- else throw("Strict value is not equal to itself.")
634- }
635- }
636- }
572+ let decrease_whitelist_drop = if (whitelisted_drop)
573+ then invoke(whitelistDapp, "useFreeDrop", [caller], nil)
574+ else unit
575+ if ((decrease_whitelist_drop == decrease_whitelist_drop))
576+ then {
577+ let txToCaller = if (isSponsored)
578+ then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
579+ else nil
580+ ([IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyExportCid(caller, artId), cidExport), StringEntry(keyExportHash(caller, artId), sha256Export), StringEntry(keyLicenceHash(caller, artId), licenceHash), StringEntry(keyLicenceCid(caller, artId), licenceCID), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyCrawler(caller, artId), crawler), IntegerEntry(keyRoyalties(caller, artId), royalties), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, artAssetId)] ++ txToCaller)
637581 }
582+ else throw("Strict value is not equal to itself.")
638583 }
639584 }
640585 }
641586
642587
643588
644589 @Callable(i)
645590 func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler,royalties,pubKey) = if (!(dappRunning))
646591 then throw(maintenanceMSG)
647592 else {
648- let $t02413224202 = idCallerDateSponsored(i, pubKey)
649- let id = $t02413224202._1
650- let caller = $t02413224202._2
651- let date = $t02413224202._3
652- let isSponsored = $t02413224202._4
653- let $t02421224281 = setLIcence(cidLicence, sha256Licence)
654- let licenceCID = $t02421224281._1
655- let licenceHash = $t02421224281._2
593+ let $t02320223272 = idCallerDateSponsored(i, pubKey)
594+ let id = $t02320223272._1
595+ let caller = $t02320223272._2
596+ let date = $t02320223272._3
597+ let isSponsored = $t02320223272._4
598+ let $t02328223351 = setLIcence(cidLicence, sha256Licence)
599+ let licenceCID = $t02328223351._1
600+ let licenceHash = $t02328223351._2
656601 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, royalties)
657602 if ((validateArtwork != ""))
658603 then throw("Something went wrong!")
659604 else {
660605 let entryExist = getStringByKey(keyName(caller, txid))
661606 if ((entryExist == ""))
662607 then throw("Entry not found")
663608 else {
664609 let flag = getStringByKey(keyFlag(caller, txid))
665610 if ((flag == "ILLEGAL"))
666611 then throw("Cannot update ILLEGAL artwork")
667612 else if (!(isArtMinted(caller, txid)))
668613 then {
669614 let txToCaller = if (isSponsored)
670615 then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
671616 else nil
672617 ([StringEntry(keyName(caller, txid), name), StringEntry(keyDesc(caller, txid), description), StringEntry(keyDisplayCid(caller, txid), cidDisplay), StringEntry(keyExportCid(caller, txid), cidExport), StringEntry(keyExportHash(caller, txid), sha256Export), StringEntry(keyLicenceCid(caller, txid), licenceCID), StringEntry(keyLicenceHash(caller, txid), licenceHash), StringEntry(keyTags(caller, txid), tags), StringEntry(keyType(caller, txid), type), StringEntry(keyCrawler(caller, txid), crawler), IntegerEntry(keyRoyalties(caller, txid), royalties)] ++ txToCaller)
673618 }
674619 else throw("Already minted")
675620 }
676621 }
677622 }
678623
679624
680625
681626 @Callable(i)
682627 func flagArtwork (artId,addr,flag,note) = {
683- let $t02590825942 = idCallerDate(i)
684- let id = $t02590825942._1
685- let caller = $t02590825942._2
628+ let $t02497825012 = idCallerDate(i)
629+ let id = $t02497825012._1
630+ let caller = $t02497825012._2
686631 if (containsElement([chris, toString(this)], caller))
687632 then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
688633 then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)]
689634 else throw(("Unknow status " + flag))
690635 else throw("You are not allowed")
691636 }
692637
693638
694639
695640 @Callable(i)
696641 func deleteArtwork (artId,addr) = {
697- let $t02637826412 = idCallerDate(i)
698- let id = $t02637826412._1
699- let caller = $t02637826412._2
642+ let $t02544825482 = idCallerDate(i)
643+ let id = $t02544825482._1
644+ let caller = $t02544825482._2
700645 let addrToUse = if (containsElement([chris, toString(this)], caller))
701646 then addr
702647 else caller
703648 let entryExist = valueOrErrorMessage(getStringByKey(keyName(addrToUse, artId)), "No art matching for this address")
704649 if ((entryExist == ""))
705650 then throw("No art matching for this address")
706651 else {
707652 let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId))
708- if ((sha256Hash == ""))
709- then throw("No art hash matching for this address")
710- else {
711- let signID = getStringByKey(keySignID(addrToUse, artId))
712- if ((signID == ""))
713- then throw("No SIGN ID matching")
714- else {
715- let dataToDelete = [DeleteEntry(keyDate(addrToUse, artId)), DeleteEntry(keyName(addrToUse, artId)), DeleteEntry(keyDesc(addrToUse, artId)), DeleteEntry(keyDisplayCid(addrToUse, artId)), DeleteEntry(keyExportCid(addrToUse, artId)), DeleteEntry(keyExportHash(addrToUse, artId)), DeleteEntry(keyLicenceHash(addrToUse, artId)), DeleteEntry(keyLicenceCid(addrToUse, artId)), DeleteEntry(keyType(addrToUse, artId)), DeleteEntry(keyTags(addrToUse, artId)), DeleteEntry(keyMaxMint(addrToUse, artId)), DeleteEntry(keySignID(addrToUse, artId)), DeleteEntry(keyIssued(addrToUse, artId)), DeleteEntry(keyOnSale(addrToUse, artId)), DeleteEntry(keyFlag(addrToUse, artId)), DeleteEntry(keyPrice(addrToUse, artId)), DeleteEntry(keyAssetIdAccepted(addrToUse, artId)), DeleteEntry(keyOwnerByHash(sha256Hash)), DeleteEntry(keyidBySignid(addrToUse, signID)), DeleteEntry(keyTxidByHashOwner(sha256Hash, addrToUse)), DeleteEntry(keyEndSale(addrToUse, artId)), DeleteEntry(keyNote(addrToUse, artId)), DeleteEntry(keyCrawler(addrToUse, artId)), DeleteEntry(keyRoyalties(addrToUse, artId))]
716- if (!(isArtMinted(addrToUse, artId)))
717- then if (!(dappRunning))
718- then throw(maintenanceMSG)
719- else dataToDelete
720- else if (containsElement([chris, toString(this)], caller))
721- then dataToDelete
722- else throw("Art already minted, you cannot delete it")
723- }
724- }
653+ let signID = if ((sha256Hash == ""))
654+ then getStringByKey(keySignID(addrToUse, artId))
655+ else ""
656+ let signID_legacy = if ((signID == ""))
657+ then nil
658+ else [DeleteEntry(keyidBySignid(addrToUse, signID))]
659+ let dataToDelete = ([DeleteEntry(keyDate(addrToUse, artId)), DeleteEntry(keyName(addrToUse, artId)), DeleteEntry(keyDesc(addrToUse, artId)), DeleteEntry(keyDisplayCid(addrToUse, artId)), DeleteEntry(keyExportCid(addrToUse, artId)), DeleteEntry(keyExportHash(addrToUse, artId)), DeleteEntry(keyLicenceHash(addrToUse, artId)), DeleteEntry(keyLicenceCid(addrToUse, artId)), DeleteEntry(keyType(addrToUse, artId)), DeleteEntry(keyTags(addrToUse, artId)), DeleteEntry(keyMaxMint(addrToUse, artId)), DeleteEntry(keySignID(addrToUse, artId)), DeleteEntry(keyIssued(addrToUse, artId)), DeleteEntry(keyOnSale(addrToUse, artId)), DeleteEntry(keyFlag(addrToUse, artId)), DeleteEntry(keyPrice(addrToUse, artId)), DeleteEntry(keyAssetIdAccepted(addrToUse, artId)), DeleteEntry(keyOwnerByHash(sha256Hash)), DeleteEntry(keyEndSale(addrToUse, artId)), DeleteEntry(keyNote(addrToUse, artId)), DeleteEntry(keyCrawler(addrToUse, artId)), DeleteEntry(keyRoyalties(addrToUse, artId))] ++ signID_legacy)
660+ if (!(isArtMinted(addrToUse, artId)))
661+ then if (!(dappRunning))
662+ then throw(maintenanceMSG)
663+ else dataToDelete
664+ else if (containsElement([chris, toString(this)], caller))
665+ then dataToDelete
666+ else throw("Art already minted, you cannot delete it")
725667 }
726668 }
727669
728670
729671
730672 @Callable(i)
731673 func sellArtwork (artId,price,maxMint,assetId,blockEnd,pubKey) = {
732- let $t02924829318 = idCallerDateSponsored(i, pubKey)
733- let id = $t02924829318._1
734- let caller = $t02924829318._2
735- let date = $t02924829318._3
736- let isSponsored = $t02924829318._4
674+ let $t02826128331 = idCallerDateSponsored(i, pubKey)
675+ let id = $t02826128331._1
676+ let caller = $t02826128331._2
677+ let date = $t02826128331._3
678+ let isSponsored = $t02826128331._4
737679 let artworkName = getStringByKey(keyName(caller, artId))
738680 if ((artworkName == ""))
739681 then throw("This art doesn't match your account")
740682 else {
741683 let flag = getStringByKey(keyFlag(caller, artId))
742684 if (containsElement(["CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
743685 then throw("Flagged artwork")
744686 else {
745687 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
746688 if ((0 > blockEnd))
747689 then throw("Negative end")
748690 else if (if ((blockEnd > 0))
749691 then if ((maxMint != 1))
750692 then true
751693 else (price != 0)
752694 else false)
753695 then throw("Timed offer only allowed for unique edition and offer only")
754696 else {
755697 let baseHeight = if ((blockEnd == 0))
756698 then 0
757699 else height
758700 if (!(acceptedAssetIds(assetId)))
759701 then throw("Something went wrong!")
760- else if (!(validateMinSell(assetId, price)))
702+ else if (!(validateMinSell(price)))
761703 then throw("Something went wrong!")
762704 else {
763705 let checkUser = validateUser(caller)
764706 if ((checkUser != ""))
765707 then throw(checkUser)
766708 else {
767709 let amountSold = getIntegerByKey(keyIssued(caller, artId))
768710 let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId))
769711 if ((maxMint > 100))
770712 then throw("100 editions max per artwork")
771713 else if (if ((amountSold != 0))
772714 then (amountSold == maxCanSell)
773715 else false)
774716 then throw("Max edition reached.")
775717 else if (if ((amountSold > 0))
776718 then (maxCanSell != maxMint)
777719 else false)
778720 then throw("Cannot change maximum issuable anymore")
779721 else if (if ((bidNbr > 0))
780722 then (maxCanSell != maxMint)
781723 else false)
782724 then throw("Cannot change maximum issuable with active orders")
783725 else {
784726 let sellStatus = if (if ((price > 0))
785727 then (maxMint > 0)
786728 else false)
787729 then true
788730 else false
789731 let txToCaller = if (isSponsored)
790732 then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
791733 else nil
792734 ([BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), StringEntry(keyAssetIdAccepted(caller, artId), assetId), IntegerEntry(keyEndSale(caller, artId), (baseHeight + blockEnd))] ++ txToCaller)
793735 }
794736 }
795737 }
796738 }
797739 }
798740 }
799741 }
800742
801743
802744
803745 @Callable(i)
804746 func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "", "")
805747
806748
807749
808750 @Callable(i)
809751 func setBid (artId,issuer) = {
810- let $t03170031740 = idCallerDate(i)
811- let id = $t03170031740._1
812- let caller = $t03170031740._2
813- let date = $t03170031740._3
814- let $t03174531781 = isPayment(i)
815- let payment = $t03174531781._1
816- let amount = $t03174531781._2
752+ let $t03070430744 = idCallerDate(i)
753+ let id = $t03070430744._1
754+ let caller = $t03070430744._2
755+ let date = $t03070430744._3
756+ let $t03074930785 = isPayment(i)
757+ let payment = $t03074930785._1
758+ let amount = $t03074930785._2
817759 let assetId = if (!(isDefined(payment.assetId)))
818760 then "WAVES"
819761 else toBase58String(value(payment.assetId))
820762 let blockEnd = getIntegerByKey(keyEndSale(issuer, artId))
821763 if (if ((blockEnd != 0))
822764 then (height >= blockEnd)
823765 else false)
824766 then throw("Sale ended.")
825767 else {
826768 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
827769 if (!(acceptedAssetIds(assetId)))
828770 then throw("asset not accepted")
829- else if (!(validateMinSell(assetId, amount)))
771+ else if (!(validateMinSell(amount)))
830772 then throw("Wrong min sell")
831773 else {
832774 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
833775 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
834776 if ((0 >= maxCanSell))
835777 then throw("No max edition set for this artwork")
836778 else if ((amountSold >= maxCanSell))
837779 then throw("Sold out, you cannot bid")
838780 else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))]
839781 }
840782 }
841783 }
842784
843785
844786
845787 @Callable(i)
846788 func acceptBid (artId,issuer,bidId,bidOwner,pubKey) = buyMint(i, artId, issuer, bidId, bidOwner, pubKey)
847789
848790
849791
850792 @Callable(i)
851793 func cancelBid (artId,issuer,bidId,bidOwner) = {
852- let $t03311433175 = idCallerDate(i)
853- let id = $t03311433175._1
854- let caller = $t03311433175._2
855- let date = $t03311433175._3
794+ let $t03210932170 = idCallerDate(i)
795+ let id = $t03210932170._1
796+ let caller = $t03210932170._2
797+ let date = $t03210932170._3
856798 if (if ((caller != bidOwner))
857799 then (caller != issuer)
858800 else false)
859801 then throw("You cannot do this action")
860802 else {
861803 let returnMoneyTo = if ((caller == issuer))
862804 then bidOwner
863805 else caller
864806 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
865807 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
866808 let bidData = getStringByKey((bidDataKey + "_OPEN"))
867809 if ((bidData == ""))
868810 then throw("Bid not found")
869811 else {
870812 let bidDataArr = split(bidData, "_")
871813 let assetId = getBidAssetId(bidDataArr[0])
872814 let bidStatus = "CANCELED"
873815 [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(returnMoneyTo)), parseIntValue(bidDataArr[1]), assetId)]
874816 }
875817 }
876818 }
877819
878820
879821 @Verifier(tx)
880822 func verifier () = match tx {
881823 case inv: InvokeScriptTransaction =>
882824 if (if (if (if ((inv.function == "addArtwork"))
883825 then (inv.dApp == this)
884826 else false)
885827 then (inv.fee == 500000)
886828 else false)
887829 then (inv.feeAssetId == unit)
888830 else false)
889- then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[13])))
831+ then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[11])))
890832 else if (if (if (if ((inv.function == "updateArtwork"))
891833 then (inv.dApp == this)
892834 else false)
893835 then (inv.fee == 500000)
894836 else false)
895837 then (inv.feeAssetId == unit)
896838 else false)
897839 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[12])))
898840 else if (if (if (if ((inv.function == "sellArtwork"))
899841 then (inv.dApp == this)
900842 else false)
901843 then (inv.fee == 500000)
902844 else false)
903845 then (inv.feeAssetId == unit)
904846 else false)
905847 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5])))
906848 else if (if (if (if ((inv.function == "acceptBid"))
907849 then (inv.dApp == this)
908850 else false)
909851 then (inv.fee == 500000)
910852 else false)
911853 then (inv.feeAssetId == unit)
912854 else false)
913855 then sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[4])))
914856 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
915857 case _ =>
916858 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
917859 }
918860

github/deemru/w8io/026f985 
104.46 ms