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:BgJMCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgUKAwgICBIDCgEIEgYKBAgIAQESBAoCCAgSAwoBCCcAB1ZFUlNJT04CAzEuNQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJsIAgUEdGhpcwUDa2V5BwEPZ2V0SW50ZWdlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnABJ3aGl0ZWxpc3RlZG9ubHlLZXkCFWNvbmZfd2hpdGVsaXN0ZWRfb25seQALZGFwcFJ1bm5p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E44s33V8Pvz4bnzcSKnSmKUzXRks6uweCd1U1Uh633T Next: 3YHRUcANtrH7KZzFBtboixMk47hpepQi2SA6ZYQwtEjP Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# 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), "") | |
5 | 7 | ||
6 | 8 | ||
7 | - | func | |
9 | + | func d (c) = valueOrElse(getBoolean(this, c), false) | |
8 | 10 | ||
9 | 11 | ||
10 | - | ||
12 | + | func e (c) = valueOrElse(getInteger(this, c), 0) | |
11 | 13 | ||
12 | - | let e = "conf_dapp_is_running" | |
13 | 14 | ||
14 | - | let f = "conf_ | |
15 | + | let f = b("conf_admin_1") | |
15 | 16 | ||
16 | - | let g = "conf_ | |
17 | + | let g = "conf_dapp_is_running" | |
17 | 18 | ||
18 | - | let h = | |
19 | + | let h = "conf_maintenance_msg" | |
19 | 20 | ||
20 | - | let i = | |
21 | + | let i = "conf_whitelisted_only" | |
21 | 22 | ||
22 | 23 | let j = valueOrElse(getBoolean(this, g), true) | |
23 | 24 | ||
24 | - | let k = " | |
25 | + | let k = valueOrElse(getString(this, h), "") | |
25 | 26 | ||
26 | - | let l = | |
27 | + | let l = valueOrElse(getBoolean(this, i), true) | |
27 | 28 | ||
28 | - | let m = " | |
29 | + | let m = value(addressFromString(b("conf_whitelist_dapp"))) | |
29 | 30 | ||
30 | - | let n = " | |
31 | + | let n = "ALLOWED" | |
31 | 32 | ||
32 | - | let o = " | |
33 | + | let o = "REGISTERED" | |
33 | 34 | ||
34 | - | let p = " | |
35 | + | let p = "VERIFIED" | |
35 | 36 | ||
36 | - | let q = " | |
37 | + | let q = "SUSPENDED" | |
37 | 38 | ||
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) | |
39 | 48 | ||
40 | 49 | ||
41 | - | func | |
50 | + | func x (w) = ("user_name_" + w) | |
42 | 51 | ||
43 | 52 | ||
44 | - | func | |
53 | + | func y (w) = ("user_desc_" + w) | |
45 | 54 | ||
46 | 55 | ||
47 | - | func | |
56 | + | func z (w) = ("user_social_" + w) | |
48 | 57 | ||
49 | 58 | ||
50 | - | func | |
59 | + | func A (w) = ("user_thumb_" + w) | |
51 | 60 | ||
52 | 61 | ||
53 | - | func | |
62 | + | func B (w) = ("user_status_" + w) | |
54 | 63 | ||
55 | 64 | ||
56 | - | func | |
65 | + | func C (w) = ("user_royalties_" + w) | |
57 | 66 | ||
58 | 67 | ||
59 | - | func | |
68 | + | func D (w) = ("user_date_" + w) | |
60 | 69 | ||
61 | 70 | ||
62 | - | func | |
71 | + | func E (w) = ("user_ERC20_" + w) | |
63 | 72 | ||
64 | 73 | ||
65 | - | func | |
74 | + | func F (G) = ("artist_agent_" + G) | |
66 | 75 | ||
67 | 76 | ||
68 | - | func | |
77 | + | func H (I,G) = ((("agent_" + I) + "_") + G) | |
69 | 78 | ||
70 | 79 | ||
71 | - | func | |
80 | + | func J (G) = ("artist_agent_primary_" + G) | |
72 | 81 | ||
73 | 82 | ||
74 | - | func | |
83 | + | func K (G) = ("artist_agent_secondary_" + G) | |
75 | 84 | ||
76 | 85 | ||
77 | - | func | |
78 | - | then if (if ((76 > size( | |
79 | - | then (size(split( | |
86 | + | func L (M) = if (contains(M, "/")) | |
87 | + | then if (if ((76 > size(M))) | |
88 | + | then (size(split(M, "/")[0]) == 59) | |
80 | 89 | else false) | |
81 | - | then (16 > size(split( | |
90 | + | then (16 > size(split(M, "/")[1])) | |
82 | 91 | else false | |
83 | 92 | else false | |
84 | 93 | ||
85 | 94 | ||
86 | - | func | |
87 | - | let | |
88 | - | then | |
95 | + | func N (w,O,P,Q,R) = { | |
96 | + | let S = if ((size(Q) != 0)) | |
97 | + | then L(Q) | |
89 | 98 | else true | |
90 | - | if (!( | |
99 | + | if (!(S)) | |
91 | 100 | then throw("CID don't match requirement!") | |
92 | - | else if (if (( | |
101 | + | else if (if ((O == "")) | |
93 | 102 | then true | |
94 | - | else ( | |
103 | + | else (P == "")) | |
95 | 104 | then throw("Name and description cannot be empty") | |
96 | - | else if ((size( | |
105 | + | else if ((size(P) > 600)) | |
97 | 106 | then throw("600 Char. max description") | |
98 | - | else if ((size( | |
107 | + | else if ((size(O) > 45)) | |
99 | 108 | then throw("45 Char. max name") | |
100 | 109 | else { | |
101 | - | let | |
102 | - | if (if (( | |
110 | + | let T = b(B(w)) | |
111 | + | if (if ((T == q)) | |
103 | 112 | then true | |
104 | - | else ( | |
113 | + | else (T == r)) | |
105 | 114 | then throw("Account suspended/ removed.") | |
106 | - | else if (if (!( | |
107 | - | then ( | |
115 | + | else if (if (!(R)) | |
116 | + | then (T == o) | |
108 | 117 | else false) | |
109 | 118 | then throw("Already registered") | |
110 | - | else if (if (if (!( | |
111 | - | then ( | |
119 | + | else if (if (if (!(R)) | |
120 | + | then (T == "") | |
112 | 121 | else false) | |
113 | - | then | |
122 | + | then l | |
114 | 123 | else false) | |
115 | 124 | then throw("Can't register, get approved first.") | |
116 | - | else if (if (if ( | |
117 | - | then ( | |
125 | + | else if (if (if (R) | |
126 | + | then (T == "") | |
118 | 127 | else false) | |
119 | 128 | then true | |
120 | - | else if ( | |
121 | - | then ( | |
129 | + | else if (R) | |
130 | + | then (T == n) | |
122 | 131 | else false) | |
123 | 132 | then throw("Register first") | |
124 | 133 | else true | |
126 | 135 | } | |
127 | 136 | ||
128 | 137 | ||
129 | - | func | |
130 | - | let | |
131 | - | let | |
132 | - | then | |
133 | - | else if (if (( | |
134 | - | then ( | |
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) | |
135 | 144 | else false) | |
136 | 145 | then "" | |
137 | 146 | else throw("Unknown status") | |
138 | - | let | |
139 | - | if (if (( | |
140 | - | then ( | |
147 | + | let Z = e(D(V)) | |
148 | + | if (if ((Z == 0)) | |
149 | + | then (Y != n) | |
141 | 150 | else false) | |
142 | 151 | then throw("You cant set this status, user is not registered.") | |
143 | - | else if (if (( | |
144 | - | then ( | |
152 | + | else if (if ((W == n)) | |
153 | + | then (Y == n) | |
145 | 154 | else false) | |
146 | 155 | then throw("User already allowed") | |
147 | - | else if (if (( | |
148 | - | then ( | |
156 | + | else if (if ((W == o)) | |
157 | + | then (Y == n) | |
149 | 158 | else false) | |
150 | 159 | then throw("User already allowed & registered") | |
151 | - | else if (if (( | |
152 | - | then ( | |
160 | + | else if (if ((W == p)) | |
161 | + | then (Y == n) | |
153 | 162 | else false) | |
154 | 163 | then throw("User already allowed & verified") | |
155 | - | else | |
164 | + | else Y | |
156 | 165 | } | |
157 | 166 | ||
158 | 167 | ||
159 | - | func | |
168 | + | func aa (O,Q,ab) = (((((("{\"user_name\": \"" + O) + "\", \"user_thumb\":\"") + Q) + "\",\"user_date\":\"") + ab) + "\"}") | |
160 | 169 | ||
161 | 170 | ||
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)] | |
167 | 200 | else throw("You are not allowed to change this") | |
168 | 201 | } | |
169 | 202 | ||
170 | 203 | ||
171 | 204 | ||
172 | - | @Callable( | |
173 | - | func appRunning ( | |
174 | - | let | |
175 | - | if (containsElement([ | |
176 | - | then [BooleanEntry( | |
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)] | |
177 | 210 | else throw("You are not allowed to change this") | |
178 | 211 | } | |
179 | 212 | ||
180 | 213 | ||
181 | 214 | ||
182 | - | @Callable( | |
183 | - | func registrationMode ( | |
184 | - | let | |
185 | - | if (containsElement([ | |
186 | - | then [BooleanEntry( | |
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)] | |
187 | 220 | else throw("You are not allowed to change this") | |
188 | 221 | } | |
189 | 222 | ||
190 | 223 | ||
191 | 224 | ||
192 | - | @Callable( | |
193 | - | func registerUser ( | |
194 | - | then throw( | |
225 | + | @Callable(ak) | |
226 | + | func registerUser (O,P,Q,ap,aq,ai) = if (!(j)) | |
227 | + | then throw(k) | |
195 | 228 | else { | |
196 | - | let | |
197 | - | let | |
198 | - | let | |
199 | - | if (!( | |
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))) | |
200 | 233 | then throw("Something went wrong") | |
201 | 234 | else { | |
202 | - | let | |
203 | - | if (if ((0 > | |
235 | + | let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(as)) | |
236 | + | if (if ((0 > aq)) | |
204 | 237 | then true | |
205 | - | else ( | |
238 | + | else (aq > 1000)) | |
206 | 239 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
207 | - | else [IntegerEntry( | |
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)] | |
208 | 241 | } | |
209 | 242 | } | |
210 | 243 | ||
211 | 244 | ||
212 | 245 | ||
213 | - | @Callable( | |
214 | - | func updateUser ( | |
215 | - | then throw( | |
246 | + | @Callable(ak) | |
247 | + | func updateUser (O,P,Q,ap,aq,ai) = if (!(j)) | |
248 | + | then throw(k) | |
216 | 249 | else { | |
217 | - | let | |
218 | - | let | |
219 | - | if (!( | |
250 | + | let w = ag(ak, ai) | |
251 | + | let T = b(B(w)) | |
252 | + | if (!(N(w, O, P, Q, true))) | |
220 | 253 | then throw("Something went wrong") | |
221 | 254 | else { | |
222 | - | let | |
223 | - | let | |
224 | - | if (if ((0 > | |
255 | + | let ab = e(D(w)) | |
256 | + | let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(ab)) | |
257 | + | if (if ((0 > aq)) | |
225 | 258 | then true | |
226 | - | else ( | |
259 | + | else (aq > 1000)) | |
227 | 260 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
228 | - | else [StringEntry( | |
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)] | |
229 | 262 | } | |
230 | 263 | } | |
231 | 264 | ||
232 | 265 | ||
233 | 266 | ||
234 | - | @Callable( | |
235 | - | func setERC20User (ai) = if (!( | |
236 | - | then throw( | |
267 | + | @Callable(ak) | |
268 | + | func setERC20User (au,ai) = if (!(j)) | |
269 | + | then throw(k) | |
237 | 270 | else { | |
238 | - | let | |
239 | - | let | |
240 | - | if (if (( | |
241 | - | then ( | |
271 | + | let w = ag(ak, ai) | |
272 | + | let T = b(B(w)) | |
273 | + | if (if ((T != o)) | |
274 | + | then (T != p) | |
242 | 275 | else false) | |
243 | 276 | then throw("Not allowed to set ERC20 address") | |
244 | 277 | else { | |
245 | - | let | |
246 | - | if (if (( | |
278 | + | let av = take(au, 2) | |
279 | + | if (if ((av != "0x")) | |
247 | 280 | then true | |
248 | - | else (size( | |
281 | + | else (size(au) != 42)) | |
249 | 282 | then throw("This is not an erc20 address") | |
250 | - | else [StringEntry( | |
283 | + | else [StringEntry(E(w), au)] | |
251 | 284 | } | |
252 | 285 | } | |
253 | 286 | ||
254 | 287 | ||
255 | 288 | ||
256 | - | @Callable( | |
257 | - | func changeUserStatus ( | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | if (containsElement([ | |
266 | - | then [StringEntry( | |
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)] | |
267 | 300 | else throw("Not allowed to change user status") | |
268 | 301 | } | |
269 | 302 | ||
270 | 303 | ||
271 | 304 | ||
272 | - | @Callable( | |
273 | - | func deleteUser ( | |
274 | - | let | |
275 | - | let | |
276 | - | if (containsElement([ | |
277 | - | then [DeleteEntry( | |
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)] | |
278 | 311 | else throw("Not allowed") | |
279 | 312 | } | |
280 | 313 | ||
281 | 314 | ||
282 | 315 | ||
283 | - | @Callable( | |
284 | - | func setAgent ( | |
285 | - | then throw( | |
316 | + | @Callable(ah) | |
317 | + | func setAgent (G,I,ax,ay) = if (!(j)) | |
318 | + | then throw(k) | |
286 | 319 | else { | |
287 | - | let | |
288 | - | if (containsElement([ | |
289 | - | then if (if ((size( | |
320 | + | let w = toString(ah.caller) | |
321 | + | if (containsElement([f, toString(this)], w)) | |
322 | + | then if (if ((size(G) != 35)) | |
290 | 323 | then true | |
291 | - | else (size( | |
324 | + | else (size(I) != 35)) | |
292 | 325 | then throw("Wrong address") | |
293 | - | else [StringEntry( | |
326 | + | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), ax), IntegerEntry(K(G), ay)] | |
294 | 327 | else throw("You are not allowed") | |
295 | 328 | } | |
296 | 329 | ||
297 | 330 | ||
298 | 331 | ||
299 | - | @Callable( | |
300 | - | func unsetAgent ( | |
301 | - | then throw( | |
332 | + | @Callable(ah) | |
333 | + | func unsetAgent (G,I) = if (!(j)) | |
334 | + | then throw(k) | |
302 | 335 | else { | |
303 | - | let | |
304 | - | if (containsElement([ | |
305 | - | then if (if ((size( | |
336 | + | let w = toString(ah.caller) | |
337 | + | if (containsElement([f, toString(this)], w)) | |
338 | + | then if (if ((size(G) != 35)) | |
306 | 339 | then true | |
307 | - | else (size( | |
340 | + | else (size(I) != 35)) | |
308 | 341 | then throw("Wrong address") | |
309 | - | else [DeleteEntry( | |
342 | + | else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))] | |
310 | 343 | else throw("You are not allowed") | |
311 | 344 | } | |
312 | 345 | ||
313 | 346 | ||
314 | 347 | ||
315 | - | @Callable( | |
316 | - | func deleteEntry ( | |
317 | - | let | |
318 | - | if (( | |
319 | - | then [DeleteEntry( | |
348 | + | @Callable(ah) | |
349 | + | func deleteEntry (az) = { | |
350 | + | let w = toString(ah.caller) | |
351 | + | if ((w == f)) | |
352 | + | then [DeleteEntry(az)] | |
320 | 353 | else throw("no") | |
321 | 354 | } | |
322 | 355 | ||
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 | + | } | |
323 | 379 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# 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), "") | |
5 | 7 | ||
6 | 8 | ||
7 | - | func | |
9 | + | func d (c) = valueOrElse(getBoolean(this, c), false) | |
8 | 10 | ||
9 | 11 | ||
10 | - | ||
12 | + | func e (c) = valueOrElse(getInteger(this, c), 0) | |
11 | 13 | ||
12 | - | let e = "conf_dapp_is_running" | |
13 | 14 | ||
14 | - | let f = "conf_ | |
15 | + | let f = b("conf_admin_1") | |
15 | 16 | ||
16 | - | let g = "conf_ | |
17 | + | let g = "conf_dapp_is_running" | |
17 | 18 | ||
18 | - | let h = | |
19 | + | let h = "conf_maintenance_msg" | |
19 | 20 | ||
20 | - | let i = | |
21 | + | let i = "conf_whitelisted_only" | |
21 | 22 | ||
22 | 23 | let j = valueOrElse(getBoolean(this, g), true) | |
23 | 24 | ||
24 | - | let k = " | |
25 | + | let k = valueOrElse(getString(this, h), "") | |
25 | 26 | ||
26 | - | let l = | |
27 | + | let l = valueOrElse(getBoolean(this, i), true) | |
27 | 28 | ||
28 | - | let m = " | |
29 | + | let m = value(addressFromString(b("conf_whitelist_dapp"))) | |
29 | 30 | ||
30 | - | let n = " | |
31 | + | let n = "ALLOWED" | |
31 | 32 | ||
32 | - | let o = " | |
33 | + | let o = "REGISTERED" | |
33 | 34 | ||
34 | - | let p = " | |
35 | + | let p = "VERIFIED" | |
35 | 36 | ||
36 | - | let q = " | |
37 | + | let q = "SUSPENDED" | |
37 | 38 | ||
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) | |
39 | 48 | ||
40 | 49 | ||
41 | - | func | |
50 | + | func x (w) = ("user_name_" + w) | |
42 | 51 | ||
43 | 52 | ||
44 | - | func | |
53 | + | func y (w) = ("user_desc_" + w) | |
45 | 54 | ||
46 | 55 | ||
47 | - | func | |
56 | + | func z (w) = ("user_social_" + w) | |
48 | 57 | ||
49 | 58 | ||
50 | - | func | |
59 | + | func A (w) = ("user_thumb_" + w) | |
51 | 60 | ||
52 | 61 | ||
53 | - | func | |
62 | + | func B (w) = ("user_status_" + w) | |
54 | 63 | ||
55 | 64 | ||
56 | - | func | |
65 | + | func C (w) = ("user_royalties_" + w) | |
57 | 66 | ||
58 | 67 | ||
59 | - | func | |
68 | + | func D (w) = ("user_date_" + w) | |
60 | 69 | ||
61 | 70 | ||
62 | - | func | |
71 | + | func E (w) = ("user_ERC20_" + w) | |
63 | 72 | ||
64 | 73 | ||
65 | - | func | |
74 | + | func F (G) = ("artist_agent_" + G) | |
66 | 75 | ||
67 | 76 | ||
68 | - | func | |
77 | + | func H (I,G) = ((("agent_" + I) + "_") + G) | |
69 | 78 | ||
70 | 79 | ||
71 | - | func | |
80 | + | func J (G) = ("artist_agent_primary_" + G) | |
72 | 81 | ||
73 | 82 | ||
74 | - | func | |
83 | + | func K (G) = ("artist_agent_secondary_" + G) | |
75 | 84 | ||
76 | 85 | ||
77 | - | func | |
78 | - | then if (if ((76 > size( | |
79 | - | then (size(split( | |
86 | + | func L (M) = if (contains(M, "/")) | |
87 | + | then if (if ((76 > size(M))) | |
88 | + | then (size(split(M, "/")[0]) == 59) | |
80 | 89 | else false) | |
81 | - | then (16 > size(split( | |
90 | + | then (16 > size(split(M, "/")[1])) | |
82 | 91 | else false | |
83 | 92 | else false | |
84 | 93 | ||
85 | 94 | ||
86 | - | func | |
87 | - | let | |
88 | - | then | |
95 | + | func N (w,O,P,Q,R) = { | |
96 | + | let S = if ((size(Q) != 0)) | |
97 | + | then L(Q) | |
89 | 98 | else true | |
90 | - | if (!( | |
99 | + | if (!(S)) | |
91 | 100 | then throw("CID don't match requirement!") | |
92 | - | else if (if (( | |
101 | + | else if (if ((O == "")) | |
93 | 102 | then true | |
94 | - | else ( | |
103 | + | else (P == "")) | |
95 | 104 | then throw("Name and description cannot be empty") | |
96 | - | else if ((size( | |
105 | + | else if ((size(P) > 600)) | |
97 | 106 | then throw("600 Char. max description") | |
98 | - | else if ((size( | |
107 | + | else if ((size(O) > 45)) | |
99 | 108 | then throw("45 Char. max name") | |
100 | 109 | else { | |
101 | - | let | |
102 | - | if (if (( | |
110 | + | let T = b(B(w)) | |
111 | + | if (if ((T == q)) | |
103 | 112 | then true | |
104 | - | else ( | |
113 | + | else (T == r)) | |
105 | 114 | then throw("Account suspended/ removed.") | |
106 | - | else if (if (!( | |
107 | - | then ( | |
115 | + | else if (if (!(R)) | |
116 | + | then (T == o) | |
108 | 117 | else false) | |
109 | 118 | then throw("Already registered") | |
110 | - | else if (if (if (!( | |
111 | - | then ( | |
119 | + | else if (if (if (!(R)) | |
120 | + | then (T == "") | |
112 | 121 | else false) | |
113 | - | then | |
122 | + | then l | |
114 | 123 | else false) | |
115 | 124 | then throw("Can't register, get approved first.") | |
116 | - | else if (if (if ( | |
117 | - | then ( | |
125 | + | else if (if (if (R) | |
126 | + | then (T == "") | |
118 | 127 | else false) | |
119 | 128 | then true | |
120 | - | else if ( | |
121 | - | then ( | |
129 | + | else if (R) | |
130 | + | then (T == n) | |
122 | 131 | else false) | |
123 | 132 | then throw("Register first") | |
124 | 133 | else true | |
125 | 134 | } | |
126 | 135 | } | |
127 | 136 | ||
128 | 137 | ||
129 | - | func | |
130 | - | let | |
131 | - | let | |
132 | - | then | |
133 | - | else if (if (( | |
134 | - | then ( | |
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) | |
135 | 144 | else false) | |
136 | 145 | then "" | |
137 | 146 | else throw("Unknown status") | |
138 | - | let | |
139 | - | if (if (( | |
140 | - | then ( | |
147 | + | let Z = e(D(V)) | |
148 | + | if (if ((Z == 0)) | |
149 | + | then (Y != n) | |
141 | 150 | else false) | |
142 | 151 | then throw("You cant set this status, user is not registered.") | |
143 | - | else if (if (( | |
144 | - | then ( | |
152 | + | else if (if ((W == n)) | |
153 | + | then (Y == n) | |
145 | 154 | else false) | |
146 | 155 | then throw("User already allowed") | |
147 | - | else if (if (( | |
148 | - | then ( | |
156 | + | else if (if ((W == o)) | |
157 | + | then (Y == n) | |
149 | 158 | else false) | |
150 | 159 | then throw("User already allowed & registered") | |
151 | - | else if (if (( | |
152 | - | then ( | |
160 | + | else if (if ((W == p)) | |
161 | + | then (Y == n) | |
153 | 162 | else false) | |
154 | 163 | then throw("User already allowed & verified") | |
155 | - | else | |
164 | + | else Y | |
156 | 165 | } | |
157 | 166 | ||
158 | 167 | ||
159 | - | func | |
168 | + | func aa (O,Q,ab) = (((((("{\"user_name\": \"" + O) + "\", \"user_thumb\":\"") + Q) + "\",\"user_date\":\"") + ab) + "\"}") | |
160 | 169 | ||
161 | 170 | ||
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)] | |
167 | 200 | else throw("You are not allowed to change this") | |
168 | 201 | } | |
169 | 202 | ||
170 | 203 | ||
171 | 204 | ||
172 | - | @Callable( | |
173 | - | func appRunning ( | |
174 | - | let | |
175 | - | if (containsElement([ | |
176 | - | then [BooleanEntry( | |
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)] | |
177 | 210 | else throw("You are not allowed to change this") | |
178 | 211 | } | |
179 | 212 | ||
180 | 213 | ||
181 | 214 | ||
182 | - | @Callable( | |
183 | - | func registrationMode ( | |
184 | - | let | |
185 | - | if (containsElement([ | |
186 | - | then [BooleanEntry( | |
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)] | |
187 | 220 | else throw("You are not allowed to change this") | |
188 | 221 | } | |
189 | 222 | ||
190 | 223 | ||
191 | 224 | ||
192 | - | @Callable( | |
193 | - | func registerUser ( | |
194 | - | then throw( | |
225 | + | @Callable(ak) | |
226 | + | func registerUser (O,P,Q,ap,aq,ai) = if (!(j)) | |
227 | + | then throw(k) | |
195 | 228 | else { | |
196 | - | let | |
197 | - | let | |
198 | - | let | |
199 | - | if (!( | |
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))) | |
200 | 233 | then throw("Something went wrong") | |
201 | 234 | else { | |
202 | - | let | |
203 | - | if (if ((0 > | |
235 | + | let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(as)) | |
236 | + | if (if ((0 > aq)) | |
204 | 237 | then true | |
205 | - | else ( | |
238 | + | else (aq > 1000)) | |
206 | 239 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
207 | - | else [IntegerEntry( | |
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)] | |
208 | 241 | } | |
209 | 242 | } | |
210 | 243 | ||
211 | 244 | ||
212 | 245 | ||
213 | - | @Callable( | |
214 | - | func updateUser ( | |
215 | - | then throw( | |
246 | + | @Callable(ak) | |
247 | + | func updateUser (O,P,Q,ap,aq,ai) = if (!(j)) | |
248 | + | then throw(k) | |
216 | 249 | else { | |
217 | - | let | |
218 | - | let | |
219 | - | if (!( | |
250 | + | let w = ag(ak, ai) | |
251 | + | let T = b(B(w)) | |
252 | + | if (!(N(w, O, P, Q, true))) | |
220 | 253 | then throw("Something went wrong") | |
221 | 254 | else { | |
222 | - | let | |
223 | - | let | |
224 | - | if (if ((0 > | |
255 | + | let ab = e(D(w)) | |
256 | + | let at = aa(toBase64String(toBytes(O)), toBase64String(toBytes(Q)), toString(ab)) | |
257 | + | if (if ((0 > aq)) | |
225 | 258 | then true | |
226 | - | else ( | |
259 | + | else (aq > 1000)) | |
227 | 260 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
228 | - | else [StringEntry( | |
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)] | |
229 | 262 | } | |
230 | 263 | } | |
231 | 264 | ||
232 | 265 | ||
233 | 266 | ||
234 | - | @Callable( | |
235 | - | func setERC20User (ai) = if (!( | |
236 | - | then throw( | |
267 | + | @Callable(ak) | |
268 | + | func setERC20User (au,ai) = if (!(j)) | |
269 | + | then throw(k) | |
237 | 270 | else { | |
238 | - | let | |
239 | - | let | |
240 | - | if (if (( | |
241 | - | then ( | |
271 | + | let w = ag(ak, ai) | |
272 | + | let T = b(B(w)) | |
273 | + | if (if ((T != o)) | |
274 | + | then (T != p) | |
242 | 275 | else false) | |
243 | 276 | then throw("Not allowed to set ERC20 address") | |
244 | 277 | else { | |
245 | - | let | |
246 | - | if (if (( | |
278 | + | let av = take(au, 2) | |
279 | + | if (if ((av != "0x")) | |
247 | 280 | then true | |
248 | - | else (size( | |
281 | + | else (size(au) != 42)) | |
249 | 282 | then throw("This is not an erc20 address") | |
250 | - | else [StringEntry( | |
283 | + | else [StringEntry(E(w), au)] | |
251 | 284 | } | |
252 | 285 | } | |
253 | 286 | ||
254 | 287 | ||
255 | 288 | ||
256 | - | @Callable( | |
257 | - | func changeUserStatus ( | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | if (containsElement([ | |
266 | - | then [StringEntry( | |
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)] | |
267 | 300 | else throw("Not allowed to change user status") | |
268 | 301 | } | |
269 | 302 | ||
270 | 303 | ||
271 | 304 | ||
272 | - | @Callable( | |
273 | - | func deleteUser ( | |
274 | - | let | |
275 | - | let | |
276 | - | if (containsElement([ | |
277 | - | then [DeleteEntry( | |
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)] | |
278 | 311 | else throw("Not allowed") | |
279 | 312 | } | |
280 | 313 | ||
281 | 314 | ||
282 | 315 | ||
283 | - | @Callable( | |
284 | - | func setAgent ( | |
285 | - | then throw( | |
316 | + | @Callable(ah) | |
317 | + | func setAgent (G,I,ax,ay) = if (!(j)) | |
318 | + | then throw(k) | |
286 | 319 | else { | |
287 | - | let | |
288 | - | if (containsElement([ | |
289 | - | then if (if ((size( | |
320 | + | let w = toString(ah.caller) | |
321 | + | if (containsElement([f, toString(this)], w)) | |
322 | + | then if (if ((size(G) != 35)) | |
290 | 323 | then true | |
291 | - | else (size( | |
324 | + | else (size(I) != 35)) | |
292 | 325 | then throw("Wrong address") | |
293 | - | else [StringEntry( | |
326 | + | else [StringEntry(F(G), I), StringEntry(H(I, G), G), IntegerEntry(J(G), ax), IntegerEntry(K(G), ay)] | |
294 | 327 | else throw("You are not allowed") | |
295 | 328 | } | |
296 | 329 | ||
297 | 330 | ||
298 | 331 | ||
299 | - | @Callable( | |
300 | - | func unsetAgent ( | |
301 | - | then throw( | |
332 | + | @Callable(ah) | |
333 | + | func unsetAgent (G,I) = if (!(j)) | |
334 | + | then throw(k) | |
302 | 335 | else { | |
303 | - | let | |
304 | - | if (containsElement([ | |
305 | - | then if (if ((size( | |
336 | + | let w = toString(ah.caller) | |
337 | + | if (containsElement([f, toString(this)], w)) | |
338 | + | then if (if ((size(G) != 35)) | |
306 | 339 | then true | |
307 | - | else (size( | |
340 | + | else (size(I) != 35)) | |
308 | 341 | then throw("Wrong address") | |
309 | - | else [DeleteEntry( | |
342 | + | else [DeleteEntry(F(G)), DeleteEntry(H(I, G)), DeleteEntry(J(G)), DeleteEntry(K(G))] | |
310 | 343 | else throw("You are not allowed") | |
311 | 344 | } | |
312 | 345 | ||
313 | 346 | ||
314 | 347 | ||
315 | - | @Callable( | |
316 | - | func deleteEntry ( | |
317 | - | let | |
318 | - | if (( | |
319 | - | then [DeleteEntry( | |
348 | + | @Callable(ah) | |
349 | + | func deleteEntry (az) = { | |
350 | + | let w = toString(ah.caller) | |
351 | + | if ((w == f)) | |
352 | + | then [DeleteEntry(az)] | |
320 | 353 | else throw("no") | |
321 | 354 | } | |
322 | 355 | ||
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 | + | } | |
323 | 379 |
github/deemru/w8io/026f985 143.24 ms ◑