tx · 9k4EuFxvBSvXY4PAitq9h8L8TQAv67BRyCqttdd2SL4R 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01200000 Waves 2023.01.28 07:15 [2424324] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "9k4EuFxvBSvXY4PAitq9h8L8TQAv67BRyCqttdd2SL4R", "fee": 1200000, "feeAssetId": null, "timestamp": 1674879318879, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "5HaSviWXmFVunqYo4vXhQEQ6PJtV7Wz2tgScbTGhWz4sdUxcNARkBVX7vULVnCByG8jVge5Ah3WmMqhb9J4jwnj7" ], "script": "base64:BgJNCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgYKBAgICAgSAwoBCBIGCgQICAEBEgQKAggIEgMKAQgqAAdWRVJTSU9OAgMxLjUBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEJvb2xlYW5CeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMFA2tleQcBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAA5kYXBwUnVubmluZ0tleQIUY29uZl9kYXBwX2lzX3J1bm5pbmcAEW1haW50ZW5hbmNlTVNHS2V5AhRjb25mX21haW50ZW5hbmNlX21zZwASd2hpdGVsaXN0ZWRvbmx5S2V5AhVjb25mX3doaXRlbGlzdGVkX29ubHkAC2RhcHBSdW5uaW5nCQELdmFsdWVPckVsc2UCCQCbCAIF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HlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmrQVVe", "height": 2424324, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7MNNQHXVM5mXEWKoFQTJGZ2egQFhsWnE2yYTqUaFECxq Next: HUBnemqiBAEuFsRwe4GNxdgjSSXdW3LnFEjb1up741yK Diff:
Old | New | Differences | |
---|---|---|---|
326 | 326 | @Callable(ao) | |
327 | 327 | func changeUserStatus (Y,W,ay,az) = { | |
328 | 328 | let w = toString(ao.caller) | |
329 | - | if (containsElement([f, toString(this)], w)) | |
330 | - | then if ((size(W) == 0)) | |
331 | - | then { | |
332 | - | let Z = b(B(Y)) | |
333 | - | if ((Z == "")) | |
334 | - | then throw("User have no status yet") | |
335 | - | else [StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
336 | - | } | |
337 | - | else { | |
338 | - | let Z = b(B(Y)) | |
339 | - | let ab = X(W, Y, Z) | |
340 | - | let R = toBase64String(toBytes(b(x(Y)))) | |
341 | - | let T = toBase64String(toBytes(b(A(Y)))) | |
342 | - | let ae = e(D(Y)) | |
343 | - | let aA = ad(R, T, toString(ae)) | |
344 | - | [StringEntry(B(Y), ab), DeleteEntry(((Z + "_") + Y)), StringEntry(((ab + "_") + Y), aA), StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
345 | - | } | |
346 | - | else throw("Not allowed to change user status") | |
329 | + | if ((size(Y) == 0)) | |
330 | + | then throw("Address cannot be empty") | |
331 | + | else { | |
332 | + | let aG = b(F(Y)) | |
333 | + | let aH = b(G(Y)) | |
334 | + | let aI = if ((size(ay) != 0)) | |
335 | + | then ay | |
336 | + | else aG | |
337 | + | let aJ = if ((size(az) != 0)) | |
338 | + | then az | |
339 | + | else aH | |
340 | + | if (containsElement([f, toString(this)], w)) | |
341 | + | then if ((size(W) == 0)) | |
342 | + | then { | |
343 | + | let Z = b(B(Y)) | |
344 | + | if ((Z == "")) | |
345 | + | then throw("User have no status yet") | |
346 | + | else [StringEntry(F(Y), aI), StringEntry(G(Y), aJ)] | |
347 | + | } | |
348 | + | else { | |
349 | + | let Z = b(B(Y)) | |
350 | + | let ab = X(W, Y, Z) | |
351 | + | let R = toBase64String(toBytes(b(x(Y)))) | |
352 | + | let T = toBase64String(toBytes(b(A(Y)))) | |
353 | + | let ae = e(D(Y)) | |
354 | + | let aA = ad(R, T, toString(ae)) | |
355 | + | [StringEntry(B(Y), ab), DeleteEntry(((Z + "_") + Y)), StringEntry(((ab + "_") + Y), aA), StringEntry(F(Y), aI), StringEntry(G(Y), aJ)] | |
356 | + | } | |
357 | + | else throw("Not allowed to change user status") | |
358 | + | } | |
347 | 359 | } | |
348 | 360 | ||
349 | 361 | ||
360 | 372 | ||
361 | 373 | ||
362 | 374 | @Callable(ak) | |
363 | - | func setAgent (I,K, | |
375 | + | func setAgent (I,K,aK,aL) = if (!(j)) | |
364 | 376 | then throw(k) | |
365 | 377 | else { | |
366 | 378 | let w = toString(ak.caller) | |
369 | 381 | then true | |
370 | 382 | else (size(K) != 35)) | |
371 | 383 | then throw("Wrong address") | |
372 | - | else [StringEntry(H(I), K), StringEntry(J(K, I), I), IntegerEntry(L(I), | |
384 | + | else [StringEntry(H(I), K), StringEntry(J(K, I), I), IntegerEntry(L(I), aK), IntegerEntry(M(I), aL)] | |
373 | 385 | else throw("You are not allowed") | |
374 | 386 | } | |
375 | 387 | ||
392 | 404 | ||
393 | 405 | ||
394 | 406 | @Callable(ak) | |
395 | - | func deleteEntry ( | |
407 | + | func deleteEntry (aM) = { | |
396 | 408 | let w = toString(ak.caller) | |
397 | 409 | if ((w == f)) | |
398 | - | then [DeleteEntry( | |
410 | + | then [DeleteEntry(aM)] | |
399 | 411 | else throw("no") | |
400 | 412 | } | |
401 | 413 | ||
402 | 414 | ||
403 | - | @Verifier( | |
404 | - | func | |
405 | - | let ah = | |
415 | + | @Verifier(aN) | |
416 | + | func aO () = { | |
417 | + | let ah = aN | |
406 | 418 | if ($isInstanceOf(ah, "InvokeScriptTransaction")) | |
407 | 419 | then { | |
408 | - | let | |
409 | - | if (if (if (if (( | |
410 | - | then ( | |
420 | + | let aP = ah | |
421 | + | if (if (if (if ((aP.function == "registerUser")) | |
422 | + | then (aP.dApp == this) | |
411 | 423 | else false) | |
412 | - | then ( | |
424 | + | then (aP.fee == 500000) | |
413 | 425 | else false) | |
414 | - | then ( | |
426 | + | then (aP.feeAssetId == unit) | |
415 | 427 | else false) | |
416 | - | then sigVerify( | |
417 | - | else if (if (if (if (( | |
418 | - | then ( | |
428 | + | then sigVerify(aN.bodyBytes, aN.proofs[0], fromBase58String(af(aP.args[5]))) | |
429 | + | else if (if (if (if ((aP.function == "updateUser")) | |
430 | + | then (aP.dApp == this) | |
419 | 431 | else false) | |
420 | - | then ( | |
432 | + | then (aP.fee == 500000) | |
421 | 433 | else false) | |
422 | - | then ( | |
434 | + | then (aP.feeAssetId == unit) | |
423 | 435 | else false) | |
424 | - | then sigVerify( | |
425 | - | else if (if (if (if (( | |
426 | - | then ( | |
436 | + | then sigVerify(aN.bodyBytes, aN.proofs[0], fromBase58String(af(aP.args[5]))) | |
437 | + | else if (if (if (if ((aP.function == "setERC20User")) | |
438 | + | then (aP.dApp == this) | |
427 | 439 | else false) | |
428 | - | then ( | |
440 | + | then (aP.fee == 500000) | |
429 | 441 | else false) | |
430 | - | then ( | |
442 | + | then (aP.feeAssetId == unit) | |
431 | 443 | else false) | |
432 | - | then sigVerify( | |
433 | - | else sigVerify( | |
444 | + | then sigVerify(aN.bodyBytes, aN.proofs[0], fromBase58String(af(aP.args[2]))) | |
445 | + | else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
434 | 446 | } | |
435 | - | else sigVerify( | |
447 | + | else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
436 | 448 | } | |
437 | 449 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "1.5" | |
5 | 5 | ||
6 | 6 | func b (c) = valueOrElse(getString(this, c), "") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (c) = valueOrElse(getBoolean(this, c), false) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func e (c) = valueOrElse(getInteger(this, c), 0) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | let f = b("conf_admin_1") | |
16 | 16 | ||
17 | 17 | let g = "conf_dapp_is_running" | |
18 | 18 | ||
19 | 19 | let h = "conf_maintenance_msg" | |
20 | 20 | ||
21 | 21 | let i = "conf_whitelisted_only" | |
22 | 22 | ||
23 | 23 | let j = valueOrElse(getBoolean(this, g), true) | |
24 | 24 | ||
25 | 25 | let k = valueOrElse(getString(this, h), "") | |
26 | 26 | ||
27 | 27 | let l = valueOrElse(getBoolean(this, i), true) | |
28 | 28 | ||
29 | 29 | let m = value(addressFromString(b("conf_whitelist_dapp"))) | |
30 | 30 | ||
31 | 31 | let n = "ALLOWED" | |
32 | 32 | ||
33 | 33 | let o = "REGISTERED" | |
34 | 34 | ||
35 | 35 | let p = "VERIFIED" | |
36 | 36 | ||
37 | 37 | let q = "SUSPENDED" | |
38 | 38 | ||
39 | 39 | let r = "REMOVED" | |
40 | 40 | ||
41 | 41 | let s = "CHANGE_REQUIRED" | |
42 | 42 | ||
43 | 43 | let t = "UNREGISTERED" | |
44 | 44 | ||
45 | 45 | let u = "RESET" | |
46 | 46 | ||
47 | 47 | func v (w) = ("user_" + w) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func x (w) = ("user_name_" + w) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func y (w) = ("user_desc_" + w) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func z (w) = ("user_social_" + w) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func A (w) = ("user_thumb_" + w) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func B (w) = ("user_status_" + w) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func C (w) = ("user_royalties_" + w) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func D (w) = ("user_date_" + w) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func E (w) = ("user_ERC20_" + w) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func F (w) = ("user_note_" + w) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func G (w) = ("user_label_" + w) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func H (I) = ("artist_agent_" + I) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func J (K,I) = ((("agent_" + K) + "_") + I) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func L (I) = ("artist_agent_primary_" + I) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func M (I) = ("artist_agent_secondary_" + I) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func N (c) = valueOrElse(getInteger(m, c), 0) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func O (P) = if (contains(P, "/")) | |
96 | 96 | then if (if ((76 > size(P))) | |
97 | 97 | then (size(split(P, "/")[0]) == 59) | |
98 | 98 | else false) | |
99 | 99 | then (16 > size(split(P, "/")[1])) | |
100 | 100 | else false | |
101 | 101 | else false | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func Q (w,R,S,T,U) = { | |
105 | 105 | let V = if ((size(T) != 0)) | |
106 | 106 | then O(T) | |
107 | 107 | else true | |
108 | 108 | if (!(V)) | |
109 | 109 | then throw("CID don't match requirement!") | |
110 | 110 | else if (if ((R == "")) | |
111 | 111 | then true | |
112 | 112 | else (S == "")) | |
113 | 113 | then throw("Name and description cannot be empty") | |
114 | 114 | else if ((size(S) > 600)) | |
115 | 115 | then throw("600 Char. max description") | |
116 | 116 | else if ((size(R) > 45)) | |
117 | 117 | then throw("45 Char. max name") | |
118 | 118 | else { | |
119 | 119 | let W = b(B(w)) | |
120 | 120 | if (if ((W == q)) | |
121 | 121 | then true | |
122 | 122 | else (W == r)) | |
123 | 123 | then throw("Account suspended/ removed.") | |
124 | 124 | else if (if (!(U)) | |
125 | 125 | then (W == o) | |
126 | 126 | else false) | |
127 | 127 | then throw("Already registered") | |
128 | 128 | else if (if (if (!(U)) | |
129 | 129 | then (W == "") | |
130 | 130 | else false) | |
131 | 131 | then l | |
132 | 132 | else false) | |
133 | 133 | then throw("Can't register, get approved first.") | |
134 | 134 | else if (if (if (U) | |
135 | 135 | then (W == "") | |
136 | 136 | else false) | |
137 | 137 | then true | |
138 | 138 | else if (U) | |
139 | 139 | then (W == n) | |
140 | 140 | else false) | |
141 | 141 | then throw("Register first") | |
142 | 142 | else true | |
143 | 143 | } | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func X (W,Y,Z) = { | |
148 | 148 | let aa = [p, o, q, r, n, s] | |
149 | 149 | let ab = if (containsElement(aa, W)) | |
150 | 150 | then W | |
151 | 151 | else if (if ((W == u)) | |
152 | 152 | then (Z == n) | |
153 | 153 | else false) | |
154 | 154 | then "" | |
155 | 155 | else throw("Unknown status") | |
156 | 156 | let ac = e(D(Y)) | |
157 | 157 | if (if ((ac == 0)) | |
158 | 158 | then (ab != n) | |
159 | 159 | else false) | |
160 | 160 | then throw("You cant set this status, user is not registered.") | |
161 | 161 | else if (if ((Z == n)) | |
162 | 162 | then (ab == n) | |
163 | 163 | else false) | |
164 | 164 | then throw("User already allowed") | |
165 | 165 | else if (if ((Z == o)) | |
166 | 166 | then (ab == n) | |
167 | 167 | else false) | |
168 | 168 | then throw("User already allowed & registered") | |
169 | 169 | else if (if ((Z == p)) | |
170 | 170 | then (ab == n) | |
171 | 171 | else false) | |
172 | 172 | then throw("User already allowed & verified") | |
173 | 173 | else ab | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func ad (R,T,ae) = (((((("{\"user_name\": \"" + R) + "\", \"user_thumb\":\"") + T) + "\",\"user_date\":\"") + ae) + "\"}") | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func af (ag) = { | |
181 | 181 | let ah = ag | |
182 | 182 | if ($isInstanceOf(ah, "String")) | |
183 | 183 | then { | |
184 | 184 | let ai = ah | |
185 | 185 | ai | |
186 | 186 | } | |
187 | 187 | else throw("Sponsored Public Key String expected") | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func aj (ak,al) = { | |
192 | 192 | let am = if ((al != "")) | |
193 | 193 | then valueOrElse(N((toString(addressFromPublicKey(fromBase58String(al))) + "_free_txs")), 0) | |
194 | 194 | else 0 | |
195 | 195 | let w = if (if ((toBase58String(ak.caller.bytes) == toString(this))) | |
196 | 196 | then (am > 0) | |
197 | 197 | else false) | |
198 | 198 | then toString(addressFromPublicKey(fromBase58String(al))) | |
199 | 199 | else toBase58String(ak.caller.bytes) | |
200 | 200 | let an = if ((al != "")) | |
201 | 201 | then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(al)))], nil) | |
202 | 202 | else unit | |
203 | 203 | if ((an == an)) | |
204 | 204 | then $Tuple2(w, (am > 0)) | |
205 | 205 | else throw("Strict value is not equal to itself.") | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(ao) | |
210 | 210 | func setConf (c,ap) = { | |
211 | 211 | let w = toString(ao.caller) | |
212 | 212 | if (containsElement([f, toString(this)], w)) | |
213 | 213 | then [StringEntry(c, ap)] | |
214 | 214 | else throw("You are not allowed to change this") | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Callable(ao) | |
220 | 220 | func appRunning (aq,ar) = { | |
221 | 221 | let w = toString(ao.caller) | |
222 | 222 | if (containsElement([f, toString(this)], w)) | |
223 | 223 | then [BooleanEntry(g, aq), StringEntry(h, ar)] | |
224 | 224 | else throw("You are not allowed to change this") | |
225 | 225 | } | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | ||
229 | 229 | @Callable(ao) | |
230 | 230 | func registrationMode (as) = { | |
231 | 231 | let w = toString(ao.caller) | |
232 | 232 | if (containsElement([f, toString(this)], w)) | |
233 | 233 | then [BooleanEntry(i, as)] | |
234 | 234 | else throw("You are not allowed to change this") | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | ||
239 | 239 | @Callable(ao) | |
240 | 240 | func registerUser (R,S,T,at,au,al) = if (!(j)) | |
241 | 241 | then throw(k) | |
242 | 242 | else { | |
243 | 243 | let av = aj(ao, al) | |
244 | 244 | let w = av._1 | |
245 | 245 | let am = av._2 | |
246 | 246 | let aw = toBase58String(ao.transactionId) | |
247 | 247 | let ax = lastBlock.timestamp | |
248 | 248 | let ay = b(F(w)) | |
249 | 249 | let az = b(G(w)) | |
250 | 250 | if (!(Q(w, R, S, T, false))) | |
251 | 251 | then throw("Something went wrong") | |
252 | 252 | else { | |
253 | 253 | let aA = ad(toBase64String(toBytes(R)), toBase64String(toBytes(T)), toString(ax)) | |
254 | 254 | if (if ((0 > au)) | |
255 | 255 | then true | |
256 | 256 | else (au > 1000)) | |
257 | 257 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
258 | 258 | else { | |
259 | 259 | let aB = if (am) | |
260 | 260 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
261 | 261 | else nil | |
262 | 262 | ([IntegerEntry(D(w), ax), StringEntry(v(w), ((aw + "_") + toString(ax))), StringEntry(x(w), R), StringEntry(y(w), S), StringEntry(z(w), at), StringEntry(A(w), T), StringEntry(B(w), o), IntegerEntry(C(w), au), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), aA), StringEntry(F(w), ay), StringEntry(G(w), az)] ++ aB) | |
263 | 263 | } | |
264 | 264 | } | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | ||
269 | 269 | @Callable(ao) | |
270 | 270 | func updateUser (R,S,T,at,au,al) = if (!(j)) | |
271 | 271 | then throw(k) | |
272 | 272 | else { | |
273 | 273 | let aC = aj(ao, al) | |
274 | 274 | let w = aC._1 | |
275 | 275 | let am = aC._2 | |
276 | 276 | let W = b(B(w)) | |
277 | 277 | if (!(Q(w, R, S, T, true))) | |
278 | 278 | then throw("Something went wrong") | |
279 | 279 | else { | |
280 | 280 | let ae = e(D(w)) | |
281 | 281 | let aA = ad(toBase64String(toBytes(R)), toBase64String(toBytes(T)), toString(ae)) | |
282 | 282 | if (if ((0 > au)) | |
283 | 283 | then true | |
284 | 284 | else (au > 1000)) | |
285 | 285 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
286 | 286 | else { | |
287 | 287 | let aB = if (am) | |
288 | 288 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
289 | 289 | else nil | |
290 | 290 | ([StringEntry(x(w), R), StringEntry(y(w), S), StringEntry(z(w), at), StringEntry(A(w), T), IntegerEntry(C(w), au), StringEntry(((W + "_") + w), aA)] ++ aB) | |
291 | 291 | } | |
292 | 292 | } | |
293 | 293 | } | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | ||
297 | 297 | @Callable(ao) | |
298 | 298 | func setERC20User (aD,al) = if (!(j)) | |
299 | 299 | then throw(k) | |
300 | 300 | else { | |
301 | 301 | let aE = aj(ao, al) | |
302 | 302 | let w = aE._1 | |
303 | 303 | let am = aE._2 | |
304 | 304 | let W = b(B(w)) | |
305 | 305 | if (if ((W != o)) | |
306 | 306 | then (W != p) | |
307 | 307 | else false) | |
308 | 308 | then throw("Not allowed to set ERC20 address") | |
309 | 309 | else { | |
310 | 310 | let aF = take(aD, 2) | |
311 | 311 | if (if ((aF != "0x")) | |
312 | 312 | then true | |
313 | 313 | else (size(aD) != 42)) | |
314 | 314 | then throw("This is not an erc20 address") | |
315 | 315 | else { | |
316 | 316 | let aB = if (am) | |
317 | 317 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
318 | 318 | else nil | |
319 | 319 | ([StringEntry(E(w), aD)] ++ aB) | |
320 | 320 | } | |
321 | 321 | } | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | ||
326 | 326 | @Callable(ao) | |
327 | 327 | func changeUserStatus (Y,W,ay,az) = { | |
328 | 328 | let w = toString(ao.caller) | |
329 | - | if (containsElement([f, toString(this)], w)) | |
330 | - | then if ((size(W) == 0)) | |
331 | - | then { | |
332 | - | let Z = b(B(Y)) | |
333 | - | if ((Z == "")) | |
334 | - | then throw("User have no status yet") | |
335 | - | else [StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
336 | - | } | |
337 | - | else { | |
338 | - | let Z = b(B(Y)) | |
339 | - | let ab = X(W, Y, Z) | |
340 | - | let R = toBase64String(toBytes(b(x(Y)))) | |
341 | - | let T = toBase64String(toBytes(b(A(Y)))) | |
342 | - | let ae = e(D(Y)) | |
343 | - | let aA = ad(R, T, toString(ae)) | |
344 | - | [StringEntry(B(Y), ab), DeleteEntry(((Z + "_") + Y)), StringEntry(((ab + "_") + Y), aA), StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
345 | - | } | |
346 | - | else throw("Not allowed to change user status") | |
329 | + | if ((size(Y) == 0)) | |
330 | + | then throw("Address cannot be empty") | |
331 | + | else { | |
332 | + | let aG = b(F(Y)) | |
333 | + | let aH = b(G(Y)) | |
334 | + | let aI = if ((size(ay) != 0)) | |
335 | + | then ay | |
336 | + | else aG | |
337 | + | let aJ = if ((size(az) != 0)) | |
338 | + | then az | |
339 | + | else aH | |
340 | + | if (containsElement([f, toString(this)], w)) | |
341 | + | then if ((size(W) == 0)) | |
342 | + | then { | |
343 | + | let Z = b(B(Y)) | |
344 | + | if ((Z == "")) | |
345 | + | then throw("User have no status yet") | |
346 | + | else [StringEntry(F(Y), aI), StringEntry(G(Y), aJ)] | |
347 | + | } | |
348 | + | else { | |
349 | + | let Z = b(B(Y)) | |
350 | + | let ab = X(W, Y, Z) | |
351 | + | let R = toBase64String(toBytes(b(x(Y)))) | |
352 | + | let T = toBase64String(toBytes(b(A(Y)))) | |
353 | + | let ae = e(D(Y)) | |
354 | + | let aA = ad(R, T, toString(ae)) | |
355 | + | [StringEntry(B(Y), ab), DeleteEntry(((Z + "_") + Y)), StringEntry(((ab + "_") + Y), aA), StringEntry(F(Y), aI), StringEntry(G(Y), aJ)] | |
356 | + | } | |
357 | + | else throw("Not allowed to change user status") | |
358 | + | } | |
347 | 359 | } | |
348 | 360 | ||
349 | 361 | ||
350 | 362 | ||
351 | 363 | @Callable(ao) | |
352 | 364 | func deleteUser (Y) = { | |
353 | 365 | let w = toString(ao.caller) | |
354 | 366 | let Z = b(B(Y)) | |
355 | 367 | if (containsElement([f, toString(this)], w)) | |
356 | 368 | then [DeleteEntry(D(Y)), DeleteEntry(v(Y)), DeleteEntry(x(Y)), DeleteEntry(y(Y)), DeleteEntry(z(Y)), DeleteEntry(A(Y)), DeleteEntry(("user_note_" + Y)), DeleteEntry(((Z + "_") + Y)), DeleteEntry(C(Y)), StringEntry(B(Y), r)] | |
357 | 369 | else throw("Not allowed") | |
358 | 370 | } | |
359 | 371 | ||
360 | 372 | ||
361 | 373 | ||
362 | 374 | @Callable(ak) | |
363 | - | func setAgent (I,K, | |
375 | + | func setAgent (I,K,aK,aL) = if (!(j)) | |
364 | 376 | then throw(k) | |
365 | 377 | else { | |
366 | 378 | let w = toString(ak.caller) | |
367 | 379 | if (containsElement([f, toString(this)], w)) | |
368 | 380 | then if (if ((size(I) != 35)) | |
369 | 381 | then true | |
370 | 382 | else (size(K) != 35)) | |
371 | 383 | then throw("Wrong address") | |
372 | - | else [StringEntry(H(I), K), StringEntry(J(K, I), I), IntegerEntry(L(I), | |
384 | + | else [StringEntry(H(I), K), StringEntry(J(K, I), I), IntegerEntry(L(I), aK), IntegerEntry(M(I), aL)] | |
373 | 385 | else throw("You are not allowed") | |
374 | 386 | } | |
375 | 387 | ||
376 | 388 | ||
377 | 389 | ||
378 | 390 | @Callable(ak) | |
379 | 391 | func unsetAgent (I,K) = if (!(j)) | |
380 | 392 | then throw(k) | |
381 | 393 | else { | |
382 | 394 | let w = toString(ak.caller) | |
383 | 395 | if (containsElement([f, toString(this)], w)) | |
384 | 396 | then if (if ((size(I) != 35)) | |
385 | 397 | then true | |
386 | 398 | else (size(K) != 35)) | |
387 | 399 | then throw("Wrong address") | |
388 | 400 | else [DeleteEntry(H(I)), DeleteEntry(J(K, I)), DeleteEntry(L(I)), DeleteEntry(M(I))] | |
389 | 401 | else throw("You are not allowed") | |
390 | 402 | } | |
391 | 403 | ||
392 | 404 | ||
393 | 405 | ||
394 | 406 | @Callable(ak) | |
395 | - | func deleteEntry ( | |
407 | + | func deleteEntry (aM) = { | |
396 | 408 | let w = toString(ak.caller) | |
397 | 409 | if ((w == f)) | |
398 | - | then [DeleteEntry( | |
410 | + | then [DeleteEntry(aM)] | |
399 | 411 | else throw("no") | |
400 | 412 | } | |
401 | 413 | ||
402 | 414 | ||
403 | - | @Verifier( | |
404 | - | func | |
405 | - | let ah = | |
415 | + | @Verifier(aN) | |
416 | + | func aO () = { | |
417 | + | let ah = aN | |
406 | 418 | if ($isInstanceOf(ah, "InvokeScriptTransaction")) | |
407 | 419 | then { | |
408 | - | let | |
409 | - | if (if (if (if (( | |
410 | - | then ( | |
420 | + | let aP = ah | |
421 | + | if (if (if (if ((aP.function == "registerUser")) | |
422 | + | then (aP.dApp == this) | |
411 | 423 | else false) | |
412 | - | then ( | |
424 | + | then (aP.fee == 500000) | |
413 | 425 | else false) | |
414 | - | then ( | |
426 | + | then (aP.feeAssetId == unit) | |
415 | 427 | else false) | |
416 | - | then sigVerify( | |
417 | - | else if (if (if (if (( | |
418 | - | then ( | |
428 | + | then sigVerify(aN.bodyBytes, aN.proofs[0], fromBase58String(af(aP.args[5]))) | |
429 | + | else if (if (if (if ((aP.function == "updateUser")) | |
430 | + | then (aP.dApp == this) | |
419 | 431 | else false) | |
420 | - | then ( | |
432 | + | then (aP.fee == 500000) | |
421 | 433 | else false) | |
422 | - | then ( | |
434 | + | then (aP.feeAssetId == unit) | |
423 | 435 | else false) | |
424 | - | then sigVerify( | |
425 | - | else if (if (if (if (( | |
426 | - | then ( | |
436 | + | then sigVerify(aN.bodyBytes, aN.proofs[0], fromBase58String(af(aP.args[5]))) | |
437 | + | else if (if (if (if ((aP.function == "setERC20User")) | |
438 | + | then (aP.dApp == this) | |
427 | 439 | else false) | |
428 | - | then ( | |
440 | + | then (aP.fee == 500000) | |
429 | 441 | else false) | |
430 | - | then ( | |
442 | + | then (aP.feeAssetId == unit) | |
431 | 443 | else false) | |
432 | - | then sigVerify( | |
433 | - | else sigVerify( | |
444 | + | then sigVerify(aN.bodyBytes, aN.proofs[0], fromBase58String(af(aP.args[2]))) | |
445 | + | else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
434 | 446 | } | |
435 | - | else sigVerify( | |
447 | + | else sigVerify(aN.bodyBytes, aN.proofs[0], aN.senderPublicKey) | |
436 | 448 | } | |
437 | 449 |
github/deemru/w8io/026f985 61.63 ms ◑