tx · C8q679QND49iekVWNm7eeEXnLKhZiZrapBQeP4GKzGvh 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01100000 Waves 2023.01.22 04:37 [2415513] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "C8q679QND49iekVWNm7eeEXnLKhZiZrapBQeP4GKzGvh", "fee": 1100000, "feeAssetId": null, "timestamp": 1674351558475, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "4xcAgZxaoEMADScUYJoSxxzmUAooGaisTxJ5saFgqciSPyZCx4b2qTAR9HMXX25xiHvgDr3qZAwEEA3PE8rw6WT4" ], "script": "base64:BgJNCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgYKBAgICAgSAwoBCBIGCgQICAEBEgQKAggIEgMKAQgoAAdWRVJTSU9OAgMxLjUBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEJvb2xlYW5CeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMFA2tleQcBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAA5kYXBwUnVubmluZ0tleQIUY29uZl9kYXBwX2lzX3J1bm5pbmcAEW1haW50ZW5hbmNlTVNHS2V5AhRjb25mX21haW50ZW5hbmNlX21zZwASd2hpdGVsaXN0ZWRvbmx5S2V5AhVjb25mX3doaXRlbGlzdGVkX29ubHkAC2RhcHBSdW5uaW5nCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMFD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AAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAIJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnJ0O/q", "height": 2415513, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GDaHvZ6GS1kABSw8Y1AfUReJ5K4My1sMXnevVLiH7R9 Next: 6JFcVEWo1PbA3P5YrPgfZgsSM9LtjLBdu3JJHDTdALoD 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 { | |
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 | - | } | |
323 | + | then [StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
329 | 324 | else { | |
330 | 325 | let X = b(B(W)) | |
331 | 326 | 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 { | |
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 | - | } | |
323 | + | then [StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
329 | 324 | else { | |
330 | 325 | let X = b(B(W)) | |
331 | 326 | let Z = V(U, W, X) | |
332 | 327 | let P = toBase64String(toBytes(b(x(W)))) | |
333 | 328 | let R = toBase64String(toBytes(b(A(W)))) | |
334 | 329 | let ac = e(D(W)) | |
335 | 330 | let aw = ab(P, R, toString(ac)) | |
336 | 331 | [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), aw), StringEntry(("user_note_" + W), aC), StringEntry(("user_label_" + W), aD)] | |
337 | 332 | } | |
338 | 333 | else throw("Not allowed to change user status") | |
339 | 334 | } | |
340 | 335 | ||
341 | 336 | ||
342 | 337 | ||
343 | 338 | @Callable(am) | |
344 | 339 | func deleteUser (W) = { | |
345 | 340 | let w = toString(am.caller) | |
346 | 341 | let X = b(B(W)) | |
347 | 342 | if (containsElement([f, toString(this)], w)) | |
348 | 343 | 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)] | |
349 | 344 | else throw("Not allowed") | |
350 | 345 | } | |
351 | 346 | ||
352 | 347 | ||
353 | 348 | ||
354 | 349 | @Callable(ai) | |
355 | 350 | func setAgent (G,I,aE,aF) = if (!(j)) | |
356 | 351 | then throw(k) | |
357 | 352 | else { | |
358 | 353 | let w = toString(ai.caller) | |
359 | 354 | if (containsElement([f, toString(this)], w)) | |
360 | 355 | then if (if ((size(G) != 35)) | |
361 | 356 | then true | |
362 | 357 | else (size(I) != 35)) | |
363 | 358 | then throw("Wrong address") | |
364 | 359 | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), aE), IntegerEntry(K(G), aF)] | |
365 | 360 | else throw("You are not allowed") | |
366 | 361 | } | |
367 | 362 | ||
368 | 363 | ||
369 | 364 | ||
370 | 365 | @Callable(ai) | |
371 | 366 | func unsetAgent (G,I) = if (!(j)) | |
372 | 367 | then throw(k) | |
373 | 368 | else { | |
374 | 369 | let w = toString(ai.caller) | |
375 | 370 | if (containsElement([f, toString(this)], w)) | |
376 | 371 | then if (if ((size(G) != 35)) | |
377 | 372 | then true | |
378 | 373 | else (size(I) != 35)) | |
379 | 374 | then throw("Wrong address") | |
380 | 375 | else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))] | |
381 | 376 | else throw("You are not allowed") | |
382 | 377 | } | |
383 | 378 | ||
384 | 379 | ||
385 | 380 | ||
386 | 381 | @Callable(ai) | |
387 | 382 | func deleteEntry (aG) = { | |
388 | 383 | let w = toString(ai.caller) | |
389 | 384 | if ((w == f)) | |
390 | 385 | then [DeleteEntry(aG)] | |
391 | 386 | else throw("no") | |
392 | 387 | } | |
393 | 388 | ||
394 | 389 | ||
395 | 390 | @Verifier(aH) | |
396 | 391 | func aI () = { | |
397 | 392 | let af = aH | |
398 | 393 | if ($isInstanceOf(af, "InvokeScriptTransaction")) | |
399 | 394 | then { | |
400 | 395 | let aJ = af | |
401 | 396 | if (if (if (if ((aJ.function == "registerUser")) | |
402 | 397 | then (aJ.dApp == this) | |
403 | 398 | else false) | |
404 | 399 | then (aJ.fee == 500000) | |
405 | 400 | else false) | |
406 | 401 | then (aJ.feeAssetId == unit) | |
407 | 402 | else false) | |
408 | 403 | then sigVerify(aH.bodyBytes, aH.proofs[0], fromBase58String(ad(aJ.args[5]))) | |
409 | 404 | else if (if (if (if ((aJ.function == "updateUser")) | |
410 | 405 | then (aJ.dApp == this) | |
411 | 406 | else false) | |
412 | 407 | then (aJ.fee == 500000) | |
413 | 408 | else false) | |
414 | 409 | then (aJ.feeAssetId == unit) | |
415 | 410 | else false) | |
416 | 411 | then sigVerify(aH.bodyBytes, aH.proofs[0], fromBase58String(ad(aJ.args[5]))) | |
417 | 412 | else if (if (if (if ((aJ.function == "setERC20User")) | |
418 | 413 | then (aJ.dApp == this) | |
419 | 414 | else false) | |
420 | 415 | then (aJ.fee == 500000) | |
421 | 416 | else false) | |
422 | 417 | then (aJ.feeAssetId == unit) | |
423 | 418 | else false) | |
424 | 419 | then sigVerify(aH.bodyBytes, aH.proofs[0], fromBase58String(ad(aJ.args[2]))) | |
425 | 420 | else sigVerify(aH.bodyBytes, aH.proofs[0], aH.senderPublicKey) | |
426 | 421 | } | |
427 | 422 | else sigVerify(aH.bodyBytes, aH.proofs[0], aH.senderPublicKey) | |
428 | 423 | } | |
429 | 424 |
github/deemru/w8io/026f985 76.10 ms ◑