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:BgJMCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgUKAwgICBIDCgEIEgYKBAgIAQESBAoCCAgSAwoBCCgAB1ZFUlNJT04CAzEuNQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJsIAgUEdGhpcwUDa2V5BwEPZ2V0SW50ZWdlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnABJ3aGl0ZWxpc3RlZG9ubHlLZXkCFWNvbmZfd2hpdGVsaXN0ZWRfb25seQALZGFwcFJ1bm5p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AQITWW91IGFyZSBub3QgYWxsb3dlZAFpAQtkZWxldGVFbnRyeQEFZW50cnkEBmNhbGxlcgkApQgBCAUBaQZjYWxsZXIDCQAAAgUGY2FsbGVyBQVjaHJpcwkAzAgCCQELRGVsZXRlRW50cnkBBQVlbnRyeQUDbmlsCQACAQICbm8BAnR4AQh2ZXJpZmllcgAEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpbnYFByRtYXRjaDADAwkAAAIIBQNpbnYIZnVuY3Rpb24CDHJlZ2lzdGVyVXNlcgkAAAIIBQNpbnYEZEFwcAUEdGhpcwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABQMDCQAAAggFA2ludghmdW5jdGlvbgIKdXBkYXRlVXNlcgkAAAIIBQNpbnYEZEFwcAUEdGhpcwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABQMDCQAAAggFA2ludghmdW5jdGlvbgIMc2V0RVJDMjBVc2VyCQAAAggFA2ludgRkQXBwBQR0aGlzBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkA2QQBCQEIYXNTdHJpbmcBCQCRAwIIBQNpbnYEYXJncwACCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5cVerlg==", "height": 2412762, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DgkbseySxJkmEN9VKw79ktViCQBtVYpPkpCmspzstTBr Next: 9coC7PKpTkXWApoTZJZG5etZnBGWWCgJD87aHaQcNAc5 Diff:
OldNewDifferences
195195 then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(aj)))], nil)
196196 else unit
197197 if ((al == al))
198- then w
198+ then $Tuple2(w, (ak > 0))
199199 else throw("Strict value is not equal to itself.")
200200 }
201201
234234 func registerUser (P,Q,R,ar,as,aj) = if (!(j))
235235 then throw(k)
236236 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
240242 if (!(O(w, P, Q, R, false)))
241243 then throw("Something went wrong")
242244 else {
243- let av = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(au))
245+ let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(av))
244246 if (if ((0 > as))
245247 then true
246248 else (as > 1000))
247249 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+ }
249256 }
250257 }
251258
255262 func updateUser (P,Q,R,ar,as,aj) = if (!(j))
256263 then throw(k)
257264 else {
258- let w = ah(am, aj)
265+ let ay = ah(am, aj)
266+ let w = ay._1
267+ let ak = ay._2
259268 let U = b(B(w))
260269 if (!(O(w, P, Q, R, true)))
261270 then throw("Something went wrong")
262271 else {
263272 let ac = e(D(w))
264- let av = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(ac))
273+ let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(ac))
265274 if (if ((0 > as))
266275 then true
267276 else (as > 1000))
268277 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+ }
270284 }
271285 }
272286
273287
274288
275289 @Callable(am)
276-func setERC20User (aw,aj) = if (!(j))
290+func setERC20User (az,aj) = if (!(j))
277291 then throw(k)
278292 else {
279- let w = ah(am, aj)
293+ let aA = ah(am, aj)
294+ let w = aA._1
295+ let ak = aA._2
280296 let U = b(B(w))
281297 if (if ((U != o))
282298 then (U != p)
283299 else false)
284300 then throw("Not allowed to set ERC20 address")
285301 else {
286- let ax = take(aw, 2)
287- if (if ((ax != "0x"))
302+ let aB = take(az, 2)
303+ if (if ((aB != "0x"))
288304 then true
289- else (size(aw) != 42))
305+ else (size(az) != 42))
290306 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+ }
292313 }
293314 }
294315
295316
296317
297318 @Callable(am)
298-func changeUserStatus (W,U,ay) = {
319+func changeUserStatus (W,U,aC) = {
299320 let w = toString(am.caller)
300321 let X = b(B(W))
301322 let Z = V(U, W, X)
302323 let P = toBase64String(toBytes(b(x(W))))
303324 let R = toBase64String(toBytes(b(A(W))))
304325 let ac = e(D(W))
305- let av = ab(P, R, toString(ac))
326+ let aw = ab(P, R, toString(ac))
306327 if (containsElement([f, toString(this)], w))
307- then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), av), StringEntry(("user_note_" + W), ay)]
328+ then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), aw), StringEntry(("user_note_" + W), aC)]
308329 else throw("Not allowed to change user status")
309330 }
310331
322343
323344
324345 @Callable(ai)
325-func setAgent (G,I,az,aA) = if (!(j))
346+func setAgent (G,I,aD,aE) = if (!(j))
326347 then throw(k)
327348 else {
328349 let w = toString(ai.caller)
331352 then true
332353 else (size(I) != 35))
333354 then throw("Wrong address")
334- else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), az), IntegerEntry(K(G), aA)]
355+ else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), aD), IntegerEntry(K(G), aE)]
335356 else throw("You are not allowed")
336357 }
337358
354375
355376
356377 @Callable(ai)
357-func deleteEntry (aB) = {
378+func deleteEntry (aF) = {
358379 let w = toString(ai.caller)
359380 if ((w == f))
360- then [DeleteEntry(aB)]
381+ then [DeleteEntry(aF)]
361382 else throw("no")
362383 }
363384
364385
365-@Verifier(aC)
366-func aD () = {
367- let af = aC
386+@Verifier(aG)
387+func aH () = {
388+ let af = aG
368389 if ($isInstanceOf(af, "InvokeScriptTransaction"))
369390 then {
370- let aE = af
371- if (if ((aE.function == "registerUser"))
372- then (aE.dApp == this)
391+ let aI = af
392+ if (if ((aI.function == "registerUser"))
393+ then (aI.dApp == this)
373394 else false)
374- then sigVerify(aC.bodyBytes, aC.proofs[0], fromBase58String(ad(aE.args[5])))
375- else if (if ((aE.function == "updateUser"))
376- then (aE.dApp == this)
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)
377398 else false)
378- then sigVerify(aC.bodyBytes, aC.proofs[0], fromBase58String(ad(aE.args[5])))
379- else if (if ((aE.function == "setERC20User"))
380- then (aE.dApp == this)
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)
381402 else false)
382- then sigVerify(aC.bodyBytes, aC.proofs[0], fromBase58String(ad(aE.args[2])))
383- else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey)
403+ then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[2])))
404+ else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey)
384405 }
385- else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey)
406+ else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey)
386407 }
387408
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "1.5"
55
66 func b (c) = valueOrElse(getString(this, c), "")
77
88
99 func d (c) = valueOrElse(getBoolean(this, c), false)
1010
1111
1212 func e (c) = valueOrElse(getInteger(this, c), 0)
1313
1414
1515 let f = b("conf_admin_1")
1616
1717 let g = "conf_dapp_is_running"
1818
1919 let h = "conf_maintenance_msg"
2020
2121 let i = "conf_whitelisted_only"
2222
2323 let j = valueOrElse(getBoolean(this, g), true)
2424
2525 let k = valueOrElse(getString(this, h), "")
2626
2727 let l = valueOrElse(getBoolean(this, i), true)
2828
2929 let m = value(addressFromString(b("conf_whitelist_dapp")))
3030
3131 let n = "ALLOWED"
3232
3333 let o = "REGISTERED"
3434
3535 let p = "VERIFIED"
3636
3737 let q = "SUSPENDED"
3838
3939 let r = "REMOVED"
4040
4141 let s = "CHANGE_REQUIRED"
4242
4343 let t = "UNREGISTERED"
4444
4545 let u = "RESET"
4646
4747 func v (w) = ("user_" + w)
4848
4949
5050 func x (w) = ("user_name_" + w)
5151
5252
5353 func y (w) = ("user_desc_" + w)
5454
5555
5656 func z (w) = ("user_social_" + w)
5757
5858
5959 func A (w) = ("user_thumb_" + w)
6060
6161
6262 func B (w) = ("user_status_" + w)
6363
6464
6565 func C (w) = ("user_royalties_" + w)
6666
6767
6868 func D (w) = ("user_date_" + w)
6969
7070
7171 func E (w) = ("user_ERC20_" + w)
7272
7373
7474 func F (G) = ("artist_agent_" + G)
7575
7676
7777 func H (I,G) = ((("agent_" + I) + "_") + G)
7878
7979
8080 func J (G) = ("artist_agent_primary_" + G)
8181
8282
8383 func K (G) = ("artist_agent_secondary_" + G)
8484
8585
8686 func L (c) = valueOrElse(getInteger(m, c), 0)
8787
8888
8989 func M (N) = if (contains(N, "/"))
9090 then if (if ((76 > size(N)))
9191 then (size(split(N, "/")[0]) == 59)
9292 else false)
9393 then (16 > size(split(N, "/")[1]))
9494 else false
9595 else false
9696
9797
9898 func O (w,P,Q,R,S) = {
9999 let T = if ((size(R) != 0))
100100 then M(R)
101101 else true
102102 if (!(T))
103103 then throw("CID don't match requirement!")
104104 else if (if ((P == ""))
105105 then true
106106 else (Q == ""))
107107 then throw("Name and description cannot be empty")
108108 else if ((size(Q) > 600))
109109 then throw("600 Char. max description")
110110 else if ((size(P) > 45))
111111 then throw("45 Char. max name")
112112 else {
113113 let U = b(B(w))
114114 if (if ((U == q))
115115 then true
116116 else (U == r))
117117 then throw("Account suspended/ removed.")
118118 else if (if (!(S))
119119 then (U == o)
120120 else false)
121121 then throw("Already registered")
122122 else if (if (if (!(S))
123123 then (U == "")
124124 else false)
125125 then l
126126 else false)
127127 then throw("Can't register, get approved first.")
128128 else if (if (if (S)
129129 then (U == "")
130130 else false)
131131 then true
132132 else if (S)
133133 then (U == n)
134134 else false)
135135 then throw("Register first")
136136 else true
137137 }
138138 }
139139
140140
141141 func V (U,W,X) = {
142142 let Y = [p, o, q, r, n, s]
143143 let Z = if (containsElement(Y, U))
144144 then U
145145 else if (if ((U == u))
146146 then (X == n)
147147 else false)
148148 then ""
149149 else throw("Unknown status")
150150 let aa = e(D(W))
151151 if (if ((aa == 0))
152152 then (Z != n)
153153 else false)
154154 then throw("You cant set this status, user is not registered.")
155155 else if (if ((X == n))
156156 then (Z == n)
157157 else false)
158158 then throw("User already allowed")
159159 else if (if ((X == o))
160160 then (Z == n)
161161 else false)
162162 then throw("User already allowed & registered")
163163 else if (if ((X == p))
164164 then (Z == n)
165165 else false)
166166 then throw("User already allowed & verified")
167167 else Z
168168 }
169169
170170
171171 func ab (P,R,ac) = (((((("{\"user_name\": \"" + P) + "\", \"user_thumb\":\"") + R) + "\",\"user_date\":\"") + ac) + "\"}")
172172
173173
174174 func ad (ae) = {
175175 let af = ae
176176 if ($isInstanceOf(af, "String"))
177177 then {
178178 let ag = af
179179 ag
180180 }
181181 else throw("Sponsored Public Key String expected")
182182 }
183183
184184
185185 func ah (ai,aj) = {
186186 let ak = valueOrElse(L((toString(addressFromPublicKey(fromBase58String(aj))) + "_free_txs")), 0)
187187 let w = if (if (if ((toBase58String(ai.caller.bytes) == toString(this)))
188188 then (size(ai.payments) == 0)
189189 else false)
190190 then (ak > 0)
191191 else false)
192192 then toString(addressFromPublicKey(fromBase58String(aj)))
193193 else toBase58String(ai.caller.bytes)
194194 let al = if ((aj != ""))
195195 then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(aj)))], nil)
196196 else unit
197197 if ((al == al))
198- then w
198+ then $Tuple2(w, (ak > 0))
199199 else throw("Strict value is not equal to itself.")
200200 }
201201
202202
203203 @Callable(am)
204204 func setConf (c,an) = {
205205 let w = toString(am.caller)
206206 if (containsElement([f, toString(this)], w))
207207 then [StringEntry(c, an)]
208208 else throw("You are not allowed to change this")
209209 }
210210
211211
212212
213213 @Callable(am)
214214 func appRunning (ao,ap) = {
215215 let w = toString(am.caller)
216216 if (containsElement([f, toString(this)], w))
217217 then [BooleanEntry(g, ao), StringEntry(h, ap)]
218218 else throw("You are not allowed to change this")
219219 }
220220
221221
222222
223223 @Callable(am)
224224 func registrationMode (aq) = {
225225 let w = toString(am.caller)
226226 if (containsElement([f, toString(this)], w))
227227 then [BooleanEntry(i, aq)]
228228 else throw("You are not allowed to change this")
229229 }
230230
231231
232232
233233 @Callable(am)
234234 func registerUser (P,Q,R,ar,as,aj) = if (!(j))
235235 then throw(k)
236236 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
240242 if (!(O(w, P, Q, R, false)))
241243 then throw("Something went wrong")
242244 else {
243- let av = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(au))
245+ let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(av))
244246 if (if ((0 > as))
245247 then true
246248 else (as > 1000))
247249 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+ }
249256 }
250257 }
251258
252259
253260
254261 @Callable(am)
255262 func updateUser (P,Q,R,ar,as,aj) = if (!(j))
256263 then throw(k)
257264 else {
258- let w = ah(am, aj)
265+ let ay = ah(am, aj)
266+ let w = ay._1
267+ let ak = ay._2
259268 let U = b(B(w))
260269 if (!(O(w, P, Q, R, true)))
261270 then throw("Something went wrong")
262271 else {
263272 let ac = e(D(w))
264- let av = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(ac))
273+ let aw = ab(toBase64String(toBytes(P)), toBase64String(toBytes(R)), toString(ac))
265274 if (if ((0 > as))
266275 then true
267276 else (as > 1000))
268277 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+ }
270284 }
271285 }
272286
273287
274288
275289 @Callable(am)
276-func setERC20User (aw,aj) = if (!(j))
290+func setERC20User (az,aj) = if (!(j))
277291 then throw(k)
278292 else {
279- let w = ah(am, aj)
293+ let aA = ah(am, aj)
294+ let w = aA._1
295+ let ak = aA._2
280296 let U = b(B(w))
281297 if (if ((U != o))
282298 then (U != p)
283299 else false)
284300 then throw("Not allowed to set ERC20 address")
285301 else {
286- let ax = take(aw, 2)
287- if (if ((ax != "0x"))
302+ let aB = take(az, 2)
303+ if (if ((aB != "0x"))
288304 then true
289- else (size(aw) != 42))
305+ else (size(az) != 42))
290306 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+ }
292313 }
293314 }
294315
295316
296317
297318 @Callable(am)
298-func changeUserStatus (W,U,ay) = {
319+func changeUserStatus (W,U,aC) = {
299320 let w = toString(am.caller)
300321 let X = b(B(W))
301322 let Z = V(U, W, X)
302323 let P = toBase64String(toBytes(b(x(W))))
303324 let R = toBase64String(toBytes(b(A(W))))
304325 let ac = e(D(W))
305- let av = ab(P, R, toString(ac))
326+ let aw = ab(P, R, toString(ac))
306327 if (containsElement([f, toString(this)], w))
307- then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), av), StringEntry(("user_note_" + W), ay)]
328+ then [StringEntry(B(W), Z), DeleteEntry(((X + "_") + W)), StringEntry(((Z + "_") + W), aw), StringEntry(("user_note_" + W), aC)]
308329 else throw("Not allowed to change user status")
309330 }
310331
311332
312333
313334 @Callable(am)
314335 func deleteUser (W) = {
315336 let w = toString(am.caller)
316337 let X = b(B(W))
317338 if (containsElement([f, toString(this)], w))
318339 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)]
319340 else throw("Not allowed")
320341 }
321342
322343
323344
324345 @Callable(ai)
325-func setAgent (G,I,az,aA) = if (!(j))
346+func setAgent (G,I,aD,aE) = if (!(j))
326347 then throw(k)
327348 else {
328349 let w = toString(ai.caller)
329350 if (containsElement([f, toString(this)], w))
330351 then if (if ((size(G) != 35))
331352 then true
332353 else (size(I) != 35))
333354 then throw("Wrong address")
334- else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), az), IntegerEntry(K(G), aA)]
355+ else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), aD), IntegerEntry(K(G), aE)]
335356 else throw("You are not allowed")
336357 }
337358
338359
339360
340361 @Callable(ai)
341362 func unsetAgent (G,I) = if (!(j))
342363 then throw(k)
343364 else {
344365 let w = toString(ai.caller)
345366 if (containsElement([f, toString(this)], w))
346367 then if (if ((size(G) != 35))
347368 then true
348369 else (size(I) != 35))
349370 then throw("Wrong address")
350371 else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))]
351372 else throw("You are not allowed")
352373 }
353374
354375
355376
356377 @Callable(ai)
357-func deleteEntry (aB) = {
378+func deleteEntry (aF) = {
358379 let w = toString(ai.caller)
359380 if ((w == f))
360- then [DeleteEntry(aB)]
381+ then [DeleteEntry(aF)]
361382 else throw("no")
362383 }
363384
364385
365-@Verifier(aC)
366-func aD () = {
367- let af = aC
386+@Verifier(aG)
387+func aH () = {
388+ let af = aG
368389 if ($isInstanceOf(af, "InvokeScriptTransaction"))
369390 then {
370- let aE = af
371- if (if ((aE.function == "registerUser"))
372- then (aE.dApp == this)
391+ let aI = af
392+ if (if ((aI.function == "registerUser"))
393+ then (aI.dApp == this)
373394 else false)
374- then sigVerify(aC.bodyBytes, aC.proofs[0], fromBase58String(ad(aE.args[5])))
375- else if (if ((aE.function == "updateUser"))
376- then (aE.dApp == this)
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)
377398 else false)
378- then sigVerify(aC.bodyBytes, aC.proofs[0], fromBase58String(ad(aE.args[5])))
379- else if (if ((aE.function == "setERC20User"))
380- then (aE.dApp == this)
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)
381402 else false)
382- then sigVerify(aC.bodyBytes, aC.proofs[0], fromBase58String(ad(aE.args[2])))
383- else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey)
403+ then sigVerify(aG.bodyBytes, aG.proofs[0], fromBase58String(ad(aI.args[2])))
404+ else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey)
384405 }
385- else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey)
406+ else sigVerify(aG.bodyBytes, aG.proofs[0], aG.senderPublicKey)
386407 }
387408

github/deemru/w8io/026f985 
68.11 ms