tx · GaiULeiCDAS8SWmUtza53bX4UZvoF2Pd7gyjUzj1FyJG 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01400000 Waves 2022.08.01 12:53 [2165285] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "GaiULeiCDAS8SWmUtza53bX4UZvoF2Pd7gyjUzj1FyJG", "fee": 1400000, "feeAssetId": null, "timestamp": 1659347627842, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "4qvuuwP5nwFd1T9sFbH6SUMCDDikU9FXFSMPAcEtV4NfVuh96WnmVxKS3ovPhgD9RZtAKQfdJVCh8odduCkN5MfL" ], "script": "base64:BgJHCAISBAoCCAgSBAoCBAgSAwoBBBIGCgQICAgIEgYKBAgICAgSAwoBCBIFCgMICAgSAwoBCBIGCgQICAEBEgQKAggIEgMKAQgkAAdWRVJTSU9OAgMxLjMBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEJvb2xlYW5CeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMFA2tleQcBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAARqb2VwCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzIADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnABJ3aGl0ZWxpc3RlZG9ubHlLZXkCFWNvbmZfd2hpdGVsaXN0Z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7VvjKR43iNJ2oR7qfK1QWW6UYkXdgw2npTms9yFGTVqE Next: BnUdtgFgP6iv4RKfv87Vc5gyPn2xYbeja2GpEVdMjcGm Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func a (b) = valueOrElse(getString(this, b), "") | |
4 | + | let a = "1.3" | |
5 | + | ||
6 | + | func b (c) = valueOrElse(getString(this, c), "") | |
5 | 7 | ||
6 | 8 | ||
7 | - | func | |
9 | + | func d (c) = valueOrElse(getBoolean(this, c), false) | |
8 | 10 | ||
9 | 11 | ||
10 | - | func | |
12 | + | func e (c) = valueOrElse(getInteger(this, c), 0) | |
11 | 13 | ||
12 | 14 | ||
13 | - | let | |
15 | + | let f = b("conf_admin_1") | |
14 | 16 | ||
15 | - | let | |
17 | + | let g = b("conf_admin_2") | |
16 | 18 | ||
17 | - | let | |
19 | + | let h = "conf_dapp_is_running" | |
18 | 20 | ||
19 | - | let | |
21 | + | let i = "conf_maintenance_msg" | |
20 | 22 | ||
21 | - | let | |
23 | + | let j = "conf_whitelisted_only" | |
22 | 24 | ||
23 | - | let | |
25 | + | let k = valueOrElse(getBoolean(this, h), true) | |
24 | 26 | ||
25 | - | let | |
27 | + | let l = valueOrElse(getString(this, i), "") | |
26 | 28 | ||
27 | - | let | |
29 | + | let m = valueOrElse(getBoolean(this, j), true) | |
28 | 30 | ||
29 | - | let | |
31 | + | let n = "ALLOWED" | |
30 | 32 | ||
31 | - | let | |
33 | + | let o = "REGISTERED" | |
32 | 34 | ||
33 | - | let | |
35 | + | let p = "VERIFIED" | |
34 | 36 | ||
35 | - | let | |
37 | + | let q = "SUSPENDED" | |
36 | 38 | ||
37 | - | let | |
39 | + | let r = "REMOVED" | |
38 | 40 | ||
39 | - | let | |
41 | + | let s = "CHANGE_REQUIRED" | |
40 | 42 | ||
41 | - | let | |
43 | + | let t = "UNREGISTERED" | |
42 | 44 | ||
43 | - | let | |
45 | + | let u = "RESET" | |
44 | 46 | ||
45 | - | func | |
47 | + | func v (w) = ("user_" + w) | |
46 | 48 | ||
47 | 49 | ||
48 | - | func | |
50 | + | func x (w) = ("user_name_" + w) | |
49 | 51 | ||
50 | 52 | ||
51 | - | func | |
53 | + | func y (w) = ("user_desc_" + w) | |
52 | 54 | ||
53 | 55 | ||
54 | - | func | |
56 | + | func z (w) = ("user_social_" + w) | |
55 | 57 | ||
56 | 58 | ||
57 | - | func | |
59 | + | func A (w) = ("user_thumb_" + w) | |
58 | 60 | ||
59 | 61 | ||
60 | - | func | |
62 | + | func B (w) = ("user_status_" + w) | |
61 | 63 | ||
62 | 64 | ||
63 | - | func | |
65 | + | func C (w) = ("user_date_" + w) | |
64 | 66 | ||
65 | 67 | ||
66 | - | func | |
68 | + | func D (w) = ("user_ERC20_" + w) | |
67 | 69 | ||
68 | 70 | ||
69 | - | func E (F | |
71 | + | func E (F) = ("artist_agent_" + F) | |
70 | 72 | ||
71 | 73 | ||
72 | - | func G ( | |
74 | + | func G (H,F) = ((("agent_" + H) + "_") + F) | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
77 | + | func I (F) = ("artist_agent_primary_" + F) | |
76 | 78 | ||
77 | 79 | ||
78 | - | func I (J) = if (contains(J, "/")) | |
79 | - | then if (if ((76 > size(J))) | |
80 | - | then (size(split(J, "/")[0]) == 59) | |
80 | + | func J (F) = ("artist_agent_secondary_" + F) | |
81 | + | ||
82 | + | ||
83 | + | func K (L) = if (contains(L, "/")) | |
84 | + | then if (if ((76 > size(L))) | |
85 | + | then (size(split(L, "/")[0]) == 59) | |
81 | 86 | else false) | |
82 | - | then (16 > size(split( | |
87 | + | then (16 > size(split(L, "/")[1])) | |
83 | 88 | else false | |
84 | 89 | else false | |
85 | 90 | ||
86 | 91 | ||
87 | - | func | |
88 | - | let | |
89 | - | then | |
92 | + | func M (w,N,O,P,Q) = { | |
93 | + | let R = if ((size(P) != 0)) | |
94 | + | then K(P) | |
90 | 95 | else true | |
91 | - | if (!( | |
96 | + | if (!(R)) | |
92 | 97 | then throw("CID don't match requirement!") | |
93 | - | else if (if (( | |
98 | + | else if (if ((N == "")) | |
94 | 99 | then true | |
95 | - | else ( | |
100 | + | else (O == "")) | |
96 | 101 | then throw("Name and description cannot be empty") | |
97 | - | else if ((size( | |
102 | + | else if ((size(O) > 600)) | |
98 | 103 | then throw("600 Char. max description") | |
99 | - | else if ((size( | |
104 | + | else if ((size(N) > 45)) | |
100 | 105 | then throw("45 Char. max name") | |
101 | 106 | else { | |
102 | - | let | |
103 | - | if (if (( | |
107 | + | let S = b(B(w)) | |
108 | + | if (if ((S == q)) | |
104 | 109 | then true | |
105 | - | else ( | |
110 | + | else (S == r)) | |
106 | 111 | then throw("Account suspended/ removed.") | |
107 | - | else if (if (!( | |
108 | - | then ( | |
112 | + | else if (if (!(Q)) | |
113 | + | then (S == o) | |
109 | 114 | else false) | |
110 | 115 | then throw("Already registered") | |
111 | - | else if (if (if (!( | |
112 | - | then ( | |
116 | + | else if (if (if (!(Q)) | |
117 | + | then (S == "") | |
113 | 118 | else false) | |
114 | - | then | |
119 | + | then m | |
115 | 120 | else false) | |
116 | 121 | then throw("Can't register, get approved first.") | |
117 | - | else if (if (if ( | |
118 | - | then ( | |
122 | + | else if (if (if (Q) | |
123 | + | then (S == "") | |
119 | 124 | else false) | |
120 | 125 | then true | |
121 | - | else if ( | |
122 | - | then ( | |
126 | + | else if (Q) | |
127 | + | then (S == n) | |
123 | 128 | else false) | |
124 | 129 | then throw("Register first") | |
125 | 130 | else true | |
127 | 132 | } | |
128 | 133 | ||
129 | 134 | ||
130 | - | func | |
131 | - | let | |
132 | - | let | |
133 | - | then | |
134 | - | else if (if (( | |
135 | - | then ( | |
135 | + | func T (S,U,V) = { | |
136 | + | let W = [p, o, q, r, n, s] | |
137 | + | let X = if (containsElement(W, S)) | |
138 | + | then S | |
139 | + | else if (if ((S == u)) | |
140 | + | then (V == n) | |
136 | 141 | else false) | |
137 | 142 | then "" | |
138 | 143 | else throw("Unknown status") | |
139 | - | let | |
140 | - | if (if (( | |
141 | - | then ( | |
144 | + | let Y = e(C(U)) | |
145 | + | if (if ((Y == 0)) | |
146 | + | then (X != n) | |
142 | 147 | else false) | |
143 | 148 | then throw("You cant set this status, user is not registered.") | |
144 | - | else if (if (( | |
145 | - | then ( | |
149 | + | else if (if ((V == n)) | |
150 | + | then (X == n) | |
146 | 151 | else false) | |
147 | 152 | then throw("User already allowed") | |
148 | - | else if (if (( | |
149 | - | then ( | |
153 | + | else if (if ((V == o)) | |
154 | + | then (X == n) | |
150 | 155 | else false) | |
151 | 156 | then throw("User already allowed & registered") | |
152 | - | else if (if (( | |
153 | - | then ( | |
157 | + | else if (if ((V == p)) | |
158 | + | then (X == n) | |
154 | 159 | else false) | |
155 | 160 | then throw("User already allowed & verified") | |
156 | - | else | |
161 | + | else X | |
157 | 162 | } | |
158 | 163 | ||
159 | 164 | ||
160 | - | func | |
165 | + | func Z (N,P,aa) = (((((("{\"user_name\": \"" + N) + "\", \"user_thumb\":\"") + P) + "\",\"user_date\":\"") + aa) + "\"}") | |
161 | 166 | ||
162 | 167 | ||
163 | - | @Callable( | |
164 | - | func setConf ( | |
165 | - | let | |
166 | - | if (containsElement([ | |
167 | - | then [StringEntry( | |
168 | + | @Callable(ab) | |
169 | + | func setConf (c,ac) = { | |
170 | + | let w = toString(ab.caller) | |
171 | + | if (containsElement([f, toString(this)], w)) | |
172 | + | then [StringEntry(c, ac)] | |
168 | 173 | else throw("You are not allowed to change this") | |
169 | 174 | } | |
170 | 175 | ||
171 | 176 | ||
172 | 177 | ||
173 | - | @Callable( | |
174 | - | func appRunning ( | |
175 | - | let | |
176 | - | if (containsElement([ | |
177 | - | then [BooleanEntry( | |
178 | + | @Callable(ab) | |
179 | + | func appRunning (ad,ae) = { | |
180 | + | let w = toString(ab.caller) | |
181 | + | if (containsElement([f, g, toString(this)], w)) | |
182 | + | then [BooleanEntry(h, ad), StringEntry(i, ae)] | |
178 | 183 | else throw("You are not allowed to change this") | |
179 | 184 | } | |
180 | 185 | ||
181 | 186 | ||
182 | 187 | ||
183 | - | @Callable( | |
184 | - | func registrationMode ( | |
185 | - | let | |
186 | - | if (containsElement([ | |
187 | - | then [BooleanEntry( | |
188 | + | @Callable(ab) | |
189 | + | func registrationMode (af) = { | |
190 | + | let w = toString(ab.caller) | |
191 | + | if (containsElement([f, toString(this)], w)) | |
192 | + | then [BooleanEntry(j, af)] | |
188 | 193 | else throw("You are not allowed to change this") | |
189 | 194 | } | |
190 | 195 | ||
191 | 196 | ||
192 | 197 | ||
193 | - | @Callable( | |
194 | - | func registerUser ( | |
195 | - | then throw( | |
198 | + | @Callable(ab) | |
199 | + | func registerUser (N,O,P,ag) = if (!(k)) | |
200 | + | then throw(l) | |
196 | 201 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | if (!( | |
202 | + | let w = toString(ab.caller) | |
203 | + | let ah = toBase58String(ab.transactionId) | |
204 | + | let ai = lastBlock.timestamp | |
205 | + | if (!(M(w, N, O, P, false))) | |
201 | 206 | then throw("Something went wrong") | |
202 | 207 | else { | |
203 | - | let | |
204 | - | [IntegerEntry( | |
208 | + | let aj = Z(toBase64String(toBytes(N)), toBase64String(toBytes(P)), toString(ai)) | |
209 | + | [IntegerEntry(C(w), ai), StringEntry(v(w), ((ah + "_") + toString(ai))), StringEntry(x(w), N), StringEntry(y(w), O), StringEntry(z(w), ag), StringEntry(A(w), P), StringEntry(B(w), o), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), aj)] | |
205 | 210 | } | |
206 | 211 | } | |
207 | 212 | ||
208 | 213 | ||
209 | 214 | ||
210 | - | @Callable( | |
211 | - | func updateUser ( | |
212 | - | then throw( | |
215 | + | @Callable(ab) | |
216 | + | func updateUser (N,O,P,ag) = if (!(k)) | |
217 | + | then throw(l) | |
213 | 218 | else { | |
214 | - | let | |
215 | - | let | |
216 | - | if (!( | |
219 | + | let w = toString(ab.caller) | |
220 | + | let S = b(B(w)) | |
221 | + | if (!(M(w, N, O, P, true))) | |
217 | 222 | then throw("Something went wrong") | |
218 | 223 | else { | |
219 | - | let | |
220 | - | let | |
221 | - | [ | |
224 | + | let aa = e(C(w)) | |
225 | + | let aj = Z(toBase64String(toBytes(N)), toBase64String(toBytes(P)), toString(aa)) | |
226 | + | [StringEntry(x(w), N), StringEntry(y(w), O), StringEntry(z(w), ag), StringEntry(A(w), P), StringEntry(((S + "_") + w), aj)] | |
222 | 227 | } | |
223 | 228 | } | |
224 | 229 | ||
225 | 230 | ||
226 | 231 | ||
227 | - | @Callable(Z) | |
228 | - | func changeUserStatus (S,Q,ai) = { | |
229 | - | let v = toString(Z.caller) | |
230 | - | let T = a(A(S)) | |
231 | - | let V = R(Q, S, T) | |
232 | - | let L = toBase64String(toBytes(a(w(S)))) | |
233 | - | let N = toBase64String(toBytes(a(z(S)))) | |
234 | - | let Y = d(B(S)) | |
235 | - | let ah = X(L, N, toString(Y)) | |
236 | - | if (containsElement([e, f, toString(this)], v)) | |
237 | - | then [StringEntry(A(S), V), DeleteEntry(((T + "_") + S)), StringEntry(((V + "_") + S), ah), StringEntry(("user_note_" + S), ai)] | |
232 | + | @Callable(ab) | |
233 | + | func setERC20User (ak) = if (!(k)) | |
234 | + | then throw(l) | |
235 | + | else { | |
236 | + | let w = toString(ab.caller) | |
237 | + | let S = b(B(w)) | |
238 | + | if (if ((S != o)) | |
239 | + | then (S != p) | |
240 | + | else false) | |
241 | + | then throw("Not allowed to set ERC20 address") | |
242 | + | else [StringEntry(D(w), ak)] | |
243 | + | } | |
244 | + | ||
245 | + | ||
246 | + | ||
247 | + | @Callable(ab) | |
248 | + | func changeUserStatus (U,S,al) = { | |
249 | + | let w = toString(ab.caller) | |
250 | + | let V = b(B(U)) | |
251 | + | let X = T(S, U, V) | |
252 | + | let N = toBase64String(toBytes(b(x(U)))) | |
253 | + | let P = toBase64String(toBytes(b(A(U)))) | |
254 | + | let aa = e(C(U)) | |
255 | + | let aj = Z(N, P, toString(aa)) | |
256 | + | if (containsElement([f, g, toString(this)], w)) | |
257 | + | then [StringEntry(B(U), X), DeleteEntry(((V + "_") + U)), StringEntry(((X + "_") + U), aj), StringEntry(("user_note_" + U), al)] | |
238 | 258 | else throw("Not allowed to change user status") | |
239 | 259 | } | |
240 | 260 | ||
241 | 261 | ||
242 | 262 | ||
243 | - | @Callable( | |
244 | - | func deleteUser ( | |
245 | - | let | |
246 | - | let | |
247 | - | if (containsElement([ | |
248 | - | then [DeleteEntry( | |
263 | + | @Callable(ab) | |
264 | + | func deleteUser (U) = { | |
265 | + | let w = toString(ab.caller) | |
266 | + | let V = b(B(U)) | |
267 | + | if (containsElement([f, toString(this)], w)) | |
268 | + | then [DeleteEntry(C(U)), DeleteEntry(v(U)), DeleteEntry(x(U)), DeleteEntry(y(U)), DeleteEntry(z(U)), DeleteEntry(A(U)), DeleteEntry(("user_note_" + U)), DeleteEntry(((V + "_") + U)), StringEntry(B(U), r)] | |
249 | 269 | else throw("Not allowed") | |
250 | 270 | } | |
251 | 271 | ||
252 | 272 | ||
253 | 273 | ||
254 | - | @Callable( | |
255 | - | func setAgent ( | |
256 | - | then throw( | |
274 | + | @Callable(am) | |
275 | + | func setAgent (F,H,an,ao) = if (!(k)) | |
276 | + | then throw(l) | |
257 | 277 | else { | |
258 | - | let | |
259 | - | if (containsElement([ | |
260 | - | then if (if ((size( | |
278 | + | let w = toString(am.caller) | |
279 | + | if (containsElement([f, toString(this)], w)) | |
280 | + | then if (if ((size(F) != 35)) | |
261 | 281 | then true | |
262 | - | else (size( | |
282 | + | else (size(H) != 35)) | |
263 | 283 | then throw("Wrong address") | |
264 | - | else [StringEntry( | |
284 | + | else [StringEntry(E(F), H), StringEntry(G(H, F), F), IntegerEntry(I(F), an), IntegerEntry(J(F), ao)] | |
265 | 285 | else throw("You are not allowed") | |
266 | 286 | } | |
267 | 287 | ||
268 | 288 | ||
269 | 289 | ||
270 | - | @Callable( | |
271 | - | func unsetAgent ( | |
272 | - | then throw( | |
290 | + | @Callable(am) | |
291 | + | func unsetAgent (F,H) = if (!(k)) | |
292 | + | then throw(l) | |
273 | 293 | else { | |
274 | - | let | |
275 | - | if (containsElement([ | |
276 | - | then if (if ((size( | |
294 | + | let w = toString(am.caller) | |
295 | + | if (containsElement([f, toString(this)], w)) | |
296 | + | then if (if ((size(F) != 35)) | |
277 | 297 | then true | |
278 | - | else (size( | |
298 | + | else (size(H) != 35)) | |
279 | 299 | then throw("Wrong address") | |
280 | - | else [DeleteEntry( | |
300 | + | else [DeleteEntry(E(F)), DeleteEntry(G(H, F)), DeleteEntry(I(F)), DeleteEntry(J(F))] | |
281 | 301 | else throw("You are not allowed") | |
282 | 302 | } | |
283 | 303 | ||
284 | 304 | ||
285 | 305 | ||
286 | - | @Callable( | |
287 | - | func deleteEntry ( | |
288 | - | let | |
289 | - | if (( | |
290 | - | then [DeleteEntry( | |
306 | + | @Callable(am) | |
307 | + | func deleteEntry (ap) = { | |
308 | + | let w = toString(am.caller) | |
309 | + | if ((w == f)) | |
310 | + | then [DeleteEntry(ap)] | |
291 | 311 | else throw("no") | |
292 | 312 | } | |
293 | 313 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func a (b) = valueOrElse(getString(this, b), "") | |
4 | + | let a = "1.3" | |
5 | + | ||
6 | + | func b (c) = valueOrElse(getString(this, c), "") | |
5 | 7 | ||
6 | 8 | ||
7 | - | func | |
9 | + | func d (c) = valueOrElse(getBoolean(this, c), false) | |
8 | 10 | ||
9 | 11 | ||
10 | - | func | |
12 | + | func e (c) = valueOrElse(getInteger(this, c), 0) | |
11 | 13 | ||
12 | 14 | ||
13 | - | let | |
15 | + | let f = b("conf_admin_1") | |
14 | 16 | ||
15 | - | let | |
17 | + | let g = b("conf_admin_2") | |
16 | 18 | ||
17 | - | let | |
19 | + | let h = "conf_dapp_is_running" | |
18 | 20 | ||
19 | - | let | |
21 | + | let i = "conf_maintenance_msg" | |
20 | 22 | ||
21 | - | let | |
23 | + | let j = "conf_whitelisted_only" | |
22 | 24 | ||
23 | - | let | |
25 | + | let k = valueOrElse(getBoolean(this, h), true) | |
24 | 26 | ||
25 | - | let | |
27 | + | let l = valueOrElse(getString(this, i), "") | |
26 | 28 | ||
27 | - | let | |
29 | + | let m = valueOrElse(getBoolean(this, j), true) | |
28 | 30 | ||
29 | - | let | |
31 | + | let n = "ALLOWED" | |
30 | 32 | ||
31 | - | let | |
33 | + | let o = "REGISTERED" | |
32 | 34 | ||
33 | - | let | |
35 | + | let p = "VERIFIED" | |
34 | 36 | ||
35 | - | let | |
37 | + | let q = "SUSPENDED" | |
36 | 38 | ||
37 | - | let | |
39 | + | let r = "REMOVED" | |
38 | 40 | ||
39 | - | let | |
41 | + | let s = "CHANGE_REQUIRED" | |
40 | 42 | ||
41 | - | let | |
43 | + | let t = "UNREGISTERED" | |
42 | 44 | ||
43 | - | let | |
45 | + | let u = "RESET" | |
44 | 46 | ||
45 | - | func | |
47 | + | func v (w) = ("user_" + w) | |
46 | 48 | ||
47 | 49 | ||
48 | - | func | |
50 | + | func x (w) = ("user_name_" + w) | |
49 | 51 | ||
50 | 52 | ||
51 | - | func | |
53 | + | func y (w) = ("user_desc_" + w) | |
52 | 54 | ||
53 | 55 | ||
54 | - | func | |
56 | + | func z (w) = ("user_social_" + w) | |
55 | 57 | ||
56 | 58 | ||
57 | - | func | |
59 | + | func A (w) = ("user_thumb_" + w) | |
58 | 60 | ||
59 | 61 | ||
60 | - | func | |
62 | + | func B (w) = ("user_status_" + w) | |
61 | 63 | ||
62 | 64 | ||
63 | - | func | |
65 | + | func C (w) = ("user_date_" + w) | |
64 | 66 | ||
65 | 67 | ||
66 | - | func | |
68 | + | func D (w) = ("user_ERC20_" + w) | |
67 | 69 | ||
68 | 70 | ||
69 | - | func E (F | |
71 | + | func E (F) = ("artist_agent_" + F) | |
70 | 72 | ||
71 | 73 | ||
72 | - | func G ( | |
74 | + | func G (H,F) = ((("agent_" + H) + "_") + F) | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
77 | + | func I (F) = ("artist_agent_primary_" + F) | |
76 | 78 | ||
77 | 79 | ||
78 | - | func I (J) = if (contains(J, "/")) | |
79 | - | then if (if ((76 > size(J))) | |
80 | - | then (size(split(J, "/")[0]) == 59) | |
80 | + | func J (F) = ("artist_agent_secondary_" + F) | |
81 | + | ||
82 | + | ||
83 | + | func K (L) = if (contains(L, "/")) | |
84 | + | then if (if ((76 > size(L))) | |
85 | + | then (size(split(L, "/")[0]) == 59) | |
81 | 86 | else false) | |
82 | - | then (16 > size(split( | |
87 | + | then (16 > size(split(L, "/")[1])) | |
83 | 88 | else false | |
84 | 89 | else false | |
85 | 90 | ||
86 | 91 | ||
87 | - | func | |
88 | - | let | |
89 | - | then | |
92 | + | func M (w,N,O,P,Q) = { | |
93 | + | let R = if ((size(P) != 0)) | |
94 | + | then K(P) | |
90 | 95 | else true | |
91 | - | if (!( | |
96 | + | if (!(R)) | |
92 | 97 | then throw("CID don't match requirement!") | |
93 | - | else if (if (( | |
98 | + | else if (if ((N == "")) | |
94 | 99 | then true | |
95 | - | else ( | |
100 | + | else (O == "")) | |
96 | 101 | then throw("Name and description cannot be empty") | |
97 | - | else if ((size( | |
102 | + | else if ((size(O) > 600)) | |
98 | 103 | then throw("600 Char. max description") | |
99 | - | else if ((size( | |
104 | + | else if ((size(N) > 45)) | |
100 | 105 | then throw("45 Char. max name") | |
101 | 106 | else { | |
102 | - | let | |
103 | - | if (if (( | |
107 | + | let S = b(B(w)) | |
108 | + | if (if ((S == q)) | |
104 | 109 | then true | |
105 | - | else ( | |
110 | + | else (S == r)) | |
106 | 111 | then throw("Account suspended/ removed.") | |
107 | - | else if (if (!( | |
108 | - | then ( | |
112 | + | else if (if (!(Q)) | |
113 | + | then (S == o) | |
109 | 114 | else false) | |
110 | 115 | then throw("Already registered") | |
111 | - | else if (if (if (!( | |
112 | - | then ( | |
116 | + | else if (if (if (!(Q)) | |
117 | + | then (S == "") | |
113 | 118 | else false) | |
114 | - | then | |
119 | + | then m | |
115 | 120 | else false) | |
116 | 121 | then throw("Can't register, get approved first.") | |
117 | - | else if (if (if ( | |
118 | - | then ( | |
122 | + | else if (if (if (Q) | |
123 | + | then (S == "") | |
119 | 124 | else false) | |
120 | 125 | then true | |
121 | - | else if ( | |
122 | - | then ( | |
126 | + | else if (Q) | |
127 | + | then (S == n) | |
123 | 128 | else false) | |
124 | 129 | then throw("Register first") | |
125 | 130 | else true | |
126 | 131 | } | |
127 | 132 | } | |
128 | 133 | ||
129 | 134 | ||
130 | - | func | |
131 | - | let | |
132 | - | let | |
133 | - | then | |
134 | - | else if (if (( | |
135 | - | then ( | |
135 | + | func T (S,U,V) = { | |
136 | + | let W = [p, o, q, r, n, s] | |
137 | + | let X = if (containsElement(W, S)) | |
138 | + | then S | |
139 | + | else if (if ((S == u)) | |
140 | + | then (V == n) | |
136 | 141 | else false) | |
137 | 142 | then "" | |
138 | 143 | else throw("Unknown status") | |
139 | - | let | |
140 | - | if (if (( | |
141 | - | then ( | |
144 | + | let Y = e(C(U)) | |
145 | + | if (if ((Y == 0)) | |
146 | + | then (X != n) | |
142 | 147 | else false) | |
143 | 148 | then throw("You cant set this status, user is not registered.") | |
144 | - | else if (if (( | |
145 | - | then ( | |
149 | + | else if (if ((V == n)) | |
150 | + | then (X == n) | |
146 | 151 | else false) | |
147 | 152 | then throw("User already allowed") | |
148 | - | else if (if (( | |
149 | - | then ( | |
153 | + | else if (if ((V == o)) | |
154 | + | then (X == n) | |
150 | 155 | else false) | |
151 | 156 | then throw("User already allowed & registered") | |
152 | - | else if (if (( | |
153 | - | then ( | |
157 | + | else if (if ((V == p)) | |
158 | + | then (X == n) | |
154 | 159 | else false) | |
155 | 160 | then throw("User already allowed & verified") | |
156 | - | else | |
161 | + | else X | |
157 | 162 | } | |
158 | 163 | ||
159 | 164 | ||
160 | - | func | |
165 | + | func Z (N,P,aa) = (((((("{\"user_name\": \"" + N) + "\", \"user_thumb\":\"") + P) + "\",\"user_date\":\"") + aa) + "\"}") | |
161 | 166 | ||
162 | 167 | ||
163 | - | @Callable( | |
164 | - | func setConf ( | |
165 | - | let | |
166 | - | if (containsElement([ | |
167 | - | then [StringEntry( | |
168 | + | @Callable(ab) | |
169 | + | func setConf (c,ac) = { | |
170 | + | let w = toString(ab.caller) | |
171 | + | if (containsElement([f, toString(this)], w)) | |
172 | + | then [StringEntry(c, ac)] | |
168 | 173 | else throw("You are not allowed to change this") | |
169 | 174 | } | |
170 | 175 | ||
171 | 176 | ||
172 | 177 | ||
173 | - | @Callable( | |
174 | - | func appRunning ( | |
175 | - | let | |
176 | - | if (containsElement([ | |
177 | - | then [BooleanEntry( | |
178 | + | @Callable(ab) | |
179 | + | func appRunning (ad,ae) = { | |
180 | + | let w = toString(ab.caller) | |
181 | + | if (containsElement([f, g, toString(this)], w)) | |
182 | + | then [BooleanEntry(h, ad), StringEntry(i, ae)] | |
178 | 183 | else throw("You are not allowed to change this") | |
179 | 184 | } | |
180 | 185 | ||
181 | 186 | ||
182 | 187 | ||
183 | - | @Callable( | |
184 | - | func registrationMode ( | |
185 | - | let | |
186 | - | if (containsElement([ | |
187 | - | then [BooleanEntry( | |
188 | + | @Callable(ab) | |
189 | + | func registrationMode (af) = { | |
190 | + | let w = toString(ab.caller) | |
191 | + | if (containsElement([f, toString(this)], w)) | |
192 | + | then [BooleanEntry(j, af)] | |
188 | 193 | else throw("You are not allowed to change this") | |
189 | 194 | } | |
190 | 195 | ||
191 | 196 | ||
192 | 197 | ||
193 | - | @Callable( | |
194 | - | func registerUser ( | |
195 | - | then throw( | |
198 | + | @Callable(ab) | |
199 | + | func registerUser (N,O,P,ag) = if (!(k)) | |
200 | + | then throw(l) | |
196 | 201 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | if (!( | |
202 | + | let w = toString(ab.caller) | |
203 | + | let ah = toBase58String(ab.transactionId) | |
204 | + | let ai = lastBlock.timestamp | |
205 | + | if (!(M(w, N, O, P, false))) | |
201 | 206 | then throw("Something went wrong") | |
202 | 207 | else { | |
203 | - | let | |
204 | - | [IntegerEntry( | |
208 | + | let aj = Z(toBase64String(toBytes(N)), toBase64String(toBytes(P)), toString(ai)) | |
209 | + | [IntegerEntry(C(w), ai), StringEntry(v(w), ((ah + "_") + toString(ai))), StringEntry(x(w), N), StringEntry(y(w), O), StringEntry(z(w), ag), StringEntry(A(w), P), StringEntry(B(w), o), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), aj)] | |
205 | 210 | } | |
206 | 211 | } | |
207 | 212 | ||
208 | 213 | ||
209 | 214 | ||
210 | - | @Callable( | |
211 | - | func updateUser ( | |
212 | - | then throw( | |
215 | + | @Callable(ab) | |
216 | + | func updateUser (N,O,P,ag) = if (!(k)) | |
217 | + | then throw(l) | |
213 | 218 | else { | |
214 | - | let | |
215 | - | let | |
216 | - | if (!( | |
219 | + | let w = toString(ab.caller) | |
220 | + | let S = b(B(w)) | |
221 | + | if (!(M(w, N, O, P, true))) | |
217 | 222 | then throw("Something went wrong") | |
218 | 223 | else { | |
219 | - | let | |
220 | - | let | |
221 | - | [ | |
224 | + | let aa = e(C(w)) | |
225 | + | let aj = Z(toBase64String(toBytes(N)), toBase64String(toBytes(P)), toString(aa)) | |
226 | + | [StringEntry(x(w), N), StringEntry(y(w), O), StringEntry(z(w), ag), StringEntry(A(w), P), StringEntry(((S + "_") + w), aj)] | |
222 | 227 | } | |
223 | 228 | } | |
224 | 229 | ||
225 | 230 | ||
226 | 231 | ||
227 | - | @Callable(Z) | |
228 | - | func changeUserStatus (S,Q,ai) = { | |
229 | - | let v = toString(Z.caller) | |
230 | - | let T = a(A(S)) | |
231 | - | let V = R(Q, S, T) | |
232 | - | let L = toBase64String(toBytes(a(w(S)))) | |
233 | - | let N = toBase64String(toBytes(a(z(S)))) | |
234 | - | let Y = d(B(S)) | |
235 | - | let ah = X(L, N, toString(Y)) | |
236 | - | if (containsElement([e, f, toString(this)], v)) | |
237 | - | then [StringEntry(A(S), V), DeleteEntry(((T + "_") + S)), StringEntry(((V + "_") + S), ah), StringEntry(("user_note_" + S), ai)] | |
232 | + | @Callable(ab) | |
233 | + | func setERC20User (ak) = if (!(k)) | |
234 | + | then throw(l) | |
235 | + | else { | |
236 | + | let w = toString(ab.caller) | |
237 | + | let S = b(B(w)) | |
238 | + | if (if ((S != o)) | |
239 | + | then (S != p) | |
240 | + | else false) | |
241 | + | then throw("Not allowed to set ERC20 address") | |
242 | + | else [StringEntry(D(w), ak)] | |
243 | + | } | |
244 | + | ||
245 | + | ||
246 | + | ||
247 | + | @Callable(ab) | |
248 | + | func changeUserStatus (U,S,al) = { | |
249 | + | let w = toString(ab.caller) | |
250 | + | let V = b(B(U)) | |
251 | + | let X = T(S, U, V) | |
252 | + | let N = toBase64String(toBytes(b(x(U)))) | |
253 | + | let P = toBase64String(toBytes(b(A(U)))) | |
254 | + | let aa = e(C(U)) | |
255 | + | let aj = Z(N, P, toString(aa)) | |
256 | + | if (containsElement([f, g, toString(this)], w)) | |
257 | + | then [StringEntry(B(U), X), DeleteEntry(((V + "_") + U)), StringEntry(((X + "_") + U), aj), StringEntry(("user_note_" + U), al)] | |
238 | 258 | else throw("Not allowed to change user status") | |
239 | 259 | } | |
240 | 260 | ||
241 | 261 | ||
242 | 262 | ||
243 | - | @Callable( | |
244 | - | func deleteUser ( | |
245 | - | let | |
246 | - | let | |
247 | - | if (containsElement([ | |
248 | - | then [DeleteEntry( | |
263 | + | @Callable(ab) | |
264 | + | func deleteUser (U) = { | |
265 | + | let w = toString(ab.caller) | |
266 | + | let V = b(B(U)) | |
267 | + | if (containsElement([f, toString(this)], w)) | |
268 | + | then [DeleteEntry(C(U)), DeleteEntry(v(U)), DeleteEntry(x(U)), DeleteEntry(y(U)), DeleteEntry(z(U)), DeleteEntry(A(U)), DeleteEntry(("user_note_" + U)), DeleteEntry(((V + "_") + U)), StringEntry(B(U), r)] | |
249 | 269 | else throw("Not allowed") | |
250 | 270 | } | |
251 | 271 | ||
252 | 272 | ||
253 | 273 | ||
254 | - | @Callable( | |
255 | - | func setAgent ( | |
256 | - | then throw( | |
274 | + | @Callable(am) | |
275 | + | func setAgent (F,H,an,ao) = if (!(k)) | |
276 | + | then throw(l) | |
257 | 277 | else { | |
258 | - | let | |
259 | - | if (containsElement([ | |
260 | - | then if (if ((size( | |
278 | + | let w = toString(am.caller) | |
279 | + | if (containsElement([f, toString(this)], w)) | |
280 | + | then if (if ((size(F) != 35)) | |
261 | 281 | then true | |
262 | - | else (size( | |
282 | + | else (size(H) != 35)) | |
263 | 283 | then throw("Wrong address") | |
264 | - | else [StringEntry( | |
284 | + | else [StringEntry(E(F), H), StringEntry(G(H, F), F), IntegerEntry(I(F), an), IntegerEntry(J(F), ao)] | |
265 | 285 | else throw("You are not allowed") | |
266 | 286 | } | |
267 | 287 | ||
268 | 288 | ||
269 | 289 | ||
270 | - | @Callable( | |
271 | - | func unsetAgent ( | |
272 | - | then throw( | |
290 | + | @Callable(am) | |
291 | + | func unsetAgent (F,H) = if (!(k)) | |
292 | + | then throw(l) | |
273 | 293 | else { | |
274 | - | let | |
275 | - | if (containsElement([ | |
276 | - | then if (if ((size( | |
294 | + | let w = toString(am.caller) | |
295 | + | if (containsElement([f, toString(this)], w)) | |
296 | + | then if (if ((size(F) != 35)) | |
277 | 297 | then true | |
278 | - | else (size( | |
298 | + | else (size(H) != 35)) | |
279 | 299 | then throw("Wrong address") | |
280 | - | else [DeleteEntry( | |
300 | + | else [DeleteEntry(E(F)), DeleteEntry(G(H, F)), DeleteEntry(I(F)), DeleteEntry(J(F))] | |
281 | 301 | else throw("You are not allowed") | |
282 | 302 | } | |
283 | 303 | ||
284 | 304 | ||
285 | 305 | ||
286 | - | @Callable( | |
287 | - | func deleteEntry ( | |
288 | - | let | |
289 | - | if (( | |
290 | - | then [DeleteEntry( | |
306 | + | @Callable(am) | |
307 | + | func deleteEntry (ap) = { | |
308 | + | let w = toString(am.caller) | |
309 | + | if ((w == f)) | |
310 | + | then [DeleteEntry(ap)] | |
291 | 311 | else throw("no") | |
292 | 312 | } | |
293 | 313 | ||
294 | 314 |
github/deemru/w8io/026f985 106.88 ms ◑