tx · 86xAk5HinPcDpNDdv6dP7PBL3Dg4B4UDm1tWgKC1SN9E 3My71eA5781UVppziZNzPzoaXoQ79XLfpou: -0.01400000 Waves 2020.09.17 13:55 [1181186] smart account 3My71eA5781UVppziZNzPzoaXoQ79XLfpou > SELF 0.00000000 Waves
{ "type": 13, "id": "86xAk5HinPcDpNDdv6dP7PBL3Dg4B4UDm1tWgKC1SN9E", "fee": 1400000, "feeAssetId": null, "timestamp": 1600340151772, "version": 2, "chainId": 84, "sender": "3My71eA5781UVppziZNzPzoaXoQ79XLfpou", "senderPublicKey": "xu7oh5A3xfh5PtSRAoZLCyetRFpcf6bq7bCzGtTCUyL", "proofs": [ "3m1WNzYUjJpeGvFSW6xNTBNhJynbVeKqgvzLwvPHp5x7Vod3zcAjzzdd5e8h52dVGP3S8EKRFrC1rtXRKUkSzVTU" ], "script": "base64:AAIEAAAAAAAAAFMIAhIGCgQICAgIEgYKBAgICAgSBAoCCAgSAwoBCBIDCgEIEg4KDAgICAgICAEICAgICBINCgsICAgICAEICAgICBIECgIICBIECgIIARIECgIICAAAADAAAAAAD3N0b3JhZ2VWZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAANdXNlcldoaXRlbGlzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXBKRWIzNlpReWsxaGFLbm9jYXlKY1lNMzFjTlBYUGlLMwAAAAAMc2lnblZlcmlmaWVyCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQzI4aFNpdnJtc1RVWGFZRDF4NkwzNjJKNFpwVW5vVGRCAAAAAAtmZWVSZWNlaXZlcgIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAAAC3NpZ25Bc3NldElkAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAGdXNkbkl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AgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAALYXJ0X29uc2FsZV8FAAAAB2VudHJ5SUQCAAAAAV8FAAAADWNhbGxlckFkZHJlc3MFAAAACnNlbGxTdGF0dXMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAABmlzc3VlcgUAAAAGYW1vdW50BQAAAAdhc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAZpbnZva2UAAAAGY2FsbGVyAAAAAAAAAAABBQAAAAVpZE5GVAUAAAADbmlsAAAAAG3zCxQ=", "height": 1181186, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FeLgDhkaVFsAeL8BRXW8Rr25LZwB5eeNJnbt8QYNY411 Next: 7x3hWQ9pbKjanfAUnxJqd2bVw3LqqJAgd6d1Whbmuyfq Diff:
Old | New | Differences | |
---|---|---|---|
235 | 235 | if (if ((callerAddr != admin)) | |
236 | 236 | then true | |
237 | 237 | else (callerAddr != admin2)) | |
238 | - | then throw("You are not allowed to change user status") | |
238 | + | then throw(("You are not allowed to change user status " + callerAddr)) | |
239 | 239 | else [StringEntry(keyUserStatus(callerAddr), statusToSet), StringEntry("last_invoke_id", id)] | |
240 | 240 | } | |
241 | 241 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | 5 | ||
6 | 6 | let userWhitelist = value(addressFromString("3MpJEb36ZQyk1haKnocayJcYM31cNPXPiK3")) | |
7 | 7 | ||
8 | 8 | let signVerifier = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
11 | 11 | ||
12 | 12 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
13 | 13 | ||
14 | 14 | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
15 | 15 | ||
16 | 16 | let admin = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
17 | 17 | ||
18 | 18 | let admin2 = "3NCqpdb8jHW1d1hqZgeS9AE2MJ2Keh95jMC" | |
19 | 19 | ||
20 | 20 | let WHITELISTEDONLY = true | |
21 | 21 | ||
22 | 22 | let userAllowed = "ALLOWED" | |
23 | 23 | ||
24 | 24 | let userRegistered = "REGISTERED" | |
25 | 25 | ||
26 | 26 | let userVerified = "VERIFIED" | |
27 | 27 | ||
28 | 28 | let userSuspended = "SUSPENDED" | |
29 | 29 | ||
30 | 30 | let userRemoved = "REMOVED" | |
31 | 31 | ||
32 | 32 | let userUnregistered = "UNREGISTERED" | |
33 | 33 | ||
34 | 34 | let onSale = "ON_SALE" | |
35 | 35 | ||
36 | 36 | let sold = "SOLD" | |
37 | 37 | ||
38 | 38 | let canceled = "CANCELED" | |
39 | 39 | ||
40 | 40 | func getStringByKey (key) = match getString(this, key) { | |
41 | 41 | case a: String => | |
42 | 42 | a | |
43 | 43 | case _ => | |
44 | 44 | "" | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getIntegerByKey (key) = match getInteger(this, key) { | |
49 | 49 | case i: Int => | |
50 | 50 | i | |
51 | 51 | case _ => | |
52 | 52 | 0 | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signVerifier, ((("data_fc_" + signID) + "_") + Owner)) { | |
57 | 57 | case a: String => | |
58 | 58 | if (contains(a, sha256Hash)) | |
59 | 59 | then true | |
60 | 60 | else false | |
61 | 61 | case _ => | |
62 | 62 | false | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func validateNFTs (accumulator,id) = { | |
67 | 67 | let assetDetails = value(assetInfo(fromBase58String(id))) | |
68 | 68 | if (if (if ((assetDetails.quantity != 1)) | |
69 | 69 | then true | |
70 | 70 | else (assetDetails.decimals != 0)) | |
71 | 71 | then true | |
72 | 72 | else (assetDetails.reissuable != false)) | |
73 | 73 | then (accumulator + 0) | |
74 | 74 | else (accumulator + 1) | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func verifyAddress (addr) = if (!(WHITELISTEDONLY)) | |
79 | 79 | then true | |
80 | 80 | else match getBoolean(userWhitelist, addr) { | |
81 | 81 | case b: Boolean => | |
82 | 82 | b | |
83 | 83 | case _ => | |
84 | 84 | throw("You are not allowed, please contact us first.") | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func verifyStatus (addr) = match getString(this, ("user_status_" + addr)) { | |
89 | 89 | case b: String => | |
90 | 90 | b | |
91 | 91 | case _ => | |
92 | 92 | throw("Something went wrong.") | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyUserAddr (callerAddr) = ("user_" + callerAddr) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyUserName (callerAddr) = ("user_name_" + callerAddr) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyUserDesc (callerAddr) = ("user_desc_" + callerAddr) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyUserSocial (callerAddr) = ("user_social_" + callerAddr) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyUserThumb (callerAddr) = ("user_thumb_" + callerAddr) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyUserIsArtist (callerAddr) = ("user_isartist_" + callerAddr) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyUserStatus (callerAddr) = ("user_status_" + callerAddr) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyUserDate (callerAddr) = ("user_date_" + callerAddr) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyArtDate (callerAddr,artId) = ((("art_date_" + artId) + "_") + callerAddr) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyArtName (callerAddr,artId) = ((("art_name_" + artId) + "_") + callerAddr) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyArtDesc (callerAddr,artId) = ((("art_desc_" + artId) + "_") + callerAddr) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyArtDisplayCid (callerAddr,artId) = ((("art_display_cid_" + artId) + "_") + callerAddr) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyArtExportHash (callerAddr,artId) = ((("art_export_hash_" + artId) + "_") + callerAddr) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyArtExportCid (callerAddr,artId) = ((("art_export_cid_" + artId) + "_") + callerAddr) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyArtMaxMint (callerAddr,artId) = ((("art_maxmint_" + artId) + "_") + callerAddr) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyArtSignID (callerAddr,artId) = ((("art_signid_" + artId) + "_") + callerAddr) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyArtIssued (callerAddr,artId) = ((("art_issued_" + artId) + "_") + callerAddr) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyArtOnSale (callerAddr,artId) = ((("art_onsale_" + artId) + "_") + callerAddr) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyArtLicenceHash (callerAddr,artId) = ((("art_licence_hash_" + artId) + "_") + callerAddr) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyArtLicenceCid (callerAddr,artId) = ((("art_licence_cid_" + artId) + "_") + callerAddr) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func keyArtTags (callerAddr,artId) = ((("art_tags_" + artId) + "_") + callerAddr) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func keyArtType (callerAddr,artId) = ((("art_type_" + artId) + "_") + callerAddr) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func keyArtOwnerByHash (sha256Hash) = ("art_owner_by_hash_" + sha256Hash) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("art_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr))))) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(i) | |
169 | 169 | func registerUser (name,description,thumb,social) = { | |
170 | 170 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
171 | 171 | let userCanRegister = getStringByKey(keyUserStatus(callerAddr)) | |
172 | 172 | let id = toBase58String(i.transactionId) | |
173 | 173 | let timestamp = lastBlock.timestamp | |
174 | 174 | if (if ((userCanRegister == userSuspended)) | |
175 | 175 | then true | |
176 | 176 | else (userCanRegister == userRemoved)) | |
177 | 177 | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
178 | 178 | else if ((userCanRegister == userRegistered)) | |
179 | 179 | then throw("You are already registered, please use update method instead.") | |
180 | 180 | else if (if ((userCanRegister == "")) | |
181 | 181 | then WHITELISTEDONLY | |
182 | 182 | else false) | |
183 | 183 | then throw("You are now allowed to register yet, please contact us first to get approved.") | |
184 | 184 | else if (if ((name == "")) | |
185 | 185 | then true | |
186 | 186 | else (description == "")) | |
187 | 187 | then throw("Name and description cannot be empty") | |
188 | 188 | else if ((size(description) > 600)) | |
189 | 189 | then throw("600 Characters maximum for the description") | |
190 | 190 | else [IntegerEntry(keyUserDate(callerAddr), timestamp), StringEntry(keyUserAddr(callerAddr), ((id + "_") + toString(lastBlock.timestamp))), StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), BooleanEntry(keyUserIsArtist(callerAddr), false), StringEntry(keyUserStatus(callerAddr), userRegistered), StringEntry("last_invoke_id", id)] | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(i) | |
196 | 196 | func updateUser (name,description,thumb,social) = { | |
197 | 197 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
198 | 198 | let userCanRegister = getStringByKey(keyUserStatus(callerAddr)) | |
199 | 199 | if (if ((userCanRegister == userSuspended)) | |
200 | 200 | then true | |
201 | 201 | else (userCanRegister == userRemoved)) | |
202 | 202 | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
203 | 203 | else if (if ((userCanRegister == "")) | |
204 | 204 | then true | |
205 | 205 | else (userCanRegister == userAllowed)) | |
206 | 206 | then throw("Please register first with registerUser") | |
207 | 207 | else { | |
208 | 208 | let id = toBase58String(i.transactionId) | |
209 | 209 | let timestamp = lastBlock.timestamp | |
210 | 210 | if (if ((name == "")) | |
211 | 211 | then true | |
212 | 212 | else (description == "")) | |
213 | 213 | then throw("Name and description cannot be empty") | |
214 | 214 | else if ((size(description) > 600)) | |
215 | 215 | then throw("600 Characters maximum for the description") | |
216 | 216 | else [StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), StringEntry("last_invoke_id", id)] | |
217 | 217 | } | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func changeUserStatus (address,status) = { | |
224 | 224 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
225 | 225 | let id = toBase58String(i.transactionId) | |
226 | 226 | let statusToSet = if ((status == userVerified)) | |
227 | 227 | then userVerified | |
228 | 228 | else if ((status == userRegistered)) | |
229 | 229 | then userRegistered | |
230 | 230 | else if ((status == userSuspended)) | |
231 | 231 | then userSuspended | |
232 | 232 | else if ((status == userRemoved)) | |
233 | 233 | then userRemoved | |
234 | 234 | else throw("Unknown status") | |
235 | 235 | if (if ((callerAddr != admin)) | |
236 | 236 | then true | |
237 | 237 | else (callerAddr != admin2)) | |
238 | - | then throw("You are not allowed to change user status") | |
238 | + | then throw(("You are not allowed to change user status " + callerAddr)) | |
239 | 239 | else [StringEntry(keyUserStatus(callerAddr), statusToSet), StringEntry("last_invoke_id", id)] | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | ||
244 | 244 | @Callable(i) | |
245 | 245 | func deleteUser (address) = { | |
246 | 246 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
247 | 247 | let id = toBase58String(i.transactionId) | |
248 | 248 | if ((callerAddr != admin)) | |
249 | 249 | then throw("You are not allowed to do that") | |
250 | 250 | else [DeleteEntry(keyUserDate(callerAddr)), DeleteEntry(keyUserAddr(callerAddr)), DeleteEntry(keyUserName(callerAddr)), DeleteEntry(keyUserDesc(callerAddr)), DeleteEntry(keyUserSocial(callerAddr)), DeleteEntry(keyUserThumb(callerAddr)), DeleteEntry(keyUserIsArtist(callerAddr)), StringEntry(keyUserStatus(callerAddr), userRemoved), StringEntry("last_invoke_id", id)] | |
251 | 251 | } | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | ||
255 | 255 | @Callable(i) | |
256 | 256 | func suspendUser (address) = { | |
257 | 257 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
258 | 258 | let id = toBase58String(i.transactionId) | |
259 | 259 | if ((callerAddr != admin)) | |
260 | 260 | then throw("You are not allowed to do that") | |
261 | 261 | else [StringEntry(keyUserStatus(callerAddr), userSuspended), StringEntry("last_invoke_id", id)] | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | ||
266 | 266 | @Callable(invoke) | |
267 | 267 | func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
268 | 268 | let artId = toBase58String(invoke.transactionId) | |
269 | 269 | let callerAddress = toBase58String(invoke.caller.bytes) | |
270 | 270 | if ((size(invoke.payments) == 0)) | |
271 | 271 | then throw("No payment attached") | |
272 | 272 | else { | |
273 | 273 | let payment = value(invoke.payments[0]) | |
274 | 274 | let amount = value(payment.amount) | |
275 | 275 | let assetId = if (if (isDefined(payment.assetId)) | |
276 | 276 | then (payment.assetId == signAssetId) | |
277 | 277 | else false) | |
278 | 278 | then payment.assetId | |
279 | 279 | else throw("Only SIGN token accepted at the moment") | |
280 | 280 | let currentCertificationPrice = match getInteger(storageVerifier, ("certification_fee_" + toBase58String(signAssetId))) { | |
281 | 281 | case price: Int => | |
282 | 282 | price | |
283 | 283 | case _ => | |
284 | 284 | throw("Price undefined in oracle") | |
285 | 285 | } | |
286 | 286 | if ((amount != currentCertificationPrice)) | |
287 | 287 | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
288 | 288 | else { | |
289 | 289 | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, callerAddress)) | |
290 | 290 | if ((entryExist != "")) | |
291 | 291 | then throw("You already added this artwork on Sign Art") | |
292 | 292 | else { | |
293 | 293 | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
294 | 294 | if ((hashExist != "")) | |
295 | 295 | then throw("This artwork hash is already registered on Sign Art") | |
296 | 296 | else { | |
297 | 297 | let isSignCertified = checkSignCertificate(signID, callerAddress, sha256Hash) | |
298 | 298 | if (!(isSignCertified)) | |
299 | 299 | then throw("Sign Certificate not found on Sign-web.app smart contract for this address.") | |
300 | 300 | else if ((size(cidDisplay) == 0)) | |
301 | 301 | then throw("Display CID cannot be empty") | |
302 | 302 | else if ((size(name) == 0)) | |
303 | 303 | then throw("Title cannot be empty") | |
304 | 304 | else if ((size(name) > 100)) | |
305 | 305 | then throw("100 Characters maximum for the name") | |
306 | 306 | else if ((size(description) > 1000)) | |
307 | 307 | then throw("1000 Characters maximum for the description") | |
308 | 308 | else if ((size(description) == 0)) | |
309 | 309 | then throw("Description cannot be empty") | |
310 | 310 | else { | |
311 | 311 | let tagsList = split(tags, ",") | |
312 | 312 | if ((size(tagsList) > 5)) | |
313 | 313 | then throw("Tags should be maximum 5 single word separated by space.") | |
314 | 314 | else { | |
315 | 315 | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
316 | 316 | case s: String => | |
317 | 317 | s | |
318 | 318 | case _ => | |
319 | 319 | userUnregistered | |
320 | 320 | } | |
321 | 321 | let timestamp = lastBlock.timestamp | |
322 | 322 | if (if (isDefined(userIsRegistered)) | |
323 | 323 | then (userIsRegistered == userUnregistered) | |
324 | 324 | else false) | |
325 | 325 | then throw("Please register this account first with \"User infos\" tab") | |
326 | 326 | else if ((userIsRegistered == userSuspended)) | |
327 | 327 | then throw("Your account is suspended") | |
328 | 328 | else if ((userIsRegistered == userRemoved)) | |
329 | 329 | then throw("Your account have been removed") | |
330 | 330 | else if ((maxmint > 10)) | |
331 | 331 | then throw("Maximum 10 editions per artwork") | |
332 | 332 | else if ((size(sha256Hash) != 64)) | |
333 | 333 | then throw("Hash should be sha256 string composed of 64 char.") | |
334 | 334 | else [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), BooleanEntry(keyUserIsArtist(callerAddress), true), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry("last_invoke_id", artId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
335 | 335 | } | |
336 | 336 | } | |
337 | 337 | } | |
338 | 338 | } | |
339 | 339 | } | |
340 | 340 | } | |
341 | 341 | } | |
342 | 342 | ||
343 | 343 | ||
344 | 344 | ||
345 | 345 | @Callable(invoke) | |
346 | 346 | func updateArtwork (txid,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
347 | 347 | let updateId = toBase58String(invoke.transactionId) | |
348 | 348 | let callerAddress = toBase58String(invoke.caller.bytes) | |
349 | 349 | let entryExist = getStringByKey(keyArtName(callerAddress, txid)) | |
350 | 350 | if ((entryExist == "")) | |
351 | 351 | then throw("This entry doesn't exist or you are not the owner") | |
352 | 352 | else if ((size(name) == 0)) | |
353 | 353 | then throw("Title cannot be empty") | |
354 | 354 | else if ((size(name) > 100)) | |
355 | 355 | then throw("100 Characters maximum for the name") | |
356 | 356 | else if ((size(description) > 1000)) | |
357 | 357 | then throw("1000 Characters maximum for the description") | |
358 | 358 | else if ((size(description) == 0)) | |
359 | 359 | then throw("Description cannot be empty") | |
360 | 360 | else { | |
361 | 361 | let artworkMinted = match getInteger(this, keyArtIssued(callerAddress, txid)) { | |
362 | 362 | case b: Int => | |
363 | 363 | if ((b == 0)) | |
364 | 364 | then false | |
365 | 365 | else true | |
366 | 366 | case _ => | |
367 | 367 | throw("Something went wrong.") | |
368 | 368 | } | |
369 | 369 | let tagsList = split(tags, ",") | |
370 | 370 | if ((size(tagsList) > 5)) | |
371 | 371 | then throw("Tags should be maximum 5 single word separated by space.") | |
372 | 372 | else { | |
373 | 373 | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
374 | 374 | case s: String => | |
375 | 375 | s | |
376 | 376 | case _ => | |
377 | 377 | userUnregistered | |
378 | 378 | } | |
379 | 379 | if (if (isDefined(userIsRegistered)) | |
380 | 380 | then (userIsRegistered == userUnregistered) | |
381 | 381 | else false) | |
382 | 382 | then throw("Please register this account first with \"User infos\" tab") | |
383 | 383 | else if ((userIsRegistered == userSuspended)) | |
384 | 384 | then throw("Your account is suspended") | |
385 | 385 | else if ((userIsRegistered == userRemoved)) | |
386 | 386 | then throw("Your account have been removed") | |
387 | 387 | else if ((maxmint > 10)) | |
388 | 388 | then throw("Maximum 10 editions per artwork") | |
389 | 389 | else if (!(artworkMinted)) | |
390 | 390 | then [StringEntry(keyArtName(callerAddress, txid), name), StringEntry(keyArtDesc(callerAddress, txid), description), StringEntry(keyArtDisplayCid(callerAddress, txid), cidDisplay), StringEntry(keyArtExportCid(callerAddress, txid), cidExport), StringEntry(keyArtExportHash(callerAddress, txid), sha256Export), StringEntry(keyArtLicenceCid(callerAddress, txid), cidLicence), StringEntry(keyArtLicenceHash(callerAddress, txid), sha256Licence), IntegerEntry(keyArtMaxMint(callerAddress, txid), maxmint), StringEntry(keyArtTags(callerAddress, txid), tags), StringEntry(keyArtType(callerAddress, txid), type), StringEntry("last_invoke_id", updateId)] | |
391 | 391 | else [StringEntry(keyArtName(callerAddress, txid), name), StringEntry(keyArtDesc(callerAddress, txid), description), StringEntry(keyArtDisplayCid(callerAddress, txid), cidDisplay), StringEntry(keyArtType(callerAddress, txid), type), StringEntry(keyArtTags(callerAddress, txid), tags), StringEntry("last_invoke_id", updateId)] | |
392 | 392 | } | |
393 | 393 | } | |
394 | 394 | } | |
395 | 395 | ||
396 | 396 | ||
397 | 397 | ||
398 | 398 | @Callable(i) | |
399 | 399 | func deleteArtwork (artId,ownerAddress) = { | |
400 | 400 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
401 | 401 | let id = toBase58String(i.transactionId) | |
402 | 402 | if ((callerAddr != admin)) | |
403 | 403 | then throw("You are not allowed to do that") | |
404 | 404 | else [DeleteEntry(keyArtDate(ownerAddress, artId)), DeleteEntry(keyArtName(ownerAddress, artId)), DeleteEntry(keyArtDesc(ownerAddress, artId)), DeleteEntry(keyArtDisplayCid(ownerAddress, artId)), DeleteEntry(keyArtExportCid(ownerAddress, artId)), DeleteEntry(keyArtExportHash(ownerAddress, artId)), DeleteEntry(keyArtLicenceHash(ownerAddress, artId)), DeleteEntry(keyArtLicenceCid(ownerAddress, artId)), DeleteEntry(keyArtType(ownerAddress, artId)), DeleteEntry(keyArtTags(ownerAddress, artId)), DeleteEntry(keyArtMaxMint(ownerAddress, artId)), DeleteEntry(keyArtSignID(ownerAddress, artId)), DeleteEntry(keyArtIssued(ownerAddress, artId)), DeleteEntry(keyArtOnSale(ownerAddress, artId)), StringEntry("last_invoke_id", id)] | |
405 | 405 | } | |
406 | 406 | ||
407 | 407 | ||
408 | 408 | ||
409 | 409 | @Callable(invoke) | |
410 | 410 | func sellArtwork (hash,price) = { | |
411 | 411 | let id = toBase58String(invoke.transactionId) | |
412 | 412 | let callerAddress = toBase58String(invoke.caller.bytes) | |
413 | 413 | let entryDate = lastBlock.timestamp | |
414 | 414 | let entryID = getStringByKey(((hash + "_") + callerAddress)) | |
415 | 415 | if (!(isDefined(entryID))) | |
416 | 416 | then throw("This artwork doesn't exit or you are not the owner") | |
417 | 417 | else { | |
418 | 418 | let userIsRegistered = getStringByKey(("user_status_" + callerAddress)) | |
419 | 419 | if ((userIsRegistered == "")) | |
420 | 420 | then throw("Please register this account first") | |
421 | 421 | else { | |
422 | 422 | let amountSold = getIntegerByKey(((("art_issued_" + entryID) + "_") + callerAddress)) | |
423 | 423 | let maxCanSell = getIntegerByKey(((("art_maxmint_" + entryID) + "_") + callerAddress)) | |
424 | 424 | if ((amountSold == maxCanSell)) | |
425 | 425 | then throw("You reached the max edition allowed to sell for this edition.") | |
426 | 426 | else if ((userIsRegistered == userSuspended)) | |
427 | 427 | then throw("Your account is suspended") | |
428 | 428 | else if (!(isDefined(entryID))) | |
429 | 429 | then throw("This artwork desn't exist") | |
430 | 430 | else if ((size(hash) != 64)) | |
431 | 431 | then throw("This hash is incorrect.") | |
432 | 432 | else { | |
433 | 433 | let sellStatus = if ((price > 0)) | |
434 | 434 | then true | |
435 | 435 | else false | |
436 | 436 | [BooleanEntry(((("art_onsale_" + entryID) + "_") + callerAddress), sellStatus), IntegerEntry(((("art_price_" + entryID) + "_") + callerAddress), price), StringEntry("last_invoke_id", id)] | |
437 | 437 | } | |
438 | 438 | } | |
439 | 439 | } | |
440 | 440 | } | |
441 | 441 | ||
442 | 442 | ||
443 | 443 | ||
444 | 444 | @Callable(invoke) | |
445 | 445 | func buyArtwork (hash,issuer) = { | |
446 | 446 | let id = toBase58String(invoke.transactionId) | |
447 | 447 | let callerAddress = toBase58String(invoke.caller.bytes) | |
448 | 448 | let totalNFT = getIntegerByKey("total_nft_issued") | |
449 | 449 | let entryID = getStringByKey(((hash + "_") + issuer)) | |
450 | 450 | if ((entryID == "")) | |
451 | 451 | then throw("This artwork doesn't exit or you are not the owner") | |
452 | 452 | else { | |
453 | 453 | let userIsRegistered = getStringByKey(("user_status_" + callerAddress)) | |
454 | 454 | if (!(isDefined(userIsRegistered))) | |
455 | 455 | then throw("Please register this account first") | |
456 | 456 | else { | |
457 | 457 | let alreadySoldList = getStringByKey(((("art_sold_" + entryID) + "_") + issuer)) | |
458 | 458 | let amountSold = getIntegerByKey(((("art_issued_" + entryID) + "_") + issuer)) | |
459 | 459 | let artworkPrice = getIntegerByKey(((("art_price_" + entryID) + "_") + issuer)) | |
460 | 460 | if ((artworkPrice == 0)) | |
461 | 461 | then throw("This artwork is not for sell") | |
462 | 462 | else { | |
463 | 463 | let maxCanSell = getIntegerByKey(((("art_maxmint_" + entryID) + "_") + issuer)) | |
464 | 464 | let payment = value(invoke.payments[0]) | |
465 | 465 | let amount = value(payment.amount) | |
466 | 466 | let assetId = if (isDefined(payment.assetId)) | |
467 | 467 | then throw("Only Waves token accepted at the moment") | |
468 | 468 | else unit | |
469 | 469 | if ((amountSold == maxCanSell)) | |
470 | 470 | then throw("Cannot buy this artwork anymore") | |
471 | 471 | else if ((artworkPrice != amount)) | |
472 | 472 | then throw("Payment don't match seller price") | |
473 | 473 | else { | |
474 | 474 | let newAmountSold = (amountSold + 1) | |
475 | 475 | let entryDate = lastBlock.timestamp | |
476 | 476 | let issueMeta = (((((((((((((("{\"version\": 1,\"artID\": \"" + entryID) + "\",\"maxIssuable\": \"") + toString(maxCanSell)) + "\",\"signID\": \"SA_") + toString((totalNFT + 1))) + "\", \"creator\": \"") + issuer) + "\", \"issue\": \"") + toString(newAmountSold)) + "/") + toString(maxCanSell)) + "\", \"hash\": ") + hash) + "}") | |
477 | 477 | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
478 | 478 | let idNFT = calculateAssetId(issueNFT) | |
479 | 479 | let sellStatus = if ((newAmountSold == maxCanSell)) | |
480 | 480 | then false | |
481 | 481 | else true | |
482 | 482 | [IntegerEntry(((("art_issued_" + entryID) + "_") + issuer), newAmountSold), StringEntry(((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + entryID) + "_") + issuer), ((((((callerAddress + "_") + toString(entryDate)) + "_") + id) + "_") + toString(artworkPrice))), IntegerEntry("total_nft_issued", (totalNFT + 1)), StringEntry("last_invoke_id", id), issueNFT, BooleanEntry(((("art_onsale_" + entryID) + "_") + callerAddress), sellStatus), ScriptTransfer(Address(fromBase58String(issuer)), amount, assetId), ScriptTransfer(invoke.caller, 1, idNFT)] | |
483 | 483 | } | |
484 | 484 | } | |
485 | 485 | } | |
486 | 486 | } | |
487 | 487 | } | |
488 | 488 | ||
489 | 489 |
github/deemru/w8io/026f985 81.38 ms ◑