tx · HJuFQwm75ntfMjjBx4Fdx9BXxUQUDXZFZAXbwwnDbGpP

3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj:  -0.01000000 Waves

2023.01.19 10:45 [2411524] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves

{ "type": 13, "id": "HJuFQwm75ntfMjjBx4Fdx9BXxUQUDXZFZAXbwwnDbGpP", "fee": 1000000, "feeAssetId": null, "timestamp": 1674114352746, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "3bY8pWWa687fgwJWdFHVsf4vMWyciRUEBX1taQr9WB8DLoBpYuQnuqk6nbvLzAg9EJUHBSSLAfHvbM9d5pcWQGuM" ], "script": "base64:BgJMCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgUKAwgICBIDCgEIEgYKBAgIAQESBAoCCAgSAwoBCCcAB1ZFUlNJT04CAzEuNQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJsIAgUEdGhpcwUDa2V5BwEPZ2V0SW50ZWdlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnABJ3aGl0ZWxpc3RlZG9ubHlLZXkCFWNvbmZfd2hpdGVsaXN0ZWRfb25seQALZGFwcFJ1bm5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7E44s33V8Pvz4bnzcSKnSmKUzXRks6uweCd1U1Uh633T Next: 3YHRUcANtrH7KZzFBtboixMk47hpepQi2SA6ZYQwtEjP Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func a (b) = valueOrElse(getString(this, b), "")
4+let a = "1.5"
5+
6+func b (c) = valueOrElse(getString(this, c), "")
57
68
7-func c (b) = valueOrElse(getInteger(this, b), 0)
9+func d (c) = valueOrElse(getBoolean(this, c), false)
810
911
10-let d = a("conf_admin_1")
12+func e (c) = valueOrElse(getInteger(this, c), 0)
1113
12-let e = "conf_dapp_is_running"
1314
14-let f = "conf_maintenance_msg"
15+let f = b("conf_admin_1")
1516
16-let g = "conf_whitelisted_only"
17+let g = "conf_dapp_is_running"
1718
18-let h = valueOrElse(getBoolean(this, e), true)
19+let h = "conf_maintenance_msg"
1920
20-let i = valueOrElse(getString(this, f), "")
21+let i = "conf_whitelisted_only"
2122
2223 let j = valueOrElse(getBoolean(this, g), true)
2324
24-let k = "ALLOWED"
25+let k = valueOrElse(getString(this, h), "")
2526
26-let l = "REGISTERED"
27+let l = valueOrElse(getBoolean(this, i), true)
2728
28-let m = "VERIFIED"
29+let m = value(addressFromString(b("conf_whitelist_dapp")))
2930
30-let n = "SUSPENDED"
31+let n = "ALLOWED"
3132
32-let o = "REMOVED"
33+let o = "REGISTERED"
3334
34-let p = "CHANGE_REQUIRED"
35+let p = "VERIFIED"
3536
36-let q = "RESET"
37+let q = "SUSPENDED"
3738
38-func r (s) = ("user_" + s)
39+let r = "REMOVED"
40+
41+let s = "CHANGE_REQUIRED"
42+
43+let t = "UNREGISTERED"
44+
45+let u = "RESET"
46+
47+func v (w) = ("user_" + w)
3948
4049
41-func t (s) = ("user_name_" + s)
50+func x (w) = ("user_name_" + w)
4251
4352
44-func u (s) = ("user_desc_" + s)
53+func y (w) = ("user_desc_" + w)
4554
4655
47-func v (s) = ("user_social_" + s)
56+func z (w) = ("user_social_" + w)
4857
4958
50-func w (s) = ("user_thumb_" + s)
59+func A (w) = ("user_thumb_" + w)
5160
5261
53-func x (s) = ("user_status_" + s)
62+func B (w) = ("user_status_" + w)
5463
5564
56-func y (s) = ("user_royalties_" + s)
65+func C (w) = ("user_royalties_" + w)
5766
5867
59-func z (s) = ("user_date_" + s)
68+func D (w) = ("user_date_" + w)
6069
6170
62-func A (s) = ("user_ERC20_" + s)
71+func E (w) = ("user_ERC20_" + w)
6372
6473
65-func B (C) = ("artist_agent_" + C)
74+func F (G) = ("artist_agent_" + G)
6675
6776
68-func D (E,C) = ((("agent_" + E) + "_") + C)
77+func H (I,G) = ((("agent_" + I) + "_") + G)
6978
7079
71-func F (C) = ("artist_agent_primary_" + C)
80+func J (G) = ("artist_agent_primary_" + G)
7281
7382
74-func G (C) = ("artist_agent_secondary_" + C)
83+func K (G) = ("artist_agent_secondary_" + G)
7584
7685
77-func H (I) = if (contains(I, "/"))
78- then if (if ((76 > size(I)))
79- then (size(split(I, "/")[0]) == 59)
86+func L (M) = if (contains(M, "/"))
87+ then if (if ((76 > size(M)))
88+ then (size(split(M, "/")[0]) == 59)
8089 else false)
81- then (16 > size(split(I, "/")[1]))
90+ then (16 > size(split(M, "/")[1]))
8291 else false
8392 else false
8493
8594
86-func J (s,K,L,M,N) = {
87- let O = if ((size(M) != 0))
88- then H(M)
95+func N (w,O,P,Q,R) = {
96+ let S = if ((size(Q) != 0))
97+ then L(Q)
8998 else true
90- if (!(O))
99+ if (!(S))
91100 then throw("CID don't match requirement!")
92- else if (if ((K == ""))
101+ else if (if ((O == ""))
93102 then true
94- else (L == ""))
103+ else (P == ""))
95104 then throw("Name and description cannot be empty")
96- else if ((size(L) > 600))
105+ else if ((size(P) > 600))
97106 then throw("600 Char. max description")
98- else if ((size(K) > 45))
107+ else if ((size(O) > 45))
99108 then throw("45 Char. max name")
100109 else {
101- let P = a(x(s))
102- if (if ((P == n))
110+ let T = b(B(w))
111+ if (if ((T == q))
103112 then true
104- else (P == o))
113+ else (T == r))
105114 then throw("Account suspended/ removed.")
106- else if (if (!(N))
107- then (P == l)
115+ else if (if (!(R))
116+ then (T == o)
108117 else false)
109118 then throw("Already registered")
110- else if (if (if (!(N))
111- then (P == "")
119+ else if (if (if (!(R))
120+ then (T == "")
112121 else false)
113- then j
122+ then l
114123 else false)
115124 then throw("Can't register, get approved first.")
116- else if (if (if (N)
117- then (P == "")
125+ else if (if (if (R)
126+ then (T == "")
118127 else false)
119128 then true
120- else if (N)
121- then (P == k)
129+ else if (R)
130+ then (T == n)
122131 else false)
123132 then throw("Register first")
124133 else true
126135 }
127136
128137
129-func Q (P,R,S) = {
130- let T = [m, l, n, o, k, p]
131- let U = if (containsElement(T, P))
132- then P
133- else if (if ((P == q))
134- then (S == k)
138+func U (T,V,W) = {
139+ let X = [p, o, q, r, n, s]
140+ let Y = if (containsElement(X, T))
141+ then T
142+ else if (if ((T == u))
143+ then (W == n)
135144 else false)
136145 then ""
137146 else throw("Unknown status")
138- let V = c(z(R))
139- if (if ((V == 0))
140- then (U != k)
147+ let Z = e(D(V))
148+ if (if ((Z == 0))
149+ then (Y != n)
141150 else false)
142151 then throw("You cant set this status, user is not registered.")
143- else if (if ((S == k))
144- then (U == k)
152+ else if (if ((W == n))
153+ then (Y == n)
145154 else false)
146155 then throw("User already allowed")
147- else if (if ((S == l))
148- then (U == k)
156+ else if (if ((W == o))
157+ then (Y == n)
149158 else false)
150159 then throw("User already allowed & registered")
151- else if (if ((S == m))
152- then (U == k)
160+ else if (if ((W == p))
161+ then (Y == n)
153162 else false)
154163 then throw("User already allowed & verified")
155- else U
164+ else Y
156165 }
157166
158167
159-func W (K,M,X) = (((((("{\"user_name\": \"" + K) + "\", \"user_thumb\":\"") + M) + "\",\"user_date\":\"") + X) + "\"}")
168+func aa (O,Q,ab) = (((((("{\"user_name\": \"" + O) + "\", \"user_thumb\":\"") + Q) + "\",\"user_date\":\"") + ab) + "\"}")
160169
161170
162-@Callable(Y)
163-func setConf (b,Z) = {
164- let s = toString(Y.caller)
165- if (containsElement([d, toString(this)], s))
166- then [StringEntry(b, Z)]
171+func ac (ad) = {
172+ let ae = ad
173+ if ($isInstanceOf(ae, "String"))
174+ then {
175+ let af = ae
176+ af
177+ }
178+ else throw("Sponsored Public Key String expected")
179+ }
180+
181+
182+func ag (ah,ai) = {
183+ let w = if ((toBase58String(ah.caller.bytes) == toString(this)))
184+ then toString(addressFromPublicKey(fromBase58String(ai)))
185+ else toBase58String(ah.caller.bytes)
186+ let aj = if ((ai != ""))
187+ then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(ai)))], nil)
188+ else unit
189+ if ((aj == aj))
190+ then w
191+ else throw("Strict value is not equal to itself.")
192+ }
193+
194+
195+@Callable(ak)
196+func setConf (c,al) = {
197+ let w = toString(ak.caller)
198+ if (containsElement([f, toString(this)], w))
199+ then [StringEntry(c, al)]
167200 else throw("You are not allowed to change this")
168201 }
169202
170203
171204
172-@Callable(Y)
173-func appRunning (aa,ab) = {
174- let s = toString(Y.caller)
175- if (containsElement([d, toString(this)], s))
176- then [BooleanEntry(e, aa), StringEntry(f, ab)]
205+@Callable(ak)
206+func appRunning (am,an) = {
207+ let w = toString(ak.caller)
208+ if (containsElement([f, toString(this)], w))
209+ then [BooleanEntry(g, am), StringEntry(h, an)]
177210 else throw("You are not allowed to change this")
178211 }
179212
180213
181214
182-@Callable(Y)
183-func registrationMode (ac) = {
184- let s = toString(Y.caller)
185- if (containsElement([d, toString(this)], s))
186- then [BooleanEntry(g, ac)]
215+@Callable(ak)
216+func registrationMode (ao) = {
217+ let w = toString(ak.caller)
218+ if (containsElement([f, toString(this)], w))
219+ then [BooleanEntry(i, ao)]
187220 else throw("You are not allowed to change this")
188221 }
189222
190223
191224
192-@Callable(Y)
193-func registerUser (K,L,M,ad,ae) = if (!(h))
194- then throw(i)
225+@Callable(ak)
226+func registerUser (O,P,Q,ap,aq,ai) = if (!(j))
227+ then throw(k)
195228 else {
196- let s = toString(Y.caller)
197- let af = toBase58String(Y.transactionId)
198- let ag = lastBlock.timestamp
199- if (!(J(s, K, L, M, false)))
229+ let w = ag(ak, ai)
230+ let ar = toBase58String(ak.transactionId)
231+ let as = lastBlock.timestamp
232+ if (!(N(w, O, P, Q, false)))
200233 then throw("Something went wrong")
201234 else {
202- let ah = W(toBase64String(toBytes(K)), toBase64String(toBytes(M)), toString(ag))
203- if (if ((0 > ae))
235+ let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(as))
236+ if (if ((0 > aq))
204237 then true
205- else (ae > 1000))
238+ else (aq > 1000))
206239 then throw("Royalties cannot be less than 0% or higher than 10%")
207- else [IntegerEntry(z(s), ag), StringEntry(r(s), ((af + "_") + toString(ag))), StringEntry(t(s), K), StringEntry(u(s), L), StringEntry(v(s), ad), StringEntry(w(s), M), StringEntry(x(s), l), IntegerEntry(y(s), ae), DeleteEntry(("ALLOWED_" + s)), StringEntry(((l + "_") + s), ah)]
240+ else [IntegerEntry(D(w), as), StringEntry(v(w), ((ar + "_") + toString(as))), StringEntry(x(w), O), StringEntry(y(w), P), StringEntry(z(w), ap), StringEntry(A(w), Q), StringEntry(B(w), o), IntegerEntry(C(w), aq), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), at)]
208241 }
209242 }
210243
211244
212245
213-@Callable(Y)
214-func updateUser (K,L,M,ad,ae) = if (!(h))
215- then throw(i)
246+@Callable(ak)
247+func updateUser (O,P,Q,ap,aq,ai) = if (!(j))
248+ then throw(k)
216249 else {
217- let s = toString(Y.caller)
218- let P = a(x(s))
219- if (!(J(s, K, L, M, true)))
250+ let w = ag(ak, ai)
251+ let T = b(B(w))
252+ if (!(N(w, O, P, Q, true)))
220253 then throw("Something went wrong")
221254 else {
222- let X = c(z(s))
223- let ah = W(toBase64String(toBytes(K)), toBase64String(toBytes(M)), toString(X))
224- if (if ((0 > ae))
255+ let ab = e(D(w))
256+ let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(ab))
257+ if (if ((0 > aq))
225258 then true
226- else (ae > 1000))
259+ else (aq > 1000))
227260 then throw("Royalties cannot be less than 0% or higher than 10%")
228- else [StringEntry(t(s), K), StringEntry(u(s), L), StringEntry(v(s), ad), StringEntry(w(s), M), IntegerEntry(y(s), ae), StringEntry(((P + "_") + s), ah)]
261+ else [StringEntry(x(w), O), StringEntry(y(w), P), StringEntry(z(w), ap), StringEntry(A(w), Q), IntegerEntry(C(w), aq), StringEntry(((T + "_") + w), at)]
229262 }
230263 }
231264
232265
233266
234-@Callable(Y)
235-func setERC20User (ai) = if (!(h))
236- then throw(i)
267+@Callable(ak)
268+func setERC20User (au,ai) = if (!(j))
269+ then throw(k)
237270 else {
238- let s = toString(Y.caller)
239- let P = a(x(s))
240- if (if ((P != l))
241- then (P != m)
271+ let w = ag(ak, ai)
272+ let T = b(B(w))
273+ if (if ((T != o))
274+ then (T != p)
242275 else false)
243276 then throw("Not allowed to set ERC20 address")
244277 else {
245- let aj = take(ai, 2)
246- if (if ((aj != "0x"))
278+ let av = take(au, 2)
279+ if (if ((av != "0x"))
247280 then true
248- else (size(ai) != 42))
281+ else (size(au) != 42))
249282 then throw("This is not an erc20 address")
250- else [StringEntry(A(s), ai)]
283+ else [StringEntry(E(w), au)]
251284 }
252285 }
253286
254287
255288
256-@Callable(Y)
257-func changeUserStatus (R,P,ak) = {
258- let s = toString(Y.caller)
259- let S = a(x(R))
260- let U = Q(P, R, S)
261- let K = toBase64String(toBytes(a(t(R))))
262- let M = toBase64String(toBytes(a(w(R))))
263- let X = c(z(R))
264- let ah = W(K, M, toString(X))
265- if (containsElement([d, toString(this)], s))
266- then [StringEntry(x(R), U), DeleteEntry(((S + "_") + R)), StringEntry(((U + "_") + R), ah), StringEntry(("user_note_" + R), ak)]
289+@Callable(ak)
290+func changeUserStatus (V,T,aw) = {
291+ let w = toString(ak.caller)
292+ let W = b(B(V))
293+ let Y = U(T, V, W)
294+ let O = toBase64String(toBytes(b(x(V))))
295+ let Q = toBase64String(toBytes(b(A(V))))
296+ let ab = e(D(V))
297+ let at = aa(O, Q, toString(ab))
298+ if (containsElement([f, toString(this)], w))
299+ then [StringEntry(B(V), Y), DeleteEntry(((W + "_") + V)), StringEntry(((Y + "_") + V), at), StringEntry(("user_note_" + V), aw)]
267300 else throw("Not allowed to change user status")
268301 }
269302
270303
271304
272-@Callable(Y)
273-func deleteUser (R) = {
274- let s = toString(Y.caller)
275- let S = a(x(R))
276- if (containsElement([d, toString(this)], s))
277- then [DeleteEntry(z(R)), DeleteEntry(r(R)), DeleteEntry(t(R)), DeleteEntry(u(R)), DeleteEntry(v(R)), DeleteEntry(w(R)), DeleteEntry(("user_note_" + R)), DeleteEntry(((S + "_") + R)), DeleteEntry(y(R)), StringEntry(x(R), o)]
305+@Callable(ak)
306+func deleteUser (V) = {
307+ let w = toString(ak.caller)
308+ let W = b(B(V))
309+ if (containsElement([f, toString(this)], w))
310+ then [DeleteEntry(D(V)), DeleteEntry(v(V)), DeleteEntry(x(V)), DeleteEntry(y(V)), DeleteEntry(z(V)), DeleteEntry(A(V)), DeleteEntry(("user_note_" + V)), DeleteEntry(((W + "_") + V)), DeleteEntry(C(V)), StringEntry(B(V), r)]
278311 else throw("Not allowed")
279312 }
280313
281314
282315
283-@Callable(al)
284-func setAgent (C,E,am,an) = if (!(h))
285- then throw(i)
316+@Callable(ah)
317+func setAgent (G,I,ax,ay) = if (!(j))
318+ then throw(k)
286319 else {
287- let s = toString(al.caller)
288- if (containsElement([d, toString(this)], s))
289- then if (if ((size(C) != 35))
320+ let w = toString(ah.caller)
321+ if (containsElement([f, toString(this)], w))
322+ then if (if ((size(G) != 35))
290323 then true
291- else (size(E) != 35))
324+ else (size(I) != 35))
292325 then throw("Wrong address")
293- else [StringEntry(B(C), E), StringEntry(D(E, C), C), IntegerEntry(F(C), am), IntegerEntry(G(C), an)]
326+ else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), ax), IntegerEntry(K(G), ay)]
294327 else throw("You are not allowed")
295328 }
296329
297330
298331
299-@Callable(al)
300-func unsetAgent (C,E) = if (!(h))
301- then throw(i)
332+@Callable(ah)
333+func unsetAgent (G,I) = if (!(j))
334+ then throw(k)
302335 else {
303- let s = toString(al.caller)
304- if (containsElement([d, toString(this)], s))
305- then if (if ((size(C) != 35))
336+ let w = toString(ah.caller)
337+ if (containsElement([f, toString(this)], w))
338+ then if (if ((size(G) != 35))
306339 then true
307- else (size(E) != 35))
340+ else (size(I) != 35))
308341 then throw("Wrong address")
309- else [DeleteEntry(B(C)), DeleteEntry(D(E, C)), DeleteEntry(F(C)), DeleteEntry(G(C))]
342+ else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))]
310343 else throw("You are not allowed")
311344 }
312345
313346
314347
315-@Callable(al)
316-func deleteEntry (ao) = {
317- let s = toString(al.caller)
318- if ((s == d))
319- then [DeleteEntry(ao)]
348+@Callable(ah)
349+func deleteEntry (az) = {
350+ let w = toString(ah.caller)
351+ if ((w == f))
352+ then [DeleteEntry(az)]
320353 else throw("no")
321354 }
322355
356+
357+@Verifier(aA)
358+func aB () = {
359+ let ae = aA
360+ if ($isInstanceOf(ae, "InvokeScriptTransaction"))
361+ then {
362+ let aC = ae
363+ if (if ((aC.function == "registerUser"))
364+ then (aC.dApp == this)
365+ else false)
366+ then sigVerify(aA.bodyBytes, aA.proofs[0], fromBase58String(ac(aC.args[13])))
367+ else if (if ((aC.function == "updateUser"))
368+ then (aC.dApp == this)
369+ else false)
370+ then sigVerify(aA.bodyBytes, aA.proofs[0], fromBase58String(ac(aC.args[12])))
371+ else if (if ((aC.function == "setERC20User"))
372+ then (aC.dApp == this)
373+ else false)
374+ then sigVerify(aA.bodyBytes, aA.proofs[0], fromBase58String(ac(aC.args[5])))
375+ else sigVerify(aA.bodyBytes, aA.proofs[0], aA.senderPublicKey)
376+ }
377+ else sigVerify(aA.bodyBytes, aA.proofs[0], aA.senderPublicKey)
378+ }
323379
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func a (b) = valueOrElse(getString(this, b), "")
4+let a = "1.5"
5+
6+func b (c) = valueOrElse(getString(this, c), "")
57
68
7-func c (b) = valueOrElse(getInteger(this, b), 0)
9+func d (c) = valueOrElse(getBoolean(this, c), false)
810
911
10-let d = a("conf_admin_1")
12+func e (c) = valueOrElse(getInteger(this, c), 0)
1113
12-let e = "conf_dapp_is_running"
1314
14-let f = "conf_maintenance_msg"
15+let f = b("conf_admin_1")
1516
16-let g = "conf_whitelisted_only"
17+let g = "conf_dapp_is_running"
1718
18-let h = valueOrElse(getBoolean(this, e), true)
19+let h = "conf_maintenance_msg"
1920
20-let i = valueOrElse(getString(this, f), "")
21+let i = "conf_whitelisted_only"
2122
2223 let j = valueOrElse(getBoolean(this, g), true)
2324
24-let k = "ALLOWED"
25+let k = valueOrElse(getString(this, h), "")
2526
26-let l = "REGISTERED"
27+let l = valueOrElse(getBoolean(this, i), true)
2728
28-let m = "VERIFIED"
29+let m = value(addressFromString(b("conf_whitelist_dapp")))
2930
30-let n = "SUSPENDED"
31+let n = "ALLOWED"
3132
32-let o = "REMOVED"
33+let o = "REGISTERED"
3334
34-let p = "CHANGE_REQUIRED"
35+let p = "VERIFIED"
3536
36-let q = "RESET"
37+let q = "SUSPENDED"
3738
38-func r (s) = ("user_" + s)
39+let r = "REMOVED"
40+
41+let s = "CHANGE_REQUIRED"
42+
43+let t = "UNREGISTERED"
44+
45+let u = "RESET"
46+
47+func v (w) = ("user_" + w)
3948
4049
41-func t (s) = ("user_name_" + s)
50+func x (w) = ("user_name_" + w)
4251
4352
44-func u (s) = ("user_desc_" + s)
53+func y (w) = ("user_desc_" + w)
4554
4655
47-func v (s) = ("user_social_" + s)
56+func z (w) = ("user_social_" + w)
4857
4958
50-func w (s) = ("user_thumb_" + s)
59+func A (w) = ("user_thumb_" + w)
5160
5261
53-func x (s) = ("user_status_" + s)
62+func B (w) = ("user_status_" + w)
5463
5564
56-func y (s) = ("user_royalties_" + s)
65+func C (w) = ("user_royalties_" + w)
5766
5867
59-func z (s) = ("user_date_" + s)
68+func D (w) = ("user_date_" + w)
6069
6170
62-func A (s) = ("user_ERC20_" + s)
71+func E (w) = ("user_ERC20_" + w)
6372
6473
65-func B (C) = ("artist_agent_" + C)
74+func F (G) = ("artist_agent_" + G)
6675
6776
68-func D (E,C) = ((("agent_" + E) + "_") + C)
77+func H (I,G) = ((("agent_" + I) + "_") + G)
6978
7079
71-func F (C) = ("artist_agent_primary_" + C)
80+func J (G) = ("artist_agent_primary_" + G)
7281
7382
74-func G (C) = ("artist_agent_secondary_" + C)
83+func K (G) = ("artist_agent_secondary_" + G)
7584
7685
77-func H (I) = if (contains(I, "/"))
78- then if (if ((76 > size(I)))
79- then (size(split(I, "/")[0]) == 59)
86+func L (M) = if (contains(M, "/"))
87+ then if (if ((76 > size(M)))
88+ then (size(split(M, "/")[0]) == 59)
8089 else false)
81- then (16 > size(split(I, "/")[1]))
90+ then (16 > size(split(M, "/")[1]))
8291 else false
8392 else false
8493
8594
86-func J (s,K,L,M,N) = {
87- let O = if ((size(M) != 0))
88- then H(M)
95+func N (w,O,P,Q,R) = {
96+ let S = if ((size(Q) != 0))
97+ then L(Q)
8998 else true
90- if (!(O))
99+ if (!(S))
91100 then throw("CID don't match requirement!")
92- else if (if ((K == ""))
101+ else if (if ((O == ""))
93102 then true
94- else (L == ""))
103+ else (P == ""))
95104 then throw("Name and description cannot be empty")
96- else if ((size(L) > 600))
105+ else if ((size(P) > 600))
97106 then throw("600 Char. max description")
98- else if ((size(K) > 45))
107+ else if ((size(O) > 45))
99108 then throw("45 Char. max name")
100109 else {
101- let P = a(x(s))
102- if (if ((P == n))
110+ let T = b(B(w))
111+ if (if ((T == q))
103112 then true
104- else (P == o))
113+ else (T == r))
105114 then throw("Account suspended/ removed.")
106- else if (if (!(N))
107- then (P == l)
115+ else if (if (!(R))
116+ then (T == o)
108117 else false)
109118 then throw("Already registered")
110- else if (if (if (!(N))
111- then (P == "")
119+ else if (if (if (!(R))
120+ then (T == "")
112121 else false)
113- then j
122+ then l
114123 else false)
115124 then throw("Can't register, get approved first.")
116- else if (if (if (N)
117- then (P == "")
125+ else if (if (if (R)
126+ then (T == "")
118127 else false)
119128 then true
120- else if (N)
121- then (P == k)
129+ else if (R)
130+ then (T == n)
122131 else false)
123132 then throw("Register first")
124133 else true
125134 }
126135 }
127136
128137
129-func Q (P,R,S) = {
130- let T = [m, l, n, o, k, p]
131- let U = if (containsElement(T, P))
132- then P
133- else if (if ((P == q))
134- then (S == k)
138+func U (T,V,W) = {
139+ let X = [p, o, q, r, n, s]
140+ let Y = if (containsElement(X, T))
141+ then T
142+ else if (if ((T == u))
143+ then (W == n)
135144 else false)
136145 then ""
137146 else throw("Unknown status")
138- let V = c(z(R))
139- if (if ((V == 0))
140- then (U != k)
147+ let Z = e(D(V))
148+ if (if ((Z == 0))
149+ then (Y != n)
141150 else false)
142151 then throw("You cant set this status, user is not registered.")
143- else if (if ((S == k))
144- then (U == k)
152+ else if (if ((W == n))
153+ then (Y == n)
145154 else false)
146155 then throw("User already allowed")
147- else if (if ((S == l))
148- then (U == k)
156+ else if (if ((W == o))
157+ then (Y == n)
149158 else false)
150159 then throw("User already allowed & registered")
151- else if (if ((S == m))
152- then (U == k)
160+ else if (if ((W == p))
161+ then (Y == n)
153162 else false)
154163 then throw("User already allowed & verified")
155- else U
164+ else Y
156165 }
157166
158167
159-func W (K,M,X) = (((((("{\"user_name\": \"" + K) + "\", \"user_thumb\":\"") + M) + "\",\"user_date\":\"") + X) + "\"}")
168+func aa (O,Q,ab) = (((((("{\"user_name\": \"" + O) + "\", \"user_thumb\":\"") + Q) + "\",\"user_date\":\"") + ab) + "\"}")
160169
161170
162-@Callable(Y)
163-func setConf (b,Z) = {
164- let s = toString(Y.caller)
165- if (containsElement([d, toString(this)], s))
166- then [StringEntry(b, Z)]
171+func ac (ad) = {
172+ let ae = ad
173+ if ($isInstanceOf(ae, "String"))
174+ then {
175+ let af = ae
176+ af
177+ }
178+ else throw("Sponsored Public Key String expected")
179+ }
180+
181+
182+func ag (ah,ai) = {
183+ let w = if ((toBase58String(ah.caller.bytes) == toString(this)))
184+ then toString(addressFromPublicKey(fromBase58String(ai)))
185+ else toBase58String(ah.caller.bytes)
186+ let aj = if ((ai != ""))
187+ then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(ai)))], nil)
188+ else unit
189+ if ((aj == aj))
190+ then w
191+ else throw("Strict value is not equal to itself.")
192+ }
193+
194+
195+@Callable(ak)
196+func setConf (c,al) = {
197+ let w = toString(ak.caller)
198+ if (containsElement([f, toString(this)], w))
199+ then [StringEntry(c, al)]
167200 else throw("You are not allowed to change this")
168201 }
169202
170203
171204
172-@Callable(Y)
173-func appRunning (aa,ab) = {
174- let s = toString(Y.caller)
175- if (containsElement([d, toString(this)], s))
176- then [BooleanEntry(e, aa), StringEntry(f, ab)]
205+@Callable(ak)
206+func appRunning (am,an) = {
207+ let w = toString(ak.caller)
208+ if (containsElement([f, toString(this)], w))
209+ then [BooleanEntry(g, am), StringEntry(h, an)]
177210 else throw("You are not allowed to change this")
178211 }
179212
180213
181214
182-@Callable(Y)
183-func registrationMode (ac) = {
184- let s = toString(Y.caller)
185- if (containsElement([d, toString(this)], s))
186- then [BooleanEntry(g, ac)]
215+@Callable(ak)
216+func registrationMode (ao) = {
217+ let w = toString(ak.caller)
218+ if (containsElement([f, toString(this)], w))
219+ then [BooleanEntry(i, ao)]
187220 else throw("You are not allowed to change this")
188221 }
189222
190223
191224
192-@Callable(Y)
193-func registerUser (K,L,M,ad,ae) = if (!(h))
194- then throw(i)
225+@Callable(ak)
226+func registerUser (O,P,Q,ap,aq,ai) = if (!(j))
227+ then throw(k)
195228 else {
196- let s = toString(Y.caller)
197- let af = toBase58String(Y.transactionId)
198- let ag = lastBlock.timestamp
199- if (!(J(s, K, L, M, false)))
229+ let w = ag(ak, ai)
230+ let ar = toBase58String(ak.transactionId)
231+ let as = lastBlock.timestamp
232+ if (!(N(w, O, P, Q, false)))
200233 then throw("Something went wrong")
201234 else {
202- let ah = W(toBase64String(toBytes(K)), toBase64String(toBytes(M)), toString(ag))
203- if (if ((0 > ae))
235+ let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(as))
236+ if (if ((0 > aq))
204237 then true
205- else (ae > 1000))
238+ else (aq > 1000))
206239 then throw("Royalties cannot be less than 0% or higher than 10%")
207- else [IntegerEntry(z(s), ag), StringEntry(r(s), ((af + "_") + toString(ag))), StringEntry(t(s), K), StringEntry(u(s), L), StringEntry(v(s), ad), StringEntry(w(s), M), StringEntry(x(s), l), IntegerEntry(y(s), ae), DeleteEntry(("ALLOWED_" + s)), StringEntry(((l + "_") + s), ah)]
240+ else [IntegerEntry(D(w), as), StringEntry(v(w), ((ar + "_") + toString(as))), StringEntry(x(w), O), StringEntry(y(w), P), StringEntry(z(w), ap), StringEntry(A(w), Q), StringEntry(B(w), o), IntegerEntry(C(w), aq), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), at)]
208241 }
209242 }
210243
211244
212245
213-@Callable(Y)
214-func updateUser (K,L,M,ad,ae) = if (!(h))
215- then throw(i)
246+@Callable(ak)
247+func updateUser (O,P,Q,ap,aq,ai) = if (!(j))
248+ then throw(k)
216249 else {
217- let s = toString(Y.caller)
218- let P = a(x(s))
219- if (!(J(s, K, L, M, true)))
250+ let w = ag(ak, ai)
251+ let T = b(B(w))
252+ if (!(N(w, O, P, Q, true)))
220253 then throw("Something went wrong")
221254 else {
222- let X = c(z(s))
223- let ah = W(toBase64String(toBytes(K)), toBase64String(toBytes(M)), toString(X))
224- if (if ((0 > ae))
255+ let ab = e(D(w))
256+ let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(ab))
257+ if (if ((0 > aq))
225258 then true
226- else (ae > 1000))
259+ else (aq > 1000))
227260 then throw("Royalties cannot be less than 0% or higher than 10%")
228- else [StringEntry(t(s), K), StringEntry(u(s), L), StringEntry(v(s), ad), StringEntry(w(s), M), IntegerEntry(y(s), ae), StringEntry(((P + "_") + s), ah)]
261+ else [StringEntry(x(w), O), StringEntry(y(w), P), StringEntry(z(w), ap), StringEntry(A(w), Q), IntegerEntry(C(w), aq), StringEntry(((T + "_") + w), at)]
229262 }
230263 }
231264
232265
233266
234-@Callable(Y)
235-func setERC20User (ai) = if (!(h))
236- then throw(i)
267+@Callable(ak)
268+func setERC20User (au,ai) = if (!(j))
269+ then throw(k)
237270 else {
238- let s = toString(Y.caller)
239- let P = a(x(s))
240- if (if ((P != l))
241- then (P != m)
271+ let w = ag(ak, ai)
272+ let T = b(B(w))
273+ if (if ((T != o))
274+ then (T != p)
242275 else false)
243276 then throw("Not allowed to set ERC20 address")
244277 else {
245- let aj = take(ai, 2)
246- if (if ((aj != "0x"))
278+ let av = take(au, 2)
279+ if (if ((av != "0x"))
247280 then true
248- else (size(ai) != 42))
281+ else (size(au) != 42))
249282 then throw("This is not an erc20 address")
250- else [StringEntry(A(s), ai)]
283+ else [StringEntry(E(w), au)]
251284 }
252285 }
253286
254287
255288
256-@Callable(Y)
257-func changeUserStatus (R,P,ak) = {
258- let s = toString(Y.caller)
259- let S = a(x(R))
260- let U = Q(P, R, S)
261- let K = toBase64String(toBytes(a(t(R))))
262- let M = toBase64String(toBytes(a(w(R))))
263- let X = c(z(R))
264- let ah = W(K, M, toString(X))
265- if (containsElement([d, toString(this)], s))
266- then [StringEntry(x(R), U), DeleteEntry(((S + "_") + R)), StringEntry(((U + "_") + R), ah), StringEntry(("user_note_" + R), ak)]
289+@Callable(ak)
290+func changeUserStatus (V,T,aw) = {
291+ let w = toString(ak.caller)
292+ let W = b(B(V))
293+ let Y = U(T, V, W)
294+ let O = toBase64String(toBytes(b(x(V))))
295+ let Q = toBase64String(toBytes(b(A(V))))
296+ let ab = e(D(V))
297+ let at = aa(O, Q, toString(ab))
298+ if (containsElement([f, toString(this)], w))
299+ then [StringEntry(B(V), Y), DeleteEntry(((W + "_") + V)), StringEntry(((Y + "_") + V), at), StringEntry(("user_note_" + V), aw)]
267300 else throw("Not allowed to change user status")
268301 }
269302
270303
271304
272-@Callable(Y)
273-func deleteUser (R) = {
274- let s = toString(Y.caller)
275- let S = a(x(R))
276- if (containsElement([d, toString(this)], s))
277- then [DeleteEntry(z(R)), DeleteEntry(r(R)), DeleteEntry(t(R)), DeleteEntry(u(R)), DeleteEntry(v(R)), DeleteEntry(w(R)), DeleteEntry(("user_note_" + R)), DeleteEntry(((S + "_") + R)), DeleteEntry(y(R)), StringEntry(x(R), o)]
305+@Callable(ak)
306+func deleteUser (V) = {
307+ let w = toString(ak.caller)
308+ let W = b(B(V))
309+ if (containsElement([f, toString(this)], w))
310+ then [DeleteEntry(D(V)), DeleteEntry(v(V)), DeleteEntry(x(V)), DeleteEntry(y(V)), DeleteEntry(z(V)), DeleteEntry(A(V)), DeleteEntry(("user_note_" + V)), DeleteEntry(((W + "_") + V)), DeleteEntry(C(V)), StringEntry(B(V), r)]
278311 else throw("Not allowed")
279312 }
280313
281314
282315
283-@Callable(al)
284-func setAgent (C,E,am,an) = if (!(h))
285- then throw(i)
316+@Callable(ah)
317+func setAgent (G,I,ax,ay) = if (!(j))
318+ then throw(k)
286319 else {
287- let s = toString(al.caller)
288- if (containsElement([d, toString(this)], s))
289- then if (if ((size(C) != 35))
320+ let w = toString(ah.caller)
321+ if (containsElement([f, toString(this)], w))
322+ then if (if ((size(G) != 35))
290323 then true
291- else (size(E) != 35))
324+ else (size(I) != 35))
292325 then throw("Wrong address")
293- else [StringEntry(B(C), E), StringEntry(D(E, C), C), IntegerEntry(F(C), am), IntegerEntry(G(C), an)]
326+ else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), ax), IntegerEntry(K(G), ay)]
294327 else throw("You are not allowed")
295328 }
296329
297330
298331
299-@Callable(al)
300-func unsetAgent (C,E) = if (!(h))
301- then throw(i)
332+@Callable(ah)
333+func unsetAgent (G,I) = if (!(j))
334+ then throw(k)
302335 else {
303- let s = toString(al.caller)
304- if (containsElement([d, toString(this)], s))
305- then if (if ((size(C) != 35))
336+ let w = toString(ah.caller)
337+ if (containsElement([f, toString(this)], w))
338+ then if (if ((size(G) != 35))
306339 then true
307- else (size(E) != 35))
340+ else (size(I) != 35))
308341 then throw("Wrong address")
309- else [DeleteEntry(B(C)), DeleteEntry(D(E, C)), DeleteEntry(F(C)), DeleteEntry(G(C))]
342+ else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))]
310343 else throw("You are not allowed")
311344 }
312345
313346
314347
315-@Callable(al)
316-func deleteEntry (ao) = {
317- let s = toString(al.caller)
318- if ((s == d))
319- then [DeleteEntry(ao)]
348+@Callable(ah)
349+func deleteEntry (az) = {
350+ let w = toString(ah.caller)
351+ if ((w == f))
352+ then [DeleteEntry(az)]
320353 else throw("no")
321354 }
322355
356+
357+@Verifier(aA)
358+func aB () = {
359+ let ae = aA
360+ if ($isInstanceOf(ae, "InvokeScriptTransaction"))
361+ then {
362+ let aC = ae
363+ if (if ((aC.function == "registerUser"))
364+ then (aC.dApp == this)
365+ else false)
366+ then sigVerify(aA.bodyBytes, aA.proofs[0], fromBase58String(ac(aC.args[13])))
367+ else if (if ((aC.function == "updateUser"))
368+ then (aC.dApp == this)
369+ else false)
370+ then sigVerify(aA.bodyBytes, aA.proofs[0], fromBase58String(ac(aC.args[12])))
371+ else if (if ((aC.function == "setERC20User"))
372+ then (aC.dApp == this)
373+ else false)
374+ then sigVerify(aA.bodyBytes, aA.proofs[0], fromBase58String(ac(aC.args[5])))
375+ else sigVerify(aA.bodyBytes, aA.proofs[0], aA.senderPublicKey)
376+ }
377+ else sigVerify(aA.bodyBytes, aA.proofs[0], aA.senderPublicKey)
378+ }
323379

github/deemru/w8io/026f985 
143.24 ms