tx · CmfQraCzeWc3HB2eie3GmzJgPqFwP8D8RWwVxEyuUoFo 3N6VmiwyYvN3mje3HrLWZJwpGpXerqPwiY1: -0.01400000 Waves 2020.11.26 06:57 [1281874] smart account 3N6VmiwyYvN3mje3HrLWZJwpGpXerqPwiY1 > SELF 0.00000000 Waves
{ "type": 13, "id": "CmfQraCzeWc3HB2eie3GmzJgPqFwP8D8RWwVxEyuUoFo", "fee": 1400000, "feeAssetId": null, "timestamp": 1606363050860, "version": 2, "chainId": 84, "sender": "3N6VmiwyYvN3mje3HrLWZJwpGpXerqPwiY1", "senderPublicKey": "6d67Hi89AYURSDxe1L8huJrSeU9FSdfUJMXWvwZb8goX", "proofs": [ "4WiCy3exByZhSqW7HxAit7sYmi4e6EAykLpHj93YHPFBD1EGDkhLSYyoyjiYg2X69ymNbZ6DQg2jkgXsK3NobavF" ], "script": "base64:AAIEAAAAAAAAAGEIAhIGCgQICAgIEgYKBAgICAgSBAoCCAgSDgoMCAgICAgIAQgICAgIEg0KCwgICAgIAQgICAgIEgUKAwgICBIECgIICBIGCgQIAQEIEgQKAggIEgMKAQgSAwoBCBIDCgEIAAAAPAAAAAAJb3JhY2xlRmVlCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOMnM1UnRhSFBCZW5Dc3gyRUNjb0ZSYllIeDNub1poWFcxAAAAAAhzaWduRGFwcAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTkMyOGhTaXZybXNUVVhhWUQxeDZMMzYySjRacFVub1RkQgAAAAALZmVlUmVjZWl2ZXICAAAAIzNOMUU2dFhkZFJvVmFSZlE5ZFEzdmc1TGFXMmZzZDhIS3ViAAAAAAtzaWduQXNzZXRJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresAAAAAC3VzZG5Bc3NldElkAQAAACAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAAAAAAMd2F2ZXNBc3NldElkAQAAAAAAAA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plexity": 0 } View: original | compacted Prev: 5m16hwuHsPFxe1gqyuCvQqhahKSNoNUZsyaLYjUUCLuq Next: 5pwAF1BVazhFmgu1fBksobKpT7XPtcwMr7rBQQnhbrtY Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = base58'' | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = 8 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 10 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 10 | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = true | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = true | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "SIGN Art is under maintenance" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "ALLOWED" | |
33 | 33 | ||
34 | - | let p = " | |
34 | + | let p = "REGISTERED" | |
35 | 35 | ||
36 | - | let q = " | |
36 | + | let q = "VERIFIED" | |
37 | 37 | ||
38 | - | func r (s) = { | |
39 | - | let t = getString(this, s) | |
40 | - | if ($isInstanceOf(t, "String")) | |
38 | + | let r = "SUSPENDED" | |
39 | + | ||
40 | + | let s = "REMOVED" | |
41 | + | ||
42 | + | let t = "CHANGE_REQUIRED" | |
43 | + | ||
44 | + | let u = "UNREGISTERED" | |
45 | + | ||
46 | + | let v = "RESET" | |
47 | + | ||
48 | + | func w (x) = { | |
49 | + | let y = getString(this, x) | |
50 | + | if ($isInstanceOf(y, "String")) | |
41 | 51 | then { | |
42 | - | let | |
43 | - | | |
52 | + | let z = y | |
53 | + | z | |
44 | 54 | } | |
45 | 55 | else "" | |
46 | 56 | } | |
47 | 57 | ||
48 | 58 | ||
49 | - | func | |
50 | - | let | |
51 | - | if ($isInstanceOf( | |
59 | + | func A (x) = { | |
60 | + | let y = getInteger(a, x) | |
61 | + | if ($isInstanceOf(y, "Int")) | |
52 | 62 | then { | |
53 | - | let w = t | |
54 | - | w | |
63 | + | let z = y | |
64 | + | z | |
65 | + | } | |
66 | + | else throw("Integer undefine or 0 in oracle") | |
67 | + | } | |
68 | + | ||
69 | + | ||
70 | + | func B (x) = { | |
71 | + | let y = getInteger(this, x) | |
72 | + | if ($isInstanceOf(y, "Int")) | |
73 | + | then { | |
74 | + | let C = y | |
75 | + | C | |
55 | 76 | } | |
56 | 77 | else 0 | |
57 | 78 | } | |
58 | 79 | ||
59 | 80 | ||
60 | - | func | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
81 | + | func D (x) = { | |
82 | + | let y = getBoolean(this, x) | |
83 | + | if ($isInstanceOf(y, "Boolean")) | |
63 | 84 | then { | |
64 | - | let u = t | |
65 | - | if (contains(u, A)) | |
85 | + | let C = y | |
86 | + | C | |
87 | + | } | |
88 | + | else false | |
89 | + | } | |
90 | + | ||
91 | + | ||
92 | + | func E (F,G,H) = { | |
93 | + | let y = getString(b, ((("data_fc_" + F) + "_") + G)) | |
94 | + | if ($isInstanceOf(y, "String")) | |
95 | + | then { | |
96 | + | let z = y | |
97 | + | if (contains(z, H)) | |
66 | 98 | then true | |
67 | 99 | else false | |
68 | 100 | } | |
70 | 102 | } | |
71 | 103 | ||
72 | 104 | ||
73 | - | func B (C,D) = { | |
74 | - | let E = value(assetInfo(fromBase58String(D))) | |
75 | - | if (if (if ((E.quantity != 1)) | |
76 | - | then true | |
77 | - | else (E.decimals != 0)) | |
78 | - | then true | |
79 | - | else (E.reissuable != false)) | |
80 | - | then (C + 0) | |
81 | - | else (C + 1) | |
82 | - | } | |
105 | + | func I (J) = if (if ((75 > size(J))) | |
106 | + | then (60 > size(split(J, "/")[0])) | |
107 | + | else false) | |
108 | + | then (16 > size(split(J, "/")[1])) | |
109 | + | else false | |
83 | 110 | ||
84 | 111 | ||
85 | - | func F (G) = { | |
86 | - | let t = getString(this, ("user_status_" + G)) | |
87 | - | if ($isInstanceOf(t, "String")) | |
88 | - | then { | |
89 | - | let H = t | |
90 | - | H | |
91 | - | } | |
92 | - | else throw("Something went wrong.") | |
93 | - | } | |
112 | + | func K (L) = (65 > size(L)) | |
94 | 113 | ||
95 | 114 | ||
96 | - | func | |
115 | + | func M (N) = ("user_" + N) | |
97 | 116 | ||
98 | 117 | ||
99 | - | func | |
118 | + | func O (N) = ("user_name_" + N) | |
100 | 119 | ||
101 | 120 | ||
102 | - | func | |
121 | + | func P (N) = ("user_desc_" + N) | |
103 | 122 | ||
104 | 123 | ||
105 | - | func | |
124 | + | func Q (N) = ("user_social_" + N) | |
106 | 125 | ||
107 | 126 | ||
108 | - | func | |
127 | + | func R (N) = ("user_thumb_" + N) | |
109 | 128 | ||
110 | 129 | ||
111 | - | func | |
130 | + | func S (N) = ("user_status_" + N) | |
112 | 131 | ||
113 | 132 | ||
114 | - | func | |
133 | + | func T (N) = ("user_date_" + N) | |
115 | 134 | ||
116 | 135 | ||
117 | - | func | |
136 | + | func U (N,V) = ((("art_date_" + V) + "_") + N) | |
118 | 137 | ||
119 | 138 | ||
120 | - | func | |
139 | + | func W (N,V) = ((("art_name_" + V) + "_") + N) | |
121 | 140 | ||
122 | 141 | ||
123 | - | func | |
142 | + | func X (N,V) = ((("art_desc_" + V) + "_") + N) | |
124 | 143 | ||
125 | 144 | ||
126 | - | func | |
145 | + | func Y (N,V) = ((("art_display_cid_" + V) + "_") + N) | |
127 | 146 | ||
128 | 147 | ||
129 | - | func | |
148 | + | func Z (N,V) = ((("art_export_hash_" + V) + "_") + N) | |
130 | 149 | ||
131 | 150 | ||
132 | - | func | |
151 | + | func aa (N,V) = ((("art_export_cid_" + V) + "_") + N) | |
133 | 152 | ||
134 | 153 | ||
135 | - | func | |
154 | + | func ab (N,V) = ((("art_maxmint_" + V) + "_") + N) | |
136 | 155 | ||
137 | 156 | ||
138 | - | func | |
157 | + | func ac (N,V) = ((("art_signid_" + V) + "_") + N) | |
139 | 158 | ||
140 | 159 | ||
141 | - | func | |
160 | + | func ad (N,V) = ((("art_issued_" + V) + "_") + N) | |
142 | 161 | ||
143 | 162 | ||
144 | - | func | |
163 | + | func ae (N,V) = ((("art_onsale_" + V) + "_") + N) | |
145 | 164 | ||
146 | 165 | ||
147 | - | func | |
166 | + | func af (N,V) = ((("art_licence_hash_" + V) + "_") + N) | |
148 | 167 | ||
149 | 168 | ||
150 | - | func | |
169 | + | func ag (N,V) = ((("art_licence_cid_" + V) + "_") + N) | |
151 | 170 | ||
152 | 171 | ||
153 | - | func | |
172 | + | func ah (N,V) = ((("art_tags_" + V) + "_") + N) | |
154 | 173 | ||
155 | 174 | ||
156 | - | func | |
175 | + | func ai (N,V) = ((("art_type_" + V) + "_") + N) | |
157 | 176 | ||
158 | 177 | ||
159 | - | func | |
178 | + | func aj (N,V) = ((("art_price_" + V) + "_") + N) | |
160 | 179 | ||
161 | 180 | ||
162 | - | func | |
181 | + | func ak (N,V) = ((("art_assetAccepted_" + V) + "_") + N) | |
163 | 182 | ||
164 | 183 | ||
165 | - | func | |
184 | + | func al (N,V) = ((("art_flag_" + V) + "_") + N) | |
166 | 185 | ||
167 | 186 | ||
168 | - | func | |
187 | + | func am (N,an) = ((("get_hashbytxidaddr_" + an) + "_") + N) | |
169 | 188 | ||
170 | 189 | ||
171 | - | @Callable(w) | |
172 | - | func registerUser (al,am,an,ao) = { | |
173 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
174 | - | let ap = r(O(J)) | |
175 | - | let D = toBase58String(w.transactionId) | |
176 | - | let aq = lastBlock.timestamp | |
177 | - | if (if ((ap == l)) | |
178 | - | then true | |
179 | - | else (ap == m)) | |
180 | - | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
181 | - | else if ((ap == j)) | |
182 | - | then throw("You are already registered, please use update method instead.") | |
183 | - | else if (if ((ap == "")) | |
184 | - | then h | |
185 | - | else false) | |
186 | - | then throw("You are now allowed to register yet, please contact us first to get approved.") | |
187 | - | else if (if ((al == "")) | |
188 | - | then true | |
189 | - | else (am == "")) | |
190 | - | then throw("Name and description cannot be empty") | |
191 | - | else if ((size(am) > 600)) | |
192 | - | then throw("600 Characters maximum for the description") | |
193 | - | else [IntegerEntry(P(J), aq), StringEntry(I(J), ((D + "_") + toString(lastBlock.timestamp))), StringEntry(K(J), al), StringEntry(L(J), am), StringEntry(M(J), ao), StringEntry(N(J), an), StringEntry(O(J), j), StringEntry("last_invoke_id", D)] | |
194 | - | } | |
190 | + | func ao (H) = ("get_owner_by_hash_" + H) | |
191 | + | ||
192 | + | ||
193 | + | func ap (N,aq) = ((("get_artidbysignid_" + aq) + "_") + N) | |
194 | + | ||
195 | + | ||
196 | + | func ar (H,N) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((H + N))))) | |
197 | + | ||
198 | + | ||
199 | + | func as (at,au,av) = if (if ((at != "")) | |
200 | + | then !(I(at)) | |
201 | + | else false) | |
202 | + | then throw("Wrong Display CID") | |
203 | + | else if (if ((au != "")) | |
204 | + | then !(I(au)) | |
205 | + | else false) | |
206 | + | then throw("Wrong Export CID") | |
207 | + | else if (if ((av != "")) | |
208 | + | then !(I(av)) | |
209 | + | else false) | |
210 | + | then throw("Wrong Licence CID") | |
211 | + | else true | |
212 | + | ||
213 | + | ||
214 | + | func aw (ax,ay) = if (if ((ax != "")) | |
215 | + | then !(K(ax)) | |
216 | + | else false) | |
217 | + | then throw("Export Hash 64 char. max") | |
218 | + | else if (if ((ay != "")) | |
219 | + | then !(K(ay)) | |
220 | + | else false) | |
221 | + | then throw("Licence Hash 64 char. max") | |
222 | + | else true | |
223 | + | ||
224 | + | ||
225 | + | func az (aA,aB) = if ((size(aA) == 0)) | |
226 | + | then throw("Field cannot be is empty") | |
227 | + | else if ((size(aA) > aB)) | |
228 | + | then throw((aA + " is too long")) | |
229 | + | else true | |
230 | + | ||
231 | + | ||
232 | + | @Callable(C) | |
233 | + | func registerUser (aC,aD,aE,aF) = if (!(m)) | |
234 | + | then throw(n) | |
235 | + | else { | |
236 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
237 | + | let aG = w(S(N)) | |
238 | + | let aH = toBase58String(C.transactionId) | |
239 | + | let aI = lastBlock.timestamp | |
240 | + | if (if ((aG == r)) | |
241 | + | then true | |
242 | + | else (aG == s)) | |
243 | + | then throw("Account suspended/ removed.") | |
244 | + | else if ((aG == p)) | |
245 | + | then throw("Already registered") | |
246 | + | else if (if ((aG == "")) | |
247 | + | then l | |
248 | + | else false) | |
249 | + | then throw("Can't register, get approved first.") | |
250 | + | else if (if ((aC == "")) | |
251 | + | then true | |
252 | + | else (aD == "")) | |
253 | + | then throw("Name and description cannot be empty") | |
254 | + | else if ((size(aD) > 600)) | |
255 | + | then throw("600 Char. max description") | |
256 | + | else if ((size(aC) > 45)) | |
257 | + | then throw("45 Char. max name") | |
258 | + | else [IntegerEntry(T(N), aI), StringEntry(M(N), ((aH + "_") + toString(aI))), StringEntry(O(N), aC), StringEntry(P(N), aD), StringEntry(Q(N), aF), StringEntry(R(N), aE), StringEntry(S(N), p), StringEntry("last_invoke_id", aH)] | |
259 | + | } | |
195 | 260 | ||
196 | 261 | ||
197 | 262 | ||
198 | - | @Callable(w) | |
199 | - | func deleteEntry (ar) = { | |
200 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
201 | - | if ((J == f)) | |
202 | - | then [DeleteEntry(ar)] | |
263 | + | @Callable(C) | |
264 | + | func updateUser (aC,aD,aE,aF) = if (!(m)) | |
265 | + | then throw(n) | |
266 | + | else { | |
267 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
268 | + | let aH = toBase58String(C.transactionId) | |
269 | + | let aJ = w(S(N)) | |
270 | + | if (if ((aJ == r)) | |
271 | + | then true | |
272 | + | else (aJ == s)) | |
273 | + | then throw("Account suspended/ removed.") | |
274 | + | else if (if ((aJ == "")) | |
275 | + | then true | |
276 | + | else (aJ == o)) | |
277 | + | then throw("Register first") | |
278 | + | else if (if ((aC == "")) | |
279 | + | then true | |
280 | + | else (aD == "")) | |
281 | + | then throw("Name & description cannot be empty") | |
282 | + | else if ((size(aD) > 600)) | |
283 | + | then throw("600 Char. max for description") | |
284 | + | else if ((size(aC) > 45)) | |
285 | + | then throw("45 Char. max name") | |
286 | + | else [StringEntry(O(N), aC), StringEntry(P(N), aD), StringEntry(Q(N), aF), StringEntry(R(N), aE), StringEntry("last_invoke_id", aH)] | |
287 | + | } | |
288 | + | ||
289 | + | ||
290 | + | ||
291 | + | @Callable(C) | |
292 | + | func changeUserStatus (aK,aL) = if (!(m)) | |
293 | + | then throw(n) | |
294 | + | else { | |
295 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
296 | + | let aH = toBase58String(C.transactionId) | |
297 | + | let aM = w(S(aK)) | |
298 | + | let aN = if ((aL == q)) | |
299 | + | then q | |
300 | + | else if ((aL == p)) | |
301 | + | then p | |
302 | + | else if ((aL == r)) | |
303 | + | then r | |
304 | + | else if ((aL == s)) | |
305 | + | then s | |
306 | + | else if ((aL == o)) | |
307 | + | then o | |
308 | + | else if ((aL == t)) | |
309 | + | then t | |
310 | + | else if (if ((aL == v)) | |
311 | + | then (aM == o) | |
312 | + | else false) | |
313 | + | then "" | |
314 | + | else throw("Unknown status") | |
315 | + | if (if ((aM == o)) | |
316 | + | then (aL == o) | |
317 | + | else false) | |
318 | + | then throw("User already allowed") | |
319 | + | else if (if ((aM == p)) | |
320 | + | then (aL == o) | |
321 | + | else false) | |
322 | + | then throw("User already allowed & registered") | |
323 | + | else if (if ((aM == q)) | |
324 | + | then (aL == o) | |
325 | + | else false) | |
326 | + | then throw("User already allowed & verified") | |
327 | + | else if (containsElement([j, k], N)) | |
328 | + | then [StringEntry(S(aK), aN), StringEntry("last_invoke_id", aH)] | |
329 | + | else throw(((("Not allowed to change user status " + N) + " / ") + j)) | |
330 | + | } | |
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | @Callable(aO) | |
335 | + | func addArtwork (H,F,aC,aD,aP,aQ,aR,at,ax,au,ay,av) = if (!(m)) | |
336 | + | then throw(n) | |
337 | + | else { | |
338 | + | let V = toBase58String(aO.transactionId) | |
339 | + | let N = toBase58String(aO.caller.bytes) | |
340 | + | if (!(as(at, au, av))) | |
341 | + | then throw("Problem with CID") | |
342 | + | else if (!(K(H))) | |
343 | + | then throw("Hash should be 64 characters maximum") | |
344 | + | else if (!(aw(ax, ay))) | |
345 | + | then throw("Problem with Hashes") | |
346 | + | else if ((size(aO.payments) == 0)) | |
347 | + | then throw("No payment attached") | |
348 | + | else { | |
349 | + | let aS = value(aO.payments[0]) | |
350 | + | let aT = value(aS.amount) | |
351 | + | let aU = if (if (isDefined(aS.assetId)) | |
352 | + | then (aS.assetId == d) | |
353 | + | else false) | |
354 | + | then aS.assetId | |
355 | + | else throw("Only SIGN token accepted at the moment") | |
356 | + | let aV = A(("certification_fee_" + toBase58String(d))) | |
357 | + | if ((aT != aV)) | |
358 | + | then throw(("Payment amount should be " + toString(aV))) | |
359 | + | else { | |
360 | + | let aW = w(ar(H, N)) | |
361 | + | if ((aW != "")) | |
362 | + | then throw("You already added it") | |
363 | + | else { | |
364 | + | let aX = w(ao(H)) | |
365 | + | if ((aX != "")) | |
366 | + | then throw("Hash already registered") | |
367 | + | else { | |
368 | + | let aY = E(F, N, H) | |
369 | + | if (!(aY)) | |
370 | + | then throw("Sign Certificate not found for this address.") | |
371 | + | else if ((size(at) == 0)) | |
372 | + | then throw("Display CID cannot be empty") | |
373 | + | else if (!(az(aC, 100))) | |
374 | + | then throw("100 Char. max name") | |
375 | + | else if (!(az(aD, 1000))) | |
376 | + | then throw("1000 Char. max description") | |
377 | + | else if ((size(split(aP, ",")) > 5)) | |
378 | + | then throw("5 tags max.") | |
379 | + | else { | |
380 | + | let aZ = { | |
381 | + | let y = getString(this, ("user_status_" + N)) | |
382 | + | if ($isInstanceOf(y, "String")) | |
383 | + | then { | |
384 | + | let ba = y | |
385 | + | ba | |
386 | + | } | |
387 | + | else u | |
388 | + | } | |
389 | + | let aI = lastBlock.timestamp | |
390 | + | if (if (isDefined(aZ)) | |
391 | + | then (aZ == u) | |
392 | + | else false) | |
393 | + | then throw("Register this account first with \"User infos\" tab") | |
394 | + | else if ((aZ == r)) | |
395 | + | then throw("Account suspended") | |
396 | + | else if ((aZ == s)) | |
397 | + | then throw("Account removed") | |
398 | + | else if ((aR > 10)) | |
399 | + | then throw("10 editions max") | |
400 | + | else if ((size(H) != 64)) | |
401 | + | then throw("Hash 64 char. max") | |
402 | + | else [StringEntry(ao(H), N), StringEntry(ar(H, N), V), IntegerEntry(U(N, V), aI), StringEntry(W(N, V), aC), StringEntry(X(N, V), aD), StringEntry(Y(N, V), at), StringEntry(aa(N, V), au), StringEntry(Z(N, V), ax), StringEntry(af(N, V), ay), StringEntry(ag(N, V), av), StringEntry(ai(N, V), aQ), StringEntry(ah(N, V), aP), IntegerEntry(ab(N, V), aR), StringEntry(ac(N, V), F), IntegerEntry(ad(N, V), 0), BooleanEntry(ae(N, V), false), StringEntry(ap(N, F), V), StringEntry("last_invoke_id", V), StringEntry(am(N, V), H), ScriptTransfer(Address(fromBase58String(c)), aT, aU)] | |
403 | + | } | |
404 | + | } | |
405 | + | } | |
406 | + | } | |
407 | + | } | |
408 | + | } | |
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | @Callable(aO) | |
413 | + | func updateArtwork (an,aC,aD,aP,aQ,aR,at,ax,au,ay,av) = if (!(m)) | |
414 | + | then throw(n) | |
415 | + | else { | |
416 | + | let bb = toBase58String(aO.transactionId) | |
417 | + | let N = toBase58String(aO.caller.bytes) | |
418 | + | if (!(as(at, au, av))) | |
419 | + | then throw("Problem with CID") | |
420 | + | else if (!(aw(ax, ay))) | |
421 | + | then throw("Problem with Hashes") | |
422 | + | else { | |
423 | + | let aW = w(W(N, an)) | |
424 | + | if ((aW == "")) | |
425 | + | then throw("Entry not found") | |
426 | + | else if (!(az(aC, 100))) | |
427 | + | then throw("100 Char. max name") | |
428 | + | else if (!(az(aD, 1000))) | |
429 | + | then throw("1000 Char. max description") | |
430 | + | else { | |
431 | + | let bc = w(al(N, an)) | |
432 | + | if ((bc == "ILLEGAL")) | |
433 | + | then throw("Cannot update") | |
434 | + | else { | |
435 | + | let bd = { | |
436 | + | let y = getInteger(this, ad(N, an)) | |
437 | + | if ($isInstanceOf(y, "Int")) | |
438 | + | then { | |
439 | + | let be = y | |
440 | + | if ((be == 0)) | |
441 | + | then false | |
442 | + | else true | |
443 | + | } | |
444 | + | else false | |
445 | + | } | |
446 | + | if ((size(split(aP, ",")) > 5)) | |
447 | + | then throw("5 tags max.") | |
448 | + | else { | |
449 | + | let aZ = { | |
450 | + | let y = getString(this, ("user_status_" + N)) | |
451 | + | if ($isInstanceOf(y, "String")) | |
452 | + | then { | |
453 | + | let ba = y | |
454 | + | ba | |
455 | + | } | |
456 | + | else u | |
457 | + | } | |
458 | + | if (if (isDefined(aZ)) | |
459 | + | then (aZ == u) | |
460 | + | else false) | |
461 | + | then throw("Register first with \"User infos\"") | |
462 | + | else if ((aZ == r)) | |
463 | + | then throw("Account suspended") | |
464 | + | else if ((aZ == s)) | |
465 | + | then throw("Account removed") | |
466 | + | else if ((aR > 10)) | |
467 | + | then throw("10 editions max per artwork") | |
468 | + | else if (!(bd)) | |
469 | + | then [StringEntry(W(N, an), aC), StringEntry(X(N, an), aD), StringEntry(Y(N, an), at), StringEntry(aa(N, an), au), StringEntry(Z(N, an), ax), StringEntry(ag(N, an), av), StringEntry(af(N, an), ay), IntegerEntry(ab(N, an), aR), StringEntry(ah(N, an), aP), StringEntry(ai(N, an), aQ), StringEntry("last_invoke_id", bb)] | |
470 | + | else throw("Already minted") | |
471 | + | } | |
472 | + | } | |
473 | + | } | |
474 | + | } | |
475 | + | } | |
476 | + | ||
477 | + | ||
478 | + | ||
479 | + | @Callable(C) | |
480 | + | func flagArtwork (V,bf,bc) = { | |
481 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
482 | + | let aH = toBase58String(C.transactionId) | |
483 | + | if (containsElement([j, k], N)) | |
484 | + | then if ((bc == "CONSENT")) | |
485 | + | then [StringEntry(al(bf, V), bc), StringEntry("last_invoke_id", aH)] | |
486 | + | else if ((bc == "")) | |
487 | + | then [StringEntry(al(bf, V), bc), StringEntry("last_invoke_id", aH)] | |
488 | + | else if ((bc == "ILLEGAL")) | |
489 | + | then [StringEntry(al(bf, V), bc), StringEntry(W(bf, V), "ILLEGAL CONTENT"), StringEntry(X(bf, V), "ILLEGAL CONTENT"), StringEntry(Y(bf, V), ""), StringEntry(aa(bf, V), ""), StringEntry(ag(bf, V), ""), StringEntry("last_invoke_id", aH)] | |
490 | + | else throw(("Unknow status" + bc)) | |
203 | 491 | else throw("no") | |
204 | 492 | } | |
205 | 493 | ||
206 | 494 | ||
207 | 495 | ||
208 | - | @Callable(w) | |
209 | - | func updateUser (al,am,an,ao) = { | |
210 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
211 | - | let ap = r(O(J)) | |
212 | - | if (if ((ap == l)) | |
213 | - | then true | |
214 | - | else (ap == m)) | |
215 | - | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
216 | - | else if (if ((ap == "")) | |
217 | - | then true | |
218 | - | else (ap == i)) | |
219 | - | then throw("Please register first with registerUser") | |
220 | - | else { | |
221 | - | let D = toBase58String(w.transactionId) | |
222 | - | let aq = lastBlock.timestamp | |
223 | - | if (if ((al == "")) | |
496 | + | @Callable(C) | |
497 | + | func deleteArtwork (V,bf) = { | |
498 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
499 | + | let aH = toBase58String(C.transactionId) | |
500 | + | let bg = if (containsElement([j, k], N)) | |
501 | + | then bf | |
502 | + | else N | |
503 | + | let aW = { | |
504 | + | let y = getString(this, W(bg, V)) | |
505 | + | if ($isInstanceOf(y, "String")) | |
506 | + | then { | |
507 | + | let ba = y | |
508 | + | ba | |
509 | + | } | |
510 | + | else throw("No art matching") | |
511 | + | } | |
512 | + | let bd = { | |
513 | + | let y = getInteger(this, ad(bg, V)) | |
514 | + | if ($isInstanceOf(y, "Int")) | |
515 | + | then { | |
516 | + | let be = y | |
517 | + | if ((be != 0)) | |
224 | 518 | then true | |
225 | - | else (am == "")) | |
226 | - | then throw("Name and description cannot be empty") | |
227 | - | else if ((size(am) > 600)) | |
228 | - | then throw("600 Characters maximum for the description") | |
229 | - | else [StringEntry(K(J), al), StringEntry(L(J), am), StringEntry(M(J), ao), StringEntry(N(J), an), StringEntry("last_invoke_id", D)] | |
519 | + | else false | |
230 | 520 | } | |
521 | + | else false | |
522 | + | } | |
523 | + | let bh = B(ab(bg, V)) | |
524 | + | let H = { | |
525 | + | let y = getString(this, am(bg, V)) | |
526 | + | if ($isInstanceOf(y, "String")) | |
527 | + | then { | |
528 | + | let ba = y | |
529 | + | ba | |
530 | + | } | |
531 | + | else throw("No art hash matching") | |
532 | + | } | |
533 | + | let F = { | |
534 | + | let y = getString(this, ac(bg, V)) | |
535 | + | if ($isInstanceOf(y, "String")) | |
536 | + | then { | |
537 | + | let ba = y | |
538 | + | ba | |
539 | + | } | |
540 | + | else throw("No SIGN ID matching") | |
541 | + | } | |
542 | + | let bi = [DeleteEntry(U(bg, V)), DeleteEntry(W(bg, V)), DeleteEntry(X(bg, V)), DeleteEntry(Y(bg, V)), DeleteEntry(aa(bg, V)), DeleteEntry(Z(bg, V)), DeleteEntry(af(bg, V)), DeleteEntry(ag(bg, V)), DeleteEntry(ai(bg, V)), DeleteEntry(ah(bg, V)), DeleteEntry(ab(bg, V)), DeleteEntry(ac(bg, V)), DeleteEntry(ad(bg, V)), DeleteEntry(ae(bg, V)), DeleteEntry(al(bf, V)), StringEntry("last_invoke_id", aH), DeleteEntry(ao(H)), DeleteEntry(ap(bg, F)), DeleteEntry(ar(H, bg))] | |
543 | + | if (!(bd)) | |
544 | + | then if (!(m)) | |
545 | + | then throw(n) | |
546 | + | else bi | |
547 | + | else throw("Art already minted, cannot delete") | |
231 | 548 | } | |
232 | 549 | ||
233 | 550 | ||
234 | 551 | ||
235 | - | @Callable(w) | |
236 | - | func changeUserStatus (as,at) = { | |
237 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
238 | - | let D = toBase58String(w.transactionId) | |
239 | - | let au = if ((at == k)) | |
240 | - | then k | |
241 | - | else if ((at == j)) | |
242 | - | then j | |
243 | - | else if ((at == l)) | |
244 | - | then l | |
245 | - | else if ((at == m)) | |
246 | - | then m | |
247 | - | else if ((at == i)) | |
248 | - | then i | |
249 | - | else throw("Unknown status") | |
250 | - | if (if ((J == f)) | |
251 | - | then true | |
252 | - | else (J == g)) | |
253 | - | then [StringEntry(O(as), au), StringEntry("last_invoke_id", D)] | |
254 | - | else throw(((("You are not allowed to change user status " + J) + " / ") + f)) | |
552 | + | @Callable(C) | |
553 | + | func sellArtwork (V,bj,bh,aU) = if (!(m)) | |
554 | + | then throw(n) | |
555 | + | else { | |
556 | + | let aH = toBase58String(C.transactionId) | |
557 | + | let N = toBase58String(C.caller.bytes) | |
558 | + | let bk = lastBlock.timestamp | |
559 | + | let bl = w(aa(N, V)) | |
560 | + | if ((size(split(bl, "/")[0]) != 59)) | |
561 | + | then throw("You cannot sell art with no export file") | |
562 | + | else { | |
563 | + | let bm = w(Z(N, V)) | |
564 | + | if ((size(bm) != 64)) | |
565 | + | then throw("You cannot sell art with no export hash") | |
566 | + | else if (if (if ((aU != toBase58String(d))) | |
567 | + | then (aU != toBase58String(f)) | |
568 | + | else false) | |
569 | + | then (aU != toBase58String(e)) | |
570 | + | else false) | |
571 | + | then throw("Only SIGN, USDN or WAVES accepted") | |
572 | + | else { | |
573 | + | let bn = A("waves_min_sell") | |
574 | + | let bo = 1000000 | |
575 | + | let bp = (A(("certification_fee_" + toBase58String(d))) * 2) | |
576 | + | if (if (if (if (if ((aU == toBase58String(e))) | |
577 | + | then (bo > bj) | |
578 | + | else false) | |
579 | + | then (bj != 0) | |
580 | + | else false) | |
581 | + | then true | |
582 | + | else if (if ((aU == toBase58String(d))) | |
583 | + | then (bp > bj) | |
584 | + | else false) | |
585 | + | then (bj != 0) | |
586 | + | else false) | |
587 | + | then true | |
588 | + | else if (if ((aU == toBase58String(f))) | |
589 | + | then (bn > bj) | |
590 | + | else false) | |
591 | + | then (bj != 0) | |
592 | + | else false) | |
593 | + | then throw("Wrong minimum sell price") | |
594 | + | else { | |
595 | + | let bq = { | |
596 | + | let y = getString(this, W(N, V)) | |
597 | + | if ($isInstanceOf(y, "String")) | |
598 | + | then { | |
599 | + | let ba = y | |
600 | + | ba | |
601 | + | } | |
602 | + | else throw("This art doesn't match") | |
603 | + | } | |
604 | + | let aZ = { | |
605 | + | let y = getString(this, S(N)) | |
606 | + | if ($isInstanceOf(y, "String")) | |
607 | + | then { | |
608 | + | let ba = y | |
609 | + | ba | |
610 | + | } | |
611 | + | else throw("Register this account first") | |
612 | + | } | |
613 | + | let br = B(ad(N, V)) | |
614 | + | let bs = B(ab(N, V)) | |
615 | + | if (if ((br != 0)) | |
616 | + | then (br == bs) | |
617 | + | else false) | |
618 | + | then throw("Max edition reached.") | |
619 | + | else if (if ((br > 0)) | |
620 | + | then (bs != bh) | |
621 | + | else false) | |
622 | + | then throw("Cannot change maximum issuable anymore") | |
623 | + | else if ((aZ == r)) | |
624 | + | then throw("Account suspended") | |
625 | + | else if ((aZ == s)) | |
626 | + | then throw("Account deleted") | |
627 | + | else { | |
628 | + | let bt = if (if ((bj > 0)) | |
629 | + | then (bh > 0) | |
630 | + | else false) | |
631 | + | then true | |
632 | + | else false | |
633 | + | [BooleanEntry(ae(N, V), bt), IntegerEntry(aj(N, V), bj), IntegerEntry(ab(N, V), bh), StringEntry(ak(N, V), aU), StringEntry("last_invoke_id", aH)] | |
634 | + | } | |
635 | + | } | |
636 | + | } | |
637 | + | } | |
638 | + | } | |
639 | + | ||
640 | + | ||
641 | + | ||
642 | + | @Callable(C) | |
643 | + | func buyArtwork (V,bu) = if (!(m)) | |
644 | + | then throw(n) | |
645 | + | else { | |
646 | + | let aH = toBase58String(C.transactionId) | |
647 | + | let N = toBase58String(C.caller.bytes) | |
648 | + | let bv = B("total_nft_issued") | |
649 | + | let F = w(ac(bu, V)) | |
650 | + | let bq = { | |
651 | + | let y = getString(this, W(bu, V)) | |
652 | + | if ($isInstanceOf(y, "String")) | |
653 | + | then { | |
654 | + | let ba = y | |
655 | + | ba | |
656 | + | } | |
657 | + | else throw("Art doesn't exist") | |
658 | + | } | |
659 | + | let bw = w(Y(bu, V)) | |
660 | + | let bl = w(aa(bu, V)) | |
661 | + | let bm = w(Z(bu, V)) | |
662 | + | let bx = w(ag(bu, V)) | |
663 | + | let by = w(af(bu, V)) | |
664 | + | let aD = take(w(X(bu, V)), 50) | |
665 | + | let br = B(ad(bu, V)) | |
666 | + | let bz = B(aj(bu, V)) | |
667 | + | let bA = D(ae(bu, V)) | |
668 | + | let bB = w(ak(bu, V)) | |
669 | + | let bC = w(am(bu, V)) | |
670 | + | if ((bz == 0)) | |
671 | + | then throw("Art not for sell") | |
672 | + | else if (!(bA)) | |
673 | + | then throw("Art not for sale") | |
674 | + | else { | |
675 | + | let bs = B(ab(bu, V)) | |
676 | + | let aS = value(C.payments[0]) | |
677 | + | let aT = value(aS.amount) | |
678 | + | let aU = if (if (if (isDefined(aS.assetId)) | |
679 | + | then (size(fromBase58String(bB)) > 0) | |
680 | + | else false) | |
681 | + | then (aS.assetId == fromBase58String(bB)) | |
682 | + | else false) | |
683 | + | then aS.assetId | |
684 | + | else unit | |
685 | + | let bD = if ((bB == toBase58String(d))) | |
686 | + | then 8 | |
687 | + | else 10 | |
688 | + | let bE = fraction(aT, bD, 100) | |
689 | + | let bF = (aT - bE) | |
690 | + | if ((br == bs)) | |
691 | + | then throw("Art sold out") | |
692 | + | else if ((bz != aT)) | |
693 | + | then throw("Payment don't match") | |
694 | + | else { | |
695 | + | let bG = (br + 1) | |
696 | + | let bH = lastBlock.timestamp | |
697 | + | let bI = ((((((((((((((((((((((((((("Creator: " + bu) + ", | |
698 | + | ArtID: ") + V) + ", | |
699 | + | SignID: ") + F) + ", | |
700 | + | Artwork name: ") + bq) + ", | |
701 | + | Artwork description: ") + aD) + ", | |
702 | + | Issue: ") + toString(bG)) + "/") + toString(bs)) + ", | |
703 | + | Max issuable: ") + toString(bs)) + ", | |
704 | + | Source hash: ") + bC) + ", | |
705 | + | Display cid: ") + bw) + ", | |
706 | + | Export cid: ") + bl) + ", | |
707 | + | Export hash: ") + bm) + ", | |
708 | + | Licence cid: ") + bx) + ", | |
709 | + | Licence hash: ") + by) | |
710 | + | let bJ = Issue(("SA_" + toString((bv + 1))), bI, 1, 0, false) | |
711 | + | let bK = calculateAssetId(bJ) | |
712 | + | let bt = if ((bG == bs)) | |
713 | + | then false | |
714 | + | else true | |
715 | + | [IntegerEntry(ad(bu, V), bG), StringEntry(((((((("art_sold_" + toString(bG)) + "_of_") + toString(bs)) + "_") + V) + "_") + bu), ((((((((((N + "_") + toString(bH)) + "_") + aH) + "_") + toString(bz)) + "_") + bB) + "_") + toBase58String(bK))), IntegerEntry("total_nft_issued", (bv + 1)), BooleanEntry(ae(bu, V), bt), StringEntry("last_invoke_id", aH), bJ, ScriptTransfer(Address(fromBase58String(bu)), bF, aU), ScriptTransfer(Address(fromBase58String(c)), bE, aU), ScriptTransfer(C.caller, 1, bK)] | |
716 | + | } | |
717 | + | } | |
718 | + | } | |
719 | + | ||
720 | + | ||
721 | + | ||
722 | + | @Callable(C) | |
723 | + | func creditUser (aK) = { | |
724 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
725 | + | let aH = toBase58String(C.transactionId) | |
726 | + | if (containsElement([j, k], N)) | |
727 | + | then [ScriptTransfer(Address(fromBase58String(aK)), 150000000000, d)] | |
728 | + | else throw("Not allowed") | |
255 | 729 | } | |
256 | 730 | ||
257 | 731 | ||
258 | 732 | ||
259 | - | @Callable(w) | |
260 | - | func creditUser (as) = { | |
261 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
262 | - | let D = toBase58String(w.transactionId) | |
263 | - | if (if ((J == f)) | |
264 | - | then true | |
265 | - | else (J == g)) | |
266 | - | then [ScriptTransfer(Address(fromBase58String(as)), 150000000000, d)] | |
267 | - | else throw("You are not allowed to do that") | |
733 | + | @Callable(C) | |
734 | + | func deleteUser (aK) = { | |
735 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
736 | + | let aH = toBase58String(C.transactionId) | |
737 | + | if (containsElement([j, k], N)) | |
738 | + | then [DeleteEntry(T(aK)), DeleteEntry(M(aK)), DeleteEntry(O(aK)), DeleteEntry(P(aK)), DeleteEntry(Q(aK)), DeleteEntry(R(aK)), StringEntry(S(aK), s), StringEntry("last_invoke_id", aH)] | |
739 | + | else throw("Not allowed") | |
268 | 740 | } | |
269 | 741 | ||
270 | 742 | ||
271 | 743 | ||
272 | - | @Callable(av) | |
273 | - | func addArtwork (A,y,al,am,aw,ax,ay,az,aA,aB,aC,aD) = { | |
274 | - | let R = toBase58String(av.transactionId) | |
275 | - | let aE = toBase58String(av.caller.bytes) | |
276 | - | if ((size(av.payments) == 0)) | |
277 | - | then throw("No payment attached") | |
278 | - | else { | |
279 | - | let aF = value(av.payments[0]) | |
280 | - | let aG = value(aF.amount) | |
281 | - | let aH = if (if (isDefined(aF.assetId)) | |
282 | - | then (aF.assetId == d) | |
283 | - | else false) | |
284 | - | then aF.assetId | |
285 | - | else throw("Only SIGN token accepted at the moment") | |
286 | - | let aI = { | |
287 | - | let t = getInteger(a, ("certification_fee_" + toBase58String(d))) | |
288 | - | if ($isInstanceOf(t, "Int")) | |
289 | - | then { | |
290 | - | let aJ = t | |
291 | - | aJ | |
292 | - | } | |
293 | - | else throw("Price undefined in oracle") | |
294 | - | } | |
295 | - | if ((aG != aI)) | |
296 | - | then throw(("Payment amount should be " + toString(aI))) | |
297 | - | else { | |
298 | - | let aK = r(ak(A, aE)) | |
299 | - | if ((aK != "")) | |
300 | - | then throw("You already added this artwork on Sign Art") | |
301 | - | else { | |
302 | - | let aL = r(ah(A)) | |
303 | - | if ((aL != "")) | |
304 | - | then throw("This artwork hash is already registered on Sign Art") | |
305 | - | else { | |
306 | - | let aM = x(y, aE, A) | |
307 | - | if (!(aM)) | |
308 | - | then throw("Sign Certificate not found on Sign-web.app smart contract for this address.") | |
309 | - | else if ((size(az) == 0)) | |
310 | - | then throw("Display CID cannot be empty") | |
311 | - | else if ((size(al) == 0)) | |
312 | - | then throw("Title cannot be empty") | |
313 | - | else if ((size(al) > 100)) | |
314 | - | then throw("100 Characters maximum for the name") | |
315 | - | else if ((size(am) > 1000)) | |
316 | - | then throw("1000 Characters maximum for the description") | |
317 | - | else if ((size(am) == 0)) | |
318 | - | then throw("Description cannot be empty") | |
319 | - | else { | |
320 | - | let aN = split(aw, ",") | |
321 | - | if ((size(aN) > 5)) | |
322 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
323 | - | else { | |
324 | - | let aO = { | |
325 | - | let t = getString(this, ("user_status_" + aE)) | |
326 | - | if ($isInstanceOf(t, "String")) | |
327 | - | then { | |
328 | - | let aP = t | |
329 | - | aP | |
330 | - | } | |
331 | - | else n | |
332 | - | } | |
333 | - | let aq = lastBlock.timestamp | |
334 | - | if (if (isDefined(aO)) | |
335 | - | then (aO == n) | |
336 | - | else false) | |
337 | - | then throw("Please register this account first with \"User infos\" tab") | |
338 | - | else if ((aO == l)) | |
339 | - | then throw("Your account is suspended") | |
340 | - | else if ((aO == m)) | |
341 | - | then throw("Your account have been removed") | |
342 | - | else if ((ay > 10)) | |
343 | - | then throw("Maximum 10 editions per artwork") | |
344 | - | else if ((size(A) != 64)) | |
345 | - | then throw("Hash should be sha256 string composed of 64 char.") | |
346 | - | else [StringEntry(ah(A), aE), StringEntry(ak(A, aE), R), IntegerEntry(Q(aE, R), aq), StringEntry(S(aE, R), al), StringEntry(T(aE, R), am), StringEntry(U(aE, R), az), StringEntry(W(aE, R), aB), StringEntry(V(aE, R), aA), StringEntry(ab(aE, R), aC), StringEntry(ac(aE, R), aD), StringEntry(ae(aE, R), ax), StringEntry(ad(aE, R), aw), IntegerEntry(X(aE, R), ay), StringEntry(Y(aE, R), y), IntegerEntry(Z(aE, R), 0), BooleanEntry(aa(aE, R), false), StringEntry(ai(aE, y), R), StringEntry("last_invoke_id", R), StringEntry(af(aE, R), A), ScriptTransfer(Address(fromBase58String(c)), aG, aH)] | |
347 | - | } | |
348 | - | } | |
349 | - | } | |
350 | - | } | |
351 | - | } | |
352 | - | } | |
353 | - | } | |
354 | - | ||
355 | - | ||
356 | - | ||
357 | - | @Callable(av) | |
358 | - | func updateArtwork (ag,al,am,aw,ax,ay,az,aA,aB,aC,aD) = { | |
359 | - | let aQ = toBase58String(av.transactionId) | |
360 | - | let aE = toBase58String(av.caller.bytes) | |
361 | - | let aK = r(S(aE, ag)) | |
362 | - | if ((aK == "")) | |
363 | - | then throw("This entry doesn't exist or you are not the owner") | |
364 | - | else if ((size(al) == 0)) | |
365 | - | then throw("Title cannot be empty") | |
366 | - | else if ((size(al) > 100)) | |
367 | - | then throw("100 Characters maximum for the name") | |
368 | - | else if ((size(am) > 1000)) | |
369 | - | then throw("1000 Characters maximum for the description") | |
370 | - | else if ((size(am) == 0)) | |
371 | - | then throw("Description cannot be empty") | |
372 | - | else { | |
373 | - | let aR = { | |
374 | - | let t = getInteger(this, Z(aE, ag)) | |
375 | - | if ($isInstanceOf(t, "Int")) | |
376 | - | then { | |
377 | - | let H = t | |
378 | - | if ((H == 0)) | |
379 | - | then false | |
380 | - | else true | |
381 | - | } | |
382 | - | else false | |
383 | - | } | |
384 | - | let aN = split(aw, ",") | |
385 | - | if ((size(aN) > 5)) | |
386 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
387 | - | else { | |
388 | - | let aO = { | |
389 | - | let t = getString(this, ("user_status_" + aE)) | |
390 | - | if ($isInstanceOf(t, "String")) | |
391 | - | then { | |
392 | - | let aP = t | |
393 | - | aP | |
394 | - | } | |
395 | - | else n | |
396 | - | } | |
397 | - | if (if (isDefined(aO)) | |
398 | - | then (aO == n) | |
399 | - | else false) | |
400 | - | then throw("Please register this account first with \"User infos\" tab") | |
401 | - | else if ((aO == l)) | |
402 | - | then throw("Your account is suspended") | |
403 | - | else if ((aO == m)) | |
404 | - | then throw("Your account have been removed") | |
405 | - | else if ((ay > 10)) | |
406 | - | then throw("Maximum 10 editions per artwork") | |
407 | - | else if (!(aR)) | |
408 | - | then [StringEntry(S(aE, ag), al), StringEntry(T(aE, ag), am), StringEntry(U(aE, ag), az), StringEntry(W(aE, ag), aB), StringEntry(V(aE, ag), aA), StringEntry(ac(aE, ag), aD), StringEntry(ab(aE, ag), aC), IntegerEntry(X(aE, ag), ay), StringEntry(ad(aE, ag), aw), StringEntry(ae(aE, ag), ax), StringEntry("last_invoke_id", aQ)] | |
409 | - | else [StringEntry(S(aE, ag), al), StringEntry(T(aE, ag), am), StringEntry(U(aE, ag), az), StringEntry(ae(aE, ag), ax), StringEntry(ad(aE, ag), aw), StringEntry("last_invoke_id", aQ)] | |
410 | - | } | |
411 | - | } | |
412 | - | } | |
413 | - | ||
414 | - | ||
415 | - | ||
416 | - | @Callable(w) | |
417 | - | func deleteArtwork (R,as) = { | |
418 | - | let aE = toString(addressFromPublicKey(w.callerPublicKey)) | |
419 | - | let D = toBase58String(w.transactionId) | |
420 | - | let aS = if (if ((aE == f)) | |
421 | - | then true | |
422 | - | else (aE == g)) | |
423 | - | then as | |
424 | - | else aE | |
425 | - | let aK = { | |
426 | - | let t = getString(this, S(aS, R)) | |
427 | - | if ($isInstanceOf(t, "String")) | |
428 | - | then { | |
429 | - | let aP = t | |
430 | - | aP | |
431 | - | } | |
432 | - | else throw("No artwork matching this request or you are not allowed") | |
433 | - | } | |
434 | - | let aR = { | |
435 | - | let t = getInteger(this, Z(aS, R)) | |
436 | - | if ($isInstanceOf(t, "Int")) | |
437 | - | then { | |
438 | - | let H = t | |
439 | - | if ((H == 0)) | |
440 | - | then false | |
441 | - | else true | |
442 | - | } | |
443 | - | else false | |
444 | - | } | |
445 | - | let A = { | |
446 | - | let t = getString(this, af(aS, R)) | |
447 | - | if ($isInstanceOf(t, "String")) | |
448 | - | then { | |
449 | - | let aP = t | |
450 | - | aP | |
451 | - | } | |
452 | - | else throw("No artwork hash matching this request") | |
453 | - | } | |
454 | - | let y = { | |
455 | - | let t = getString(this, Y(aS, R)) | |
456 | - | if ($isInstanceOf(t, "String")) | |
457 | - | then { | |
458 | - | let aP = t | |
459 | - | aP | |
460 | - | } | |
461 | - | else throw("No SIGN ID matching this request") | |
462 | - | } | |
463 | - | let aT = [DeleteEntry(Q(aS, R)), DeleteEntry(S(aS, R)), DeleteEntry(T(aS, R)), DeleteEntry(U(aS, R)), DeleteEntry(W(aS, R)), DeleteEntry(V(aS, R)), DeleteEntry(ab(aS, R)), DeleteEntry(ac(aS, R)), DeleteEntry(ae(aS, R)), DeleteEntry(ad(aS, R)), DeleteEntry(X(aS, R)), DeleteEntry(Y(aS, R)), DeleteEntry(Z(aS, R)), DeleteEntry(aa(aS, R)), StringEntry("last_invoke_id", D), DeleteEntry(ah(A)), DeleteEntry(ai(aS, y)), DeleteEntry(ak(A, aS))] | |
464 | - | if (if ((aE == f)) | |
465 | - | then true | |
466 | - | else (aE == g)) | |
467 | - | then aT | |
468 | - | else if (!(aR)) | |
469 | - | then aT | |
470 | - | else throw("This artwork already have minted NFT, you cannot delete it") | |
471 | - | } | |
472 | - | ||
473 | - | ||
474 | - | ||
475 | - | @Callable(av) | |
476 | - | func sellArtwork (aU,aJ) = { | |
477 | - | let D = toBase58String(av.transactionId) | |
478 | - | let aE = toBase58String(av.caller.bytes) | |
479 | - | let aV = lastBlock.timestamp | |
480 | - | let aW = r(((aU + "_") + aE)) | |
481 | - | if (!(isDefined(aW))) | |
482 | - | then throw("This artwork doesn't exit or you are not the owner") | |
483 | - | else { | |
484 | - | let aO = r(("user_status_" + aE)) | |
485 | - | if ((aO == "")) | |
486 | - | then throw("Please register this account first") | |
487 | - | else { | |
488 | - | let aX = v(((("art_issued_" + aW) + "_") + aE)) | |
489 | - | let aY = v(((("art_maxmint_" + aW) + "_") + aE)) | |
490 | - | if ((aX == aY)) | |
491 | - | then throw("You reached the max edition allowed to sell for this edition.") | |
492 | - | else if ((aO == l)) | |
493 | - | then throw("Your account is suspended") | |
494 | - | else if (!(isDefined(aW))) | |
495 | - | then throw("This artwork desn't exist") | |
496 | - | else if ((size(aU) != 64)) | |
497 | - | then throw("This hash is incorrect.") | |
498 | - | else { | |
499 | - | let aZ = if ((aJ > 0)) | |
500 | - | then true | |
501 | - | else false | |
502 | - | [BooleanEntry(((("art_onsale_" + aW) + "_") + aE), aZ), IntegerEntry(((("art_price_" + aW) + "_") + aE), aJ), StringEntry("last_invoke_id", D)] | |
503 | - | } | |
504 | - | } | |
505 | - | } | |
506 | - | } | |
507 | - | ||
508 | - | ||
509 | - | ||
510 | - | @Callable(av) | |
511 | - | func buyArtwork (aU,ba) = { | |
512 | - | let D = toBase58String(av.transactionId) | |
513 | - | let aE = toBase58String(av.caller.bytes) | |
514 | - | let bb = v("total_nft_issued") | |
515 | - | let aW = r(((aU + "_") + ba)) | |
516 | - | if ((aW == "")) | |
517 | - | then throw("This artwork doesn't exit or you are not the owner") | |
518 | - | else { | |
519 | - | let aO = r(("user_status_" + aE)) | |
520 | - | if (!(isDefined(aO))) | |
521 | - | then throw("Please register this account first") | |
522 | - | else { | |
523 | - | let bc = r(((("art_sold_" + aW) + "_") + ba)) | |
524 | - | let aX = v(((("art_issued_" + aW) + "_") + ba)) | |
525 | - | let bd = v(((("art_price_" + aW) + "_") + ba)) | |
526 | - | if ((bd == 0)) | |
527 | - | then throw("This artwork is not for sell") | |
528 | - | else { | |
529 | - | let aY = v(((("art_maxmint_" + aW) + "_") + ba)) | |
530 | - | let aF = value(av.payments[0]) | |
531 | - | let aG = value(aF.amount) | |
532 | - | let aH = if (isDefined(aF.assetId)) | |
533 | - | then throw("Only Waves token accepted at the moment") | |
534 | - | else unit | |
535 | - | if ((aX == aY)) | |
536 | - | then throw("Cannot buy this artwork anymore") | |
537 | - | else if ((bd != aG)) | |
538 | - | then throw("Payment don't match seller price") | |
539 | - | else { | |
540 | - | let be = (aX + 1) | |
541 | - | let aV = lastBlock.timestamp | |
542 | - | let bf = (((((((((((((("{\"version\": 1,\"artID\": \"" + aW) + "\",\"maxIssuable\": \"") + toString(aY)) + "\",\"signID\": \"SA_") + toString((bb + 1))) + "\", \"creator\": \"") + ba) + "\", \"issue\": \"") + toString(be)) + "/") + toString(aY)) + "\", \"hash\": ") + aU) + "}") | |
543 | - | let bg = Issue(("SA_" + toString((bb + 1))), bf, 1, 0, false) | |
544 | - | let bh = calculateAssetId(bg) | |
545 | - | let aZ = if ((be == aY)) | |
546 | - | then false | |
547 | - | else true | |
548 | - | [IntegerEntry(((("art_issued_" + aW) + "_") + ba), be), StringEntry(((((((("art_sold_" + toString(be)) + "_of_") + toString(aY)) + "_") + aW) + "_") + ba), ((((((aE + "_") + toString(aV)) + "_") + D) + "_") + toString(bd))), IntegerEntry("total_nft_issued", (bb + 1)), StringEntry("last_invoke_id", D), bg, BooleanEntry(((("art_onsale_" + aW) + "_") + aE), aZ), ScriptTransfer(Address(fromBase58String(ba)), aG, aH), ScriptTransfer(av.caller, 1, bh)] | |
549 | - | } | |
550 | - | } | |
551 | - | } | |
552 | - | } | |
553 | - | } | |
554 | - | ||
555 | - | ||
556 | - | ||
557 | - | @Callable(w) | |
558 | - | func deleteUser (as) = { | |
559 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
560 | - | let D = toBase58String(w.transactionId) | |
561 | - | if (if ((J == f)) | |
562 | - | then true | |
563 | - | else (J == g)) | |
564 | - | then [DeleteEntry(P(as)), DeleteEntry(I(as)), DeleteEntry(K(as)), DeleteEntry(L(as)), DeleteEntry(M(as)), DeleteEntry(N(as)), StringEntry(O(as), m), StringEntry("last_invoke_id", D)] | |
565 | - | else throw("You are not allowed to do that") | |
744 | + | @Callable(C) | |
745 | + | func deleteEntry (bL) = { | |
746 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
747 | + | if ((N == j)) | |
748 | + | then [DeleteEntry(bL)] | |
749 | + | else throw("no") | |
566 | 750 | } | |
567 | 751 | ||
568 | 752 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | 5 | ||
6 | 6 | let b = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
7 | 7 | ||
8 | 8 | let c = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
9 | 9 | ||
10 | 10 | let d = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
13 | 13 | ||
14 | - | let f = | |
14 | + | let f = base58'' | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = 8 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 10 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 10 | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = true | |
27 | 27 | ||
28 | - | let m = | |
28 | + | let m = true | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "SIGN Art is under maintenance" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "ALLOWED" | |
33 | 33 | ||
34 | - | let p = " | |
34 | + | let p = "REGISTERED" | |
35 | 35 | ||
36 | - | let q = " | |
36 | + | let q = "VERIFIED" | |
37 | 37 | ||
38 | - | func r (s) = { | |
39 | - | let t = getString(this, s) | |
40 | - | if ($isInstanceOf(t, "String")) | |
38 | + | let r = "SUSPENDED" | |
39 | + | ||
40 | + | let s = "REMOVED" | |
41 | + | ||
42 | + | let t = "CHANGE_REQUIRED" | |
43 | + | ||
44 | + | let u = "UNREGISTERED" | |
45 | + | ||
46 | + | let v = "RESET" | |
47 | + | ||
48 | + | func w (x) = { | |
49 | + | let y = getString(this, x) | |
50 | + | if ($isInstanceOf(y, "String")) | |
41 | 51 | then { | |
42 | - | let | |
43 | - | | |
52 | + | let z = y | |
53 | + | z | |
44 | 54 | } | |
45 | 55 | else "" | |
46 | 56 | } | |
47 | 57 | ||
48 | 58 | ||
49 | - | func | |
50 | - | let | |
51 | - | if ($isInstanceOf( | |
59 | + | func A (x) = { | |
60 | + | let y = getInteger(a, x) | |
61 | + | if ($isInstanceOf(y, "Int")) | |
52 | 62 | then { | |
53 | - | let w = t | |
54 | - | w | |
63 | + | let z = y | |
64 | + | z | |
65 | + | } | |
66 | + | else throw("Integer undefine or 0 in oracle") | |
67 | + | } | |
68 | + | ||
69 | + | ||
70 | + | func B (x) = { | |
71 | + | let y = getInteger(this, x) | |
72 | + | if ($isInstanceOf(y, "Int")) | |
73 | + | then { | |
74 | + | let C = y | |
75 | + | C | |
55 | 76 | } | |
56 | 77 | else 0 | |
57 | 78 | } | |
58 | 79 | ||
59 | 80 | ||
60 | - | func | |
61 | - | let | |
62 | - | if ($isInstanceOf( | |
81 | + | func D (x) = { | |
82 | + | let y = getBoolean(this, x) | |
83 | + | if ($isInstanceOf(y, "Boolean")) | |
63 | 84 | then { | |
64 | - | let u = t | |
65 | - | if (contains(u, A)) | |
85 | + | let C = y | |
86 | + | C | |
87 | + | } | |
88 | + | else false | |
89 | + | } | |
90 | + | ||
91 | + | ||
92 | + | func E (F,G,H) = { | |
93 | + | let y = getString(b, ((("data_fc_" + F) + "_") + G)) | |
94 | + | if ($isInstanceOf(y, "String")) | |
95 | + | then { | |
96 | + | let z = y | |
97 | + | if (contains(z, H)) | |
66 | 98 | then true | |
67 | 99 | else false | |
68 | 100 | } | |
69 | 101 | else false | |
70 | 102 | } | |
71 | 103 | ||
72 | 104 | ||
73 | - | func B (C,D) = { | |
74 | - | let E = value(assetInfo(fromBase58String(D))) | |
75 | - | if (if (if ((E.quantity != 1)) | |
76 | - | then true | |
77 | - | else (E.decimals != 0)) | |
78 | - | then true | |
79 | - | else (E.reissuable != false)) | |
80 | - | then (C + 0) | |
81 | - | else (C + 1) | |
82 | - | } | |
105 | + | func I (J) = if (if ((75 > size(J))) | |
106 | + | then (60 > size(split(J, "/")[0])) | |
107 | + | else false) | |
108 | + | then (16 > size(split(J, "/")[1])) | |
109 | + | else false | |
83 | 110 | ||
84 | 111 | ||
85 | - | func F (G) = { | |
86 | - | let t = getString(this, ("user_status_" + G)) | |
87 | - | if ($isInstanceOf(t, "String")) | |
88 | - | then { | |
89 | - | let H = t | |
90 | - | H | |
91 | - | } | |
92 | - | else throw("Something went wrong.") | |
93 | - | } | |
112 | + | func K (L) = (65 > size(L)) | |
94 | 113 | ||
95 | 114 | ||
96 | - | func | |
115 | + | func M (N) = ("user_" + N) | |
97 | 116 | ||
98 | 117 | ||
99 | - | func | |
118 | + | func O (N) = ("user_name_" + N) | |
100 | 119 | ||
101 | 120 | ||
102 | - | func | |
121 | + | func P (N) = ("user_desc_" + N) | |
103 | 122 | ||
104 | 123 | ||
105 | - | func | |
124 | + | func Q (N) = ("user_social_" + N) | |
106 | 125 | ||
107 | 126 | ||
108 | - | func | |
127 | + | func R (N) = ("user_thumb_" + N) | |
109 | 128 | ||
110 | 129 | ||
111 | - | func | |
130 | + | func S (N) = ("user_status_" + N) | |
112 | 131 | ||
113 | 132 | ||
114 | - | func | |
133 | + | func T (N) = ("user_date_" + N) | |
115 | 134 | ||
116 | 135 | ||
117 | - | func | |
136 | + | func U (N,V) = ((("art_date_" + V) + "_") + N) | |
118 | 137 | ||
119 | 138 | ||
120 | - | func | |
139 | + | func W (N,V) = ((("art_name_" + V) + "_") + N) | |
121 | 140 | ||
122 | 141 | ||
123 | - | func | |
142 | + | func X (N,V) = ((("art_desc_" + V) + "_") + N) | |
124 | 143 | ||
125 | 144 | ||
126 | - | func | |
145 | + | func Y (N,V) = ((("art_display_cid_" + V) + "_") + N) | |
127 | 146 | ||
128 | 147 | ||
129 | - | func | |
148 | + | func Z (N,V) = ((("art_export_hash_" + V) + "_") + N) | |
130 | 149 | ||
131 | 150 | ||
132 | - | func | |
151 | + | func aa (N,V) = ((("art_export_cid_" + V) + "_") + N) | |
133 | 152 | ||
134 | 153 | ||
135 | - | func | |
154 | + | func ab (N,V) = ((("art_maxmint_" + V) + "_") + N) | |
136 | 155 | ||
137 | 156 | ||
138 | - | func | |
157 | + | func ac (N,V) = ((("art_signid_" + V) + "_") + N) | |
139 | 158 | ||
140 | 159 | ||
141 | - | func | |
160 | + | func ad (N,V) = ((("art_issued_" + V) + "_") + N) | |
142 | 161 | ||
143 | 162 | ||
144 | - | func | |
163 | + | func ae (N,V) = ((("art_onsale_" + V) + "_") + N) | |
145 | 164 | ||
146 | 165 | ||
147 | - | func | |
166 | + | func af (N,V) = ((("art_licence_hash_" + V) + "_") + N) | |
148 | 167 | ||
149 | 168 | ||
150 | - | func | |
169 | + | func ag (N,V) = ((("art_licence_cid_" + V) + "_") + N) | |
151 | 170 | ||
152 | 171 | ||
153 | - | func | |
172 | + | func ah (N,V) = ((("art_tags_" + V) + "_") + N) | |
154 | 173 | ||
155 | 174 | ||
156 | - | func | |
175 | + | func ai (N,V) = ((("art_type_" + V) + "_") + N) | |
157 | 176 | ||
158 | 177 | ||
159 | - | func | |
178 | + | func aj (N,V) = ((("art_price_" + V) + "_") + N) | |
160 | 179 | ||
161 | 180 | ||
162 | - | func | |
181 | + | func ak (N,V) = ((("art_assetAccepted_" + V) + "_") + N) | |
163 | 182 | ||
164 | 183 | ||
165 | - | func | |
184 | + | func al (N,V) = ((("art_flag_" + V) + "_") + N) | |
166 | 185 | ||
167 | 186 | ||
168 | - | func | |
187 | + | func am (N,an) = ((("get_hashbytxidaddr_" + an) + "_") + N) | |
169 | 188 | ||
170 | 189 | ||
171 | - | @Callable(w) | |
172 | - | func registerUser (al,am,an,ao) = { | |
173 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
174 | - | let ap = r(O(J)) | |
175 | - | let D = toBase58String(w.transactionId) | |
176 | - | let aq = lastBlock.timestamp | |
177 | - | if (if ((ap == l)) | |
178 | - | then true | |
179 | - | else (ap == m)) | |
180 | - | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
181 | - | else if ((ap == j)) | |
182 | - | then throw("You are already registered, please use update method instead.") | |
183 | - | else if (if ((ap == "")) | |
184 | - | then h | |
185 | - | else false) | |
186 | - | then throw("You are now allowed to register yet, please contact us first to get approved.") | |
187 | - | else if (if ((al == "")) | |
188 | - | then true | |
189 | - | else (am == "")) | |
190 | - | then throw("Name and description cannot be empty") | |
191 | - | else if ((size(am) > 600)) | |
192 | - | then throw("600 Characters maximum for the description") | |
193 | - | else [IntegerEntry(P(J), aq), StringEntry(I(J), ((D + "_") + toString(lastBlock.timestamp))), StringEntry(K(J), al), StringEntry(L(J), am), StringEntry(M(J), ao), StringEntry(N(J), an), StringEntry(O(J), j), StringEntry("last_invoke_id", D)] | |
194 | - | } | |
190 | + | func ao (H) = ("get_owner_by_hash_" + H) | |
191 | + | ||
192 | + | ||
193 | + | func ap (N,aq) = ((("get_artidbysignid_" + aq) + "_") + N) | |
194 | + | ||
195 | + | ||
196 | + | func ar (H,N) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((H + N))))) | |
197 | + | ||
198 | + | ||
199 | + | func as (at,au,av) = if (if ((at != "")) | |
200 | + | then !(I(at)) | |
201 | + | else false) | |
202 | + | then throw("Wrong Display CID") | |
203 | + | else if (if ((au != "")) | |
204 | + | then !(I(au)) | |
205 | + | else false) | |
206 | + | then throw("Wrong Export CID") | |
207 | + | else if (if ((av != "")) | |
208 | + | then !(I(av)) | |
209 | + | else false) | |
210 | + | then throw("Wrong Licence CID") | |
211 | + | else true | |
212 | + | ||
213 | + | ||
214 | + | func aw (ax,ay) = if (if ((ax != "")) | |
215 | + | then !(K(ax)) | |
216 | + | else false) | |
217 | + | then throw("Export Hash 64 char. max") | |
218 | + | else if (if ((ay != "")) | |
219 | + | then !(K(ay)) | |
220 | + | else false) | |
221 | + | then throw("Licence Hash 64 char. max") | |
222 | + | else true | |
223 | + | ||
224 | + | ||
225 | + | func az (aA,aB) = if ((size(aA) == 0)) | |
226 | + | then throw("Field cannot be is empty") | |
227 | + | else if ((size(aA) > aB)) | |
228 | + | then throw((aA + " is too long")) | |
229 | + | else true | |
230 | + | ||
231 | + | ||
232 | + | @Callable(C) | |
233 | + | func registerUser (aC,aD,aE,aF) = if (!(m)) | |
234 | + | then throw(n) | |
235 | + | else { | |
236 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
237 | + | let aG = w(S(N)) | |
238 | + | let aH = toBase58String(C.transactionId) | |
239 | + | let aI = lastBlock.timestamp | |
240 | + | if (if ((aG == r)) | |
241 | + | then true | |
242 | + | else (aG == s)) | |
243 | + | then throw("Account suspended/ removed.") | |
244 | + | else if ((aG == p)) | |
245 | + | then throw("Already registered") | |
246 | + | else if (if ((aG == "")) | |
247 | + | then l | |
248 | + | else false) | |
249 | + | then throw("Can't register, get approved first.") | |
250 | + | else if (if ((aC == "")) | |
251 | + | then true | |
252 | + | else (aD == "")) | |
253 | + | then throw("Name and description cannot be empty") | |
254 | + | else if ((size(aD) > 600)) | |
255 | + | then throw("600 Char. max description") | |
256 | + | else if ((size(aC) > 45)) | |
257 | + | then throw("45 Char. max name") | |
258 | + | else [IntegerEntry(T(N), aI), StringEntry(M(N), ((aH + "_") + toString(aI))), StringEntry(O(N), aC), StringEntry(P(N), aD), StringEntry(Q(N), aF), StringEntry(R(N), aE), StringEntry(S(N), p), StringEntry("last_invoke_id", aH)] | |
259 | + | } | |
195 | 260 | ||
196 | 261 | ||
197 | 262 | ||
198 | - | @Callable(w) | |
199 | - | func deleteEntry (ar) = { | |
200 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
201 | - | if ((J == f)) | |
202 | - | then [DeleteEntry(ar)] | |
263 | + | @Callable(C) | |
264 | + | func updateUser (aC,aD,aE,aF) = if (!(m)) | |
265 | + | then throw(n) | |
266 | + | else { | |
267 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
268 | + | let aH = toBase58String(C.transactionId) | |
269 | + | let aJ = w(S(N)) | |
270 | + | if (if ((aJ == r)) | |
271 | + | then true | |
272 | + | else (aJ == s)) | |
273 | + | then throw("Account suspended/ removed.") | |
274 | + | else if (if ((aJ == "")) | |
275 | + | then true | |
276 | + | else (aJ == o)) | |
277 | + | then throw("Register first") | |
278 | + | else if (if ((aC == "")) | |
279 | + | then true | |
280 | + | else (aD == "")) | |
281 | + | then throw("Name & description cannot be empty") | |
282 | + | else if ((size(aD) > 600)) | |
283 | + | then throw("600 Char. max for description") | |
284 | + | else if ((size(aC) > 45)) | |
285 | + | then throw("45 Char. max name") | |
286 | + | else [StringEntry(O(N), aC), StringEntry(P(N), aD), StringEntry(Q(N), aF), StringEntry(R(N), aE), StringEntry("last_invoke_id", aH)] | |
287 | + | } | |
288 | + | ||
289 | + | ||
290 | + | ||
291 | + | @Callable(C) | |
292 | + | func changeUserStatus (aK,aL) = if (!(m)) | |
293 | + | then throw(n) | |
294 | + | else { | |
295 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
296 | + | let aH = toBase58String(C.transactionId) | |
297 | + | let aM = w(S(aK)) | |
298 | + | let aN = if ((aL == q)) | |
299 | + | then q | |
300 | + | else if ((aL == p)) | |
301 | + | then p | |
302 | + | else if ((aL == r)) | |
303 | + | then r | |
304 | + | else if ((aL == s)) | |
305 | + | then s | |
306 | + | else if ((aL == o)) | |
307 | + | then o | |
308 | + | else if ((aL == t)) | |
309 | + | then t | |
310 | + | else if (if ((aL == v)) | |
311 | + | then (aM == o) | |
312 | + | else false) | |
313 | + | then "" | |
314 | + | else throw("Unknown status") | |
315 | + | if (if ((aM == o)) | |
316 | + | then (aL == o) | |
317 | + | else false) | |
318 | + | then throw("User already allowed") | |
319 | + | else if (if ((aM == p)) | |
320 | + | then (aL == o) | |
321 | + | else false) | |
322 | + | then throw("User already allowed & registered") | |
323 | + | else if (if ((aM == q)) | |
324 | + | then (aL == o) | |
325 | + | else false) | |
326 | + | then throw("User already allowed & verified") | |
327 | + | else if (containsElement([j, k], N)) | |
328 | + | then [StringEntry(S(aK), aN), StringEntry("last_invoke_id", aH)] | |
329 | + | else throw(((("Not allowed to change user status " + N) + " / ") + j)) | |
330 | + | } | |
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | @Callable(aO) | |
335 | + | func addArtwork (H,F,aC,aD,aP,aQ,aR,at,ax,au,ay,av) = if (!(m)) | |
336 | + | then throw(n) | |
337 | + | else { | |
338 | + | let V = toBase58String(aO.transactionId) | |
339 | + | let N = toBase58String(aO.caller.bytes) | |
340 | + | if (!(as(at, au, av))) | |
341 | + | then throw("Problem with CID") | |
342 | + | else if (!(K(H))) | |
343 | + | then throw("Hash should be 64 characters maximum") | |
344 | + | else if (!(aw(ax, ay))) | |
345 | + | then throw("Problem with Hashes") | |
346 | + | else if ((size(aO.payments) == 0)) | |
347 | + | then throw("No payment attached") | |
348 | + | else { | |
349 | + | let aS = value(aO.payments[0]) | |
350 | + | let aT = value(aS.amount) | |
351 | + | let aU = if (if (isDefined(aS.assetId)) | |
352 | + | then (aS.assetId == d) | |
353 | + | else false) | |
354 | + | then aS.assetId | |
355 | + | else throw("Only SIGN token accepted at the moment") | |
356 | + | let aV = A(("certification_fee_" + toBase58String(d))) | |
357 | + | if ((aT != aV)) | |
358 | + | then throw(("Payment amount should be " + toString(aV))) | |
359 | + | else { | |
360 | + | let aW = w(ar(H, N)) | |
361 | + | if ((aW != "")) | |
362 | + | then throw("You already added it") | |
363 | + | else { | |
364 | + | let aX = w(ao(H)) | |
365 | + | if ((aX != "")) | |
366 | + | then throw("Hash already registered") | |
367 | + | else { | |
368 | + | let aY = E(F, N, H) | |
369 | + | if (!(aY)) | |
370 | + | then throw("Sign Certificate not found for this address.") | |
371 | + | else if ((size(at) == 0)) | |
372 | + | then throw("Display CID cannot be empty") | |
373 | + | else if (!(az(aC, 100))) | |
374 | + | then throw("100 Char. max name") | |
375 | + | else if (!(az(aD, 1000))) | |
376 | + | then throw("1000 Char. max description") | |
377 | + | else if ((size(split(aP, ",")) > 5)) | |
378 | + | then throw("5 tags max.") | |
379 | + | else { | |
380 | + | let aZ = { | |
381 | + | let y = getString(this, ("user_status_" + N)) | |
382 | + | if ($isInstanceOf(y, "String")) | |
383 | + | then { | |
384 | + | let ba = y | |
385 | + | ba | |
386 | + | } | |
387 | + | else u | |
388 | + | } | |
389 | + | let aI = lastBlock.timestamp | |
390 | + | if (if (isDefined(aZ)) | |
391 | + | then (aZ == u) | |
392 | + | else false) | |
393 | + | then throw("Register this account first with \"User infos\" tab") | |
394 | + | else if ((aZ == r)) | |
395 | + | then throw("Account suspended") | |
396 | + | else if ((aZ == s)) | |
397 | + | then throw("Account removed") | |
398 | + | else if ((aR > 10)) | |
399 | + | then throw("10 editions max") | |
400 | + | else if ((size(H) != 64)) | |
401 | + | then throw("Hash 64 char. max") | |
402 | + | else [StringEntry(ao(H), N), StringEntry(ar(H, N), V), IntegerEntry(U(N, V), aI), StringEntry(W(N, V), aC), StringEntry(X(N, V), aD), StringEntry(Y(N, V), at), StringEntry(aa(N, V), au), StringEntry(Z(N, V), ax), StringEntry(af(N, V), ay), StringEntry(ag(N, V), av), StringEntry(ai(N, V), aQ), StringEntry(ah(N, V), aP), IntegerEntry(ab(N, V), aR), StringEntry(ac(N, V), F), IntegerEntry(ad(N, V), 0), BooleanEntry(ae(N, V), false), StringEntry(ap(N, F), V), StringEntry("last_invoke_id", V), StringEntry(am(N, V), H), ScriptTransfer(Address(fromBase58String(c)), aT, aU)] | |
403 | + | } | |
404 | + | } | |
405 | + | } | |
406 | + | } | |
407 | + | } | |
408 | + | } | |
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | @Callable(aO) | |
413 | + | func updateArtwork (an,aC,aD,aP,aQ,aR,at,ax,au,ay,av) = if (!(m)) | |
414 | + | then throw(n) | |
415 | + | else { | |
416 | + | let bb = toBase58String(aO.transactionId) | |
417 | + | let N = toBase58String(aO.caller.bytes) | |
418 | + | if (!(as(at, au, av))) | |
419 | + | then throw("Problem with CID") | |
420 | + | else if (!(aw(ax, ay))) | |
421 | + | then throw("Problem with Hashes") | |
422 | + | else { | |
423 | + | let aW = w(W(N, an)) | |
424 | + | if ((aW == "")) | |
425 | + | then throw("Entry not found") | |
426 | + | else if (!(az(aC, 100))) | |
427 | + | then throw("100 Char. max name") | |
428 | + | else if (!(az(aD, 1000))) | |
429 | + | then throw("1000 Char. max description") | |
430 | + | else { | |
431 | + | let bc = w(al(N, an)) | |
432 | + | if ((bc == "ILLEGAL")) | |
433 | + | then throw("Cannot update") | |
434 | + | else { | |
435 | + | let bd = { | |
436 | + | let y = getInteger(this, ad(N, an)) | |
437 | + | if ($isInstanceOf(y, "Int")) | |
438 | + | then { | |
439 | + | let be = y | |
440 | + | if ((be == 0)) | |
441 | + | then false | |
442 | + | else true | |
443 | + | } | |
444 | + | else false | |
445 | + | } | |
446 | + | if ((size(split(aP, ",")) > 5)) | |
447 | + | then throw("5 tags max.") | |
448 | + | else { | |
449 | + | let aZ = { | |
450 | + | let y = getString(this, ("user_status_" + N)) | |
451 | + | if ($isInstanceOf(y, "String")) | |
452 | + | then { | |
453 | + | let ba = y | |
454 | + | ba | |
455 | + | } | |
456 | + | else u | |
457 | + | } | |
458 | + | if (if (isDefined(aZ)) | |
459 | + | then (aZ == u) | |
460 | + | else false) | |
461 | + | then throw("Register first with \"User infos\"") | |
462 | + | else if ((aZ == r)) | |
463 | + | then throw("Account suspended") | |
464 | + | else if ((aZ == s)) | |
465 | + | then throw("Account removed") | |
466 | + | else if ((aR > 10)) | |
467 | + | then throw("10 editions max per artwork") | |
468 | + | else if (!(bd)) | |
469 | + | then [StringEntry(W(N, an), aC), StringEntry(X(N, an), aD), StringEntry(Y(N, an), at), StringEntry(aa(N, an), au), StringEntry(Z(N, an), ax), StringEntry(ag(N, an), av), StringEntry(af(N, an), ay), IntegerEntry(ab(N, an), aR), StringEntry(ah(N, an), aP), StringEntry(ai(N, an), aQ), StringEntry("last_invoke_id", bb)] | |
470 | + | else throw("Already minted") | |
471 | + | } | |
472 | + | } | |
473 | + | } | |
474 | + | } | |
475 | + | } | |
476 | + | ||
477 | + | ||
478 | + | ||
479 | + | @Callable(C) | |
480 | + | func flagArtwork (V,bf,bc) = { | |
481 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
482 | + | let aH = toBase58String(C.transactionId) | |
483 | + | if (containsElement([j, k], N)) | |
484 | + | then if ((bc == "CONSENT")) | |
485 | + | then [StringEntry(al(bf, V), bc), StringEntry("last_invoke_id", aH)] | |
486 | + | else if ((bc == "")) | |
487 | + | then [StringEntry(al(bf, V), bc), StringEntry("last_invoke_id", aH)] | |
488 | + | else if ((bc == "ILLEGAL")) | |
489 | + | then [StringEntry(al(bf, V), bc), StringEntry(W(bf, V), "ILLEGAL CONTENT"), StringEntry(X(bf, V), "ILLEGAL CONTENT"), StringEntry(Y(bf, V), ""), StringEntry(aa(bf, V), ""), StringEntry(ag(bf, V), ""), StringEntry("last_invoke_id", aH)] | |
490 | + | else throw(("Unknow status" + bc)) | |
203 | 491 | else throw("no") | |
204 | 492 | } | |
205 | 493 | ||
206 | 494 | ||
207 | 495 | ||
208 | - | @Callable(w) | |
209 | - | func updateUser (al,am,an,ao) = { | |
210 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
211 | - | let ap = r(O(J)) | |
212 | - | if (if ((ap == l)) | |
213 | - | then true | |
214 | - | else (ap == m)) | |
215 | - | then throw("You are now allowed to register, your account have been suspended/ removed.") | |
216 | - | else if (if ((ap == "")) | |
217 | - | then true | |
218 | - | else (ap == i)) | |
219 | - | then throw("Please register first with registerUser") | |
220 | - | else { | |
221 | - | let D = toBase58String(w.transactionId) | |
222 | - | let aq = lastBlock.timestamp | |
223 | - | if (if ((al == "")) | |
496 | + | @Callable(C) | |
497 | + | func deleteArtwork (V,bf) = { | |
498 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
499 | + | let aH = toBase58String(C.transactionId) | |
500 | + | let bg = if (containsElement([j, k], N)) | |
501 | + | then bf | |
502 | + | else N | |
503 | + | let aW = { | |
504 | + | let y = getString(this, W(bg, V)) | |
505 | + | if ($isInstanceOf(y, "String")) | |
506 | + | then { | |
507 | + | let ba = y | |
508 | + | ba | |
509 | + | } | |
510 | + | else throw("No art matching") | |
511 | + | } | |
512 | + | let bd = { | |
513 | + | let y = getInteger(this, ad(bg, V)) | |
514 | + | if ($isInstanceOf(y, "Int")) | |
515 | + | then { | |
516 | + | let be = y | |
517 | + | if ((be != 0)) | |
224 | 518 | then true | |
225 | - | else (am == "")) | |
226 | - | then throw("Name and description cannot be empty") | |
227 | - | else if ((size(am) > 600)) | |
228 | - | then throw("600 Characters maximum for the description") | |
229 | - | else [StringEntry(K(J), al), StringEntry(L(J), am), StringEntry(M(J), ao), StringEntry(N(J), an), StringEntry("last_invoke_id", D)] | |
519 | + | else false | |
230 | 520 | } | |
521 | + | else false | |
522 | + | } | |
523 | + | let bh = B(ab(bg, V)) | |
524 | + | let H = { | |
525 | + | let y = getString(this, am(bg, V)) | |
526 | + | if ($isInstanceOf(y, "String")) | |
527 | + | then { | |
528 | + | let ba = y | |
529 | + | ba | |
530 | + | } | |
531 | + | else throw("No art hash matching") | |
532 | + | } | |
533 | + | let F = { | |
534 | + | let y = getString(this, ac(bg, V)) | |
535 | + | if ($isInstanceOf(y, "String")) | |
536 | + | then { | |
537 | + | let ba = y | |
538 | + | ba | |
539 | + | } | |
540 | + | else throw("No SIGN ID matching") | |
541 | + | } | |
542 | + | let bi = [DeleteEntry(U(bg, V)), DeleteEntry(W(bg, V)), DeleteEntry(X(bg, V)), DeleteEntry(Y(bg, V)), DeleteEntry(aa(bg, V)), DeleteEntry(Z(bg, V)), DeleteEntry(af(bg, V)), DeleteEntry(ag(bg, V)), DeleteEntry(ai(bg, V)), DeleteEntry(ah(bg, V)), DeleteEntry(ab(bg, V)), DeleteEntry(ac(bg, V)), DeleteEntry(ad(bg, V)), DeleteEntry(ae(bg, V)), DeleteEntry(al(bf, V)), StringEntry("last_invoke_id", aH), DeleteEntry(ao(H)), DeleteEntry(ap(bg, F)), DeleteEntry(ar(H, bg))] | |
543 | + | if (!(bd)) | |
544 | + | then if (!(m)) | |
545 | + | then throw(n) | |
546 | + | else bi | |
547 | + | else throw("Art already minted, cannot delete") | |
231 | 548 | } | |
232 | 549 | ||
233 | 550 | ||
234 | 551 | ||
235 | - | @Callable(w) | |
236 | - | func changeUserStatus (as,at) = { | |
237 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
238 | - | let D = toBase58String(w.transactionId) | |
239 | - | let au = if ((at == k)) | |
240 | - | then k | |
241 | - | else if ((at == j)) | |
242 | - | then j | |
243 | - | else if ((at == l)) | |
244 | - | then l | |
245 | - | else if ((at == m)) | |
246 | - | then m | |
247 | - | else if ((at == i)) | |
248 | - | then i | |
249 | - | else throw("Unknown status") | |
250 | - | if (if ((J == f)) | |
251 | - | then true | |
252 | - | else (J == g)) | |
253 | - | then [StringEntry(O(as), au), StringEntry("last_invoke_id", D)] | |
254 | - | else throw(((("You are not allowed to change user status " + J) + " / ") + f)) | |
552 | + | @Callable(C) | |
553 | + | func sellArtwork (V,bj,bh,aU) = if (!(m)) | |
554 | + | then throw(n) | |
555 | + | else { | |
556 | + | let aH = toBase58String(C.transactionId) | |
557 | + | let N = toBase58String(C.caller.bytes) | |
558 | + | let bk = lastBlock.timestamp | |
559 | + | let bl = w(aa(N, V)) | |
560 | + | if ((size(split(bl, "/")[0]) != 59)) | |
561 | + | then throw("You cannot sell art with no export file") | |
562 | + | else { | |
563 | + | let bm = w(Z(N, V)) | |
564 | + | if ((size(bm) != 64)) | |
565 | + | then throw("You cannot sell art with no export hash") | |
566 | + | else if (if (if ((aU != toBase58String(d))) | |
567 | + | then (aU != toBase58String(f)) | |
568 | + | else false) | |
569 | + | then (aU != toBase58String(e)) | |
570 | + | else false) | |
571 | + | then throw("Only SIGN, USDN or WAVES accepted") | |
572 | + | else { | |
573 | + | let bn = A("waves_min_sell") | |
574 | + | let bo = 1000000 | |
575 | + | let bp = (A(("certification_fee_" + toBase58String(d))) * 2) | |
576 | + | if (if (if (if (if ((aU == toBase58String(e))) | |
577 | + | then (bo > bj) | |
578 | + | else false) | |
579 | + | then (bj != 0) | |
580 | + | else false) | |
581 | + | then true | |
582 | + | else if (if ((aU == toBase58String(d))) | |
583 | + | then (bp > bj) | |
584 | + | else false) | |
585 | + | then (bj != 0) | |
586 | + | else false) | |
587 | + | then true | |
588 | + | else if (if ((aU == toBase58String(f))) | |
589 | + | then (bn > bj) | |
590 | + | else false) | |
591 | + | then (bj != 0) | |
592 | + | else false) | |
593 | + | then throw("Wrong minimum sell price") | |
594 | + | else { | |
595 | + | let bq = { | |
596 | + | let y = getString(this, W(N, V)) | |
597 | + | if ($isInstanceOf(y, "String")) | |
598 | + | then { | |
599 | + | let ba = y | |
600 | + | ba | |
601 | + | } | |
602 | + | else throw("This art doesn't match") | |
603 | + | } | |
604 | + | let aZ = { | |
605 | + | let y = getString(this, S(N)) | |
606 | + | if ($isInstanceOf(y, "String")) | |
607 | + | then { | |
608 | + | let ba = y | |
609 | + | ba | |
610 | + | } | |
611 | + | else throw("Register this account first") | |
612 | + | } | |
613 | + | let br = B(ad(N, V)) | |
614 | + | let bs = B(ab(N, V)) | |
615 | + | if (if ((br != 0)) | |
616 | + | then (br == bs) | |
617 | + | else false) | |
618 | + | then throw("Max edition reached.") | |
619 | + | else if (if ((br > 0)) | |
620 | + | then (bs != bh) | |
621 | + | else false) | |
622 | + | then throw("Cannot change maximum issuable anymore") | |
623 | + | else if ((aZ == r)) | |
624 | + | then throw("Account suspended") | |
625 | + | else if ((aZ == s)) | |
626 | + | then throw("Account deleted") | |
627 | + | else { | |
628 | + | let bt = if (if ((bj > 0)) | |
629 | + | then (bh > 0) | |
630 | + | else false) | |
631 | + | then true | |
632 | + | else false | |
633 | + | [BooleanEntry(ae(N, V), bt), IntegerEntry(aj(N, V), bj), IntegerEntry(ab(N, V), bh), StringEntry(ak(N, V), aU), StringEntry("last_invoke_id", aH)] | |
634 | + | } | |
635 | + | } | |
636 | + | } | |
637 | + | } | |
638 | + | } | |
639 | + | ||
640 | + | ||
641 | + | ||
642 | + | @Callable(C) | |
643 | + | func buyArtwork (V,bu) = if (!(m)) | |
644 | + | then throw(n) | |
645 | + | else { | |
646 | + | let aH = toBase58String(C.transactionId) | |
647 | + | let N = toBase58String(C.caller.bytes) | |
648 | + | let bv = B("total_nft_issued") | |
649 | + | let F = w(ac(bu, V)) | |
650 | + | let bq = { | |
651 | + | let y = getString(this, W(bu, V)) | |
652 | + | if ($isInstanceOf(y, "String")) | |
653 | + | then { | |
654 | + | let ba = y | |
655 | + | ba | |
656 | + | } | |
657 | + | else throw("Art doesn't exist") | |
658 | + | } | |
659 | + | let bw = w(Y(bu, V)) | |
660 | + | let bl = w(aa(bu, V)) | |
661 | + | let bm = w(Z(bu, V)) | |
662 | + | let bx = w(ag(bu, V)) | |
663 | + | let by = w(af(bu, V)) | |
664 | + | let aD = take(w(X(bu, V)), 50) | |
665 | + | let br = B(ad(bu, V)) | |
666 | + | let bz = B(aj(bu, V)) | |
667 | + | let bA = D(ae(bu, V)) | |
668 | + | let bB = w(ak(bu, V)) | |
669 | + | let bC = w(am(bu, V)) | |
670 | + | if ((bz == 0)) | |
671 | + | then throw("Art not for sell") | |
672 | + | else if (!(bA)) | |
673 | + | then throw("Art not for sale") | |
674 | + | else { | |
675 | + | let bs = B(ab(bu, V)) | |
676 | + | let aS = value(C.payments[0]) | |
677 | + | let aT = value(aS.amount) | |
678 | + | let aU = if (if (if (isDefined(aS.assetId)) | |
679 | + | then (size(fromBase58String(bB)) > 0) | |
680 | + | else false) | |
681 | + | then (aS.assetId == fromBase58String(bB)) | |
682 | + | else false) | |
683 | + | then aS.assetId | |
684 | + | else unit | |
685 | + | let bD = if ((bB == toBase58String(d))) | |
686 | + | then 8 | |
687 | + | else 10 | |
688 | + | let bE = fraction(aT, bD, 100) | |
689 | + | let bF = (aT - bE) | |
690 | + | if ((br == bs)) | |
691 | + | then throw("Art sold out") | |
692 | + | else if ((bz != aT)) | |
693 | + | then throw("Payment don't match") | |
694 | + | else { | |
695 | + | let bG = (br + 1) | |
696 | + | let bH = lastBlock.timestamp | |
697 | + | let bI = ((((((((((((((((((((((((((("Creator: " + bu) + ", | |
698 | + | ArtID: ") + V) + ", | |
699 | + | SignID: ") + F) + ", | |
700 | + | Artwork name: ") + bq) + ", | |
701 | + | Artwork description: ") + aD) + ", | |
702 | + | Issue: ") + toString(bG)) + "/") + toString(bs)) + ", | |
703 | + | Max issuable: ") + toString(bs)) + ", | |
704 | + | Source hash: ") + bC) + ", | |
705 | + | Display cid: ") + bw) + ", | |
706 | + | Export cid: ") + bl) + ", | |
707 | + | Export hash: ") + bm) + ", | |
708 | + | Licence cid: ") + bx) + ", | |
709 | + | Licence hash: ") + by) | |
710 | + | let bJ = Issue(("SA_" + toString((bv + 1))), bI, 1, 0, false) | |
711 | + | let bK = calculateAssetId(bJ) | |
712 | + | let bt = if ((bG == bs)) | |
713 | + | then false | |
714 | + | else true | |
715 | + | [IntegerEntry(ad(bu, V), bG), StringEntry(((((((("art_sold_" + toString(bG)) + "_of_") + toString(bs)) + "_") + V) + "_") + bu), ((((((((((N + "_") + toString(bH)) + "_") + aH) + "_") + toString(bz)) + "_") + bB) + "_") + toBase58String(bK))), IntegerEntry("total_nft_issued", (bv + 1)), BooleanEntry(ae(bu, V), bt), StringEntry("last_invoke_id", aH), bJ, ScriptTransfer(Address(fromBase58String(bu)), bF, aU), ScriptTransfer(Address(fromBase58String(c)), bE, aU), ScriptTransfer(C.caller, 1, bK)] | |
716 | + | } | |
717 | + | } | |
718 | + | } | |
719 | + | ||
720 | + | ||
721 | + | ||
722 | + | @Callable(C) | |
723 | + | func creditUser (aK) = { | |
724 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
725 | + | let aH = toBase58String(C.transactionId) | |
726 | + | if (containsElement([j, k], N)) | |
727 | + | then [ScriptTransfer(Address(fromBase58String(aK)), 150000000000, d)] | |
728 | + | else throw("Not allowed") | |
255 | 729 | } | |
256 | 730 | ||
257 | 731 | ||
258 | 732 | ||
259 | - | @Callable(w) | |
260 | - | func creditUser (as) = { | |
261 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
262 | - | let D = toBase58String(w.transactionId) | |
263 | - | if (if ((J == f)) | |
264 | - | then true | |
265 | - | else (J == g)) | |
266 | - | then [ScriptTransfer(Address(fromBase58String(as)), 150000000000, d)] | |
267 | - | else throw("You are not allowed to do that") | |
733 | + | @Callable(C) | |
734 | + | func deleteUser (aK) = { | |
735 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
736 | + | let aH = toBase58String(C.transactionId) | |
737 | + | if (containsElement([j, k], N)) | |
738 | + | then [DeleteEntry(T(aK)), DeleteEntry(M(aK)), DeleteEntry(O(aK)), DeleteEntry(P(aK)), DeleteEntry(Q(aK)), DeleteEntry(R(aK)), StringEntry(S(aK), s), StringEntry("last_invoke_id", aH)] | |
739 | + | else throw("Not allowed") | |
268 | 740 | } | |
269 | 741 | ||
270 | 742 | ||
271 | 743 | ||
272 | - | @Callable(av) | |
273 | - | func addArtwork (A,y,al,am,aw,ax,ay,az,aA,aB,aC,aD) = { | |
274 | - | let R = toBase58String(av.transactionId) | |
275 | - | let aE = toBase58String(av.caller.bytes) | |
276 | - | if ((size(av.payments) == 0)) | |
277 | - | then throw("No payment attached") | |
278 | - | else { | |
279 | - | let aF = value(av.payments[0]) | |
280 | - | let aG = value(aF.amount) | |
281 | - | let aH = if (if (isDefined(aF.assetId)) | |
282 | - | then (aF.assetId == d) | |
283 | - | else false) | |
284 | - | then aF.assetId | |
285 | - | else throw("Only SIGN token accepted at the moment") | |
286 | - | let aI = { | |
287 | - | let t = getInteger(a, ("certification_fee_" + toBase58String(d))) | |
288 | - | if ($isInstanceOf(t, "Int")) | |
289 | - | then { | |
290 | - | let aJ = t | |
291 | - | aJ | |
292 | - | } | |
293 | - | else throw("Price undefined in oracle") | |
294 | - | } | |
295 | - | if ((aG != aI)) | |
296 | - | then throw(("Payment amount should be " + toString(aI))) | |
297 | - | else { | |
298 | - | let aK = r(ak(A, aE)) | |
299 | - | if ((aK != "")) | |
300 | - | then throw("You already added this artwork on Sign Art") | |
301 | - | else { | |
302 | - | let aL = r(ah(A)) | |
303 | - | if ((aL != "")) | |
304 | - | then throw("This artwork hash is already registered on Sign Art") | |
305 | - | else { | |
306 | - | let aM = x(y, aE, A) | |
307 | - | if (!(aM)) | |
308 | - | then throw("Sign Certificate not found on Sign-web.app smart contract for this address.") | |
309 | - | else if ((size(az) == 0)) | |
310 | - | then throw("Display CID cannot be empty") | |
311 | - | else if ((size(al) == 0)) | |
312 | - | then throw("Title cannot be empty") | |
313 | - | else if ((size(al) > 100)) | |
314 | - | then throw("100 Characters maximum for the name") | |
315 | - | else if ((size(am) > 1000)) | |
316 | - | then throw("1000 Characters maximum for the description") | |
317 | - | else if ((size(am) == 0)) | |
318 | - | then throw("Description cannot be empty") | |
319 | - | else { | |
320 | - | let aN = split(aw, ",") | |
321 | - | if ((size(aN) > 5)) | |
322 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
323 | - | else { | |
324 | - | let aO = { | |
325 | - | let t = getString(this, ("user_status_" + aE)) | |
326 | - | if ($isInstanceOf(t, "String")) | |
327 | - | then { | |
328 | - | let aP = t | |
329 | - | aP | |
330 | - | } | |
331 | - | else n | |
332 | - | } | |
333 | - | let aq = lastBlock.timestamp | |
334 | - | if (if (isDefined(aO)) | |
335 | - | then (aO == n) | |
336 | - | else false) | |
337 | - | then throw("Please register this account first with \"User infos\" tab") | |
338 | - | else if ((aO == l)) | |
339 | - | then throw("Your account is suspended") | |
340 | - | else if ((aO == m)) | |
341 | - | then throw("Your account have been removed") | |
342 | - | else if ((ay > 10)) | |
343 | - | then throw("Maximum 10 editions per artwork") | |
344 | - | else if ((size(A) != 64)) | |
345 | - | then throw("Hash should be sha256 string composed of 64 char.") | |
346 | - | else [StringEntry(ah(A), aE), StringEntry(ak(A, aE), R), IntegerEntry(Q(aE, R), aq), StringEntry(S(aE, R), al), StringEntry(T(aE, R), am), StringEntry(U(aE, R), az), StringEntry(W(aE, R), aB), StringEntry(V(aE, R), aA), StringEntry(ab(aE, R), aC), StringEntry(ac(aE, R), aD), StringEntry(ae(aE, R), ax), StringEntry(ad(aE, R), aw), IntegerEntry(X(aE, R), ay), StringEntry(Y(aE, R), y), IntegerEntry(Z(aE, R), 0), BooleanEntry(aa(aE, R), false), StringEntry(ai(aE, y), R), StringEntry("last_invoke_id", R), StringEntry(af(aE, R), A), ScriptTransfer(Address(fromBase58String(c)), aG, aH)] | |
347 | - | } | |
348 | - | } | |
349 | - | } | |
350 | - | } | |
351 | - | } | |
352 | - | } | |
353 | - | } | |
354 | - | ||
355 | - | ||
356 | - | ||
357 | - | @Callable(av) | |
358 | - | func updateArtwork (ag,al,am,aw,ax,ay,az,aA,aB,aC,aD) = { | |
359 | - | let aQ = toBase58String(av.transactionId) | |
360 | - | let aE = toBase58String(av.caller.bytes) | |
361 | - | let aK = r(S(aE, ag)) | |
362 | - | if ((aK == "")) | |
363 | - | then throw("This entry doesn't exist or you are not the owner") | |
364 | - | else if ((size(al) == 0)) | |
365 | - | then throw("Title cannot be empty") | |
366 | - | else if ((size(al) > 100)) | |
367 | - | then throw("100 Characters maximum for the name") | |
368 | - | else if ((size(am) > 1000)) | |
369 | - | then throw("1000 Characters maximum for the description") | |
370 | - | else if ((size(am) == 0)) | |
371 | - | then throw("Description cannot be empty") | |
372 | - | else { | |
373 | - | let aR = { | |
374 | - | let t = getInteger(this, Z(aE, ag)) | |
375 | - | if ($isInstanceOf(t, "Int")) | |
376 | - | then { | |
377 | - | let H = t | |
378 | - | if ((H == 0)) | |
379 | - | then false | |
380 | - | else true | |
381 | - | } | |
382 | - | else false | |
383 | - | } | |
384 | - | let aN = split(aw, ",") | |
385 | - | if ((size(aN) > 5)) | |
386 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
387 | - | else { | |
388 | - | let aO = { | |
389 | - | let t = getString(this, ("user_status_" + aE)) | |
390 | - | if ($isInstanceOf(t, "String")) | |
391 | - | then { | |
392 | - | let aP = t | |
393 | - | aP | |
394 | - | } | |
395 | - | else n | |
396 | - | } | |
397 | - | if (if (isDefined(aO)) | |
398 | - | then (aO == n) | |
399 | - | else false) | |
400 | - | then throw("Please register this account first with \"User infos\" tab") | |
401 | - | else if ((aO == l)) | |
402 | - | then throw("Your account is suspended") | |
403 | - | else if ((aO == m)) | |
404 | - | then throw("Your account have been removed") | |
405 | - | else if ((ay > 10)) | |
406 | - | then throw("Maximum 10 editions per artwork") | |
407 | - | else if (!(aR)) | |
408 | - | then [StringEntry(S(aE, ag), al), StringEntry(T(aE, ag), am), StringEntry(U(aE, ag), az), StringEntry(W(aE, ag), aB), StringEntry(V(aE, ag), aA), StringEntry(ac(aE, ag), aD), StringEntry(ab(aE, ag), aC), IntegerEntry(X(aE, ag), ay), StringEntry(ad(aE, ag), aw), StringEntry(ae(aE, ag), ax), StringEntry("last_invoke_id", aQ)] | |
409 | - | else [StringEntry(S(aE, ag), al), StringEntry(T(aE, ag), am), StringEntry(U(aE, ag), az), StringEntry(ae(aE, ag), ax), StringEntry(ad(aE, ag), aw), StringEntry("last_invoke_id", aQ)] | |
410 | - | } | |
411 | - | } | |
412 | - | } | |
413 | - | ||
414 | - | ||
415 | - | ||
416 | - | @Callable(w) | |
417 | - | func deleteArtwork (R,as) = { | |
418 | - | let aE = toString(addressFromPublicKey(w.callerPublicKey)) | |
419 | - | let D = toBase58String(w.transactionId) | |
420 | - | let aS = if (if ((aE == f)) | |
421 | - | then true | |
422 | - | else (aE == g)) | |
423 | - | then as | |
424 | - | else aE | |
425 | - | let aK = { | |
426 | - | let t = getString(this, S(aS, R)) | |
427 | - | if ($isInstanceOf(t, "String")) | |
428 | - | then { | |
429 | - | let aP = t | |
430 | - | aP | |
431 | - | } | |
432 | - | else throw("No artwork matching this request or you are not allowed") | |
433 | - | } | |
434 | - | let aR = { | |
435 | - | let t = getInteger(this, Z(aS, R)) | |
436 | - | if ($isInstanceOf(t, "Int")) | |
437 | - | then { | |
438 | - | let H = t | |
439 | - | if ((H == 0)) | |
440 | - | then false | |
441 | - | else true | |
442 | - | } | |
443 | - | else false | |
444 | - | } | |
445 | - | let A = { | |
446 | - | let t = getString(this, af(aS, R)) | |
447 | - | if ($isInstanceOf(t, "String")) | |
448 | - | then { | |
449 | - | let aP = t | |
450 | - | aP | |
451 | - | } | |
452 | - | else throw("No artwork hash matching this request") | |
453 | - | } | |
454 | - | let y = { | |
455 | - | let t = getString(this, Y(aS, R)) | |
456 | - | if ($isInstanceOf(t, "String")) | |
457 | - | then { | |
458 | - | let aP = t | |
459 | - | aP | |
460 | - | } | |
461 | - | else throw("No SIGN ID matching this request") | |
462 | - | } | |
463 | - | let aT = [DeleteEntry(Q(aS, R)), DeleteEntry(S(aS, R)), DeleteEntry(T(aS, R)), DeleteEntry(U(aS, R)), DeleteEntry(W(aS, R)), DeleteEntry(V(aS, R)), DeleteEntry(ab(aS, R)), DeleteEntry(ac(aS, R)), DeleteEntry(ae(aS, R)), DeleteEntry(ad(aS, R)), DeleteEntry(X(aS, R)), DeleteEntry(Y(aS, R)), DeleteEntry(Z(aS, R)), DeleteEntry(aa(aS, R)), StringEntry("last_invoke_id", D), DeleteEntry(ah(A)), DeleteEntry(ai(aS, y)), DeleteEntry(ak(A, aS))] | |
464 | - | if (if ((aE == f)) | |
465 | - | then true | |
466 | - | else (aE == g)) | |
467 | - | then aT | |
468 | - | else if (!(aR)) | |
469 | - | then aT | |
470 | - | else throw("This artwork already have minted NFT, you cannot delete it") | |
471 | - | } | |
472 | - | ||
473 | - | ||
474 | - | ||
475 | - | @Callable(av) | |
476 | - | func sellArtwork (aU,aJ) = { | |
477 | - | let D = toBase58String(av.transactionId) | |
478 | - | let aE = toBase58String(av.caller.bytes) | |
479 | - | let aV = lastBlock.timestamp | |
480 | - | let aW = r(((aU + "_") + aE)) | |
481 | - | if (!(isDefined(aW))) | |
482 | - | then throw("This artwork doesn't exit or you are not the owner") | |
483 | - | else { | |
484 | - | let aO = r(("user_status_" + aE)) | |
485 | - | if ((aO == "")) | |
486 | - | then throw("Please register this account first") | |
487 | - | else { | |
488 | - | let aX = v(((("art_issued_" + aW) + "_") + aE)) | |
489 | - | let aY = v(((("art_maxmint_" + aW) + "_") + aE)) | |
490 | - | if ((aX == aY)) | |
491 | - | then throw("You reached the max edition allowed to sell for this edition.") | |
492 | - | else if ((aO == l)) | |
493 | - | then throw("Your account is suspended") | |
494 | - | else if (!(isDefined(aW))) | |
495 | - | then throw("This artwork desn't exist") | |
496 | - | else if ((size(aU) != 64)) | |
497 | - | then throw("This hash is incorrect.") | |
498 | - | else { | |
499 | - | let aZ = if ((aJ > 0)) | |
500 | - | then true | |
501 | - | else false | |
502 | - | [BooleanEntry(((("art_onsale_" + aW) + "_") + aE), aZ), IntegerEntry(((("art_price_" + aW) + "_") + aE), aJ), StringEntry("last_invoke_id", D)] | |
503 | - | } | |
504 | - | } | |
505 | - | } | |
506 | - | } | |
507 | - | ||
508 | - | ||
509 | - | ||
510 | - | @Callable(av) | |
511 | - | func buyArtwork (aU,ba) = { | |
512 | - | let D = toBase58String(av.transactionId) | |
513 | - | let aE = toBase58String(av.caller.bytes) | |
514 | - | let bb = v("total_nft_issued") | |
515 | - | let aW = r(((aU + "_") + ba)) | |
516 | - | if ((aW == "")) | |
517 | - | then throw("This artwork doesn't exit or you are not the owner") | |
518 | - | else { | |
519 | - | let aO = r(("user_status_" + aE)) | |
520 | - | if (!(isDefined(aO))) | |
521 | - | then throw("Please register this account first") | |
522 | - | else { | |
523 | - | let bc = r(((("art_sold_" + aW) + "_") + ba)) | |
524 | - | let aX = v(((("art_issued_" + aW) + "_") + ba)) | |
525 | - | let bd = v(((("art_price_" + aW) + "_") + ba)) | |
526 | - | if ((bd == 0)) | |
527 | - | then throw("This artwork is not for sell") | |
528 | - | else { | |
529 | - | let aY = v(((("art_maxmint_" + aW) + "_") + ba)) | |
530 | - | let aF = value(av.payments[0]) | |
531 | - | let aG = value(aF.amount) | |
532 | - | let aH = if (isDefined(aF.assetId)) | |
533 | - | then throw("Only Waves token accepted at the moment") | |
534 | - | else unit | |
535 | - | if ((aX == aY)) | |
536 | - | then throw("Cannot buy this artwork anymore") | |
537 | - | else if ((bd != aG)) | |
538 | - | then throw("Payment don't match seller price") | |
539 | - | else { | |
540 | - | let be = (aX + 1) | |
541 | - | let aV = lastBlock.timestamp | |
542 | - | let bf = (((((((((((((("{\"version\": 1,\"artID\": \"" + aW) + "\",\"maxIssuable\": \"") + toString(aY)) + "\",\"signID\": \"SA_") + toString((bb + 1))) + "\", \"creator\": \"") + ba) + "\", \"issue\": \"") + toString(be)) + "/") + toString(aY)) + "\", \"hash\": ") + aU) + "}") | |
543 | - | let bg = Issue(("SA_" + toString((bb + 1))), bf, 1, 0, false) | |
544 | - | let bh = calculateAssetId(bg) | |
545 | - | let aZ = if ((be == aY)) | |
546 | - | then false | |
547 | - | else true | |
548 | - | [IntegerEntry(((("art_issued_" + aW) + "_") + ba), be), StringEntry(((((((("art_sold_" + toString(be)) + "_of_") + toString(aY)) + "_") + aW) + "_") + ba), ((((((aE + "_") + toString(aV)) + "_") + D) + "_") + toString(bd))), IntegerEntry("total_nft_issued", (bb + 1)), StringEntry("last_invoke_id", D), bg, BooleanEntry(((("art_onsale_" + aW) + "_") + aE), aZ), ScriptTransfer(Address(fromBase58String(ba)), aG, aH), ScriptTransfer(av.caller, 1, bh)] | |
549 | - | } | |
550 | - | } | |
551 | - | } | |
552 | - | } | |
553 | - | } | |
554 | - | ||
555 | - | ||
556 | - | ||
557 | - | @Callable(w) | |
558 | - | func deleteUser (as) = { | |
559 | - | let J = toString(addressFromPublicKey(w.callerPublicKey)) | |
560 | - | let D = toBase58String(w.transactionId) | |
561 | - | if (if ((J == f)) | |
562 | - | then true | |
563 | - | else (J == g)) | |
564 | - | then [DeleteEntry(P(as)), DeleteEntry(I(as)), DeleteEntry(K(as)), DeleteEntry(L(as)), DeleteEntry(M(as)), DeleteEntry(N(as)), StringEntry(O(as), m), StringEntry("last_invoke_id", D)] | |
565 | - | else throw("You are not allowed to do that") | |
744 | + | @Callable(C) | |
745 | + | func deleteEntry (bL) = { | |
746 | + | let N = toString(addressFromPublicKey(C.callerPublicKey)) | |
747 | + | if ((N == j)) | |
748 | + | then [DeleteEntry(bL)] | |
749 | + | else throw("no") | |
566 | 750 | } | |
567 | 751 | ||
568 | 752 |
github/deemru/w8io/169f3d6 136.03 ms ◑