tx · 97J8ikmsPZgj9rVJcQ35zmP9fZYH1CH3WDnhf8YD89gB 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01100000 Waves 2023.01.20 07:05 [2412762] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "97J8ikmsPZgj9rVJcQ35zmP9fZYH1CH3WDnhf8YD89gB", "fee": 1100000, "feeAssetId": null, "timestamp": 1674187523703, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "4Ejq2NY76mm3Vx2fTCL6phvkHK7qj4vxKQzAdUYzcnoKQEq5R9EodbrbeYcFDa1jbwccn895oz3VqM4Ypnpi4Cs2" ], "script": "base64:BgJMCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgUKAwgICBIDCgEIEgYKBAgIAQESBAoCCAgSAwoBCCgAB1ZFUlNJT04CAzEuNQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJsIAgUEdGhpcwUDa2V5BwEPZ2V0SW50ZWdlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnABJ3aGl0ZWxpc3RlZG9ubHlLZXkCFWNvbmZfd2hpdGVsaXN0ZWRfb25seQALZGFwcFJ1bm5pb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QITWW91IGFyZSBub3QgYWxsb3dlZAFpAQtkZWxldGVFbnRyeQEFZW50cnkEBmNhbGxlcgkApQgBCAUBaQZjYWxsZXIDCQAAAgUGY2FsbGVyBQVjaHJpcwkAzAgCCQELRGVsZXRlRW50cnkBBQVlbnRyeQUDbmlsCQACAQICbm8BAnR4AQh2ZXJpZmllcgAEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpbnYFByRtYXRjaDADAwkAAAIIBQNpbnYIZnVuY3Rpb24CDHJlZ2lzdGVyVXNlcgkAAAIIBQNpbnYEZEFwcAUEdGhpcwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABQMDCQAAAggFA2ludghmdW5jdGlvbgIKdXBkYXRlVXNlcgkAAAIIBQNpbnYEZEFwcAUEdGhpcwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABQMDCQAAAggFA2ludghmdW5jdGlvbgIMc2V0RVJDMjBVc2VyCQAAAggFA2ludgRkQXBwBQR0aGlzBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkA2QQBCQEIYXNTdHJpbmcBCQCRAwIIBQNpbnYEYXJncwACCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5cVerlg==", "height": 2412762, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DgkbseySxJkmEN9VKw79ktViCQBtVYpPkpCmspzstTBr Next: 9coC7PKpTkXWApoTZJZG5etZnBGWWCgJD87aHaQcNAc5 Diff:
Old | New | Differences | |
---|---|---|---|
195 | 195 | then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(aj)))], nil) | |
196 | 196 | else unit | |
197 | 197 | if ((al == al)) | |
198 | - | then w | |
198 | + | then $Tuple2(w, (ak > 0)) | |
199 | 199 | else throw("Strict value is not equal to itself.") | |
200 | 200 | } | |
201 | 201 | ||
234 | 234 | func registerUser (P,Q,R,ar,as,aj) = if (!(j)) | |
235 | 235 | then throw(k) | |
236 | 236 | else { | |
237 | - | let w = ah(am, aj) | |
238 | - | let at = toBase58String(am.transactionId) | |
239 | - | let au = lastBlock.timestamp | |
237 | + | let at = ah(am, aj) | |
238 | + | let w = at._1 | |
239 | + | let ak = at._2 | |
240 | + | let au = toBase58String(am.transactionId) | |
241 | + | let av = lastBlock.timestamp | |
240 | 242 | if (!(O(w, P, Q, R, false))) | |
241 | 243 | then throw("Something went wrong") | |
242 | 244 | else { | |
243 | - | let | |
245 | + | let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(av)) | |
244 | 246 | if (if ((0 > as)) | |
245 | 247 | then true | |
246 | 248 | else (as > 1000)) | |
247 | 249 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
248 | - | else [IntegerEntry(D(w), au), StringEntry(v(w), ((at + "_") + toString(au))), StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), StringEntry(B(w), o), IntegerEntry(C(w), as), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), av)] | |
250 | + | else { | |
251 | + | let ax = if (ak) | |
252 | + | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
253 | + | else nil | |
254 | + | ([IntegerEntry(D(w), av), StringEntry(v(w), ((au + "_") + toString(av))), StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), StringEntry(B(w), o), IntegerEntry(C(w), as), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), aw)] ++ ax) | |
255 | + | } | |
249 | 256 | } | |
250 | 257 | } | |
251 | 258 | ||
255 | 262 | func updateUser (P,Q,R,ar,as,aj) = if (!(j)) | |
256 | 263 | then throw(k) | |
257 | 264 | else { | |
258 | - | let w = ah(am, aj) | |
265 | + | let ay = ah(am, aj) | |
266 | + | let w = ay._1 | |
267 | + | let ak = ay._2 | |
259 | 268 | let U = b(B(w)) | |
260 | 269 | if (!(O(w, P, Q, R, true))) | |
261 | 270 | then throw("Something went wrong") | |
262 | 271 | else { | |
263 | 272 | let ac = e(D(w)) | |
264 | - | let | |
273 | + | let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(ac)) | |
265 | 274 | if (if ((0 > as)) | |
266 | 275 | then true | |
267 | 276 | else (as > 1000)) | |
268 | 277 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
269 | - | else [StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), IntegerEntry(C(w), as), StringEntry(((U + "_") + w), av)] | |
278 | + | else { | |
279 | + | let ax = if (ak) | |
280 | + | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
281 | + | else nil | |
282 | + | ([StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), IntegerEntry(C(w), as), StringEntry(((U + "_") + w), aw)] ++ ax) | |
283 | + | } | |
270 | 284 | } | |
271 | 285 | } | |
272 | 286 | ||
273 | 287 | ||
274 | 288 | ||
275 | 289 | @Callable(am) | |
276 | - | func setERC20User ( | |
290 | + | func setERC20User (az,aj) = if (!(j)) | |
277 | 291 | then throw(k) | |
278 | 292 | else { | |
279 | - | let w = ah(am, aj) | |
293 | + | let aA = ah(am, aj) | |
294 | + | let w = aA._1 | |
295 | + | let ak = aA._2 | |
280 | 296 | let U = b(B(w)) | |
281 | 297 | if (if ((U != o)) | |
282 | 298 | then (U != p) | |
283 | 299 | else false) | |
284 | 300 | then throw("Not allowed to set ERC20 address") | |
285 | 301 | else { | |
286 | - | let | |
287 | - | if (if (( | |
302 | + | let aB = take(az, 2) | |
303 | + | if (if ((aB != "0x")) | |
288 | 304 | then true | |
289 | - | else (size( | |
305 | + | else (size(az) != 42)) | |
290 | 306 | then throw("This is not an erc20 address") | |
291 | - | else [StringEntry(E(w), aw)] | |
307 | + | else { | |
308 | + | let ax = if (ak) | |
309 | + | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
310 | + | else nil | |
311 | + | ([StringEntry(E(w), az)] ++ ax) | |
312 | + | } | |
292 | 313 | } | |
293 | 314 | } | |
294 | 315 | ||
295 | 316 | ||
296 | 317 | ||
297 | 318 | @Callable(am) | |
298 | - | func changeUserStatus (W,U, | |
319 | + | func changeUserStatus (W,U,aC) = { | |
299 | 320 | let w = toString(am.caller) | |
300 | 321 | let X = b(B(W)) | |
301 | 322 | let Z = V(U, W, X) | |
302 | 323 | let P = toBase64String(toBytes(b(x(W)))) | |
303 | 324 | let R = toBase64String(toBytes(b(A(W)))) | |
304 | 325 | let ac = e(D(W)) | |
305 | - | let | |
326 | + | let aw = ab(P, R, toString(ac)) | |
306 | 327 | if (containsElement([f, toString(this)], w)) | |
307 | - | then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), | |
328 | + | then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), aw), StringEntry(("user_note_" + W), aC)] | |
308 | 329 | else throw("Not allowed to change user status") | |
309 | 330 | } | |
310 | 331 | ||
322 | 343 | ||
323 | 344 | ||
324 | 345 | @Callable(ai) | |
325 | - | func setAgent (G,I, | |
346 | + | func setAgent (G,I,aD,aE) = if (!(j)) | |
326 | 347 | then throw(k) | |
327 | 348 | else { | |
328 | 349 | let w = toString(ai.caller) | |
331 | 352 | then true | |
332 | 353 | else (size(I) != 35)) | |
333 | 354 | then throw("Wrong address") | |
334 | - | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), | |
355 | + | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), aD), IntegerEntry(K(G), aE)] | |
335 | 356 | else throw("You are not allowed") | |
336 | 357 | } | |
337 | 358 | ||
354 | 375 | ||
355 | 376 | ||
356 | 377 | @Callable(ai) | |
357 | - | func deleteEntry ( | |
378 | + | func deleteEntry (aF) = { | |
358 | 379 | let w = toString(ai.caller) | |
359 | 380 | if ((w == f)) | |
360 | - | then [DeleteEntry( | |
381 | + | then [DeleteEntry(aF)] | |
361 | 382 | else throw("no") | |
362 | 383 | } | |
363 | 384 | ||
364 | 385 | ||
365 | - | @Verifier( | |
366 | - | func | |
367 | - | let af = | |
386 | + | @Verifier(aG) | |
387 | + | func aH () = { | |
388 | + | let af = aG | |
368 | 389 | if ($isInstanceOf(af, "InvokeScriptTransaction")) | |
369 | 390 | then { | |
370 | - | let | |
371 | - | if (if (( | |
372 | - | then ( | |
391 | + | let aI = af | |
392 | + | if (if ((aI.function == "registerUser")) | |
393 | + | then (aI.dApp == this) | |
373 | 394 | else false) | |
374 | - | then sigVerify( | |
375 | - | else if (if (( | |
376 | - | then ( | |
395 | + | then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[5]))) | |
396 | + | else if (if ((aI.function == "updateUser")) | |
397 | + | then (aI.dApp == this) | |
377 | 398 | else false) | |
378 | - | then sigVerify( | |
379 | - | else if (if (( | |
380 | - | then ( | |
399 | + | then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[5]))) | |
400 | + | else if (if ((aI.function == "setERC20User")) | |
401 | + | then (aI.dApp == this) | |
381 | 402 | else false) | |
382 | - | then sigVerify( | |
383 | - | else sigVerify( | |
403 | + | then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[2]))) | |
404 | + | else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey) | |
384 | 405 | } | |
385 | - | else sigVerify( | |
406 | + | else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey) | |
386 | 407 | } | |
387 | 408 |
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 (G) = ("artist_agent_" + G) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func H (I,G) = ((("agent_" + I) + "_") + G) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func J (G) = ("artist_agent_primary_" + G) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func K (G) = ("artist_agent_secondary_" + G) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func L (c) = valueOrElse(getInteger(m, c), 0) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func M (N) = if (contains(N, "/")) | |
90 | 90 | then if (if ((76 > size(N))) | |
91 | 91 | then (size(split(N, "/")[0]) == 59) | |
92 | 92 | else false) | |
93 | 93 | then (16 > size(split(N, "/")[1])) | |
94 | 94 | else false | |
95 | 95 | else false | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func O (w,P,Q,R,S) = { | |
99 | 99 | let T = if ((size(R) != 0)) | |
100 | 100 | then M(R) | |
101 | 101 | else true | |
102 | 102 | if (!(T)) | |
103 | 103 | then throw("CID don't match requirement!") | |
104 | 104 | else if (if ((P == "")) | |
105 | 105 | then true | |
106 | 106 | else (Q == "")) | |
107 | 107 | then throw("Name and description cannot be empty") | |
108 | 108 | else if ((size(Q) > 600)) | |
109 | 109 | then throw("600 Char. max description") | |
110 | 110 | else if ((size(P) > 45)) | |
111 | 111 | then throw("45 Char. max name") | |
112 | 112 | else { | |
113 | 113 | let U = b(B(w)) | |
114 | 114 | if (if ((U == q)) | |
115 | 115 | then true | |
116 | 116 | else (U == r)) | |
117 | 117 | then throw("Account suspended/ removed.") | |
118 | 118 | else if (if (!(S)) | |
119 | 119 | then (U == o) | |
120 | 120 | else false) | |
121 | 121 | then throw("Already registered") | |
122 | 122 | else if (if (if (!(S)) | |
123 | 123 | then (U == "") | |
124 | 124 | else false) | |
125 | 125 | then l | |
126 | 126 | else false) | |
127 | 127 | then throw("Can't register, get approved first.") | |
128 | 128 | else if (if (if (S) | |
129 | 129 | then (U == "") | |
130 | 130 | else false) | |
131 | 131 | then true | |
132 | 132 | else if (S) | |
133 | 133 | then (U == n) | |
134 | 134 | else false) | |
135 | 135 | then throw("Register first") | |
136 | 136 | else true | |
137 | 137 | } | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func V (U,W,X) = { | |
142 | 142 | let Y = [p, o, q, r, n, s] | |
143 | 143 | let Z = if (containsElement(Y, U)) | |
144 | 144 | then U | |
145 | 145 | else if (if ((U == u)) | |
146 | 146 | then (X == n) | |
147 | 147 | else false) | |
148 | 148 | then "" | |
149 | 149 | else throw("Unknown status") | |
150 | 150 | let aa = e(D(W)) | |
151 | 151 | if (if ((aa == 0)) | |
152 | 152 | then (Z != n) | |
153 | 153 | else false) | |
154 | 154 | then throw("You cant set this status, user is not registered.") | |
155 | 155 | else if (if ((X == n)) | |
156 | 156 | then (Z == n) | |
157 | 157 | else false) | |
158 | 158 | then throw("User already allowed") | |
159 | 159 | else if (if ((X == o)) | |
160 | 160 | then (Z == n) | |
161 | 161 | else false) | |
162 | 162 | then throw("User already allowed & registered") | |
163 | 163 | else if (if ((X == p)) | |
164 | 164 | then (Z == n) | |
165 | 165 | else false) | |
166 | 166 | then throw("User already allowed & verified") | |
167 | 167 | else Z | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func ab (P,R,ac) = (((((("{\"user_name\": \"" + P) + "\", \"user_thumb\":\"") + R) + "\",\"user_date\":\"") + ac) + "\"}") | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func ad (ae) = { | |
175 | 175 | let af = ae | |
176 | 176 | if ($isInstanceOf(af, "String")) | |
177 | 177 | then { | |
178 | 178 | let ag = af | |
179 | 179 | ag | |
180 | 180 | } | |
181 | 181 | else throw("Sponsored Public Key String expected") | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func ah (ai,aj) = { | |
186 | 186 | let ak = valueOrElse(L((toString(addressFromPublicKey(fromBase58String(aj))) + "_free_txs")), 0) | |
187 | 187 | let w = if (if (if ((toBase58String(ai.caller.bytes) == toString(this))) | |
188 | 188 | then (size(ai.payments) == 0) | |
189 | 189 | else false) | |
190 | 190 | then (ak > 0) | |
191 | 191 | else false) | |
192 | 192 | then toString(addressFromPublicKey(fromBase58String(aj))) | |
193 | 193 | else toBase58String(ai.caller.bytes) | |
194 | 194 | let al = if ((aj != "")) | |
195 | 195 | then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(aj)))], nil) | |
196 | 196 | else unit | |
197 | 197 | if ((al == al)) | |
198 | - | then w | |
198 | + | then $Tuple2(w, (ak > 0)) | |
199 | 199 | else throw("Strict value is not equal to itself.") | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | @Callable(am) | |
204 | 204 | func setConf (c,an) = { | |
205 | 205 | let w = toString(am.caller) | |
206 | 206 | if (containsElement([f, toString(this)], w)) | |
207 | 207 | then [StringEntry(c, an)] | |
208 | 208 | else throw("You are not allowed to change this") | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | ||
213 | 213 | @Callable(am) | |
214 | 214 | func appRunning (ao,ap) = { | |
215 | 215 | let w = toString(am.caller) | |
216 | 216 | if (containsElement([f, toString(this)], w)) | |
217 | 217 | then [BooleanEntry(g, ao), StringEntry(h, ap)] | |
218 | 218 | else throw("You are not allowed to change this") | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | ||
223 | 223 | @Callable(am) | |
224 | 224 | func registrationMode (aq) = { | |
225 | 225 | let w = toString(am.caller) | |
226 | 226 | if (containsElement([f, toString(this)], w)) | |
227 | 227 | then [BooleanEntry(i, aq)] | |
228 | 228 | else throw("You are not allowed to change this") | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Callable(am) | |
234 | 234 | func registerUser (P,Q,R,ar,as,aj) = if (!(j)) | |
235 | 235 | then throw(k) | |
236 | 236 | else { | |
237 | - | let w = ah(am, aj) | |
238 | - | let at = toBase58String(am.transactionId) | |
239 | - | let au = lastBlock.timestamp | |
237 | + | let at = ah(am, aj) | |
238 | + | let w = at._1 | |
239 | + | let ak = at._2 | |
240 | + | let au = toBase58String(am.transactionId) | |
241 | + | let av = lastBlock.timestamp | |
240 | 242 | if (!(O(w, P, Q, R, false))) | |
241 | 243 | then throw("Something went wrong") | |
242 | 244 | else { | |
243 | - | let | |
245 | + | let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(av)) | |
244 | 246 | if (if ((0 > as)) | |
245 | 247 | then true | |
246 | 248 | else (as > 1000)) | |
247 | 249 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
248 | - | else [IntegerEntry(D(w), au), StringEntry(v(w), ((at + "_") + toString(au))), StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), StringEntry(B(w), o), IntegerEntry(C(w), as), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), av)] | |
250 | + | else { | |
251 | + | let ax = if (ak) | |
252 | + | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
253 | + | else nil | |
254 | + | ([IntegerEntry(D(w), av), StringEntry(v(w), ((au + "_") + toString(av))), StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), StringEntry(B(w), o), IntegerEntry(C(w), as), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), aw)] ++ ax) | |
255 | + | } | |
249 | 256 | } | |
250 | 257 | } | |
251 | 258 | ||
252 | 259 | ||
253 | 260 | ||
254 | 261 | @Callable(am) | |
255 | 262 | func updateUser (P,Q,R,ar,as,aj) = if (!(j)) | |
256 | 263 | then throw(k) | |
257 | 264 | else { | |
258 | - | let w = ah(am, aj) | |
265 | + | let ay = ah(am, aj) | |
266 | + | let w = ay._1 | |
267 | + | let ak = ay._2 | |
259 | 268 | let U = b(B(w)) | |
260 | 269 | if (!(O(w, P, Q, R, true))) | |
261 | 270 | then throw("Something went wrong") | |
262 | 271 | else { | |
263 | 272 | let ac = e(D(w)) | |
264 | - | let | |
273 | + | let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(ac)) | |
265 | 274 | if (if ((0 > as)) | |
266 | 275 | then true | |
267 | 276 | else (as > 1000)) | |
268 | 277 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
269 | - | else [StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), IntegerEntry(C(w), as), StringEntry(((U + "_") + w), av)] | |
278 | + | else { | |
279 | + | let ax = if (ak) | |
280 | + | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
281 | + | else nil | |
282 | + | ([StringEntry(x(w), P), StringEntry(y(w), Q), StringEntry(z(w), ar), StringEntry(A(w), R), IntegerEntry(C(w), as), StringEntry(((U + "_") + w), aw)] ++ ax) | |
283 | + | } | |
270 | 284 | } | |
271 | 285 | } | |
272 | 286 | ||
273 | 287 | ||
274 | 288 | ||
275 | 289 | @Callable(am) | |
276 | - | func setERC20User ( | |
290 | + | func setERC20User (az,aj) = if (!(j)) | |
277 | 291 | then throw(k) | |
278 | 292 | else { | |
279 | - | let w = ah(am, aj) | |
293 | + | let aA = ah(am, aj) | |
294 | + | let w = aA._1 | |
295 | + | let ak = aA._2 | |
280 | 296 | let U = b(B(w)) | |
281 | 297 | if (if ((U != o)) | |
282 | 298 | then (U != p) | |
283 | 299 | else false) | |
284 | 300 | then throw("Not allowed to set ERC20 address") | |
285 | 301 | else { | |
286 | - | let | |
287 | - | if (if (( | |
302 | + | let aB = take(az, 2) | |
303 | + | if (if ((aB != "0x")) | |
288 | 304 | then true | |
289 | - | else (size( | |
305 | + | else (size(az) != 42)) | |
290 | 306 | then throw("This is not an erc20 address") | |
291 | - | else [StringEntry(E(w), aw)] | |
307 | + | else { | |
308 | + | let ax = if (ak) | |
309 | + | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
310 | + | else nil | |
311 | + | ([StringEntry(E(w), az)] ++ ax) | |
312 | + | } | |
292 | 313 | } | |
293 | 314 | } | |
294 | 315 | ||
295 | 316 | ||
296 | 317 | ||
297 | 318 | @Callable(am) | |
298 | - | func changeUserStatus (W,U, | |
319 | + | func changeUserStatus (W,U,aC) = { | |
299 | 320 | let w = toString(am.caller) | |
300 | 321 | let X = b(B(W)) | |
301 | 322 | let Z = V(U, W, X) | |
302 | 323 | let P = toBase64String(toBytes(b(x(W)))) | |
303 | 324 | let R = toBase64String(toBytes(b(A(W)))) | |
304 | 325 | let ac = e(D(W)) | |
305 | - | let | |
326 | + | let aw = ab(P, R, toString(ac)) | |
306 | 327 | if (containsElement([f, toString(this)], w)) | |
307 | - | then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), | |
328 | + | then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), aw), StringEntry(("user_note_" + W), aC)] | |
308 | 329 | else throw("Not allowed to change user status") | |
309 | 330 | } | |
310 | 331 | ||
311 | 332 | ||
312 | 333 | ||
313 | 334 | @Callable(am) | |
314 | 335 | func deleteUser (W) = { | |
315 | 336 | let w = toString(am.caller) | |
316 | 337 | let X = b(B(W)) | |
317 | 338 | if (containsElement([f, toString(this)], w)) | |
318 | 339 | then [DeleteEntry(D(W)), DeleteEntry(v(W)), DeleteEntry(x(W)), DeleteEntry(y(W)), DeleteEntry(z(W)), DeleteEntry(A(W)), DeleteEntry(("user_note_" + W)), DeleteEntry(((X + "_") + W)), DeleteEntry(C(W)), StringEntry(B(W), r)] | |
319 | 340 | else throw("Not allowed") | |
320 | 341 | } | |
321 | 342 | ||
322 | 343 | ||
323 | 344 | ||
324 | 345 | @Callable(ai) | |
325 | - | func setAgent (G,I, | |
346 | + | func setAgent (G,I,aD,aE) = if (!(j)) | |
326 | 347 | then throw(k) | |
327 | 348 | else { | |
328 | 349 | let w = toString(ai.caller) | |
329 | 350 | if (containsElement([f, toString(this)], w)) | |
330 | 351 | then if (if ((size(G) != 35)) | |
331 | 352 | then true | |
332 | 353 | else (size(I) != 35)) | |
333 | 354 | then throw("Wrong address") | |
334 | - | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), | |
355 | + | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), aD), IntegerEntry(K(G), aE)] | |
335 | 356 | else throw("You are not allowed") | |
336 | 357 | } | |
337 | 358 | ||
338 | 359 | ||
339 | 360 | ||
340 | 361 | @Callable(ai) | |
341 | 362 | func unsetAgent (G,I) = if (!(j)) | |
342 | 363 | then throw(k) | |
343 | 364 | else { | |
344 | 365 | let w = toString(ai.caller) | |
345 | 366 | if (containsElement([f, toString(this)], w)) | |
346 | 367 | then if (if ((size(G) != 35)) | |
347 | 368 | then true | |
348 | 369 | else (size(I) != 35)) | |
349 | 370 | then throw("Wrong address") | |
350 | 371 | else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))] | |
351 | 372 | else throw("You are not allowed") | |
352 | 373 | } | |
353 | 374 | ||
354 | 375 | ||
355 | 376 | ||
356 | 377 | @Callable(ai) | |
357 | - | func deleteEntry ( | |
378 | + | func deleteEntry (aF) = { | |
358 | 379 | let w = toString(ai.caller) | |
359 | 380 | if ((w == f)) | |
360 | - | then [DeleteEntry( | |
381 | + | then [DeleteEntry(aF)] | |
361 | 382 | else throw("no") | |
362 | 383 | } | |
363 | 384 | ||
364 | 385 | ||
365 | - | @Verifier( | |
366 | - | func | |
367 | - | let af = | |
386 | + | @Verifier(aG) | |
387 | + | func aH () = { | |
388 | + | let af = aG | |
368 | 389 | if ($isInstanceOf(af, "InvokeScriptTransaction")) | |
369 | 390 | then { | |
370 | - | let | |
371 | - | if (if (( | |
372 | - | then ( | |
391 | + | let aI = af | |
392 | + | if (if ((aI.function == "registerUser")) | |
393 | + | then (aI.dApp == this) | |
373 | 394 | else false) | |
374 | - | then sigVerify( | |
375 | - | else if (if (( | |
376 | - | then ( | |
395 | + | then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[5]))) | |
396 | + | else if (if ((aI.function == "updateUser")) | |
397 | + | then (aI.dApp == this) | |
377 | 398 | else false) | |
378 | - | then sigVerify( | |
379 | - | else if (if (( | |
380 | - | then ( | |
399 | + | then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[5]))) | |
400 | + | else if (if ((aI.function == "setERC20User")) | |
401 | + | then (aI.dApp == this) | |
381 | 402 | else false) | |
382 | - | then sigVerify( | |
383 | - | else sigVerify( | |
403 | + | then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[2]))) | |
404 | + | else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey) | |
384 | 405 | } | |
385 | - | else sigVerify( | |
406 | + | else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey) | |
386 | 407 | } | |
387 | 408 |
github/deemru/w8io/026f985 68.11 ms ◑