tx · AvRwdiH22cgEjygtguxjUZcGC3qGWz4C4qsTvsH1wXTb

3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY:  -0.02200000 Waves

2022.07.14 07:54 [2138942] smart account 3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY > SELF 0.00000000 Waves

{ "type": 13, "id": "AvRwdiH22cgEjygtguxjUZcGC3qGWz4C4qsTvsH1wXTb", "fee": 2200000, "feeAssetId": null, "timestamp": 1657774493047, "version": 2, "chainId": 84, "sender": "3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY", "senderPublicKey": "J9DCtJJxJBWZdtDR12BA1U94Q3cZzMi4R6k5hYkAzmzC", "proofs": [ "2NgUZL4zQEtviBSzCvovMhyQurM7G8e1ArGBWdRhHLYgHGrnKKNBQdt7SGFQqxLNFMGQ3W9heyeiePqLDJJ9hqah" ], "script": "base64:BgJaCAISBAoCCAgSDgoMCAgICAgICAgICAgIEg0KCwgICAgICAgICAgIEgYKBAgICAgSBAoCCAgSBwoFCAEBCAESBAoCCAgSBAoCCAgSBgoECAgICBIGCgQICAgISQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAAIdW5pdFRlc3QHAAlvcmFjbGVGZWUJAQV2YWx1ZQEJAKYIAQkBDmdldFN0cmluZ0J5S2V5AQIPY29uZl9vcmFjbGVfZmVlAAhzaWduRGFwcAkBBXZhbHVlAQkApggBCQEOZ2V0U3RyaW5nQnlLZXkBAhFjb25mX3NpZ253ZWJfZGFwcAALZmVlUmVjZWl2ZXIJAQ5nZXRTdHJpbmdCeUtleQECEWNvbmZfZmVlX3JlY2VpdmVyAAh1c2VyRGFwcAMFCHVuaXRUZXN0CQEFdmFsdWUBCQCmCAECIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3ZEhRUUIzUFUyVUNtCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECD2NvbmZfdXNlcnNfZG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AIJAQxJbnRlZ2VyRW50cnkCCQCsAgICEmN1cnJlbnRfYmlkYW1vdW50XwUFYXJ0SWQJAGUCBQZiaWROYnIAAQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUNcmV0dXJuTW9uZXlUbwkBDXBhcnNlSW50VmFsdWUBCQCRAwIFCmJpZERhdGFBcnIAAQUHYXNzZXRJZAUDbmlsAPGhFz8=", "height": 2138942, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BJY64MKbSrh6xDgHLVrV7exPhHmPioCGhkzvHRJZidNU Next: dKvJNGqb28yHPXLadGqS8EAC2p8kqmAMBU9nCLFrru2 Diff:
OldNewDifferences
493493 func setConf (key,val) = {
494494 let caller = toString(invoke.caller)
495495 if (containsElement([chris, toString(this)], caller))
496- then if (contains(val, "conf_"))
496+ then if (contains(key, "conf_"))
497497 then [StringEntry(key, val)]
498498 else throw("Entries starting with conf_ only")
499499 else throw("You are not allowed to change this")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringByKey (key) = valueOrElse(getString(this, key), "")
55
66
77 let unitTest = false
88
99 let oracleFee = value(addressFromString(getStringByKey("conf_oracle_fee")))
1010
1111 let signDapp = value(addressFromString(getStringByKey("conf_signweb_dapp")))
1212
1313 let feeReceiver = getStringByKey("conf_fee_receiver")
1414
1515 let userDapp = if (unitTest)
1616 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
1717 else value(addressFromString(getStringByKey("conf_users_dapp")))
1818
1919 let whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp")))
2020
2121 let signAssetId = fromBase58String(getStringByKey("conf_accepted_asset_SIGN"))
2222
2323 let usdnAssetId = fromBase58String("conf_accepted_asset_USDN")
2424
2525 let wavesAssetId = base58''
2626
2727 let chris = getStringByKey("conf_admin_1")
2828
2929 let joep = getStringByKey("conf_admin_2")
3030
3131 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
3232
3333
3434 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
3535
3636
3737 func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
3838
3939
4040 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
4141
4242
4343 let signCut = 7
4444
4545 let usdnWaveCut = 10
4646
4747 let defaultLicence = getStringByKey("conf_default_licence")
4848
4949 let defaultHashLicence = getStringByKey("conf_default_licence_hash")
5050
5151 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
5252
5353 let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
5454
5555 let userSuspended = "SUSPENDED"
5656
5757 let userRemoved = "REMOVED"
5858
5959 let userUnregistered = "UNREGISTERED"
6060
6161 let userAllowed = "ALLOWED"
6262
6363 let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId)))
6464
6565 func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) {
6666 case a: String =>
6767 if (contains(a, sha256Hash))
6868 then true
6969 else false
7070 case _ =>
7171 false
7272 }
7373
7474
7575 func validateCID (cid) = if (contains(cid, "/"))
7676 then if (if ((76 > size(cid)))
7777 then (size(split(cid, "/")[0]) == 59)
7878 else false)
7979 then (16 > size(split(cid, "/")[1]))
8080 else false
8181 else false
8282
8383
8484 func validateHash (hash) = (size(hash) == 64)
8585
8686
8787 func keyUserStatus (caller) = ("user_status_" + caller)
8888
8989
9090 func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller)
9191
9292
9393 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
9494
9595
9696 func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller)
9797
9898
9999 func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller)
100100
101101
102102 func keyExportHash (caller,artId) = ((("art_export_hash_" + artId) + "_") + caller)
103103
104104
105105 func keyExportCid (caller,artId) = ((("art_export_cid_" + artId) + "_") + caller)
106106
107107
108108 func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller)
109109
110110
111111 func keySignID (caller,artId) = ((("art_signid_" + artId) + "_") + caller)
112112
113113
114114 func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller)
115115
116116
117117 func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller)
118118
119119
120120 func keyLicenceHash (caller,artId) = ((("art_licence_hash_" + artId) + "_") + caller)
121121
122122
123123 func keyLicenceCid (caller,artId) = ((("art_licence_cid_" + artId) + "_") + caller)
124124
125125
126126 func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller)
127127
128128
129129 func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller)
130130
131131
132132 func keyNote (caller,artId) = ((("art_note_" + artId) + "_") + caller)
133133
134134
135135 func keyCrawler (caller,artId) = ((("art_crawler_cid_" + artId) + "_") + caller)
136136
137137
138138 func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller)
139139
140140
141141 func keyEndSale (caller,artId) = ((("art_endsale_" + artId) + "_") + caller)
142142
143143
144144 func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller)
145145
146146
147147 func keyFlag (caller,artId) = ((("art_flag_" + artId) + "_") + caller)
148148
149149
150150 func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
151151
152152
153153 func keyPrimaryShare (artistAddr) = ("artist_agent_primary_" + artistAddr)
154154
155155
156156 func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller)
157157
158158
159159 func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash)
160160
161161
162162 func keyidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller)
163163
164164
165165 func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller)))))
166166
167167
168168 func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay)))
169169 then throw("Wrong Display CID")
170170 else if (!(validateCID(cidExport)))
171171 then throw("Wrong Export CID")
172172 else if (if ((cidLicence != ""))
173173 then !(validateCID(cidLicence))
174174 else false)
175175 then throw("Wrong Licence CID")
176176 else true
177177
178178
179179 func validateAllHash (sha256Export,sha256Licence) = if (!(validateHash(sha256Export)))
180180 then throw("Export Hash 64 char. max")
181181 else if (!(validateHash(sha256Licence)))
182182 then throw("Licence Hash 64 char. max")
183183 else true
184184
185185
186186 func validateString (str,max) = if ((size(str) == 0))
187187 then throw("Field cannot be is empty")
188188 else if ((size(str) > max))
189189 then throw((str + " is too long"))
190190 else true
191191
192192
193193 func validateUser (caller) = {
194194 let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
195195 if (if ((userStatus == userUnregistered))
196196 then true
197197 else (userStatus == userAllowed))
198198 then "Register this account first with \"Account\" tab"
199199 else if ((userStatus == userSuspended))
200200 then "Account suspended"
201201 else if ((userStatus == userRemoved))
202202 then "Account removed"
203203 else ""
204204 }
205205
206206
207207 func setLIcence (cidLicence,sha256Licence) = {
208208 let cid = if ((size(cidLicence) == 0))
209209 then defaultLicence
210210 else cidLicence
211211 let hash = if ((size(sha256Licence) == 0))
212212 then defaultHashLicence
213213 else sha256Licence
214214 $Tuple2(cid, hash)
215215 }
216216
217217
218218 func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags) = {
219219 let checkUser = validateUser(caller)
220220 if ((checkUser != ""))
221221 then throw(checkUser)
222222 else if ((size(cidDisplay) == 0))
223223 then throw("Display CID cannot be empty")
224224 else if (!(validateAllCID(cidDisplay, cidExport, licenceCID)))
225225 then throw("Problem with CID")
226226 else if (!(validateAllHash(sha256Export, licenceHash)))
227227 then throw("Problem with Hashes")
228228 else if (!(validateString(name, 100)))
229229 then throw("100 Char. max name")
230230 else if (!(validateString(description, 1000)))
231231 then throw("1000 Char. max description")
232232 else if ((size(split(tags, ",")) > 5))
233233 then throw("5 tags max.")
234234 else ""
235235 }
236236
237237
238238 func isPayment (i) = if ((size(i.payments) == 0))
239239 then throw("No payment attached")
240240 else {
241241 let payment = value(i.payments[0])
242242 let amount = value(payment.amount)
243243 $Tuple2(payment, amount)
244244 }
245245
246246
247247 func validatePayment (i) = {
248248 let $t01020010236 = isPayment(i)
249249 let payment = $t01020010236._1
250250 let amount = $t01020010236._2
251251 let assetId = if (if (isDefined(payment.assetId))
252252 then (payment.assetId == signAssetId)
253253 else false)
254254 then payment.assetId
255255 else throw("Only SIGN token accepted as transaction fee")
256256 if ((amount != currentCertificationPrice))
257257 then throw(("Payment amount should be " + toString(currentCertificationPrice)))
258258 else $Tuple2(amount, assetId)
259259 }
260260
261261
262262 func isArtMinted (addrToUse,artId) = match getInteger(this, keyIssued(addrToUse, artId)) {
263263 case b: Int =>
264264 if ((b != 0))
265265 then true
266266 else false
267267 case _ =>
268268 false
269269 }
270270
271271
272272 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
273273 let $t01082910865 = isPayment(i)
274274 let payment = $t01082910865._1
275275 let amount = $t01082910865._2
276276 let assetId = if (!(isDefined(payment.assetId)))
277277 then unit
278278 else if (if ((size(priceAssetId) > 0))
279279 then (toBase58String(value(payment.assetId)) == priceAssetId)
280280 else false)
281281 then payment.assetId
282282 else throw("Wrong asset id")
283283 if (if ((assetId == unit))
284284 then (priceAssetId != "")
285285 else false)
286286 then throw("Wrong asset id")
287287 else if ((artworkPrice != amount))
288288 then throw("Payment don't match")
289289 else $Tuple2(amount, assetId)
290290 }
291291
292292
293293 func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId)))
294294 then (assetId != toBase58String(wavesAssetId))
295295 else false)
296296 then (assetId != "WAVES")
297297 else false)
298298 then (assetId != toBase58String(usdnAssetId))
299299 else false)
300300 then throw("Only SIGN, USDN or WAVES accepted")
301301 else true
302302
303303
304304 func validateMinSell (assetId,price) = {
305305 let minSellWaves = if (unitTest)
306306 then 10
307307 else getIntegerByKeyFromOracle("waves_min_sell")
308308 let minSellUsdn = 1000000
309309 let minSellSign = if (unitTest)
310310 then 1
311311 else (currentCertificationPrice * 2)
312312 if (if (if (if (if ((assetId == toBase58String(usdnAssetId)))
313313 then (minSellUsdn > price)
314314 else false)
315315 then (price != 0)
316316 else false)
317317 then true
318318 else if (if ((assetId == toBase58String(signAssetId)))
319319 then (minSellSign > price)
320320 else false)
321321 then (price != 0)
322322 else false)
323323 then true
324324 else if (if (if ((assetId == toBase58String(wavesAssetId)))
325325 then true
326326 else (assetId == "WAVES"))
327327 then (minSellWaves > price)
328328 else false)
329329 then (price != 0)
330330 else false)
331331 then throw("Wrong minimum sell price")
332332 else true
333333 }
334334
335335
336336 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
337337 then unit
338338 else fromBase58String(assetId)
339339
340340
341341 func getPriceAssetIdFromBid (bidDataKey) = {
342342 let bidData = getStringByKey((bidDataKey + "_OPEN"))
343343 if ((bidData == ""))
344344 then throw("Bid not found")
345345 else {
346346 let bidDataArr = split(bidData, "_")
347347 let bidAmount = parseIntValue(bidDataArr[1])
348348 let bidAssetId = getBidAssetId(bidDataArr[0])
349349 if ((0 >= bidAmount))
350350 then throw("Wrong amount")
351351 else $Tuple2(bidAmount, bidAssetId)
352352 }
353353 }
354354
355355
356356 func idCallerDate (i) = if (!(dappRunning))
357357 then throw(maintenanceMSG)
358358 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
359359
360360
361361 func buyMint (i,artId,issuer,bidId,bidOwner) = {
362362 let $t01309013147 = idCallerDate(i)
363363 let id = $t01309013147._1
364364 let caller = $t01309013147._2
365365 let date = $t01309013147._3
366366 let isBid = if (if (if ((toBase58String(i.caller.bytes) == issuer))
367367 then (bidOwner != "")
368368 else false)
369369 then (bidId != "")
370370 else false)
371371 then true
372372 else false
373373 let blockEnd = getIntegerByKey(keyEndSale(caller, artId))
374374 if (if (if ((blockEnd != 0))
375375 then (height >= blockEnd)
376376 else false)
377377 then !(isBid)
378378 else false)
379379 then throw("Sale ended.")
380380 else {
381381 let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer)
382382 let totalNFT = getIntegerByKey("total_nft_issued")
383383 let signID = getStringByKey(keySignID(issuer, artId))
384384 let artworkName = getStringByKey(keyName(issuer, artId))
385385 if ((artworkName == ""))
386386 then throw("Art doesn't exist")
387387 else {
388388 let isOnSale = getBooleanByKey(keyOnSale(issuer, artId))
389389 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
390390 let artworkPrice = if (callerIsIssuer)
391391 then (currentCertificationPrice * 2)
392392 else getIntegerByKey(keyPrice(issuer, artId))
393393 let priceAssetId = if (callerIsIssuer)
394394 then toBase58String(signAssetId)
395395 else getStringByKey(keyAssetIdAccepted(issuer, artId))
396396 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
397397 if (if (if (!(isBid))
398398 then !(callerIsIssuer)
399399 else false)
400400 then if (if ((0 >= artworkPrice))
401401 then true
402402 else !(isOnSale))
403403 then true
404404 else (0 >= maxCanSell)
405405 else false)
406406 then throw("Art not for sale")
407407 else if (if (if (!(isBid))
408408 then callerIsIssuer
409409 else false)
410410 then (0 >= maxCanSell)
411411 else false)
412412 then throw("Max issuable not set")
413413 else {
414414 let checkUser = validateUser(issuer)
415415 if (if (isBid)
416416 then (checkUser != "")
417417 else false)
418418 then throw(checkUser)
419419 else {
420420 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
421421 let $t01489815065 = if (isBid)
422422 then getPriceAssetIdFromBid(bidDataKey)
423423 else validatePriceAssetId(i, priceAssetId, artworkPrice)
424424 let amount = $t01489815065._1
425425 let assetId = $t01489815065._2
426426 let agent = valueOrElse(getString(userDapp, keyArtistAgentAddr(issuer)), feeReceiver)
427427 let agentShare = valueOrElse(getInteger(userDapp, keyPrimaryShare(issuer)), 0)
428428 let isWhitelisted = checkWhitelist(issuer)
429429 let cut = if ((isWhitelisted > height))
430430 then 0
431431 else if ((assetId == signAssetId))
432432 then signCut
433433 else usdnWaveCut
434434 let amountForSign = fraction(amount, cut, 100)
435435 let amountForAgent = if (if (if ((agent != feeReceiver))
436436 then (agentShare > 0)
437437 else false)
438438 then (height > isWhitelisted)
439439 else false)
440440 then fraction(amount, agentShare, 100)
441441 else 0
442442 let amountForCreator = (amount - amountForSign)
443443 if ((amountSold == maxCanSell))
444444 then throw("Art sold out")
445445 else {
446446 let newAmountSold = (amountSold + 1)
447447 let issueMeta = ((((((((((("Creator: " + issuer) + ",
448448 ArtID: ") + artId) + ",
449449 SignID: ") + signID) + ",
450450 Artwork name: ") + artworkName) + ",
451451 Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
452452 let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
453453 let idNFT = calculateAssetId(issueNFT)
454454 let sellStatus = if (if ((newAmountSold == maxCanSell))
455455 then true
456456 else !(isOnSale))
457457 then false
458458 else true
459459 let receiveNFT = if (if (if ((caller == issuer))
460460 then (bidOwner != "")
461461 else false)
462462 then (bidId != "")
463463 else false)
464464 then addressFromStringValue(bidOwner)
465465 else i.caller
466466 let assetIdBid = if (!(isDefined(assetId)))
467467 then "WAVES"
468468 else toBase58String(value(assetId))
469469 let bidData = getStringByKey((bidDataKey + "_OPEN"))
470470 let bidDelOld = DeleteEntry((bidDataKey + "_OPEN"))
471471 let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date)))
472472 let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)
473473 let soldValue = if (!(isBid))
474474 then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))
475475 else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT))
476476 let soldData = StringEntry(soldKey, soldValue)
477477 let commissions = if ((amountForAgent != 0))
478478 then [ScriptTransfer(Address(fromBase58String(feeReceiver)), (amountForSign - amountForAgent), assetId), ScriptTransfer(Address(fromBase58String(agent)), amountForAgent, assetId)]
479479 else [ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId)]
480480 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(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(receiveNFT, 1, idNFT)] ++ commissions)
481481 if (isBid)
482482 then [soldData, bidUpdate, bidDelOld] :: buyRes
483483 else soldData :: buyRes
484484 }
485485 }
486486 }
487487 }
488488 }
489489 }
490490
491491
492492 @Callable(invoke)
493493 func setConf (key,val) = {
494494 let caller = toString(invoke.caller)
495495 if (containsElement([chris, toString(this)], caller))
496- then if (contains(val, "conf_"))
496+ then if (contains(key, "conf_"))
497497 then [StringEntry(key, val)]
498498 else throw("Entries starting with conf_ only")
499499 else throw("You are not allowed to change this")
500500 }
501501
502502
503503
504504 @Callable(i)
505505 func addArtwork (sha256Hash,signID,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler) = {
506506 let $t01885018891 = idCallerDate(i)
507507 let artId = $t01885018891._1
508508 let caller = $t01885018891._2
509509 let date = $t01885018891._3
510510 if (!(validateHash(sha256Hash)))
511511 then throw("Hash should be 64 characters maximum")
512512 else {
513513 let $t01899219061 = setLIcence(cidLicence, sha256Licence)
514514 let licenceCID = $t01899219061._1
515515 let licenceHash = $t01899219061._2
516516 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags)
517517 if ((validateArtwork != ""))
518518 then throw("Something went wrong!")
519519 else {
520520 let $t01928019322 = validatePayment(i)
521521 let amount = $t01928019322._1
522522 let assetId = $t01928019322._2
523523 if (!(isDefined(amount)))
524524 then throw("Something went wrong")
525525 else {
526526 let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller))
527527 if ((entryExist != ""))
528528 then throw("You already added it")
529529 else {
530530 let hashExist = getStringByKey(keyOwnerByHash(sha256Hash))
531531 if ((hashExist != ""))
532532 then throw("Hash already registered")
533533 else {
534534 let isSignCertified = checkSignCertificate(signID, caller, sha256Hash)
535535 if (!(isSignCertified))
536536 then throw("Sign Certificate not found for this address.")
537537 else [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), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)]
538538 }
539539 }
540540 }
541541 }
542542 }
543543 }
544544
545545
546546
547547 @Callable(i)
548548 func updateArtwork (txid,name,description,tags,type,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence,crawler) = if (!(dappRunning))
549549 then throw(maintenanceMSG)
550550 else {
551551 let caller = toBase58String(i.caller.bytes)
552552 let $t02205422123 = setLIcence(cidLicence, sha256Licence)
553553 let licenceCID = $t02205422123._1
554554 let licenceHash = $t02205422123._2
555555 let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags)
556556 if ((validateArtwork != ""))
557557 then throw("Something went wrong!")
558558 else {
559559 let entryExist = getStringByKey(keyName(caller, txid))
560560 if ((entryExist == ""))
561561 then throw("Entry not found")
562562 else {
563563 let flag = getStringByKey(keyFlag(caller, txid))
564564 if ((flag == "ILLEGAL"))
565565 then throw("Cannot update ILLEGAL artwork")
566566 else if (!(isArtMinted(caller, txid)))
567567 then [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)]
568568 else throw("Already minted")
569569 }
570570 }
571571 }
572572
573573
574574
575575 @Callable(i)
576576 func flagArtwork (artId,addr,flag,note) = {
577577 let $t02354823581 = idCallerDate(i)
578578 let id = $t02354823581._1
579579 let caller = $t02354823581._2
580580 if (containsElement([chris, toString(this)], caller))
581581 then if (containsElement(["CONSENT", "", "CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
582582 then [StringEntry(keyFlag(addr, artId), flag), StringEntry(keyNote(addr, artId), note)]
583583 else throw(("Unknow status " + flag))
584584 else throw("You are not allowed")
585585 }
586586
587587
588588
589589 @Callable(i)
590590 func deleteArtwork (artId,addr) = {
591591 let $t02401724050 = idCallerDate(i)
592592 let id = $t02401724050._1
593593 let caller = $t02401724050._2
594594 let addrToUse = if (containsElement([chris, joep, toString(this)], caller))
595595 then addr
596596 else caller
597597 let entryExist = valueOrErrorMessage(getStringByKey(keyName(addrToUse, artId)), "No art matching for this address")
598598 if ((entryExist == ""))
599599 then throw("No art matching for this address")
600600 else {
601601 let sha256Hash = getStringByKey(keyHashByTxidAddr(addrToUse, artId))
602602 if ((sha256Hash == ""))
603603 then throw("No art hash matching for this address")
604604 else {
605605 let signID = getStringByKey(keySignID(addrToUse, artId))
606606 if ((signID == ""))
607607 then throw("No SIGN ID matching")
608608 else {
609609 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))]
610610 if (!(isArtMinted(addrToUse, artId)))
611611 then if (!(dappRunning))
612612 then throw(maintenanceMSG)
613613 else dataToDelete
614614 else if (containsElement([chris, toString(this)], caller))
615615 then dataToDelete
616616 else throw("Art already minted, you cannot delete it")
617617 }
618618 }
619619 }
620620 }
621621
622622
623623
624624 @Callable(i)
625625 func sellArtwork (artId,price,maxMint,assetId,blockEnd) = {
626626 let $t02682326856 = idCallerDate(i)
627627 let id = $t02682326856._1
628628 let caller = $t02682326856._2
629629 let artworkName = getStringByKey(keyName(caller, artId))
630630 if ((artworkName == ""))
631631 then throw("This art doesn't match your account")
632632 else {
633633 let flag = getStringByKey(keyFlag(caller, artId))
634634 if (containsElement(["CHANGE_REQUIRED", "FLAGGED", "ILLEGAL"], flag))
635635 then throw("Flagged artwork")
636636 else {
637637 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
638638 if ((0 > blockEnd))
639639 then throw("Negative end")
640640 else if (if ((blockEnd > 0))
641641 then if ((maxMint != 1))
642642 then true
643643 else (price != 0)
644644 else false)
645645 then throw("Timed offer only allowed for unique edition and offer only")
646646 else {
647647 let baseHeight = if ((blockEnd == 0))
648648 then 0
649649 else height
650650 if (!(acceptedAssetIds(assetId)))
651651 then throw("Something went wrong!")
652652 else if (!(validateMinSell(assetId, price)))
653653 then throw("Something went wrong!")
654654 else {
655655 let checkUser = validateUser(caller)
656656 if ((checkUser != ""))
657657 then throw(checkUser)
658658 else {
659659 let amountSold = getIntegerByKey(keyIssued(caller, artId))
660660 let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId))
661661 if ((maxMint > 100))
662662 then throw("100 editions max per artwork")
663663 else if (if ((amountSold != 0))
664664 then (amountSold == maxCanSell)
665665 else false)
666666 then throw("Max edition reached.")
667667 else if (if ((amountSold > 0))
668668 then (maxCanSell != maxMint)
669669 else false)
670670 then throw("Cannot change maximum issuable anymore")
671671 else if (if ((bidNbr > 0))
672672 then (maxCanSell != maxMint)
673673 else false)
674674 then throw("Cannot change maximum issuable with active orders")
675675 else {
676676 let sellStatus = if (if ((price > 0))
677677 then (maxMint > 0)
678678 else false)
679679 then true
680680 else false
681681 [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))]
682682 }
683683 }
684684 }
685685 }
686686 }
687687 }
688688 }
689689
690690
691691
692692 @Callable(i)
693693 func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "")
694694
695695
696696
697697 @Callable(i)
698698 func setBid (artId,issuer) = {
699699 let $t02911329151 = idCallerDate(i)
700700 let id = $t02911329151._1
701701 let caller = $t02911329151._2
702702 let date = $t02911329151._3
703703 let $t02915629192 = isPayment(i)
704704 let payment = $t02915629192._1
705705 let amount = $t02915629192._2
706706 let assetId = if (!(isDefined(payment.assetId)))
707707 then "WAVES"
708708 else toBase58String(value(payment.assetId))
709709 let blockEnd = getIntegerByKey(keyEndSale(issuer, artId))
710710 if (if ((blockEnd != 0))
711711 then (height >= blockEnd)
712712 else false)
713713 then throw("Sale ended.")
714714 else {
715715 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
716716 if (!(acceptedAssetIds(assetId)))
717717 then throw("asset not accepted")
718718 else if (!(validateMinSell(assetId, amount)))
719719 then throw("Wrong min sell")
720720 else {
721721 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
722722 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
723723 if ((0 >= maxCanSell))
724724 then throw("No max edition set for this artwork")
725725 else if ((amountSold >= maxCanSell))
726726 then throw("Sold out, you cannot bid")
727727 else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))]
728728 }
729729 }
730730 }
731731
732732
733733
734734 @Callable(i)
735735 func acceptBid (artId,issuer,bidId,bidOwner) = {
736736 let caller = toBase58String(i.caller.bytes)
737737 if ((caller != issuer))
738738 then throw("You cannot do this action")
739739 else buyMint(i, artId, issuer, bidId, bidOwner)
740740 }
741741
742742
743743
744744 @Callable(i)
745745 func cancelBid (artId,issuer,bidId,bidOwner) = {
746746 let $t03061930678 = idCallerDate(i)
747747 let id = $t03061930678._1
748748 let caller = $t03061930678._2
749749 let date = $t03061930678._3
750750 if (if ((caller != bidOwner))
751751 then (caller != issuer)
752752 else false)
753753 then throw("You cannot do this action")
754754 else {
755755 let returnMoneyTo = if ((caller == issuer))
756756 then bidOwner
757757 else caller
758758 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
759759 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
760760 let bidData = getStringByKey((bidDataKey + "_OPEN"))
761761 if ((bidData == ""))
762762 then throw("Bid not found")
763763 else {
764764 let bidDataArr = split(bidData, "_")
765765 let assetId = getBidAssetId(bidDataArr[0])
766766 let bidStatus = "CANCELED"
767767 [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(returnMoneyTo)), parseIntValue(bidDataArr[1]), assetId)]
768768 }
769769 }
770770 }
771771
772772

github/deemru/w8io/169f3d6 
81.07 ms