tx · GDaHvZ6GS1kABSw8Y1AfUReJ5K4My1sMXnevVLiH7R9 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01100000 Waves 2023.01.22 04:37 [2415513] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "GDaHvZ6GS1kABSw8Y1AfUReJ5K4My1sMXnevVLiH7R9", "fee": 1100000, "feeAssetId": null, "timestamp": 1674351511418, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "8Qox1bhoGa6UmtxMHHJsBxZQKGqMMw5yfuCdcpyTREj2eX86SkYotv2mqx1uqKVd1FEf4dZabBLceq1yDHY1C3M" ], "script": "base64:BgJNCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgYKBAgICAgSAwoBCBIGCgQICAEBEgQKAggIEgMKAQgoAAdWRVJTSU9OAgMxLjUBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEJvb2xlYW5CeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMFA2tleQcBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAA5kYXBwUnVubmluZ0tleQIUY29uZl9kYXBwX2lzX3J1bm5pbmcAEW1haW50ZW5hbmNlTVNHS2V5AhRjb25mX21haW50ZW5hbmNlX21zZwASd2hpdGVsaXN0ZWRvbmx5S2V5AhVjb25mX3doaXRlbGlzdGVkX29ubHkAC2RhcHBSdW5uaW5nCQELdmFsdWVPckVsc2UCCQCbCAIFB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mVlQXNzZXRJZAUEdW5pdAcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABQMDAwMJAAACCAUDaW52CGZ1bmN0aW9uAgxzZXRFUkMyMFVzZXIJAAACCAUDaW52BGRBcHAFBHRoaXMHCQAAAggFA2ludgNmZWUAoMIeBwkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MAAgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tledWND14=", "height": 2415513, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FDUT9vd8qBNgH7duTgnCmUECT2oCQ8fvdPLRnthikZYi Next: C8q679QND49iekVWNm7eeEXnLKhZiZrapBQeP4GKzGvh Diff:
Old | New | Differences | |
---|---|---|---|
320 | 320 | let w = toString(am.caller) | |
321 | 321 | if (containsElement([f, toString(this)], w)) | |
322 | 322 | then if ((size(U) == 0)) | |
323 | - | then [StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
323 | + | then { | |
324 | + | let X = b(B(W)) | |
325 | + | if ((X != "")) | |
326 | + | then [StringEntry(B(W), X), StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
327 | + | else throw("No current status") | |
328 | + | } | |
324 | 329 | else { | |
325 | 330 | let X = b(B(W)) | |
326 | 331 | let Z = V(U, W, X) |
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 = if ((aj != "")) | |
187 | 187 | then valueOrElse(L((toString(addressFromPublicKey(fromBase58String(aj))) + "_free_txs")), 0) | |
188 | 188 | else 0 | |
189 | 189 | let w = if (if ((toBase58String(ai.caller.bytes) == toString(this))) | |
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 | 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 | 237 | let at = ah(am, aj) | |
238 | 238 | let w = at._1 | |
239 | 239 | let ak = at._2 | |
240 | 240 | let au = toBase58String(am.transactionId) | |
241 | 241 | let av = lastBlock.timestamp | |
242 | 242 | if (!(O(w, P, Q, R, false))) | |
243 | 243 | then throw("Something went wrong") | |
244 | 244 | else { | |
245 | 245 | let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(av)) | |
246 | 246 | if (if ((0 > as)) | |
247 | 247 | then true | |
248 | 248 | else (as > 1000)) | |
249 | 249 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
250 | 250 | else { | |
251 | 251 | let ax = if (ak) | |
252 | 252 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
253 | 253 | else nil | |
254 | 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 | 255 | } | |
256 | 256 | } | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | ||
261 | 261 | @Callable(am) | |
262 | 262 | func updateUser (P,Q,R,ar,as,aj) = if (!(j)) | |
263 | 263 | then throw(k) | |
264 | 264 | else { | |
265 | 265 | let ay = ah(am, aj) | |
266 | 266 | let w = ay._1 | |
267 | 267 | let ak = ay._2 | |
268 | 268 | let U = b(B(w)) | |
269 | 269 | if (!(O(w, P, Q, R, true))) | |
270 | 270 | then throw("Something went wrong") | |
271 | 271 | else { | |
272 | 272 | let ac = e(D(w)) | |
273 | 273 | let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(ac)) | |
274 | 274 | if (if ((0 > as)) | |
275 | 275 | then true | |
276 | 276 | else (as > 1000)) | |
277 | 277 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
278 | 278 | else { | |
279 | 279 | let ax = if (ak) | |
280 | 280 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
281 | 281 | else nil | |
282 | 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 | 283 | } | |
284 | 284 | } | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(am) | |
290 | 290 | func setERC20User (az,aj) = if (!(j)) | |
291 | 291 | then throw(k) | |
292 | 292 | else { | |
293 | 293 | let aA = ah(am, aj) | |
294 | 294 | let w = aA._1 | |
295 | 295 | let ak = aA._2 | |
296 | 296 | let U = b(B(w)) | |
297 | 297 | if (if ((U != o)) | |
298 | 298 | then (U != p) | |
299 | 299 | else false) | |
300 | 300 | then throw("Not allowed to set ERC20 address") | |
301 | 301 | else { | |
302 | 302 | let aB = take(az, 2) | |
303 | 303 | if (if ((aB != "0x")) | |
304 | 304 | then true | |
305 | 305 | else (size(az) != 42)) | |
306 | 306 | then throw("This is not an erc20 address") | |
307 | 307 | else { | |
308 | 308 | let ax = if (ak) | |
309 | 309 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
310 | 310 | else nil | |
311 | 311 | ([StringEntry(E(w), az)] ++ ax) | |
312 | 312 | } | |
313 | 313 | } | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | ||
318 | 318 | @Callable(am) | |
319 | 319 | func changeUserStatus (W,U,aC,aD) = { | |
320 | 320 | let w = toString(am.caller) | |
321 | 321 | if (containsElement([f, toString(this)], w)) | |
322 | 322 | then if ((size(U) == 0)) | |
323 | - | then [StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
323 | + | then { | |
324 | + | let X = b(B(W)) | |
325 | + | if ((X != "")) | |
326 | + | then [StringEntry(B(W), X), StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
327 | + | else throw("No current status") | |
328 | + | } | |
324 | 329 | else { | |
325 | 330 | let X = b(B(W)) | |
326 | 331 | let Z = V(U, W, X) | |
327 | 332 | let P = toBase64String(toBytes(b(x(W)))) | |
328 | 333 | let R = toBase64String(toBytes(b(A(W)))) | |
329 | 334 | let ac = e(D(W)) | |
330 | 335 | let aw = ab(P, R, toString(ac)) | |
331 | 336 | [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), aw), StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
332 | 337 | } | |
333 | 338 | else throw("Not allowed to change user status") | |
334 | 339 | } | |
335 | 340 | ||
336 | 341 | ||
337 | 342 | ||
338 | 343 | @Callable(am) | |
339 | 344 | func deleteUser (W) = { | |
340 | 345 | let w = toString(am.caller) | |
341 | 346 | let X = b(B(W)) | |
342 | 347 | if (containsElement([f, toString(this)], w)) | |
343 | 348 | 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)] | |
344 | 349 | else throw("Not allowed") | |
345 | 350 | } | |
346 | 351 | ||
347 | 352 | ||
348 | 353 | ||
349 | 354 | @Callable(ai) | |
350 | 355 | func setAgent (G,I,aE,aF) = if (!(j)) | |
351 | 356 | then throw(k) | |
352 | 357 | else { | |
353 | 358 | let w = toString(ai.caller) | |
354 | 359 | if (containsElement([f, toString(this)], w)) | |
355 | 360 | then if (if ((size(G) != 35)) | |
356 | 361 | then true | |
357 | 362 | else (size(I) != 35)) | |
358 | 363 | then throw("Wrong address") | |
359 | 364 | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), aE), IntegerEntry(K(G), aF)] | |
360 | 365 | else throw("You are not allowed") | |
361 | 366 | } | |
362 | 367 | ||
363 | 368 | ||
364 | 369 | ||
365 | 370 | @Callable(ai) | |
366 | 371 | func unsetAgent (G,I) = if (!(j)) | |
367 | 372 | then throw(k) | |
368 | 373 | else { | |
369 | 374 | let w = toString(ai.caller) | |
370 | 375 | if (containsElement([f, toString(this)], w)) | |
371 | 376 | then if (if ((size(G) != 35)) | |
372 | 377 | then true | |
373 | 378 | else (size(I) != 35)) | |
374 | 379 | then throw("Wrong address") | |
375 | 380 | else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))] | |
376 | 381 | else throw("You are not allowed") | |
377 | 382 | } | |
378 | 383 | ||
379 | 384 | ||
380 | 385 | ||
381 | 386 | @Callable(ai) | |
382 | 387 | func deleteEntry (aG) = { | |
383 | 388 | let w = toString(ai.caller) | |
384 | 389 | if ((w == f)) | |
385 | 390 | then [DeleteEntry(aG)] | |
386 | 391 | else throw("no") | |
387 | 392 | } | |
388 | 393 | ||
389 | 394 | ||
390 | 395 | @Verifier(aH) | |
391 | 396 | func aI () = { | |
392 | 397 | let af = aH | |
393 | 398 | if ($isInstanceOf(af, "InvokeScriptTransaction")) | |
394 | 399 | then { | |
395 | 400 | let aJ = af | |
396 | 401 | if (if (if (if ((aJ.function == "registerUser")) | |
397 | 402 | then (aJ.dApp == this) | |
398 | 403 | else false) | |
399 | 404 | then (aJ.fee == 500000) | |
400 | 405 | else false) | |
401 | 406 | then (aJ.feeAssetId == unit) | |
402 | 407 | else false) | |
403 | 408 | then sigVerify(aH.bodyBytes, aH.proofs[0], fromBase58String(ad(aJ.args[5]))) | |
404 | 409 | else if (if (if (if ((aJ.function == "updateUser")) | |
405 | 410 | then (aJ.dApp == this) | |
406 | 411 | else false) | |
407 | 412 | then (aJ.fee == 500000) | |
408 | 413 | else false) | |
409 | 414 | then (aJ.feeAssetId == unit) | |
410 | 415 | else false) | |
411 | 416 | then sigVerify(aH.bodyBytes, aH.proofs[0], fromBase58String(ad(aJ.args[5]))) | |
412 | 417 | else if (if (if (if ((aJ.function == "setERC20User")) | |
413 | 418 | then (aJ.dApp == this) | |
414 | 419 | else false) | |
415 | 420 | then (aJ.fee == 500000) | |
416 | 421 | else false) | |
417 | 422 | then (aJ.feeAssetId == unit) | |
418 | 423 | else false) | |
419 | 424 | then sigVerify(aH.bodyBytes, aH.proofs[0], fromBase58String(ad(aJ.args[2]))) | |
420 | 425 | else sigVerify(aH.bodyBytes, aH.proofs[0], aH.senderPublicKey) | |
421 | 426 | } | |
422 | 427 | else sigVerify(aH.bodyBytes, aH.proofs[0], aH.senderPublicKey) | |
423 | 428 | } | |
424 | 429 |
github/deemru/w8io/026f985 53.58 ms ◑