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