tx · HM8FCLojvoP8XzLNo4w3FuMCGUFfgGgrBXug1yqj8K8P 3N1CYgyJqi5s7uHqiAuGnb86PxXAPBEJ2hg: -0.01400000 Waves 2021.01.05 14:21 [1340024] smart account 3N1CYgyJqi5s7uHqiAuGnb86PxXAPBEJ2hg > SELF 0.00000000 Waves
{ "type": 13, "id": "HM8FCLojvoP8XzLNo4w3FuMCGUFfgGgrBXug1yqj8K8P", "fee": 1400000, "feeAssetId": null, "timestamp": 1609845742823, "version": 2, "chainId": 84, "sender": "3N1CYgyJqi5s7uHqiAuGnb86PxXAPBEJ2hg", "senderPublicKey": "75wzrSTzcF5qMYeuwuLWeziy4CgffobpM7wFcCFcCTkU", "proofs": [ "4mebYLNk7xZx6v7MkDXrr5LyhR4zDjzyef9kY525ACYRiqbyK4ghMhGr7aapiyNpk87NuoDGr5nPUK5Rr6LbBrwJ" ], "script": "base64:AAIEAAAAAAAAADwIAhIOCgwICAgICAgBCAgICAgSDQoLCAgICAgBCAgICAgSBQoDCAgIEgQKAggIEgYKBAgBAQgSBAoCCAgAAABBAAAAAAh1bml0VGVzdAcAAAAACW9yYWNsZUZlZQkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAIc2lnbkRhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM05DMjhoU2l2cm1zVFVYYVlEMXg2TDM2Mko0WnBVbm9UZEIAAAAAC2ZlZVJlY2VpdmVyAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAAIdXNlckRhcHADBQAAAAh1bml0VGVzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXQ0UkdNRXlqU1dZQW9jVFBxZDU1d2RIUVFCM1BVMlVDbQkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXg5S1UycVdBZ0hmcDFoM2l5VnNkaUh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GxTdGF0dXMJAARMAAAAAgUAAAAIaXNzdWVORlQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAABmlzc3VlcgUAAAAQYW1vdW50Rm9yQ3JlYXRvcgUAAAAHYXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUAAAALZmVlUmVjZWl2ZXIFAAAADWFtb3VudEZvclNpZ24FAAAAB2Fzc2V0SWQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAABmludm9rZQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAABWlkTkZUBQAAAANuaWwAAAAABkAqxw==", "height": 1340024, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: LeAs6EkKcbnkVbEXbQ2oEJU4yZwr5RWcRSaDAC6UdUf Next: none Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | ||
12 | 12 | let userDapp = if (unitTest) | |
13 | 13 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
14 | - | else value(addressFromString(" | |
14 | + | else value(addressFromString("3Mx9KU2qWAgHfp1h3iyVsdiHiz3uuZFbBUG")) | |
15 | 15 | ||
16 | - | let whitelistDapp = value(addressFromString(" | |
16 | + | let whitelistDapp = value(addressFromString("3MuidizAcKUKVzU6AsDFfqcZQC7nkTEMm95")) | |
17 | 17 | ||
18 | 18 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
19 | 19 | ||
27 | 27 | ||
28 | 28 | let signCut = 7 | |
29 | 29 | ||
30 | - | let usdnCut = 10 | |
31 | - | ||
32 | - | let wavesCut = 10 | |
30 | + | let usdnWaveCut = 10 | |
33 | 31 | ||
34 | 32 | let defaultLicence = "bafybeigisfqtyo2qdfsceh5fpcp7eeymrpeglp6edao2bmyhijbayvausy/licence.pdf" | |
35 | 33 | ||
36 | 34 | let defaultHashLicence = "3df79d34abbca99308e79cb94461c1893582604d68329a41fd4bec1885e6adb4" | |
37 | 35 | ||
38 | - | let dappRunning = match getBoolean(userDapp, "conf_dapp_is_running") { | |
39 | - | case a: Boolean => | |
40 | - | a | |
41 | - | case _ => | |
42 | - | true | |
43 | - | } | |
36 | + | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
44 | 37 | ||
45 | - | let maintenanceMSG = match getString(userDapp, "conf_maintenance_msg") { | |
46 | - | case a: String => | |
47 | - | a | |
48 | - | case _ => | |
49 | - | "" | |
50 | - | } | |
38 | + | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
51 | 39 | ||
52 | 40 | let userSuspended = "SUSPENDED" | |
53 | 41 | ||
57 | 45 | ||
58 | 46 | let userAllowed = "ALLOWED" | |
59 | 47 | ||
60 | - | func getStringByKeyFromUsers (key) = match getString(userDapp, key) { | |
61 | - | case a: String => | |
62 | - | a | |
63 | - | case _ => | |
64 | - | "" | |
65 | - | } | |
48 | + | func getStringByKeyFromUsers (key) = valueOrElse(getString(userDapp, key), "") | |
66 | 49 | ||
67 | 50 | ||
68 | - | func getStringByKey (key) = match getString(this, key) { | |
69 | - | case a: String => | |
70 | - | a | |
71 | - | case _ => | |
72 | - | "" | |
73 | - | } | |
51 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
74 | 52 | ||
75 | 53 | ||
76 | - | func getIntegerByKeyFromOracle (key) = match getInteger(oracleFee, key) { | |
77 | - | case a: Int => | |
78 | - | a | |
79 | - | case _ => | |
80 | - | throw("Integer undefine or 0 in oracle") | |
81 | - | } | |
54 | + | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
82 | 55 | ||
83 | 56 | ||
84 | - | func getIntegerByKey (key) = match getInteger(this, key) { | |
85 | - | case i: Int => | |
86 | - | i | |
87 | - | case _ => | |
88 | - | 0 | |
89 | - | } | |
57 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
90 | 58 | ||
91 | 59 | ||
92 | - | func checkWhitelist (key) = match getInteger(whitelistDapp, key) { | |
93 | - | case a: Int => | |
94 | - | if ((a >= height)) | |
95 | - | then 1 | |
96 | - | else 0 | |
97 | - | case _ => | |
98 | - | 0 | |
99 | - | } | |
60 | + | func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0) | |
100 | 61 | ||
101 | 62 | ||
102 | - | func getBooleanByKey (key) = match getBoolean(this, key) { | |
103 | - | case i: Boolean => | |
104 | - | i | |
105 | - | case _ => | |
106 | - | false | |
107 | - | } | |
63 | + | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
108 | 64 | ||
109 | 65 | ||
110 | 66 | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) { | |
118 | 74 | ||
119 | 75 | ||
120 | 76 | func validateCID (cid) = if (contains(cid, "/")) | |
121 | - | then if (if (( | |
122 | - | then ( | |
77 | + | then if (if ((76 > size(cid))) | |
78 | + | then (size(split(cid, "/")[0]) == 59) | |
123 | 79 | else false) | |
124 | 80 | then (16 > size(split(cid, "/")[1])) | |
125 | 81 | else false | |
126 | 82 | else false | |
127 | 83 | ||
128 | 84 | ||
129 | - | func validateHash (hash) = ( | |
85 | + | func validateHash (hash) = (size(hash) == 64) | |
130 | 86 | ||
131 | 87 | ||
132 | 88 | func keyUserStatus (caller) = ("user_status_" + caller) | |
220 | 176 | else true | |
221 | 177 | ||
222 | 178 | ||
179 | + | func validateUser (caller) = { | |
180 | + | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
181 | + | if (if ((userStatus == userUnregistered)) | |
182 | + | then true | |
183 | + | else (userStatus == userAllowed)) | |
184 | + | then "Register this account first with \"Account\" tab" | |
185 | + | else if ((userStatus == userSuspended)) | |
186 | + | then "Account suspended" | |
187 | + | else if ((userStatus == userRemoved)) | |
188 | + | then "Account removed" | |
189 | + | else "" | |
190 | + | } | |
191 | + | ||
192 | + | ||
193 | + | func setLIcence (cidLicence,sha256Licence) = { | |
194 | + | let cid = if ((size(cidLicence) == 0)) | |
195 | + | then defaultLicence | |
196 | + | else cidLicence | |
197 | + | let hash = if ((size(sha256Licence) == 0)) | |
198 | + | then defaultHashLicence | |
199 | + | else sha256Licence | |
200 | + | $Tuple2(cid, hash) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | func setLIcenceCID (cidLicence) = if ((size(cidLicence) == 0)) | |
205 | + | then defaultLicence | |
206 | + | else cidLicence | |
207 | + | ||
208 | + | ||
209 | + | func setLIcenceHash (sha256Licence) = if ((size(sha256Licence) == 0)) | |
210 | + | then defaultHashLicence | |
211 | + | else sha256Licence | |
212 | + | ||
213 | + | ||
214 | + | func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags,maxmint) = { | |
215 | + | let checkUser = validateUser(caller) | |
216 | + | if ((checkUser != "")) | |
217 | + | then throw(checkUser) | |
218 | + | else if ((size(cidDisplay) == 0)) | |
219 | + | then throw("Display CID cannot be empty") | |
220 | + | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
221 | + | then throw("Problem with CID") | |
222 | + | else if (!(validateAllHash(sha256Export, licenceHash))) | |
223 | + | then throw("Problem with Hashes") | |
224 | + | else if (!(validateString(name, 100))) | |
225 | + | then throw("100 Char. max name") | |
226 | + | else if (!(validateString(description, 1000))) | |
227 | + | then throw("1000 Char. max description") | |
228 | + | else if ((size(split(tags, ",")) > 5)) | |
229 | + | then throw("5 tags max.") | |
230 | + | else if ((maxmint > 10)) | |
231 | + | then throw("10 editions max per artwork") | |
232 | + | else "" | |
233 | + | } | |
234 | + | ||
235 | + | ||
236 | + | func validatePayment (invoke) = if ((size(invoke.payments) == 0)) | |
237 | + | then throw("No payment attached") | |
238 | + | else { | |
239 | + | let payment = value(invoke.payments[0]) | |
240 | + | let amount = value(payment.amount) | |
241 | + | let assetId = if (if (isDefined(payment.assetId)) | |
242 | + | then (payment.assetId == signAssetId) | |
243 | + | else false) | |
244 | + | then payment.assetId | |
245 | + | else throw("Only SIGN token accepted as transaction fee") | |
246 | + | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
247 | + | if ((amount != currentCertificationPrice)) | |
248 | + | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
249 | + | else $Tuple2(amount, assetId) | |
250 | + | } | |
251 | + | ||
252 | + | ||
253 | + | func isArtMinted (addressToUse,artId) = match getInteger(this, keyArtIssued(addressToUse, artId)) { | |
254 | + | case b: Int => | |
255 | + | if ((b != 0)) | |
256 | + | then true | |
257 | + | else false | |
258 | + | case _ => | |
259 | + | false | |
260 | + | } | |
261 | + | ||
262 | + | ||
263 | + | func validatePriceAssetId (invoke,priceAssetId,artworkPrice) = { | |
264 | + | let payment = value(invoke.payments[0]) | |
265 | + | let amount = value(payment.amount) | |
266 | + | let assetId = if (!(isDefined(payment.assetId))) | |
267 | + | then unit | |
268 | + | else if (if ((size(priceAssetId) > 0)) | |
269 | + | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
270 | + | else false) | |
271 | + | then payment.assetId | |
272 | + | else throw("Wrong asset id") | |
273 | + | if (if ((assetId == unit)) | |
274 | + | then (priceAssetId != "") | |
275 | + | else false) | |
276 | + | then throw("Wrong asset id") | |
277 | + | else if ((artworkPrice != amount)) | |
278 | + | then throw("Payment don't match") | |
279 | + | else $Tuple2(amount, assetId) | |
280 | + | } | |
281 | + | ||
282 | + | ||
283 | + | func acceptedAssetIds (assetId) = if (if (if ((assetId != toBase58String(signAssetId))) | |
284 | + | then (assetId != toBase58String(wavesAssetId)) | |
285 | + | else false) | |
286 | + | then (assetId != toBase58String(usdnAssetId)) | |
287 | + | else false) | |
288 | + | then throw("Only SIGN, USDN or WAVES accepted") | |
289 | + | else true | |
290 | + | ||
291 | + | ||
292 | + | func validateMinSell (assetId,price) = { | |
293 | + | let minSellWaves = if (unitTest) | |
294 | + | then 1 | |
295 | + | else getIntegerByKeyFromOracle("waves_min_sell") | |
296 | + | let minSellUsdn = 1000000 | |
297 | + | let minSellSign = if (unitTest) | |
298 | + | then 1 | |
299 | + | else (getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) * 2) | |
300 | + | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
301 | + | then (minSellUsdn > price) | |
302 | + | else false) | |
303 | + | then (price != 0) | |
304 | + | else false) | |
305 | + | then true | |
306 | + | else if (if ((assetId == toBase58String(signAssetId))) | |
307 | + | then (minSellSign > price) | |
308 | + | else false) | |
309 | + | then (price != 0) | |
310 | + | else false) | |
311 | + | then true | |
312 | + | else if (if ((assetId == toBase58String(wavesAssetId))) | |
313 | + | then (minSellWaves > price) | |
314 | + | else false) | |
315 | + | then (price != 0) | |
316 | + | else false) | |
317 | + | then throw("Wrong minimum sell price") | |
318 | + | else true | |
319 | + | } | |
320 | + | ||
321 | + | ||
223 | 322 | @Callable(invoke) | |
224 | 323 | func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = if (!(dappRunning)) | |
225 | 324 | then throw(maintenanceMSG) | |
226 | 325 | else { | |
227 | 326 | let artId = toBase58String(invoke.transactionId) | |
327 | + | let timestamp = lastBlock.timestamp | |
228 | 328 | let caller = toBase58String(invoke.caller.bytes) | |
229 | - | let timestamp = lastBlock.timestamp | |
230 | - | let licenceCID = if ((size(cidLicence) == 0)) | |
231 | - | then defaultLicence | |
232 | - | else cidLicence | |
233 | - | let licenceHash = if ((size(sha256Licence) == 0)) | |
234 | - | then defaultHashLicence | |
235 | - | else sha256Licence | |
236 | - | let userIsRegistered = match getString(userDapp, ("user_status_" + caller)) { | |
237 | - | case s: String => | |
238 | - | s | |
239 | - | case _ => | |
240 | - | userUnregistered | |
241 | - | } | |
242 | - | if (if (isDefined(userIsRegistered)) | |
243 | - | then if ((userIsRegistered == userUnregistered)) | |
244 | - | then true | |
245 | - | else (userIsRegistered == userAllowed) | |
246 | - | else false) | |
247 | - | then throw("Register this account first with \"Account\" tab") | |
248 | - | else if ((userIsRegistered == userSuspended)) | |
249 | - | then throw("Account suspended") | |
250 | - | else if ((userIsRegistered == userRemoved)) | |
251 | - | then throw("Account removed") | |
252 | - | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
253 | - | then throw("Problem with CID") | |
254 | - | else if (!(validateHash(sha256Hash))) | |
255 | - | then throw("Hash should be 64 characters maximum") | |
256 | - | else if (!(validateAllHash(sha256Export, licenceHash))) | |
257 | - | then throw("Problem with Hashes") | |
258 | - | else if ((size(invoke.payments) == 0)) | |
259 | - | then throw("No payment attached") | |
329 | + | if (!(validateHash(sha256Hash))) | |
330 | + | then throw("Hash should be 64 characters maximum") | |
331 | + | else { | |
332 | + | let $t01172711796 = setLIcence(cidLicence, sha256Licence) | |
333 | + | let licenceCID = $t01172711796._1 | |
334 | + | let licenceHash = $t01172711796._2 | |
335 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, maxmint) | |
336 | + | if ((validateArtwork != "")) | |
337 | + | then throw("Something went wrong!") | |
338 | + | else { | |
339 | + | let $t01202412071 = validatePayment(invoke) | |
340 | + | let amount = $t01202412071._1 | |
341 | + | let assetId = $t01202412071._2 | |
342 | + | if (!(isDefined(amount))) | |
343 | + | then throw("Something went wrong") | |
344 | + | else { | |
345 | + | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, caller)) | |
346 | + | if ((entryExist != "")) | |
347 | + | then throw("You already added it") | |
260 | 348 | else { | |
261 | - | let payment = value(invoke.payments[0]) | |
262 | - | let amount = value(payment.amount) | |
263 | - | let assetId = if (if (isDefined(payment.assetId)) | |
264 | - | then (payment.assetId == signAssetId) | |
265 | - | else false) | |
266 | - | then payment.assetId | |
267 | - | else throw("Only SIGN token accepted") | |
268 | - | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
269 | - | if ((amount != currentCertificationPrice)) | |
270 | - | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
349 | + | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
350 | + | if ((hashExist != "")) | |
351 | + | then throw("Hash already registered") | |
271 | 352 | else { | |
272 | - | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, caller)) | |
273 | - | if ((entryExist != "")) | |
274 | - | then throw("You already added it") | |
275 | - | else { | |
276 | - | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
277 | - | if ((hashExist != "")) | |
278 | - | then throw("Hash already registered") | |
279 | - | else { | |
280 | - | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
281 | - | if (!(isSignCertified)) | |
282 | - | then throw("Sign Certificate not found for this address.") | |
283 | - | else if ((size(cidDisplay) == 0)) | |
284 | - | then throw("Display CID cannot be empty") | |
285 | - | else if (!(validateString(name, 100))) | |
286 | - | then throw("100 Char. max name") | |
287 | - | else if (!(validateString(description, 1000))) | |
288 | - | then throw("1000 Char. max description") | |
289 | - | else if ((size(split(tags, ",")) > 5)) | |
290 | - | then throw("5 tags max.") | |
291 | - | else if ((maxmint > 10)) | |
292 | - | then throw("10 editions max") | |
293 | - | else [StringEntry(keyArtOwnerByHash(sha256Hash), caller), StringEntry(keyArtTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyArtDate(caller, artId), timestamp), StringEntry(keyArtName(caller, artId), name), StringEntry(keyArtDesc(caller, artId), description), StringEntry(keyArtDisplayCid(caller, artId), cidDisplay), StringEntry(keyArtExportCid(caller, artId), cidExport), StringEntry(keyArtExportHash(caller, artId), sha256Export), StringEntry(keyArtLicenceHash(caller, artId), licenceHash), StringEntry(keyArtLicenceCid(caller, artId), licenceCID), StringEntry(keyArtType(caller, artId), type), StringEntry(keyArtTags(caller, artId), tags), IntegerEntry(keyArtMaxMint(caller, artId), maxmint), StringEntry(keyArtSignID(caller, artId), signID), IntegerEntry(keyArtIssued(caller, artId), 0), BooleanEntry(keyArtOnSale(caller, artId), false), StringEntry(keyArtArtidBySignid(caller, signID), artId), StringEntry(keyArtHashByTxidAddr(caller, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
294 | - | } | |
295 | - | } | |
353 | + | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
354 | + | if (!(isSignCertified)) | |
355 | + | then throw("Sign Certificate not found for this address.") | |
356 | + | else [StringEntry(keyArtOwnerByHash(sha256Hash), caller), StringEntry(keyArtTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyArtDate(caller, artId), timestamp), StringEntry(keyArtName(caller, artId), name), StringEntry(keyArtDesc(caller, artId), description), StringEntry(keyArtDisplayCid(caller, artId), cidDisplay), StringEntry(keyArtExportCid(caller, artId), cidExport), StringEntry(keyArtExportHash(caller, artId), sha256Export), StringEntry(keyArtLicenceHash(caller, artId), licenceHash), StringEntry(keyArtLicenceCid(caller, artId), licenceCID), StringEntry(keyArtType(caller, artId), type), StringEntry(keyArtTags(caller, artId), tags), IntegerEntry(keyArtMaxMint(caller, artId), maxmint), StringEntry(keyArtSignID(caller, artId), signID), IntegerEntry(keyArtIssued(caller, artId), 0), BooleanEntry(keyArtOnSale(caller, artId), false), StringEntry(keyArtArtidBySignid(caller, signID), artId), StringEntry(keyArtHashByTxidAddr(caller, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
296 | 357 | } | |
297 | 358 | } | |
359 | + | } | |
360 | + | } | |
361 | + | } | |
298 | 362 | } | |
299 | 363 | ||
300 | 364 | ||
305 | 369 | else { | |
306 | 370 | let updateId = toBase58String(invoke.transactionId) | |
307 | 371 | let caller = toBase58String(invoke.caller.bytes) | |
308 | - | let licenceCID = if ((size(cidLicence) == 0)) | |
309 | - | then defaultLicence | |
310 | - | else cidLicence | |
311 | - | let licenceHash = if ((size(sha256Licence) == 0)) | |
312 | - | then defaultHashLicence | |
313 | - | else sha256Licence | |
314 | - | let userIsRegistered = getStringByKeyFromUsers(keyUserStatus(caller)) | |
315 | - | if (if ((userIsRegistered == "")) | |
316 | - | then true | |
317 | - | else (userIsRegistered == userAllowed)) | |
318 | - | then throw("Register first with \"User infos\"") | |
319 | - | else if ((userIsRegistered == userSuspended)) | |
320 | - | then throw("Account suspended") | |
321 | - | else if ((userIsRegistered == userRemoved)) | |
322 | - | then throw("Account removed") | |
323 | - | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
324 | - | then throw("Problem with CID") | |
325 | - | else if (!(validateAllHash(sha256Export, licenceHash))) | |
326 | - | then throw("Problem with Hashes") | |
327 | - | else { | |
328 | - | let entryExist = getStringByKey(keyArtName(caller, txid)) | |
329 | - | if ((entryExist == "")) | |
330 | - | then throw("Entry not found") | |
331 | - | else if (!(validateString(name, 100))) | |
332 | - | then throw("100 Char. max name") | |
333 | - | else if (!(validateString(description, 1000))) | |
334 | - | then throw("1000 Char. max description") | |
335 | - | else { | |
336 | - | let flag = getStringByKey(keyArtFlag(caller, txid)) | |
337 | - | if ((flag == "ILLEGAL")) | |
338 | - | then throw("Cannot update ILLEGAL artwork") | |
339 | - | else { | |
340 | - | let artworkMinted = match getInteger(this, keyArtIssued(caller, txid)) { | |
341 | - | case b: Int => | |
342 | - | if ((b == 0)) | |
343 | - | then false | |
344 | - | else true | |
345 | - | case _ => | |
346 | - | false | |
347 | - | } | |
348 | - | if ((size(split(tags, ",")) > 5)) | |
349 | - | then throw("5 tags max.") | |
350 | - | else if ((maxmint > 10)) | |
351 | - | then throw("10 editions max per artwork") | |
352 | - | else if (!(artworkMinted)) | |
353 | - | then [StringEntry(keyArtName(caller, txid), name), StringEntry(keyArtDesc(caller, txid), description), StringEntry(keyArtDisplayCid(caller, txid), cidDisplay), StringEntry(keyArtExportCid(caller, txid), cidExport), StringEntry(keyArtExportHash(caller, txid), sha256Export), StringEntry(keyArtLicenceCid(caller, txid), licenceCID), StringEntry(keyArtLicenceHash(caller, txid), licenceHash), IntegerEntry(keyArtMaxMint(caller, txid), maxmint), StringEntry(keyArtTags(caller, txid), tags), StringEntry(keyArtType(caller, txid), type)] | |
354 | - | else throw("Already minted") | |
355 | - | } | |
356 | - | } | |
357 | - | } | |
372 | + | let $t01492614995 = setLIcence(cidLicence, sha256Licence) | |
373 | + | let licenceCID = $t01492614995._1 | |
374 | + | let licenceHash = $t01492614995._2 | |
375 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, maxmint) | |
376 | + | if ((validateArtwork != "")) | |
377 | + | then throw("Something went wrong!") | |
378 | + | else { | |
379 | + | let entryExist = getStringByKey(keyArtName(caller, txid)) | |
380 | + | if ((entryExist == "")) | |
381 | + | then throw("Entry not found") | |
382 | + | else { | |
383 | + | let flag = getStringByKey(keyArtFlag(caller, txid)) | |
384 | + | if ((flag == "ILLEGAL")) | |
385 | + | then throw("Cannot update ILLEGAL artwork") | |
386 | + | else if (!(isArtMinted(caller, txid))) | |
387 | + | then [StringEntry(keyArtName(caller, txid), name), StringEntry(keyArtDesc(caller, txid), description), StringEntry(keyArtDisplayCid(caller, txid), cidDisplay), StringEntry(keyArtExportCid(caller, txid), cidExport), StringEntry(keyArtExportHash(caller, txid), sha256Export), StringEntry(keyArtLicenceCid(caller, txid), licenceCID), StringEntry(keyArtLicenceHash(caller, txid), licenceHash), IntegerEntry(keyArtMaxMint(caller, txid), maxmint), StringEntry(keyArtTags(caller, txid), tags), StringEntry(keyArtType(caller, txid), type)] | |
388 | + | else throw("Already minted") | |
389 | + | } | |
390 | + | } | |
358 | 391 | } | |
359 | 392 | ||
360 | 393 | ||
361 | 394 | ||
362 | - | @Callable( | |
395 | + | @Callable(invoke) | |
363 | 396 | func flagArtwork (artId,addr,flag) = { | |
364 | - | let caller = toString(addressFromPublicKey( | |
365 | - | let id = toBase58String( | |
397 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
398 | + | let id = toBase58String(invoke.transactionId) | |
366 | 399 | if (containsElement([chris, joep, toString(this)], caller)) | |
367 | 400 | then if ((flag == "CONSENT")) | |
368 | 401 | then [StringEntry(keyArtFlag(addr, artId), flag)] | |
376 | 409 | ||
377 | 410 | ||
378 | 411 | ||
379 | - | @Callable( | |
412 | + | @Callable(invoke) | |
380 | 413 | func deleteArtwork (artId,addr) = { | |
381 | - | let caller = toString(addressFromPublicKey( | |
382 | - | let id = toBase58String( | |
414 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
415 | + | let id = toBase58String(invoke.transactionId) | |
383 | 416 | let addressToUse = if (containsElement([chris, joep, toString(this)], caller)) | |
384 | 417 | then addr | |
385 | 418 | else caller | |
387 | 420 | if ((entryExist == "")) | |
388 | 421 | then throw("No art matching for this address") | |
389 | 422 | else { | |
390 | - | let artworkMinted = match getInteger(this, keyArtIssued(addressToUse, artId)) { | |
391 | - | case b: Int => | |
392 | - | if ((b != 0)) | |
393 | - | then true | |
394 | - | else false | |
395 | - | case _ => | |
396 | - | false | |
397 | - | } | |
398 | - | let maxMint = getIntegerByKey(keyArtMaxMint(addressToUse, artId)) | |
399 | 423 | let sha256Hash = getStringByKey(keyArtHashByTxidAddr(addressToUse, artId)) | |
400 | 424 | if ((sha256Hash == "")) | |
401 | 425 | then throw("No art hash matching for this address") | |
405 | 429 | then throw("No SIGN ID matching") | |
406 | 430 | else { | |
407 | 431 | let dataToDelete = [DeleteEntry(keyArtDate(addressToUse, artId)), DeleteEntry(keyArtName(addressToUse, artId)), DeleteEntry(keyArtDesc(addressToUse, artId)), DeleteEntry(keyArtDisplayCid(addressToUse, artId)), DeleteEntry(keyArtExportCid(addressToUse, artId)), DeleteEntry(keyArtExportHash(addressToUse, artId)), DeleteEntry(keyArtLicenceHash(addressToUse, artId)), DeleteEntry(keyArtLicenceCid(addressToUse, artId)), DeleteEntry(keyArtType(addressToUse, artId)), DeleteEntry(keyArtTags(addressToUse, artId)), DeleteEntry(keyArtMaxMint(addressToUse, artId)), DeleteEntry(keyArtSignID(addressToUse, artId)), DeleteEntry(keyArtIssued(addressToUse, artId)), DeleteEntry(keyArtOnSale(addressToUse, artId)), DeleteEntry(keyArtFlag(addr, artId)), DeleteEntry(keyArtOwnerByHash(sha256Hash)), DeleteEntry(keyArtArtidBySignid(addressToUse, signID)), DeleteEntry(keyArtTxidByHashOwner(sha256Hash, addressToUse))] | |
408 | - | if (!( | |
432 | + | if (!(isArtMinted(addressToUse, artId))) | |
409 | 433 | then if (!(dappRunning)) | |
410 | 434 | then throw(maintenanceMSG) | |
411 | 435 | else dataToDelete | |
412 | 436 | else if (containsElement([chris, toString(this)], caller)) | |
413 | 437 | then dataToDelete | |
414 | - | else throw("Art already minted, cannot delete") | |
438 | + | else throw("Art already minted, you cannot delete it") | |
415 | 439 | } | |
416 | 440 | } | |
417 | 441 | } | |
419 | 443 | ||
420 | 444 | ||
421 | 445 | ||
422 | - | @Callable( | |
446 | + | @Callable(invoke) | |
423 | 447 | func sellArtwork (artId,price,maxMint,assetId) = if (!(dappRunning)) | |
424 | 448 | then throw(maintenanceMSG) | |
425 | 449 | else { | |
426 | - | let id = toBase58String( | |
427 | - | let caller = toBase58String( | |
450 | + | let id = toBase58String(invoke.transactionId) | |
451 | + | let caller = toBase58String(invoke.caller.bytes) | |
428 | 452 | let sellDate = lastBlock.timestamp | |
429 | 453 | let artworkName = getStringByKey(keyArtName(caller, artId)) | |
430 | 454 | if ((artworkName == "")) | |
437 | 461 | let exportHash = getStringByKey(keyArtExportHash(caller, artId)) | |
438 | 462 | if ((size(exportHash) != 64)) | |
439 | 463 | then throw("You cannot sell art with no export hash") | |
440 | - | else if (if (if ((assetId != toBase58String(signAssetId))) | |
441 | - | then (assetId != toBase58String(wavesAssetId)) | |
442 | - | else false) | |
443 | - | then (assetId != toBase58String(usdnAssetId)) | |
444 | - | else false) | |
445 | - | then throw("Only SIGN, USDN or WAVES accepted") | |
446 | - | else { | |
447 | - | let minSellWaves = if (unitTest) | |
448 | - | then 1 | |
449 | - | else getIntegerByKeyFromOracle("waves_min_sell") | |
450 | - | let minSellUsdn = 1000000 | |
451 | - | let minSellSign = if (unitTest) | |
452 | - | then 1 | |
453 | - | else (getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) * 2) | |
454 | - | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
455 | - | then (minSellUsdn > price) | |
456 | - | else false) | |
457 | - | then (price != 0) | |
458 | - | else false) | |
459 | - | then true | |
460 | - | else if (if ((assetId == toBase58String(signAssetId))) | |
461 | - | then (minSellSign > price) | |
462 | - | else false) | |
463 | - | then (price != 0) | |
464 | - | else false) | |
465 | - | then true | |
466 | - | else if (if ((assetId == toBase58String(wavesAssetId))) | |
467 | - | then (minSellWaves > price) | |
468 | - | else false) | |
469 | - | then (price != 0) | |
470 | - | else false) | |
471 | - | then throw("Wrong minimum sell price") | |
472 | - | else { | |
473 | - | let userIsRegistered = getStringByKeyFromUsers(keyUserStatus(caller)) | |
474 | - | if (if ((userIsRegistered == "")) | |
475 | - | then true | |
476 | - | else (userIsRegistered == userAllowed)) | |
477 | - | then throw("Register this account first") | |
478 | - | else if ((userIsRegistered == userSuspended)) | |
479 | - | then throw("Account suspended") | |
480 | - | else if ((userIsRegistered == userRemoved)) | |
481 | - | then throw("Account deleted") | |
482 | - | else { | |
483 | - | let amountSold = getIntegerByKey(keyArtIssued(caller, artId)) | |
484 | - | let maxCanSell = getIntegerByKey(keyArtMaxMint(caller, artId)) | |
485 | - | if ((maxMint > 10)) | |
486 | - | then throw("10 editions max per artwork") | |
487 | - | else if (if ((amountSold != 0)) | |
488 | - | then (amountSold == maxCanSell) | |
464 | + | else if (!(acceptedAssetIds(assetId))) | |
465 | + | then throw("Something wen wrong!") | |
466 | + | else if (!(validateMinSell(assetId, price))) | |
467 | + | then throw("Something wen wrong!") | |
468 | + | else { | |
469 | + | let checkUser = validateUser(caller) | |
470 | + | if ((checkUser != "")) | |
471 | + | then throw(checkUser) | |
472 | + | else { | |
473 | + | let amountSold = getIntegerByKey(keyArtIssued(caller, artId)) | |
474 | + | let maxCanSell = getIntegerByKey(keyArtMaxMint(caller, artId)) | |
475 | + | if ((maxMint > 10)) | |
476 | + | then throw("10 editions max per artwork") | |
477 | + | else if (if ((amountSold != 0)) | |
478 | + | then (amountSold == maxCanSell) | |
479 | + | else false) | |
480 | + | then throw("Max edition reached.") | |
481 | + | else if (if ((amountSold > 0)) | |
482 | + | then (maxCanSell != maxMint) | |
483 | + | else false) | |
484 | + | then throw("Cannot change maximum issuable anymore") | |
485 | + | else { | |
486 | + | let sellStatus = if (if ((price > 0)) | |
487 | + | then (maxMint > 0) | |
489 | 488 | else false) | |
490 | - | then throw("Max edition reached.") | |
491 | - | else if (if ((amountSold > 0)) | |
492 | - | then (maxCanSell != maxMint) | |
493 | - | else false) | |
494 | - | then throw("Cannot change maximum issuable anymore") | |
495 | - | else { | |
496 | - | let sellStatus = if (if ((price > 0)) | |
497 | - | then (maxMint > 0) | |
498 | - | else false) | |
499 | - | then true | |
500 | - | else false | |
489 | + | then true | |
490 | + | else false | |
501 | 491 | [BooleanEntry(keyArtOnSale(caller, artId), sellStatus), IntegerEntry(keyArtPrice(caller, artId), price), IntegerEntry(keyArtMaxMint(caller, artId), maxMint), StringEntry(keyArtAssetIdAccepted(caller, artId), assetId)] | |
502 | - | } | |
503 | - | } | |
504 | - | } | |
505 | - | } | |
492 | + | } | |
493 | + | } | |
494 | + | } | |
506 | 495 | } | |
507 | 496 | } | |
508 | 497 | } | |
509 | 498 | ||
510 | 499 | ||
511 | 500 | ||
512 | - | @Callable( | |
501 | + | @Callable(invoke) | |
513 | 502 | func buyArtwork (artId,issuer) = if (!(dappRunning)) | |
514 | 503 | then throw(maintenanceMSG) | |
515 | 504 | else { | |
516 | - | let id = toBase58String( | |
517 | - | let caller = toBase58String( | |
505 | + | let id = toBase58String(invoke.transactionId) | |
506 | + | let caller = toBase58String(invoke.caller.bytes) | |
518 | 507 | let totalNFT = getIntegerByKey("total_nft_issued") | |
519 | 508 | let signID = getStringByKey(keyArtSignID(issuer, artId)) | |
520 | 509 | let artworkName = getStringByKey(keyArtName(issuer, artId)) | |
527 | 516 | let licenceCID = getStringByKey(keyArtLicenceCid(issuer, artId)) | |
528 | 517 | let licenceHash = getStringByKey(keyArtLicenceHash(issuer, artId)) | |
529 | 518 | let description = take(getStringByKey(keyArtDesc(issuer, artId)), 50) | |
519 | + | let isOnSale = getBooleanByKey(keyArtOnSale(issuer, artId)) | |
530 | 520 | let amountSold = getIntegerByKey(keyArtIssued(issuer, artId)) | |
531 | 521 | let artworkPrice = getIntegerByKey(keyArtPrice(issuer, artId)) | |
532 | - | let isOnSale = getBooleanByKey(keyArtOnSale(issuer, artId)) | |
533 | 522 | let priceAssetId = getStringByKey(keyArtAssetIdAccepted(issuer, artId)) | |
534 | 523 | let sourceHash = getStringByKey(keyArtHashByTxidAddr(issuer, artId)) | |
535 | 524 | let maxCanSell = getIntegerByKey(keyArtMaxMint(issuer, artId)) | |
540 | 529 | else (0 >= maxCanSell)) | |
541 | 530 | then throw("Art not for sale") | |
542 | 531 | else { | |
543 | - | let | |
544 | - | let amount = | |
545 | - | let assetId = | |
546 | - | | |
547 | - | | |
548 | - | ||
549 | - | ||
550 | - | then | |
551 | - | else | |
552 | - | | |
553 | - | | |
554 | - | | |
555 | - | then throw(" | |
532 | + | let $t02311923199 = validatePriceAssetId(invoke, priceAssetId, artworkPrice) | |
533 | + | let amount = $t02311923199._1 | |
534 | + | let assetId = $t02311923199._2 | |
535 | + | let isWhitelisted = checkWhitelist(issuer) | |
536 | + | let cut = if ((isWhitelisted == 1)) | |
537 | + | then 0 | |
538 | + | else if ((priceAssetId == toBase58String(signAssetId))) | |
539 | + | then signCut | |
540 | + | else usdnWaveCut | |
541 | + | let amountForSign = fraction(amount, cut, 100) | |
542 | + | let amountForCreator = (amount - amountForSign) | |
543 | + | if ((amountSold == maxCanSell)) | |
544 | + | then throw("Art sold out") | |
556 | 545 | else { | |
557 | - | let isWhitelisted = checkWhitelist(issuer) | |
558 | - | let cut = if ((isWhitelisted == 1)) | |
559 | - | then 0 | |
560 | - | else if ((priceAssetId == toBase58String(signAssetId))) | |
561 | - | then 8 | |
562 | - | else 10 | |
563 | - | let amountForSign = fraction(amount, cut, 100) | |
564 | - | let amountForCreator = (amount - amountForSign) | |
565 | - | if ((amountSold == maxCanSell)) | |
566 | - | then throw("Art sold out") | |
567 | - | else if ((artworkPrice != amount)) | |
568 | - | then throw("Payment don't match") | |
569 | - | else { | |
570 | - | let newAmountSold = (amountSold + 1) | |
571 | - | let entryDate = lastBlock.timestamp | |
572 | - | let issueMeta = ((((((((((((((((((((((((((("Creator: " + issuer) + ", | |
546 | + | let newAmountSold = (amountSold + 1) | |
547 | + | let entryDate = lastBlock.timestamp | |
548 | + | let issueMeta = ((((((((((((((((((((((((((("Creator: " + issuer) + ", | |
573 | 549 | ArtID: ") + artId) + ", | |
574 | 550 | SignID: ") + signID) + ", | |
575 | 551 | Artwork name: ") + artworkName) + ", | |
582 | 558 | Export hash: ") + exportHash) + ", | |
583 | 559 | Licence cid: ") + licenceCID) + ", | |
584 | 560 | Licence hash: ") + licenceHash) | |
585 | - | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
586 | - | let idNFT = calculateAssetId(issueNFT) | |
587 | - | let sellStatus = if ((newAmountSold == maxCanSell)) | |
588 | - | then false | |
589 | - | else true | |
590 | - | [IntegerEntry(keyArtIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)), StringEntry(((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer), ((((((((((caller + "_") + toString(entryDate)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyArtOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(i.caller, 1, idNFT)] | |
591 | - | } | |
561 | + | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
562 | + | let idNFT = calculateAssetId(issueNFT) | |
563 | + | let sellStatus = if ((newAmountSold == maxCanSell)) | |
564 | + | then false | |
565 | + | else true | |
566 | + | [IntegerEntry(keyArtIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)), StringEntry(((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer), ((((((((((caller + "_") + toString(entryDate)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyArtOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(invoke.caller, 1, idNFT)] | |
592 | 567 | } | |
593 | 568 | } | |
594 | 569 | } | |
595 | 570 | } | |
596 | 571 | ||
597 | 572 | ||
598 | - | ||
599 | - | @Callable(i) | |
600 | - | func deleteEntry (entry) = { | |
601 | - | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
602 | - | if ((caller == chris)) | |
603 | - | then [DeleteEntry(entry)] | |
604 | - | else throw("no") | |
605 | - | } | |
606 | - | ||
607 | - |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
5 | 5 | ||
6 | 6 | let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
7 | 7 | ||
8 | 8 | let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
11 | 11 | ||
12 | 12 | let userDapp = if (unitTest) | |
13 | 13 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
14 | - | else value(addressFromString(" | |
14 | + | else value(addressFromString("3Mx9KU2qWAgHfp1h3iyVsdiHiz3uuZFbBUG")) | |
15 | 15 | ||
16 | - | let whitelistDapp = value(addressFromString(" | |
16 | + | let whitelistDapp = value(addressFromString("3MuidizAcKUKVzU6AsDFfqcZQC7nkTEMm95")) | |
17 | 17 | ||
18 | 18 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
19 | 19 | ||
20 | 20 | let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
21 | 21 | ||
22 | 22 | let wavesAssetId = base58'' | |
23 | 23 | ||
24 | 24 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
25 | 25 | ||
26 | 26 | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
27 | 27 | ||
28 | 28 | let signCut = 7 | |
29 | 29 | ||
30 | - | let usdnCut = 10 | |
31 | - | ||
32 | - | let wavesCut = 10 | |
30 | + | let usdnWaveCut = 10 | |
33 | 31 | ||
34 | 32 | let defaultLicence = "bafybeigisfqtyo2qdfsceh5fpcp7eeymrpeglp6edao2bmyhijbayvausy/licence.pdf" | |
35 | 33 | ||
36 | 34 | let defaultHashLicence = "3df79d34abbca99308e79cb94461c1893582604d68329a41fd4bec1885e6adb4" | |
37 | 35 | ||
38 | - | let dappRunning = match getBoolean(userDapp, "conf_dapp_is_running") { | |
39 | - | case a: Boolean => | |
40 | - | a | |
41 | - | case _ => | |
42 | - | true | |
43 | - | } | |
36 | + | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
44 | 37 | ||
45 | - | let maintenanceMSG = match getString(userDapp, "conf_maintenance_msg") { | |
46 | - | case a: String => | |
47 | - | a | |
48 | - | case _ => | |
49 | - | "" | |
50 | - | } | |
38 | + | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
51 | 39 | ||
52 | 40 | let userSuspended = "SUSPENDED" | |
53 | 41 | ||
54 | 42 | let userRemoved = "REMOVED" | |
55 | 43 | ||
56 | 44 | let userUnregistered = "UNREGISTERED" | |
57 | 45 | ||
58 | 46 | let userAllowed = "ALLOWED" | |
59 | 47 | ||
60 | - | func getStringByKeyFromUsers (key) = match getString(userDapp, key) { | |
61 | - | case a: String => | |
62 | - | a | |
63 | - | case _ => | |
64 | - | "" | |
65 | - | } | |
48 | + | func getStringByKeyFromUsers (key) = valueOrElse(getString(userDapp, key), "") | |
66 | 49 | ||
67 | 50 | ||
68 | - | func getStringByKey (key) = match getString(this, key) { | |
69 | - | case a: String => | |
70 | - | a | |
71 | - | case _ => | |
72 | - | "" | |
73 | - | } | |
51 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
74 | 52 | ||
75 | 53 | ||
76 | - | func getIntegerByKeyFromOracle (key) = match getInteger(oracleFee, key) { | |
77 | - | case a: Int => | |
78 | - | a | |
79 | - | case _ => | |
80 | - | throw("Integer undefine or 0 in oracle") | |
81 | - | } | |
54 | + | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
82 | 55 | ||
83 | 56 | ||
84 | - | func getIntegerByKey (key) = match getInteger(this, key) { | |
85 | - | case i: Int => | |
86 | - | i | |
87 | - | case _ => | |
88 | - | 0 | |
89 | - | } | |
57 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
90 | 58 | ||
91 | 59 | ||
92 | - | func checkWhitelist (key) = match getInteger(whitelistDapp, key) { | |
93 | - | case a: Int => | |
94 | - | if ((a >= height)) | |
95 | - | then 1 | |
96 | - | else 0 | |
97 | - | case _ => | |
98 | - | 0 | |
99 | - | } | |
60 | + | func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0) | |
100 | 61 | ||
101 | 62 | ||
102 | - | func getBooleanByKey (key) = match getBoolean(this, key) { | |
103 | - | case i: Boolean => | |
104 | - | i | |
105 | - | case _ => | |
106 | - | false | |
107 | - | } | |
63 | + | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
108 | 64 | ||
109 | 65 | ||
110 | 66 | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signDapp, ((("data_fc_" + signID) + "_") + Owner)) { | |
111 | 67 | case a: String => | |
112 | 68 | if (contains(a, sha256Hash)) | |
113 | 69 | then true | |
114 | 70 | else false | |
115 | 71 | case _ => | |
116 | 72 | false | |
117 | 73 | } | |
118 | 74 | ||
119 | 75 | ||
120 | 76 | func validateCID (cid) = if (contains(cid, "/")) | |
121 | - | then if (if (( | |
122 | - | then ( | |
77 | + | then if (if ((76 > size(cid))) | |
78 | + | then (size(split(cid, "/")[0]) == 59) | |
123 | 79 | else false) | |
124 | 80 | then (16 > size(split(cid, "/")[1])) | |
125 | 81 | else false | |
126 | 82 | else false | |
127 | 83 | ||
128 | 84 | ||
129 | - | func validateHash (hash) = ( | |
85 | + | func validateHash (hash) = (size(hash) == 64) | |
130 | 86 | ||
131 | 87 | ||
132 | 88 | func keyUserStatus (caller) = ("user_status_" + caller) | |
133 | 89 | ||
134 | 90 | ||
135 | 91 | func keyArtDate (caller,artId) = ((("art_date_" + artId) + "_") + caller) | |
136 | 92 | ||
137 | 93 | ||
138 | 94 | func keyArtName (caller,artId) = ((("art_name_" + artId) + "_") + caller) | |
139 | 95 | ||
140 | 96 | ||
141 | 97 | func keyArtDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller) | |
142 | 98 | ||
143 | 99 | ||
144 | 100 | func keyArtDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller) | |
145 | 101 | ||
146 | 102 | ||
147 | 103 | func keyArtExportHash (caller,artId) = ((("art_export_hash_" + artId) + "_") + caller) | |
148 | 104 | ||
149 | 105 | ||
150 | 106 | func keyArtExportCid (caller,artId) = ((("art_export_cid_" + artId) + "_") + caller) | |
151 | 107 | ||
152 | 108 | ||
153 | 109 | func keyArtMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller) | |
154 | 110 | ||
155 | 111 | ||
156 | 112 | func keyArtSignID (caller,artId) = ((("art_signid_" + artId) + "_") + caller) | |
157 | 113 | ||
158 | 114 | ||
159 | 115 | func keyArtIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller) | |
160 | 116 | ||
161 | 117 | ||
162 | 118 | func keyArtOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller) | |
163 | 119 | ||
164 | 120 | ||
165 | 121 | func keyArtLicenceHash (caller,artId) = ((("art_licence_hash_" + artId) + "_") + caller) | |
166 | 122 | ||
167 | 123 | ||
168 | 124 | func keyArtLicenceCid (caller,artId) = ((("art_licence_cid_" + artId) + "_") + caller) | |
169 | 125 | ||
170 | 126 | ||
171 | 127 | func keyArtTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller) | |
172 | 128 | ||
173 | 129 | ||
174 | 130 | func keyArtType (caller,artId) = ((("art_type_" + artId) + "_") + caller) | |
175 | 131 | ||
176 | 132 | ||
177 | 133 | func keyArtPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller) | |
178 | 134 | ||
179 | 135 | ||
180 | 136 | func keyArtAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller) | |
181 | 137 | ||
182 | 138 | ||
183 | 139 | func keyArtFlag (caller,artId) = ((("art_flag_" + artId) + "_") + caller) | |
184 | 140 | ||
185 | 141 | ||
186 | 142 | func keyArtHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller) | |
187 | 143 | ||
188 | 144 | ||
189 | 145 | func keyArtOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash) | |
190 | 146 | ||
191 | 147 | ||
192 | 148 | func keyArtArtidBySignid (caller,signId) = ((("get_artidbysignid_" + signId) + "_") + caller) | |
193 | 149 | ||
194 | 150 | ||
195 | 151 | func keyArtTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller))))) | |
196 | 152 | ||
197 | 153 | ||
198 | 154 | func validateAllCID (cidDisplay,cidExport,cidLicence) = if (!(validateCID(cidDisplay))) | |
199 | 155 | then throw("Wrong Display CID") | |
200 | 156 | else if (!(validateCID(cidExport))) | |
201 | 157 | then throw("Wrong Export CID") | |
202 | 158 | else if (if ((cidLicence != "")) | |
203 | 159 | then !(validateCID(cidLicence)) | |
204 | 160 | else false) | |
205 | 161 | then throw("Wrong Licence CID") | |
206 | 162 | else true | |
207 | 163 | ||
208 | 164 | ||
209 | 165 | func validateAllHash (sha256Export,sha256Licence) = if (!(validateHash(sha256Export))) | |
210 | 166 | then throw("Export Hash 64 char. max") | |
211 | 167 | else if (!(validateHash(sha256Licence))) | |
212 | 168 | then throw("Licence Hash 64 char. max") | |
213 | 169 | else true | |
214 | 170 | ||
215 | 171 | ||
216 | 172 | func validateString (str,max) = if ((size(str) == 0)) | |
217 | 173 | then throw("Field cannot be is empty") | |
218 | 174 | else if ((size(str) > max)) | |
219 | 175 | then throw((str + " is too long")) | |
220 | 176 | else true | |
221 | 177 | ||
222 | 178 | ||
179 | + | func validateUser (caller) = { | |
180 | + | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
181 | + | if (if ((userStatus == userUnregistered)) | |
182 | + | then true | |
183 | + | else (userStatus == userAllowed)) | |
184 | + | then "Register this account first with \"Account\" tab" | |
185 | + | else if ((userStatus == userSuspended)) | |
186 | + | then "Account suspended" | |
187 | + | else if ((userStatus == userRemoved)) | |
188 | + | then "Account removed" | |
189 | + | else "" | |
190 | + | } | |
191 | + | ||
192 | + | ||
193 | + | func setLIcence (cidLicence,sha256Licence) = { | |
194 | + | let cid = if ((size(cidLicence) == 0)) | |
195 | + | then defaultLicence | |
196 | + | else cidLicence | |
197 | + | let hash = if ((size(sha256Licence) == 0)) | |
198 | + | then defaultHashLicence | |
199 | + | else sha256Licence | |
200 | + | $Tuple2(cid, hash) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | func setLIcenceCID (cidLicence) = if ((size(cidLicence) == 0)) | |
205 | + | then defaultLicence | |
206 | + | else cidLicence | |
207 | + | ||
208 | + | ||
209 | + | func setLIcenceHash (sha256Licence) = if ((size(sha256Licence) == 0)) | |
210 | + | then defaultHashLicence | |
211 | + | else sha256Licence | |
212 | + | ||
213 | + | ||
214 | + | func validateArtworkData (caller,cidDisplay,cidExport,licenceCID,sha256Export,licenceHash,name,description,tags,maxmint) = { | |
215 | + | let checkUser = validateUser(caller) | |
216 | + | if ((checkUser != "")) | |
217 | + | then throw(checkUser) | |
218 | + | else if ((size(cidDisplay) == 0)) | |
219 | + | then throw("Display CID cannot be empty") | |
220 | + | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
221 | + | then throw("Problem with CID") | |
222 | + | else if (!(validateAllHash(sha256Export, licenceHash))) | |
223 | + | then throw("Problem with Hashes") | |
224 | + | else if (!(validateString(name, 100))) | |
225 | + | then throw("100 Char. max name") | |
226 | + | else if (!(validateString(description, 1000))) | |
227 | + | then throw("1000 Char. max description") | |
228 | + | else if ((size(split(tags, ",")) > 5)) | |
229 | + | then throw("5 tags max.") | |
230 | + | else if ((maxmint > 10)) | |
231 | + | then throw("10 editions max per artwork") | |
232 | + | else "" | |
233 | + | } | |
234 | + | ||
235 | + | ||
236 | + | func validatePayment (invoke) = if ((size(invoke.payments) == 0)) | |
237 | + | then throw("No payment attached") | |
238 | + | else { | |
239 | + | let payment = value(invoke.payments[0]) | |
240 | + | let amount = value(payment.amount) | |
241 | + | let assetId = if (if (isDefined(payment.assetId)) | |
242 | + | then (payment.assetId == signAssetId) | |
243 | + | else false) | |
244 | + | then payment.assetId | |
245 | + | else throw("Only SIGN token accepted as transaction fee") | |
246 | + | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
247 | + | if ((amount != currentCertificationPrice)) | |
248 | + | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
249 | + | else $Tuple2(amount, assetId) | |
250 | + | } | |
251 | + | ||
252 | + | ||
253 | + | func isArtMinted (addressToUse,artId) = match getInteger(this, keyArtIssued(addressToUse, artId)) { | |
254 | + | case b: Int => | |
255 | + | if ((b != 0)) | |
256 | + | then true | |
257 | + | else false | |
258 | + | case _ => | |
259 | + | false | |
260 | + | } | |
261 | + | ||
262 | + | ||
263 | + | func validatePriceAssetId (invoke,priceAssetId,artworkPrice) = { | |
264 | + | let payment = value(invoke.payments[0]) | |
265 | + | let amount = value(payment.amount) | |
266 | + | let assetId = if (!(isDefined(payment.assetId))) | |
267 | + | then unit | |
268 | + | else if (if ((size(priceAssetId) > 0)) | |
269 | + | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
270 | + | else false) | |
271 | + | then payment.assetId | |
272 | + | else throw("Wrong asset id") | |
273 | + | if (if ((assetId == unit)) | |
274 | + | then (priceAssetId != "") | |
275 | + | else false) | |
276 | + | then throw("Wrong asset id") | |
277 | + | else if ((artworkPrice != amount)) | |
278 | + | then throw("Payment don't match") | |
279 | + | else $Tuple2(amount, assetId) | |
280 | + | } | |
281 | + | ||
282 | + | ||
283 | + | func acceptedAssetIds (assetId) = if (if (if ((assetId != toBase58String(signAssetId))) | |
284 | + | then (assetId != toBase58String(wavesAssetId)) | |
285 | + | else false) | |
286 | + | then (assetId != toBase58String(usdnAssetId)) | |
287 | + | else false) | |
288 | + | then throw("Only SIGN, USDN or WAVES accepted") | |
289 | + | else true | |
290 | + | ||
291 | + | ||
292 | + | func validateMinSell (assetId,price) = { | |
293 | + | let minSellWaves = if (unitTest) | |
294 | + | then 1 | |
295 | + | else getIntegerByKeyFromOracle("waves_min_sell") | |
296 | + | let minSellUsdn = 1000000 | |
297 | + | let minSellSign = if (unitTest) | |
298 | + | then 1 | |
299 | + | else (getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) * 2) | |
300 | + | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
301 | + | then (minSellUsdn > price) | |
302 | + | else false) | |
303 | + | then (price != 0) | |
304 | + | else false) | |
305 | + | then true | |
306 | + | else if (if ((assetId == toBase58String(signAssetId))) | |
307 | + | then (minSellSign > price) | |
308 | + | else false) | |
309 | + | then (price != 0) | |
310 | + | else false) | |
311 | + | then true | |
312 | + | else if (if ((assetId == toBase58String(wavesAssetId))) | |
313 | + | then (minSellWaves > price) | |
314 | + | else false) | |
315 | + | then (price != 0) | |
316 | + | else false) | |
317 | + | then throw("Wrong minimum sell price") | |
318 | + | else true | |
319 | + | } | |
320 | + | ||
321 | + | ||
223 | 322 | @Callable(invoke) | |
224 | 323 | func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = if (!(dappRunning)) | |
225 | 324 | then throw(maintenanceMSG) | |
226 | 325 | else { | |
227 | 326 | let artId = toBase58String(invoke.transactionId) | |
327 | + | let timestamp = lastBlock.timestamp | |
228 | 328 | let caller = toBase58String(invoke.caller.bytes) | |
229 | - | let timestamp = lastBlock.timestamp | |
230 | - | let licenceCID = if ((size(cidLicence) == 0)) | |
231 | - | then defaultLicence | |
232 | - | else cidLicence | |
233 | - | let licenceHash = if ((size(sha256Licence) == 0)) | |
234 | - | then defaultHashLicence | |
235 | - | else sha256Licence | |
236 | - | let userIsRegistered = match getString(userDapp, ("user_status_" + caller)) { | |
237 | - | case s: String => | |
238 | - | s | |
239 | - | case _ => | |
240 | - | userUnregistered | |
241 | - | } | |
242 | - | if (if (isDefined(userIsRegistered)) | |
243 | - | then if ((userIsRegistered == userUnregistered)) | |
244 | - | then true | |
245 | - | else (userIsRegistered == userAllowed) | |
246 | - | else false) | |
247 | - | then throw("Register this account first with \"Account\" tab") | |
248 | - | else if ((userIsRegistered == userSuspended)) | |
249 | - | then throw("Account suspended") | |
250 | - | else if ((userIsRegistered == userRemoved)) | |
251 | - | then throw("Account removed") | |
252 | - | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
253 | - | then throw("Problem with CID") | |
254 | - | else if (!(validateHash(sha256Hash))) | |
255 | - | then throw("Hash should be 64 characters maximum") | |
256 | - | else if (!(validateAllHash(sha256Export, licenceHash))) | |
257 | - | then throw("Problem with Hashes") | |
258 | - | else if ((size(invoke.payments) == 0)) | |
259 | - | then throw("No payment attached") | |
329 | + | if (!(validateHash(sha256Hash))) | |
330 | + | then throw("Hash should be 64 characters maximum") | |
331 | + | else { | |
332 | + | let $t01172711796 = setLIcence(cidLicence, sha256Licence) | |
333 | + | let licenceCID = $t01172711796._1 | |
334 | + | let licenceHash = $t01172711796._2 | |
335 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, maxmint) | |
336 | + | if ((validateArtwork != "")) | |
337 | + | then throw("Something went wrong!") | |
338 | + | else { | |
339 | + | let $t01202412071 = validatePayment(invoke) | |
340 | + | let amount = $t01202412071._1 | |
341 | + | let assetId = $t01202412071._2 | |
342 | + | if (!(isDefined(amount))) | |
343 | + | then throw("Something went wrong") | |
344 | + | else { | |
345 | + | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, caller)) | |
346 | + | if ((entryExist != "")) | |
347 | + | then throw("You already added it") | |
260 | 348 | else { | |
261 | - | let payment = value(invoke.payments[0]) | |
262 | - | let amount = value(payment.amount) | |
263 | - | let assetId = if (if (isDefined(payment.assetId)) | |
264 | - | then (payment.assetId == signAssetId) | |
265 | - | else false) | |
266 | - | then payment.assetId | |
267 | - | else throw("Only SIGN token accepted") | |
268 | - | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) | |
269 | - | if ((amount != currentCertificationPrice)) | |
270 | - | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
349 | + | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
350 | + | if ((hashExist != "")) | |
351 | + | then throw("Hash already registered") | |
271 | 352 | else { | |
272 | - | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, caller)) | |
273 | - | if ((entryExist != "")) | |
274 | - | then throw("You already added it") | |
275 | - | else { | |
276 | - | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
277 | - | if ((hashExist != "")) | |
278 | - | then throw("Hash already registered") | |
279 | - | else { | |
280 | - | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
281 | - | if (!(isSignCertified)) | |
282 | - | then throw("Sign Certificate not found for this address.") | |
283 | - | else if ((size(cidDisplay) == 0)) | |
284 | - | then throw("Display CID cannot be empty") | |
285 | - | else if (!(validateString(name, 100))) | |
286 | - | then throw("100 Char. max name") | |
287 | - | else if (!(validateString(description, 1000))) | |
288 | - | then throw("1000 Char. max description") | |
289 | - | else if ((size(split(tags, ",")) > 5)) | |
290 | - | then throw("5 tags max.") | |
291 | - | else if ((maxmint > 10)) | |
292 | - | then throw("10 editions max") | |
293 | - | else [StringEntry(keyArtOwnerByHash(sha256Hash), caller), StringEntry(keyArtTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyArtDate(caller, artId), timestamp), StringEntry(keyArtName(caller, artId), name), StringEntry(keyArtDesc(caller, artId), description), StringEntry(keyArtDisplayCid(caller, artId), cidDisplay), StringEntry(keyArtExportCid(caller, artId), cidExport), StringEntry(keyArtExportHash(caller, artId), sha256Export), StringEntry(keyArtLicenceHash(caller, artId), licenceHash), StringEntry(keyArtLicenceCid(caller, artId), licenceCID), StringEntry(keyArtType(caller, artId), type), StringEntry(keyArtTags(caller, artId), tags), IntegerEntry(keyArtMaxMint(caller, artId), maxmint), StringEntry(keyArtSignID(caller, artId), signID), IntegerEntry(keyArtIssued(caller, artId), 0), BooleanEntry(keyArtOnSale(caller, artId), false), StringEntry(keyArtArtidBySignid(caller, signID), artId), StringEntry(keyArtHashByTxidAddr(caller, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
294 | - | } | |
295 | - | } | |
353 | + | let isSignCertified = checkSignCertificate(signID, caller, sha256Hash) | |
354 | + | if (!(isSignCertified)) | |
355 | + | then throw("Sign Certificate not found for this address.") | |
356 | + | else [StringEntry(keyArtOwnerByHash(sha256Hash), caller), StringEntry(keyArtTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyArtDate(caller, artId), timestamp), StringEntry(keyArtName(caller, artId), name), StringEntry(keyArtDesc(caller, artId), description), StringEntry(keyArtDisplayCid(caller, artId), cidDisplay), StringEntry(keyArtExportCid(caller, artId), cidExport), StringEntry(keyArtExportHash(caller, artId), sha256Export), StringEntry(keyArtLicenceHash(caller, artId), licenceHash), StringEntry(keyArtLicenceCid(caller, artId), licenceCID), StringEntry(keyArtType(caller, artId), type), StringEntry(keyArtTags(caller, artId), tags), IntegerEntry(keyArtMaxMint(caller, artId), maxmint), StringEntry(keyArtSignID(caller, artId), signID), IntegerEntry(keyArtIssued(caller, artId), 0), BooleanEntry(keyArtOnSale(caller, artId), false), StringEntry(keyArtArtidBySignid(caller, signID), artId), StringEntry(keyArtHashByTxidAddr(caller, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
296 | 357 | } | |
297 | 358 | } | |
359 | + | } | |
360 | + | } | |
361 | + | } | |
298 | 362 | } | |
299 | 363 | ||
300 | 364 | ||
301 | 365 | ||
302 | 366 | @Callable(invoke) | |
303 | 367 | func updateArtwork (txid,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = if (!(dappRunning)) | |
304 | 368 | then throw(maintenanceMSG) | |
305 | 369 | else { | |
306 | 370 | let updateId = toBase58String(invoke.transactionId) | |
307 | 371 | let caller = toBase58String(invoke.caller.bytes) | |
308 | - | let licenceCID = if ((size(cidLicence) == 0)) | |
309 | - | then defaultLicence | |
310 | - | else cidLicence | |
311 | - | let licenceHash = if ((size(sha256Licence) == 0)) | |
312 | - | then defaultHashLicence | |
313 | - | else sha256Licence | |
314 | - | let userIsRegistered = getStringByKeyFromUsers(keyUserStatus(caller)) | |
315 | - | if (if ((userIsRegistered == "")) | |
316 | - | then true | |
317 | - | else (userIsRegistered == userAllowed)) | |
318 | - | then throw("Register first with \"User infos\"") | |
319 | - | else if ((userIsRegistered == userSuspended)) | |
320 | - | then throw("Account suspended") | |
321 | - | else if ((userIsRegistered == userRemoved)) | |
322 | - | then throw("Account removed") | |
323 | - | else if (!(validateAllCID(cidDisplay, cidExport, licenceCID))) | |
324 | - | then throw("Problem with CID") | |
325 | - | else if (!(validateAllHash(sha256Export, licenceHash))) | |
326 | - | then throw("Problem with Hashes") | |
327 | - | else { | |
328 | - | let entryExist = getStringByKey(keyArtName(caller, txid)) | |
329 | - | if ((entryExist == "")) | |
330 | - | then throw("Entry not found") | |
331 | - | else if (!(validateString(name, 100))) | |
332 | - | then throw("100 Char. max name") | |
333 | - | else if (!(validateString(description, 1000))) | |
334 | - | then throw("1000 Char. max description") | |
335 | - | else { | |
336 | - | let flag = getStringByKey(keyArtFlag(caller, txid)) | |
337 | - | if ((flag == "ILLEGAL")) | |
338 | - | then throw("Cannot update ILLEGAL artwork") | |
339 | - | else { | |
340 | - | let artworkMinted = match getInteger(this, keyArtIssued(caller, txid)) { | |
341 | - | case b: Int => | |
342 | - | if ((b == 0)) | |
343 | - | then false | |
344 | - | else true | |
345 | - | case _ => | |
346 | - | false | |
347 | - | } | |
348 | - | if ((size(split(tags, ",")) > 5)) | |
349 | - | then throw("5 tags max.") | |
350 | - | else if ((maxmint > 10)) | |
351 | - | then throw("10 editions max per artwork") | |
352 | - | else if (!(artworkMinted)) | |
353 | - | then [StringEntry(keyArtName(caller, txid), name), StringEntry(keyArtDesc(caller, txid), description), StringEntry(keyArtDisplayCid(caller, txid), cidDisplay), StringEntry(keyArtExportCid(caller, txid), cidExport), StringEntry(keyArtExportHash(caller, txid), sha256Export), StringEntry(keyArtLicenceCid(caller, txid), licenceCID), StringEntry(keyArtLicenceHash(caller, txid), licenceHash), IntegerEntry(keyArtMaxMint(caller, txid), maxmint), StringEntry(keyArtTags(caller, txid), tags), StringEntry(keyArtType(caller, txid), type)] | |
354 | - | else throw("Already minted") | |
355 | - | } | |
356 | - | } | |
357 | - | } | |
372 | + | let $t01492614995 = setLIcence(cidLicence, sha256Licence) | |
373 | + | let licenceCID = $t01492614995._1 | |
374 | + | let licenceHash = $t01492614995._2 | |
375 | + | let validateArtwork = validateArtworkData(caller, cidDisplay, cidExport, licenceCID, sha256Export, licenceHash, name, description, tags, maxmint) | |
376 | + | if ((validateArtwork != "")) | |
377 | + | then throw("Something went wrong!") | |
378 | + | else { | |
379 | + | let entryExist = getStringByKey(keyArtName(caller, txid)) | |
380 | + | if ((entryExist == "")) | |
381 | + | then throw("Entry not found") | |
382 | + | else { | |
383 | + | let flag = getStringByKey(keyArtFlag(caller, txid)) | |
384 | + | if ((flag == "ILLEGAL")) | |
385 | + | then throw("Cannot update ILLEGAL artwork") | |
386 | + | else if (!(isArtMinted(caller, txid))) | |
387 | + | then [StringEntry(keyArtName(caller, txid), name), StringEntry(keyArtDesc(caller, txid), description), StringEntry(keyArtDisplayCid(caller, txid), cidDisplay), StringEntry(keyArtExportCid(caller, txid), cidExport), StringEntry(keyArtExportHash(caller, txid), sha256Export), StringEntry(keyArtLicenceCid(caller, txid), licenceCID), StringEntry(keyArtLicenceHash(caller, txid), licenceHash), IntegerEntry(keyArtMaxMint(caller, txid), maxmint), StringEntry(keyArtTags(caller, txid), tags), StringEntry(keyArtType(caller, txid), type)] | |
388 | + | else throw("Already minted") | |
389 | + | } | |
390 | + | } | |
358 | 391 | } | |
359 | 392 | ||
360 | 393 | ||
361 | 394 | ||
362 | - | @Callable( | |
395 | + | @Callable(invoke) | |
363 | 396 | func flagArtwork (artId,addr,flag) = { | |
364 | - | let caller = toString(addressFromPublicKey( | |
365 | - | let id = toBase58String( | |
397 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
398 | + | let id = toBase58String(invoke.transactionId) | |
366 | 399 | if (containsElement([chris, joep, toString(this)], caller)) | |
367 | 400 | then if ((flag == "CONSENT")) | |
368 | 401 | then [StringEntry(keyArtFlag(addr, artId), flag)] | |
369 | 402 | else if ((flag == "")) | |
370 | 403 | then [StringEntry(keyArtFlag(addr, artId), flag)] | |
371 | 404 | else if ((flag == "ILLEGAL")) | |
372 | 405 | then [StringEntry(keyArtFlag(addr, artId), flag), StringEntry(keyArtName(addr, artId), "ILLEGAL CONTENT"), StringEntry(keyArtDesc(addr, artId), "ILLEGAL CONTENT"), StringEntry(keyArtDisplayCid(addr, artId), ""), StringEntry(keyArtExportCid(addr, artId), ""), StringEntry(keyArtLicenceCid(addr, artId), "")] | |
373 | 406 | else throw(("Unknow status " + flag)) | |
374 | 407 | else throw("You are not allowed") | |
375 | 408 | } | |
376 | 409 | ||
377 | 410 | ||
378 | 411 | ||
379 | - | @Callable( | |
412 | + | @Callable(invoke) | |
380 | 413 | func deleteArtwork (artId,addr) = { | |
381 | - | let caller = toString(addressFromPublicKey( | |
382 | - | let id = toBase58String( | |
414 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
415 | + | let id = toBase58String(invoke.transactionId) | |
383 | 416 | let addressToUse = if (containsElement([chris, joep, toString(this)], caller)) | |
384 | 417 | then addr | |
385 | 418 | else caller | |
386 | 419 | let entryExist = getStringByKey(keyArtName(addressToUse, artId)) | |
387 | 420 | if ((entryExist == "")) | |
388 | 421 | then throw("No art matching for this address") | |
389 | 422 | else { | |
390 | - | let artworkMinted = match getInteger(this, keyArtIssued(addressToUse, artId)) { | |
391 | - | case b: Int => | |
392 | - | if ((b != 0)) | |
393 | - | then true | |
394 | - | else false | |
395 | - | case _ => | |
396 | - | false | |
397 | - | } | |
398 | - | let maxMint = getIntegerByKey(keyArtMaxMint(addressToUse, artId)) | |
399 | 423 | let sha256Hash = getStringByKey(keyArtHashByTxidAddr(addressToUse, artId)) | |
400 | 424 | if ((sha256Hash == "")) | |
401 | 425 | then throw("No art hash matching for this address") | |
402 | 426 | else { | |
403 | 427 | let signID = getStringByKey(keyArtSignID(addressToUse, artId)) | |
404 | 428 | if ((signID == "")) | |
405 | 429 | then throw("No SIGN ID matching") | |
406 | 430 | else { | |
407 | 431 | let dataToDelete = [DeleteEntry(keyArtDate(addressToUse, artId)), DeleteEntry(keyArtName(addressToUse, artId)), DeleteEntry(keyArtDesc(addressToUse, artId)), DeleteEntry(keyArtDisplayCid(addressToUse, artId)), DeleteEntry(keyArtExportCid(addressToUse, artId)), DeleteEntry(keyArtExportHash(addressToUse, artId)), DeleteEntry(keyArtLicenceHash(addressToUse, artId)), DeleteEntry(keyArtLicenceCid(addressToUse, artId)), DeleteEntry(keyArtType(addressToUse, artId)), DeleteEntry(keyArtTags(addressToUse, artId)), DeleteEntry(keyArtMaxMint(addressToUse, artId)), DeleteEntry(keyArtSignID(addressToUse, artId)), DeleteEntry(keyArtIssued(addressToUse, artId)), DeleteEntry(keyArtOnSale(addressToUse, artId)), DeleteEntry(keyArtFlag(addr, artId)), DeleteEntry(keyArtOwnerByHash(sha256Hash)), DeleteEntry(keyArtArtidBySignid(addressToUse, signID)), DeleteEntry(keyArtTxidByHashOwner(sha256Hash, addressToUse))] | |
408 | - | if (!( | |
432 | + | if (!(isArtMinted(addressToUse, artId))) | |
409 | 433 | then if (!(dappRunning)) | |
410 | 434 | then throw(maintenanceMSG) | |
411 | 435 | else dataToDelete | |
412 | 436 | else if (containsElement([chris, toString(this)], caller)) | |
413 | 437 | then dataToDelete | |
414 | - | else throw("Art already minted, cannot delete") | |
438 | + | else throw("Art already minted, you cannot delete it") | |
415 | 439 | } | |
416 | 440 | } | |
417 | 441 | } | |
418 | 442 | } | |
419 | 443 | ||
420 | 444 | ||
421 | 445 | ||
422 | - | @Callable( | |
446 | + | @Callable(invoke) | |
423 | 447 | func sellArtwork (artId,price,maxMint,assetId) = if (!(dappRunning)) | |
424 | 448 | then throw(maintenanceMSG) | |
425 | 449 | else { | |
426 | - | let id = toBase58String( | |
427 | - | let caller = toBase58String( | |
450 | + | let id = toBase58String(invoke.transactionId) | |
451 | + | let caller = toBase58String(invoke.caller.bytes) | |
428 | 452 | let sellDate = lastBlock.timestamp | |
429 | 453 | let artworkName = getStringByKey(keyArtName(caller, artId)) | |
430 | 454 | if ((artworkName == "")) | |
431 | 455 | then throw("This art doesn't match match your account") | |
432 | 456 | else { | |
433 | 457 | let exportCID = getStringByKey(keyArtExportCid(caller, artId)) | |
434 | 458 | if ((size(split(exportCID, "/")[0]) != 59)) | |
435 | 459 | then throw("You cannot sell art with no export file") | |
436 | 460 | else { | |
437 | 461 | let exportHash = getStringByKey(keyArtExportHash(caller, artId)) | |
438 | 462 | if ((size(exportHash) != 64)) | |
439 | 463 | then throw("You cannot sell art with no export hash") | |
440 | - | else if (if (if ((assetId != toBase58String(signAssetId))) | |
441 | - | then (assetId != toBase58String(wavesAssetId)) | |
442 | - | else false) | |
443 | - | then (assetId != toBase58String(usdnAssetId)) | |
444 | - | else false) | |
445 | - | then throw("Only SIGN, USDN or WAVES accepted") | |
446 | - | else { | |
447 | - | let minSellWaves = if (unitTest) | |
448 | - | then 1 | |
449 | - | else getIntegerByKeyFromOracle("waves_min_sell") | |
450 | - | let minSellUsdn = 1000000 | |
451 | - | let minSellSign = if (unitTest) | |
452 | - | then 1 | |
453 | - | else (getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(signAssetId))) * 2) | |
454 | - | if (if (if (if (if ((assetId == toBase58String(usdnAssetId))) | |
455 | - | then (minSellUsdn > price) | |
456 | - | else false) | |
457 | - | then (price != 0) | |
458 | - | else false) | |
459 | - | then true | |
460 | - | else if (if ((assetId == toBase58String(signAssetId))) | |
461 | - | then (minSellSign > price) | |
462 | - | else false) | |
463 | - | then (price != 0) | |
464 | - | else false) | |
465 | - | then true | |
466 | - | else if (if ((assetId == toBase58String(wavesAssetId))) | |
467 | - | then (minSellWaves > price) | |
468 | - | else false) | |
469 | - | then (price != 0) | |
470 | - | else false) | |
471 | - | then throw("Wrong minimum sell price") | |
472 | - | else { | |
473 | - | let userIsRegistered = getStringByKeyFromUsers(keyUserStatus(caller)) | |
474 | - | if (if ((userIsRegistered == "")) | |
475 | - | then true | |
476 | - | else (userIsRegistered == userAllowed)) | |
477 | - | then throw("Register this account first") | |
478 | - | else if ((userIsRegistered == userSuspended)) | |
479 | - | then throw("Account suspended") | |
480 | - | else if ((userIsRegistered == userRemoved)) | |
481 | - | then throw("Account deleted") | |
482 | - | else { | |
483 | - | let amountSold = getIntegerByKey(keyArtIssued(caller, artId)) | |
484 | - | let maxCanSell = getIntegerByKey(keyArtMaxMint(caller, artId)) | |
485 | - | if ((maxMint > 10)) | |
486 | - | then throw("10 editions max per artwork") | |
487 | - | else if (if ((amountSold != 0)) | |
488 | - | then (amountSold == maxCanSell) | |
464 | + | else if (!(acceptedAssetIds(assetId))) | |
465 | + | then throw("Something wen wrong!") | |
466 | + | else if (!(validateMinSell(assetId, price))) | |
467 | + | then throw("Something wen wrong!") | |
468 | + | else { | |
469 | + | let checkUser = validateUser(caller) | |
470 | + | if ((checkUser != "")) | |
471 | + | then throw(checkUser) | |
472 | + | else { | |
473 | + | let amountSold = getIntegerByKey(keyArtIssued(caller, artId)) | |
474 | + | let maxCanSell = getIntegerByKey(keyArtMaxMint(caller, artId)) | |
475 | + | if ((maxMint > 10)) | |
476 | + | then throw("10 editions max per artwork") | |
477 | + | else if (if ((amountSold != 0)) | |
478 | + | then (amountSold == maxCanSell) | |
479 | + | else false) | |
480 | + | then throw("Max edition reached.") | |
481 | + | else if (if ((amountSold > 0)) | |
482 | + | then (maxCanSell != maxMint) | |
483 | + | else false) | |
484 | + | then throw("Cannot change maximum issuable anymore") | |
485 | + | else { | |
486 | + | let sellStatus = if (if ((price > 0)) | |
487 | + | then (maxMint > 0) | |
489 | 488 | else false) | |
490 | - | then throw("Max edition reached.") | |
491 | - | else if (if ((amountSold > 0)) | |
492 | - | then (maxCanSell != maxMint) | |
493 | - | else false) | |
494 | - | then throw("Cannot change maximum issuable anymore") | |
495 | - | else { | |
496 | - | let sellStatus = if (if ((price > 0)) | |
497 | - | then (maxMint > 0) | |
498 | - | else false) | |
499 | - | then true | |
500 | - | else false | |
489 | + | then true | |
490 | + | else false | |
501 | 491 | [BooleanEntry(keyArtOnSale(caller, artId), sellStatus), IntegerEntry(keyArtPrice(caller, artId), price), IntegerEntry(keyArtMaxMint(caller, artId), maxMint), StringEntry(keyArtAssetIdAccepted(caller, artId), assetId)] | |
502 | - | } | |
503 | - | } | |
504 | - | } | |
505 | - | } | |
492 | + | } | |
493 | + | } | |
494 | + | } | |
506 | 495 | } | |
507 | 496 | } | |
508 | 497 | } | |
509 | 498 | ||
510 | 499 | ||
511 | 500 | ||
512 | - | @Callable( | |
501 | + | @Callable(invoke) | |
513 | 502 | func buyArtwork (artId,issuer) = if (!(dappRunning)) | |
514 | 503 | then throw(maintenanceMSG) | |
515 | 504 | else { | |
516 | - | let id = toBase58String( | |
517 | - | let caller = toBase58String( | |
505 | + | let id = toBase58String(invoke.transactionId) | |
506 | + | let caller = toBase58String(invoke.caller.bytes) | |
518 | 507 | let totalNFT = getIntegerByKey("total_nft_issued") | |
519 | 508 | let signID = getStringByKey(keyArtSignID(issuer, artId)) | |
520 | 509 | let artworkName = getStringByKey(keyArtName(issuer, artId)) | |
521 | 510 | if ((artworkName == "")) | |
522 | 511 | then throw("Art doesn't exist") | |
523 | 512 | else { | |
524 | 513 | let displayCID = getStringByKey(keyArtDisplayCid(issuer, artId)) | |
525 | 514 | let exportCID = getStringByKey(keyArtExportCid(issuer, artId)) | |
526 | 515 | let exportHash = getStringByKey(keyArtExportHash(issuer, artId)) | |
527 | 516 | let licenceCID = getStringByKey(keyArtLicenceCid(issuer, artId)) | |
528 | 517 | let licenceHash = getStringByKey(keyArtLicenceHash(issuer, artId)) | |
529 | 518 | let description = take(getStringByKey(keyArtDesc(issuer, artId)), 50) | |
519 | + | let isOnSale = getBooleanByKey(keyArtOnSale(issuer, artId)) | |
530 | 520 | let amountSold = getIntegerByKey(keyArtIssued(issuer, artId)) | |
531 | 521 | let artworkPrice = getIntegerByKey(keyArtPrice(issuer, artId)) | |
532 | - | let isOnSale = getBooleanByKey(keyArtOnSale(issuer, artId)) | |
533 | 522 | let priceAssetId = getStringByKey(keyArtAssetIdAccepted(issuer, artId)) | |
534 | 523 | let sourceHash = getStringByKey(keyArtHashByTxidAddr(issuer, artId)) | |
535 | 524 | let maxCanSell = getIntegerByKey(keyArtMaxMint(issuer, artId)) | |
536 | 525 | if (if (if ((0 >= artworkPrice)) | |
537 | 526 | then true | |
538 | 527 | else !(isOnSale)) | |
539 | 528 | then true | |
540 | 529 | else (0 >= maxCanSell)) | |
541 | 530 | then throw("Art not for sale") | |
542 | 531 | else { | |
543 | - | let | |
544 | - | let amount = | |
545 | - | let assetId = | |
546 | - | | |
547 | - | | |
548 | - | ||
549 | - | ||
550 | - | then | |
551 | - | else | |
552 | - | | |
553 | - | | |
554 | - | | |
555 | - | then throw(" | |
532 | + | let $t02311923199 = validatePriceAssetId(invoke, priceAssetId, artworkPrice) | |
533 | + | let amount = $t02311923199._1 | |
534 | + | let assetId = $t02311923199._2 | |
535 | + | let isWhitelisted = checkWhitelist(issuer) | |
536 | + | let cut = if ((isWhitelisted == 1)) | |
537 | + | then 0 | |
538 | + | else if ((priceAssetId == toBase58String(signAssetId))) | |
539 | + | then signCut | |
540 | + | else usdnWaveCut | |
541 | + | let amountForSign = fraction(amount, cut, 100) | |
542 | + | let amountForCreator = (amount - amountForSign) | |
543 | + | if ((amountSold == maxCanSell)) | |
544 | + | then throw("Art sold out") | |
556 | 545 | else { | |
557 | - | let isWhitelisted = checkWhitelist(issuer) | |
558 | - | let cut = if ((isWhitelisted == 1)) | |
559 | - | then 0 | |
560 | - | else if ((priceAssetId == toBase58String(signAssetId))) | |
561 | - | then 8 | |
562 | - | else 10 | |
563 | - | let amountForSign = fraction(amount, cut, 100) | |
564 | - | let amountForCreator = (amount - amountForSign) | |
565 | - | if ((amountSold == maxCanSell)) | |
566 | - | then throw("Art sold out") | |
567 | - | else if ((artworkPrice != amount)) | |
568 | - | then throw("Payment don't match") | |
569 | - | else { | |
570 | - | let newAmountSold = (amountSold + 1) | |
571 | - | let entryDate = lastBlock.timestamp | |
572 | - | let issueMeta = ((((((((((((((((((((((((((("Creator: " + issuer) + ", | |
546 | + | let newAmountSold = (amountSold + 1) | |
547 | + | let entryDate = lastBlock.timestamp | |
548 | + | let issueMeta = ((((((((((((((((((((((((((("Creator: " + issuer) + ", | |
573 | 549 | ArtID: ") + artId) + ", | |
574 | 550 | SignID: ") + signID) + ", | |
575 | 551 | Artwork name: ") + artworkName) + ", | |
576 | 552 | Artwork description: ") + description) + ", | |
577 | 553 | Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) + ", | |
578 | 554 | Max issuable: ") + toString(maxCanSell)) + ", | |
579 | 555 | Source hash: ") + sourceHash) + ", | |
580 | 556 | Display cid: ") + displayCID) + ", | |
581 | 557 | Export cid: ") + exportCID) + ", | |
582 | 558 | Export hash: ") + exportHash) + ", | |
583 | 559 | Licence cid: ") + licenceCID) + ", | |
584 | 560 | Licence hash: ") + licenceHash) | |
585 | - | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
586 | - | let idNFT = calculateAssetId(issueNFT) | |
587 | - | let sellStatus = if ((newAmountSold == maxCanSell)) | |
588 | - | then false | |
589 | - | else true | |
590 | - | [IntegerEntry(keyArtIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)), StringEntry(((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer), ((((((((((caller + "_") + toString(entryDate)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyArtOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(i.caller, 1, idNFT)] | |
591 | - | } | |
561 | + | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
562 | + | let idNFT = calculateAssetId(issueNFT) | |
563 | + | let sellStatus = if ((newAmountSold == maxCanSell)) | |
564 | + | then false | |
565 | + | else true | |
566 | + | [IntegerEntry(keyArtIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)), StringEntry(((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer), ((((((((((caller + "_") + toString(entryDate)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyArtOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(invoke.caller, 1, idNFT)] | |
592 | 567 | } | |
593 | 568 | } | |
594 | 569 | } | |
595 | 570 | } | |
596 | 571 | ||
597 | 572 | ||
598 | - | ||
599 | - | @Callable(i) | |
600 | - | func deleteEntry (entry) = { | |
601 | - | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
602 | - | if ((caller == chris)) | |
603 | - | then [DeleteEntry(entry)] | |
604 | - | else throw("no") | |
605 | - | } | |
606 | - | ||
607 | - |
github/deemru/w8io/169f3d6 81.75 ms ◑