tx · 6JFcVEWo1PbA3P5YrPgfZgsSM9LtjLBdu3JJHDTdALoD 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.11000000 Waves 2023.01.22 04:50 [2415524] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "6JFcVEWo1PbA3P5YrPgfZgsSM9LtjLBdu3JJHDTdALoD", "fee": 11000000, "feeAssetId": null, "timestamp": 1674352202810, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "251uR4bfRP33QetaGyXtEd8biaM18Pq7VLr2KAp2jv2ZfV6pxGHdtUKqih2VNzETApfwnmDqfjQ4WHc4rtWV3Tc6" ], "script": "base64:BgJNCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgYKBAgICAgSAwoBCBIGCgQICAEBEgQKAggIEgMKAQgqAAdWRVJTSU9OAgMxLjUBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEJvb2xlYW5CeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMFA2tleQcBD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAA5kYXBwUnVubmluZ0tleQIUY29uZl9kYXBwX2lzX3J1bm5pbmcAEW1haW50ZW5hbmNlTVNHS2V5AhRjb25mX21haW50ZW5hbmNlX21zZwASd2hpdGVsaXN0ZWRvbmx5S2V5AhVjb25mX3doaXRlbGlzdGVkX29ubHkAC2RhcHBSdW5uaW5nCQELdmFsdWVPckVsc2UCCQCbC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gGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABQMDAwMJAAACCAUDaW52CGZ1bmN0aW9uAgp1cGRhdGVVc2VyCQAAAggFA2ludgRkQXBwBQR0aGlzBwkAAAIIBQNpbnYDZmVlAKDCHgcJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAUDAwMDCQAAAggFA2ludghmdW5jdGlvbgIMc2V0RVJDMjBVc2VyCQAAAggFA2ludgRkQXBwBQR0aGlzBwkAAAIIBQNpbnYDZmVlAKDCHgcJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAIJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlUqqmP", "height": 2415524, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C8q679QND49iekVWNm7eeEXnLKhZiZrapBQeP4GKzGvh Next: 7MNNQHXVM5mXEWKoFQTJGZ2egQFhsWnE2yYTqUaFECxq Diff:
Old | New | Differences | |
---|---|---|---|
71 | 71 | func E (w) = ("user_ERC20_" + w) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func F ( | |
74 | + | func F (w) = ("user_note_" + w) | |
75 | 75 | ||
76 | 76 | ||
77 | - | func | |
77 | + | func G (w) = ("user_label_" + w) | |
78 | 78 | ||
79 | 79 | ||
80 | - | func | |
80 | + | func H (I) = ("artist_agent_" + I) | |
81 | 81 | ||
82 | 82 | ||
83 | - | func | |
83 | + | func J (K,I) = ((("agent_" + K) + "_") + I) | |
84 | 84 | ||
85 | 85 | ||
86 | - | func L ( | |
86 | + | func L (I) = ("artist_agent_primary_" + I) | |
87 | 87 | ||
88 | 88 | ||
89 | - | func M (N) = if (contains(N, "/")) | |
90 | - | then if (if ((76 > size(N))) | |
91 | - | then (size(split(N, "/")[0]) == 59) | |
89 | + | func M (I) = ("artist_agent_secondary_" + I) | |
90 | + | ||
91 | + | ||
92 | + | func N (c) = valueOrElse(getInteger(m, c), 0) | |
93 | + | ||
94 | + | ||
95 | + | func O (P) = if (contains(P, "/")) | |
96 | + | then if (if ((76 > size(P))) | |
97 | + | then (size(split(P, "/")[0]) == 59) | |
92 | 98 | else false) | |
93 | - | then (16 > size(split( | |
99 | + | then (16 > size(split(P, "/")[1])) | |
94 | 100 | else false | |
95 | 101 | else false | |
96 | 102 | ||
97 | 103 | ||
98 | - | func | |
99 | - | let | |
100 | - | then | |
104 | + | func Q (w,R,S,T,U) = { | |
105 | + | let V = if ((size(T) != 0)) | |
106 | + | then O(T) | |
101 | 107 | else true | |
102 | - | if (!( | |
108 | + | if (!(V)) | |
103 | 109 | then throw("CID don't match requirement!") | |
104 | - | else if (if (( | |
110 | + | else if (if ((R == "")) | |
105 | 111 | then true | |
106 | - | else ( | |
112 | + | else (S == "")) | |
107 | 113 | then throw("Name and description cannot be empty") | |
108 | - | else if ((size( | |
114 | + | else if ((size(S) > 600)) | |
109 | 115 | then throw("600 Char. max description") | |
110 | - | else if ((size( | |
116 | + | else if ((size(R) > 45)) | |
111 | 117 | then throw("45 Char. max name") | |
112 | 118 | else { | |
113 | - | let | |
114 | - | if (if (( | |
119 | + | let W = b(B(w)) | |
120 | + | if (if ((W == q)) | |
115 | 121 | then true | |
116 | - | else ( | |
122 | + | else (W == r)) | |
117 | 123 | then throw("Account suspended/ removed.") | |
118 | - | else if (if (!( | |
119 | - | then ( | |
124 | + | else if (if (!(U)) | |
125 | + | then (W == o) | |
120 | 126 | else false) | |
121 | 127 | then throw("Already registered") | |
122 | - | else if (if (if (!( | |
123 | - | then ( | |
128 | + | else if (if (if (!(U)) | |
129 | + | then (W == "") | |
124 | 130 | else false) | |
125 | 131 | then l | |
126 | 132 | else false) | |
127 | 133 | then throw("Can't register, get approved first.") | |
128 | - | else if (if (if ( | |
129 | - | then ( | |
134 | + | else if (if (if (U) | |
135 | + | then (W == "") | |
130 | 136 | else false) | |
131 | 137 | then true | |
132 | - | else if ( | |
133 | - | then ( | |
138 | + | else if (U) | |
139 | + | then (W == n) | |
134 | 140 | else false) | |
135 | 141 | then throw("Register first") | |
136 | 142 | else true | |
138 | 144 | } | |
139 | 145 | ||
140 | 146 | ||
141 | - | func | |
142 | - | let | |
143 | - | let | |
144 | - | then | |
145 | - | else if (if (( | |
146 | - | then ( | |
147 | + | func X (W,Y,Z) = { | |
148 | + | let aa = [p, o, q, r, n, s] | |
149 | + | let ab = if (containsElement(aa, W)) | |
150 | + | then W | |
151 | + | else if (if ((W == u)) | |
152 | + | then (Z == n) | |
147 | 153 | else false) | |
148 | 154 | then "" | |
149 | 155 | else throw("Unknown status") | |
150 | - | let | |
151 | - | if (if (( | |
152 | - | then ( | |
156 | + | let ac = e(D(Y)) | |
157 | + | if (if ((ac == 0)) | |
158 | + | then (ab != n) | |
153 | 159 | else false) | |
154 | 160 | then throw("You cant set this status, user is not registered.") | |
155 | - | else if (if (( | |
156 | - | then ( | |
161 | + | else if (if ((Z == n)) | |
162 | + | then (ab == n) | |
157 | 163 | else false) | |
158 | 164 | then throw("User already allowed") | |
159 | - | else if (if (( | |
160 | - | then ( | |
165 | + | else if (if ((Z == o)) | |
166 | + | then (ab == n) | |
161 | 167 | else false) | |
162 | 168 | then throw("User already allowed & registered") | |
163 | - | else if (if (( | |
164 | - | then ( | |
169 | + | else if (if ((Z == p)) | |
170 | + | then (ab == n) | |
165 | 171 | else false) | |
166 | 172 | then throw("User already allowed & verified") | |
167 | - | else | |
173 | + | else ab | |
168 | 174 | } | |
169 | 175 | ||
170 | 176 | ||
171 | - | func | |
177 | + | func ad (R,T,ae) = (((((("{\"user_name\": \"" + R) + "\", \"user_thumb\":\"") + T) + "\",\"user_date\":\"") + ae) + "\"}") | |
172 | 178 | ||
173 | 179 | ||
174 | - | func | |
175 | - | let | |
176 | - | if ($isInstanceOf( | |
180 | + | func af (ag) = { | |
181 | + | let ah = ag | |
182 | + | if ($isInstanceOf(ah, "String")) | |
177 | 183 | then { | |
178 | - | let | |
179 | - | | |
184 | + | let ai = ah | |
185 | + | ai | |
180 | 186 | } | |
181 | 187 | else throw("Sponsored Public Key String expected") | |
182 | 188 | } | |
183 | 189 | ||
184 | 190 | ||
185 | - | func | |
186 | - | let | |
187 | - | then valueOrElse( | |
191 | + | func aj (ak,al) = { | |
192 | + | let am = if ((al != "")) | |
193 | + | then valueOrElse(N((toString(addressFromPublicKey(fromBase58String(al))) + "_free_txs")), 0) | |
188 | 194 | else 0 | |
189 | - | let w = if (if ((toBase58String( | |
190 | - | then ( | |
195 | + | let w = if (if ((toBase58String(ak.caller.bytes) == toString(this))) | |
196 | + | then (am > 0) | |
191 | 197 | else false) | |
192 | - | then toString(addressFromPublicKey(fromBase58String( | |
193 | - | else toBase58String( | |
194 | - | let | |
195 | - | then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String( | |
198 | + | then toString(addressFromPublicKey(fromBase58String(al))) | |
199 | + | else toBase58String(ak.caller.bytes) | |
200 | + | let an = if ((al != "")) | |
201 | + | then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(al)))], nil) | |
196 | 202 | else unit | |
197 | - | if (( | |
198 | - | then $Tuple2(w, ( | |
203 | + | if ((an == an)) | |
204 | + | then $Tuple2(w, (am > 0)) | |
199 | 205 | else throw("Strict value is not equal to itself.") | |
200 | 206 | } | |
201 | 207 | ||
202 | 208 | ||
203 | - | @Callable( | |
204 | - | func setConf (c, | |
205 | - | let w = toString( | |
209 | + | @Callable(ao) | |
210 | + | func setConf (c,ap) = { | |
211 | + | let w = toString(ao.caller) | |
206 | 212 | if (containsElement([f, toString(this)], w)) | |
207 | - | then [StringEntry(c, | |
213 | + | then [StringEntry(c, ap)] | |
208 | 214 | else throw("You are not allowed to change this") | |
209 | 215 | } | |
210 | 216 | ||
211 | 217 | ||
212 | 218 | ||
213 | - | @Callable( | |
214 | - | func appRunning ( | |
215 | - | let w = toString( | |
219 | + | @Callable(ao) | |
220 | + | func appRunning (aq,ar) = { | |
221 | + | let w = toString(ao.caller) | |
216 | 222 | if (containsElement([f, toString(this)], w)) | |
217 | - | then [BooleanEntry(g, | |
223 | + | then [BooleanEntry(g, aq), StringEntry(h, ar)] | |
218 | 224 | else throw("You are not allowed to change this") | |
219 | 225 | } | |
220 | 226 | ||
221 | 227 | ||
222 | 228 | ||
223 | - | @Callable( | |
224 | - | func registrationMode ( | |
225 | - | let w = toString( | |
229 | + | @Callable(ao) | |
230 | + | func registrationMode (as) = { | |
231 | + | let w = toString(ao.caller) | |
226 | 232 | if (containsElement([f, toString(this)], w)) | |
227 | - | then [BooleanEntry(i, | |
233 | + | then [BooleanEntry(i, as)] | |
228 | 234 | else throw("You are not allowed to change this") | |
229 | 235 | } | |
230 | 236 | ||
231 | 237 | ||
232 | 238 | ||
233 | - | @Callable( | |
234 | - | func registerUser ( | |
239 | + | @Callable(ao) | |
240 | + | func registerUser (R,S,T,at,au,al) = if (!(j)) | |
235 | 241 | then throw(k) | |
236 | 242 | else { | |
237 | - | let at = ah(am, aj) | |
238 | - | let w = at._1 | |
239 | - | let ak = at._2 | |
240 | - | let au = toBase58String(am.transactionId) | |
241 | - | let av = lastBlock.timestamp | |
242 | - | if (!(O(w, P, Q, R, false))) | |
243 | + | let av = aj(ao, al) | |
244 | + | let w = av._1 | |
245 | + | let am = av._2 | |
246 | + | let aw = toBase58String(ao.transactionId) | |
247 | + | let ax = lastBlock.timestamp | |
248 | + | let ay = b(F(w)) | |
249 | + | let az = b(G(w)) | |
250 | + | if (!(Q(w, R, S, T, false))) | |
243 | 251 | then throw("Something went wrong") | |
244 | 252 | else { | |
245 | - | let | |
246 | - | if (if ((0 > | |
253 | + | let aA = ad(toBase64String(toBytes(R)), toBase64String(toBytes(T)), toString(ax)) | |
254 | + | if (if ((0 > au)) | |
247 | 255 | then true | |
248 | - | else ( | |
256 | + | else (au > 1000)) | |
249 | 257 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
250 | 258 | else { | |
251 | - | let | |
259 | + | let aB = if (am) | |
252 | 260 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
253 | 261 | else nil | |
254 | - | ([IntegerEntry(D(w), | |
262 | + | ([IntegerEntry(D(w), ax), StringEntry(v(w), ((aw + "_") + toString(ax))), StringEntry(x(w), R), StringEntry(y(w), S), StringEntry(z(w), at), StringEntry(A(w), T), StringEntry(B(w), o), IntegerEntry(C(w), au), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), aA), StringEntry(F(w), ay), StringEntry(G(w), az)] ++ aB) | |
255 | 263 | } | |
256 | 264 | } | |
257 | 265 | } | |
258 | 266 | ||
259 | 267 | ||
260 | 268 | ||
261 | - | @Callable( | |
262 | - | func updateUser ( | |
269 | + | @Callable(ao) | |
270 | + | func updateUser (R,S,T,at,au,al) = if (!(j)) | |
263 | 271 | then throw(k) | |
264 | 272 | else { | |
265 | - | let | |
266 | - | let w = | |
267 | - | let | |
268 | - | let | |
269 | - | if (!( | |
273 | + | let aC = aj(ao, al) | |
274 | + | let w = aC._1 | |
275 | + | let am = aC._2 | |
276 | + | let W = b(B(w)) | |
277 | + | if (!(Q(w, R, S, T, true))) | |
270 | 278 | then throw("Something went wrong") | |
271 | 279 | else { | |
272 | - | let | |
273 | - | let | |
274 | - | if (if ((0 > | |
280 | + | let ae = e(D(w)) | |
281 | + | let aA = ad(toBase64String(toBytes(R)), toBase64String(toBytes(T)), toString(ae)) | |
282 | + | if (if ((0 > au)) | |
275 | 283 | then true | |
276 | - | else ( | |
284 | + | else (au > 1000)) | |
277 | 285 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
278 | 286 | else { | |
279 | - | let | |
287 | + | let aB = if (am) | |
280 | 288 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
281 | 289 | else nil | |
282 | - | ([StringEntry(x(w), | |
290 | + | ([StringEntry(x(w), R), StringEntry(y(w), S), StringEntry(z(w), at), StringEntry(A(w), T), IntegerEntry(C(w), au), StringEntry(((W + "_") + w), aA)] ++ aB) | |
283 | 291 | } | |
284 | 292 | } | |
285 | 293 | } | |
286 | 294 | ||
287 | 295 | ||
288 | 296 | ||
289 | - | @Callable( | |
290 | - | func setERC20User ( | |
297 | + | @Callable(ao) | |
298 | + | func setERC20User (aD,al) = if (!(j)) | |
291 | 299 | then throw(k) | |
292 | 300 | else { | |
293 | - | let | |
294 | - | let w = | |
295 | - | let | |
296 | - | let | |
297 | - | if (if (( | |
298 | - | then ( | |
301 | + | let aE = aj(ao, al) | |
302 | + | let w = aE._1 | |
303 | + | let am = aE._2 | |
304 | + | let W = b(B(w)) | |
305 | + | if (if ((W != o)) | |
306 | + | then (W != p) | |
299 | 307 | else false) | |
300 | 308 | then throw("Not allowed to set ERC20 address") | |
301 | 309 | else { | |
302 | - | let | |
303 | - | if (if (( | |
310 | + | let aF = take(aD, 2) | |
311 | + | if (if ((aF != "0x")) | |
304 | 312 | then true | |
305 | - | else (size( | |
313 | + | else (size(aD) != 42)) | |
306 | 314 | then throw("This is not an erc20 address") | |
307 | 315 | else { | |
308 | - | let | |
316 | + | let aB = if (am) | |
309 | 317 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
310 | 318 | else nil | |
311 | - | ([StringEntry(E(w), | |
319 | + | ([StringEntry(E(w), aD)] ++ aB) | |
312 | 320 | } | |
313 | 321 | } | |
314 | 322 | } | |
315 | 323 | ||
316 | 324 | ||
317 | 325 | ||
318 | - | @Callable( | |
319 | - | func changeUserStatus (W, | |
320 | - | let w = toString( | |
326 | + | @Callable(ao) | |
327 | + | func changeUserStatus (Y,W,ay,az) = { | |
328 | + | let w = toString(ao.caller) | |
321 | 329 | if (containsElement([f, toString(this)], w)) | |
322 | - | then if ((size( | |
323 | - | then [StringEntry(( | |
330 | + | then if ((size(W) == 0)) | |
331 | + | then [StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
324 | 332 | else { | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | [StringEntry(B( | |
333 | + | let Z = b(B(Y)) | |
334 | + | let ab = X(W, Y, Z) | |
335 | + | let R = toBase64String(toBytes(b(x(Y)))) | |
336 | + | let T = toBase64String(toBytes(b(A(Y)))) | |
337 | + | let ae = e(D(Y)) | |
338 | + | let aA = ad(R, T, toString(ae)) | |
339 | + | [StringEntry(B(Y), ab), DeleteEntry(((Z + "_") + Y)), StringEntry(((ab + "_") + Y), aA), StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
332 | 340 | } | |
333 | 341 | else throw("Not allowed to change user status") | |
334 | 342 | } | |
335 | 343 | ||
336 | 344 | ||
337 | 345 | ||
338 | - | @Callable( | |
339 | - | func deleteUser ( | |
340 | - | let w = toString( | |
341 | - | let | |
346 | + | @Callable(ao) | |
347 | + | func deleteUser (Y) = { | |
348 | + | let w = toString(ao.caller) | |
349 | + | let Z = b(B(Y)) | |
342 | 350 | if (containsElement([f, toString(this)], w)) | |
343 | - | then [DeleteEntry(D( | |
351 | + | then [DeleteEntry(D(Y)), DeleteEntry(v(Y)), DeleteEntry(x(Y)), DeleteEntry(y(Y)), DeleteEntry(z(Y)), DeleteEntry(A(Y)), DeleteEntry(("user_note_" + Y)), DeleteEntry(((Z + "_") + Y)), DeleteEntry(C(Y)), StringEntry(B(Y), r)] | |
344 | 352 | else throw("Not allowed") | |
345 | 353 | } | |
346 | 354 | ||
347 | 355 | ||
348 | 356 | ||
349 | - | @Callable( | |
350 | - | func setAgent ( | |
357 | + | @Callable(ak) | |
358 | + | func setAgent (I,K,aG,aH) = if (!(j)) | |
351 | 359 | then throw(k) | |
352 | 360 | else { | |
353 | - | let w = toString( | |
361 | + | let w = toString(ak.caller) | |
354 | 362 | if (containsElement([f, toString(this)], w)) | |
355 | - | then if (if ((size( | |
363 | + | then if (if ((size(I) != 35)) | |
356 | 364 | then true | |
357 | - | else (size( | |
365 | + | else (size(K) != 35)) | |
358 | 366 | then throw("Wrong address") | |
359 | - | else [StringEntry( | |
367 | + | else [StringEntry(H(I), K), StringEntry(J(K, I), I), IntegerEntry(L(I), aG), IntegerEntry(M(I), aH)] | |
360 | 368 | else throw("You are not allowed") | |
361 | 369 | } | |
362 | 370 | ||
363 | 371 | ||
364 | 372 | ||
365 | - | @Callable( | |
366 | - | func unsetAgent ( | |
373 | + | @Callable(ak) | |
374 | + | func unsetAgent (I,K) = if (!(j)) | |
367 | 375 | then throw(k) | |
368 | 376 | else { | |
369 | - | let w = toString( | |
377 | + | let w = toString(ak.caller) | |
370 | 378 | if (containsElement([f, toString(this)], w)) | |
371 | - | then if (if ((size( | |
379 | + | then if (if ((size(I) != 35)) | |
372 | 380 | then true | |
373 | - | else (size( | |
381 | + | else (size(K) != 35)) | |
374 | 382 | then throw("Wrong address") | |
375 | - | else [DeleteEntry( | |
383 | + | else [DeleteEntry(H(I)), DeleteEntry(J(K, I)), DeleteEntry(L(I)), DeleteEntry(M(I))] | |
376 | 384 | else throw("You are not allowed") | |
377 | 385 | } | |
378 | 386 | ||
379 | 387 | ||
380 | 388 | ||
381 | - | @Callable( | |
382 | - | func deleteEntry ( | |
383 | - | let w = toString( | |
389 | + | @Callable(ak) | |
390 | + | func deleteEntry (aI) = { | |
391 | + | let w = toString(ak.caller) | |
384 | 392 | if ((w == f)) | |
385 | - | then [DeleteEntry( | |
393 | + | then [DeleteEntry(aI)] | |
386 | 394 | else throw("no") | |
387 | 395 | } | |
388 | 396 | ||
389 | 397 | ||
390 | - | @Verifier( | |
391 | - | func | |
392 | - | let | |
393 | - | if ($isInstanceOf( | |
398 | + | @Verifier(aJ) | |
399 | + | func aK () = { | |
400 | + | let ah = aJ | |
401 | + | if ($isInstanceOf(ah, "InvokeScriptTransaction")) | |
394 | 402 | then { | |
395 | - | let | |
396 | - | if (if (if (if (( | |
397 | - | then ( | |
403 | + | let aL = ah | |
404 | + | if (if (if (if ((aL.function == "registerUser")) | |
405 | + | then (aL.dApp == this) | |
398 | 406 | else false) | |
399 | - | then ( | |
407 | + | then (aL.fee == 500000) | |
400 | 408 | else false) | |
401 | - | then ( | |
409 | + | then (aL.feeAssetId == unit) | |
402 | 410 | else false) | |
403 | - | then sigVerify( | |
404 | - | else if (if (if (if (( | |
405 | - | then ( | |
411 | + | then sigVerify(aJ.bodyBytes, aJ.proofs[0], fromBase58String(af(aL.args[5]))) | |
412 | + | else if (if (if (if ((aL.function == "updateUser")) | |
413 | + | then (aL.dApp == this) | |
406 | 414 | else false) | |
407 | - | then ( | |
415 | + | then (aL.fee == 500000) | |
408 | 416 | else false) | |
409 | - | then ( | |
417 | + | then (aL.feeAssetId == unit) | |
410 | 418 | else false) | |
411 | - | then sigVerify( | |
412 | - | else if (if (if (if (( | |
413 | - | then ( | |
419 | + | then sigVerify(aJ.bodyBytes, aJ.proofs[0], fromBase58String(af(aL.args[5]))) | |
420 | + | else if (if (if (if ((aL.function == "setERC20User")) | |
421 | + | then (aL.dApp == this) | |
414 | 422 | else false) | |
415 | - | then ( | |
423 | + | then (aL.fee == 500000) | |
416 | 424 | else false) | |
417 | - | then ( | |
425 | + | then (aL.feeAssetId == unit) | |
418 | 426 | else false) | |
419 | - | then sigVerify( | |
420 | - | else sigVerify( | |
427 | + | then sigVerify(aJ.bodyBytes, aJ.proofs[0], fromBase58String(af(aL.args[2]))) | |
428 | + | else sigVerify(aJ.bodyBytes, aJ.proofs[0], aJ.senderPublicKey) | |
421 | 429 | } | |
422 | - | else sigVerify( | |
430 | + | else sigVerify(aJ.bodyBytes, aJ.proofs[0], aJ.senderPublicKey) | |
423 | 431 | } | |
424 | 432 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "1.5" | |
5 | 5 | ||
6 | 6 | func b (c) = valueOrElse(getString(this, c), "") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (c) = valueOrElse(getBoolean(this, c), false) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func e (c) = valueOrElse(getInteger(this, c), 0) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | let f = b("conf_admin_1") | |
16 | 16 | ||
17 | 17 | let g = "conf_dapp_is_running" | |
18 | 18 | ||
19 | 19 | let h = "conf_maintenance_msg" | |
20 | 20 | ||
21 | 21 | let i = "conf_whitelisted_only" | |
22 | 22 | ||
23 | 23 | let j = valueOrElse(getBoolean(this, g), true) | |
24 | 24 | ||
25 | 25 | let k = valueOrElse(getString(this, h), "") | |
26 | 26 | ||
27 | 27 | let l = valueOrElse(getBoolean(this, i), true) | |
28 | 28 | ||
29 | 29 | let m = value(addressFromString(b("conf_whitelist_dapp"))) | |
30 | 30 | ||
31 | 31 | let n = "ALLOWED" | |
32 | 32 | ||
33 | 33 | let o = "REGISTERED" | |
34 | 34 | ||
35 | 35 | let p = "VERIFIED" | |
36 | 36 | ||
37 | 37 | let q = "SUSPENDED" | |
38 | 38 | ||
39 | 39 | let r = "REMOVED" | |
40 | 40 | ||
41 | 41 | let s = "CHANGE_REQUIRED" | |
42 | 42 | ||
43 | 43 | let t = "UNREGISTERED" | |
44 | 44 | ||
45 | 45 | let u = "RESET" | |
46 | 46 | ||
47 | 47 | func v (w) = ("user_" + w) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func x (w) = ("user_name_" + w) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func y (w) = ("user_desc_" + w) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func z (w) = ("user_social_" + w) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func A (w) = ("user_thumb_" + w) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func B (w) = ("user_status_" + w) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func C (w) = ("user_royalties_" + w) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func D (w) = ("user_date_" + w) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func E (w) = ("user_ERC20_" + w) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func F ( | |
74 | + | func F (w) = ("user_note_" + w) | |
75 | 75 | ||
76 | 76 | ||
77 | - | func | |
77 | + | func G (w) = ("user_label_" + w) | |
78 | 78 | ||
79 | 79 | ||
80 | - | func | |
80 | + | func H (I) = ("artist_agent_" + I) | |
81 | 81 | ||
82 | 82 | ||
83 | - | func | |
83 | + | func J (K,I) = ((("agent_" + K) + "_") + I) | |
84 | 84 | ||
85 | 85 | ||
86 | - | func L ( | |
86 | + | func L (I) = ("artist_agent_primary_" + I) | |
87 | 87 | ||
88 | 88 | ||
89 | - | func M (N) = if (contains(N, "/")) | |
90 | - | then if (if ((76 > size(N))) | |
91 | - | then (size(split(N, "/")[0]) == 59) | |
89 | + | func M (I) = ("artist_agent_secondary_" + I) | |
90 | + | ||
91 | + | ||
92 | + | func N (c) = valueOrElse(getInteger(m, c), 0) | |
93 | + | ||
94 | + | ||
95 | + | func O (P) = if (contains(P, "/")) | |
96 | + | then if (if ((76 > size(P))) | |
97 | + | then (size(split(P, "/")[0]) == 59) | |
92 | 98 | else false) | |
93 | - | then (16 > size(split( | |
99 | + | then (16 > size(split(P, "/")[1])) | |
94 | 100 | else false | |
95 | 101 | else false | |
96 | 102 | ||
97 | 103 | ||
98 | - | func | |
99 | - | let | |
100 | - | then | |
104 | + | func Q (w,R,S,T,U) = { | |
105 | + | let V = if ((size(T) != 0)) | |
106 | + | then O(T) | |
101 | 107 | else true | |
102 | - | if (!( | |
108 | + | if (!(V)) | |
103 | 109 | then throw("CID don't match requirement!") | |
104 | - | else if (if (( | |
110 | + | else if (if ((R == "")) | |
105 | 111 | then true | |
106 | - | else ( | |
112 | + | else (S == "")) | |
107 | 113 | then throw("Name and description cannot be empty") | |
108 | - | else if ((size( | |
114 | + | else if ((size(S) > 600)) | |
109 | 115 | then throw("600 Char. max description") | |
110 | - | else if ((size( | |
116 | + | else if ((size(R) > 45)) | |
111 | 117 | then throw("45 Char. max name") | |
112 | 118 | else { | |
113 | - | let | |
114 | - | if (if (( | |
119 | + | let W = b(B(w)) | |
120 | + | if (if ((W == q)) | |
115 | 121 | then true | |
116 | - | else ( | |
122 | + | else (W == r)) | |
117 | 123 | then throw("Account suspended/ removed.") | |
118 | - | else if (if (!( | |
119 | - | then ( | |
124 | + | else if (if (!(U)) | |
125 | + | then (W == o) | |
120 | 126 | else false) | |
121 | 127 | then throw("Already registered") | |
122 | - | else if (if (if (!( | |
123 | - | then ( | |
128 | + | else if (if (if (!(U)) | |
129 | + | then (W == "") | |
124 | 130 | else false) | |
125 | 131 | then l | |
126 | 132 | else false) | |
127 | 133 | then throw("Can't register, get approved first.") | |
128 | - | else if (if (if ( | |
129 | - | then ( | |
134 | + | else if (if (if (U) | |
135 | + | then (W == "") | |
130 | 136 | else false) | |
131 | 137 | then true | |
132 | - | else if ( | |
133 | - | then ( | |
138 | + | else if (U) | |
139 | + | then (W == n) | |
134 | 140 | else false) | |
135 | 141 | then throw("Register first") | |
136 | 142 | else true | |
137 | 143 | } | |
138 | 144 | } | |
139 | 145 | ||
140 | 146 | ||
141 | - | func | |
142 | - | let | |
143 | - | let | |
144 | - | then | |
145 | - | else if (if (( | |
146 | - | then ( | |
147 | + | func X (W,Y,Z) = { | |
148 | + | let aa = [p, o, q, r, n, s] | |
149 | + | let ab = if (containsElement(aa, W)) | |
150 | + | then W | |
151 | + | else if (if ((W == u)) | |
152 | + | then (Z == n) | |
147 | 153 | else false) | |
148 | 154 | then "" | |
149 | 155 | else throw("Unknown status") | |
150 | - | let | |
151 | - | if (if (( | |
152 | - | then ( | |
156 | + | let ac = e(D(Y)) | |
157 | + | if (if ((ac == 0)) | |
158 | + | then (ab != n) | |
153 | 159 | else false) | |
154 | 160 | then throw("You cant set this status, user is not registered.") | |
155 | - | else if (if (( | |
156 | - | then ( | |
161 | + | else if (if ((Z == n)) | |
162 | + | then (ab == n) | |
157 | 163 | else false) | |
158 | 164 | then throw("User already allowed") | |
159 | - | else if (if (( | |
160 | - | then ( | |
165 | + | else if (if ((Z == o)) | |
166 | + | then (ab == n) | |
161 | 167 | else false) | |
162 | 168 | then throw("User already allowed & registered") | |
163 | - | else if (if (( | |
164 | - | then ( | |
169 | + | else if (if ((Z == p)) | |
170 | + | then (ab == n) | |
165 | 171 | else false) | |
166 | 172 | then throw("User already allowed & verified") | |
167 | - | else | |
173 | + | else ab | |
168 | 174 | } | |
169 | 175 | ||
170 | 176 | ||
171 | - | func | |
177 | + | func ad (R,T,ae) = (((((("{\"user_name\": \"" + R) + "\", \"user_thumb\":\"") + T) + "\",\"user_date\":\"") + ae) + "\"}") | |
172 | 178 | ||
173 | 179 | ||
174 | - | func | |
175 | - | let | |
176 | - | if ($isInstanceOf( | |
180 | + | func af (ag) = { | |
181 | + | let ah = ag | |
182 | + | if ($isInstanceOf(ah, "String")) | |
177 | 183 | then { | |
178 | - | let | |
179 | - | | |
184 | + | let ai = ah | |
185 | + | ai | |
180 | 186 | } | |
181 | 187 | else throw("Sponsored Public Key String expected") | |
182 | 188 | } | |
183 | 189 | ||
184 | 190 | ||
185 | - | func | |
186 | - | let | |
187 | - | then valueOrElse( | |
191 | + | func aj (ak,al) = { | |
192 | + | let am = if ((al != "")) | |
193 | + | then valueOrElse(N((toString(addressFromPublicKey(fromBase58String(al))) + "_free_txs")), 0) | |
188 | 194 | else 0 | |
189 | - | let w = if (if ((toBase58String( | |
190 | - | then ( | |
195 | + | let w = if (if ((toBase58String(ak.caller.bytes) == toString(this))) | |
196 | + | then (am > 0) | |
191 | 197 | else false) | |
192 | - | then toString(addressFromPublicKey(fromBase58String( | |
193 | - | else toBase58String( | |
194 | - | let | |
195 | - | then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String( | |
198 | + | then toString(addressFromPublicKey(fromBase58String(al))) | |
199 | + | else toBase58String(ak.caller.bytes) | |
200 | + | let an = if ((al != "")) | |
201 | + | then invoke(m, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(al)))], nil) | |
196 | 202 | else unit | |
197 | - | if (( | |
198 | - | then $Tuple2(w, ( | |
203 | + | if ((an == an)) | |
204 | + | then $Tuple2(w, (am > 0)) | |
199 | 205 | else throw("Strict value is not equal to itself.") | |
200 | 206 | } | |
201 | 207 | ||
202 | 208 | ||
203 | - | @Callable( | |
204 | - | func setConf (c, | |
205 | - | let w = toString( | |
209 | + | @Callable(ao) | |
210 | + | func setConf (c,ap) = { | |
211 | + | let w = toString(ao.caller) | |
206 | 212 | if (containsElement([f, toString(this)], w)) | |
207 | - | then [StringEntry(c, | |
213 | + | then [StringEntry(c, ap)] | |
208 | 214 | else throw("You are not allowed to change this") | |
209 | 215 | } | |
210 | 216 | ||
211 | 217 | ||
212 | 218 | ||
213 | - | @Callable( | |
214 | - | func appRunning ( | |
215 | - | let w = toString( | |
219 | + | @Callable(ao) | |
220 | + | func appRunning (aq,ar) = { | |
221 | + | let w = toString(ao.caller) | |
216 | 222 | if (containsElement([f, toString(this)], w)) | |
217 | - | then [BooleanEntry(g, | |
223 | + | then [BooleanEntry(g, aq), StringEntry(h, ar)] | |
218 | 224 | else throw("You are not allowed to change this") | |
219 | 225 | } | |
220 | 226 | ||
221 | 227 | ||
222 | 228 | ||
223 | - | @Callable( | |
224 | - | func registrationMode ( | |
225 | - | let w = toString( | |
229 | + | @Callable(ao) | |
230 | + | func registrationMode (as) = { | |
231 | + | let w = toString(ao.caller) | |
226 | 232 | if (containsElement([f, toString(this)], w)) | |
227 | - | then [BooleanEntry(i, | |
233 | + | then [BooleanEntry(i, as)] | |
228 | 234 | else throw("You are not allowed to change this") | |
229 | 235 | } | |
230 | 236 | ||
231 | 237 | ||
232 | 238 | ||
233 | - | @Callable( | |
234 | - | func registerUser ( | |
239 | + | @Callable(ao) | |
240 | + | func registerUser (R,S,T,at,au,al) = if (!(j)) | |
235 | 241 | then throw(k) | |
236 | 242 | else { | |
237 | - | let at = ah(am, aj) | |
238 | - | let w = at._1 | |
239 | - | let ak = at._2 | |
240 | - | let au = toBase58String(am.transactionId) | |
241 | - | let av = lastBlock.timestamp | |
242 | - | if (!(O(w, P, Q, R, false))) | |
243 | + | let av = aj(ao, al) | |
244 | + | let w = av._1 | |
245 | + | let am = av._2 | |
246 | + | let aw = toBase58String(ao.transactionId) | |
247 | + | let ax = lastBlock.timestamp | |
248 | + | let ay = b(F(w)) | |
249 | + | let az = b(G(w)) | |
250 | + | if (!(Q(w, R, S, T, false))) | |
243 | 251 | then throw("Something went wrong") | |
244 | 252 | else { | |
245 | - | let | |
246 | - | if (if ((0 > | |
253 | + | let aA = ad(toBase64String(toBytes(R)), toBase64String(toBytes(T)), toString(ax)) | |
254 | + | if (if ((0 > au)) | |
247 | 255 | then true | |
248 | - | else ( | |
256 | + | else (au > 1000)) | |
249 | 257 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
250 | 258 | else { | |
251 | - | let | |
259 | + | let aB = if (am) | |
252 | 260 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
253 | 261 | else nil | |
254 | - | ([IntegerEntry(D(w), | |
262 | + | ([IntegerEntry(D(w), ax), StringEntry(v(w), ((aw + "_") + toString(ax))), StringEntry(x(w), R), StringEntry(y(w), S), StringEntry(z(w), at), StringEntry(A(w), T), StringEntry(B(w), o), IntegerEntry(C(w), au), DeleteEntry(("ALLOWED_" + w)), StringEntry(((o + "_") + w), aA), StringEntry(F(w), ay), StringEntry(G(w), az)] ++ aB) | |
255 | 263 | } | |
256 | 264 | } | |
257 | 265 | } | |
258 | 266 | ||
259 | 267 | ||
260 | 268 | ||
261 | - | @Callable( | |
262 | - | func updateUser ( | |
269 | + | @Callable(ao) | |
270 | + | func updateUser (R,S,T,at,au,al) = if (!(j)) | |
263 | 271 | then throw(k) | |
264 | 272 | else { | |
265 | - | let | |
266 | - | let w = | |
267 | - | let | |
268 | - | let | |
269 | - | if (!( | |
273 | + | let aC = aj(ao, al) | |
274 | + | let w = aC._1 | |
275 | + | let am = aC._2 | |
276 | + | let W = b(B(w)) | |
277 | + | if (!(Q(w, R, S, T, true))) | |
270 | 278 | then throw("Something went wrong") | |
271 | 279 | else { | |
272 | - | let | |
273 | - | let | |
274 | - | if (if ((0 > | |
280 | + | let ae = e(D(w)) | |
281 | + | let aA = ad(toBase64String(toBytes(R)), toBase64String(toBytes(T)), toString(ae)) | |
282 | + | if (if ((0 > au)) | |
275 | 283 | then true | |
276 | - | else ( | |
284 | + | else (au > 1000)) | |
277 | 285 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
278 | 286 | else { | |
279 | - | let | |
287 | + | let aB = if (am) | |
280 | 288 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
281 | 289 | else nil | |
282 | - | ([StringEntry(x(w), | |
290 | + | ([StringEntry(x(w), R), StringEntry(y(w), S), StringEntry(z(w), at), StringEntry(A(w), T), IntegerEntry(C(w), au), StringEntry(((W + "_") + w), aA)] ++ aB) | |
283 | 291 | } | |
284 | 292 | } | |
285 | 293 | } | |
286 | 294 | ||
287 | 295 | ||
288 | 296 | ||
289 | - | @Callable( | |
290 | - | func setERC20User ( | |
297 | + | @Callable(ao) | |
298 | + | func setERC20User (aD,al) = if (!(j)) | |
291 | 299 | then throw(k) | |
292 | 300 | else { | |
293 | - | let | |
294 | - | let w = | |
295 | - | let | |
296 | - | let | |
297 | - | if (if (( | |
298 | - | then ( | |
301 | + | let aE = aj(ao, al) | |
302 | + | let w = aE._1 | |
303 | + | let am = aE._2 | |
304 | + | let W = b(B(w)) | |
305 | + | if (if ((W != o)) | |
306 | + | then (W != p) | |
299 | 307 | else false) | |
300 | 308 | then throw("Not allowed to set ERC20 address") | |
301 | 309 | else { | |
302 | - | let | |
303 | - | if (if (( | |
310 | + | let aF = take(aD, 2) | |
311 | + | if (if ((aF != "0x")) | |
304 | 312 | then true | |
305 | - | else (size( | |
313 | + | else (size(aD) != 42)) | |
306 | 314 | then throw("This is not an erc20 address") | |
307 | 315 | else { | |
308 | - | let | |
316 | + | let aB = if (am) | |
309 | 317 | then [ScriptTransfer(Address(fromBase58String(w)), 0, unit)] | |
310 | 318 | else nil | |
311 | - | ([StringEntry(E(w), | |
319 | + | ([StringEntry(E(w), aD)] ++ aB) | |
312 | 320 | } | |
313 | 321 | } | |
314 | 322 | } | |
315 | 323 | ||
316 | 324 | ||
317 | 325 | ||
318 | - | @Callable( | |
319 | - | func changeUserStatus (W, | |
320 | - | let w = toString( | |
326 | + | @Callable(ao) | |
327 | + | func changeUserStatus (Y,W,ay,az) = { | |
328 | + | let w = toString(ao.caller) | |
321 | 329 | if (containsElement([f, toString(this)], w)) | |
322 | - | then if ((size( | |
323 | - | then [StringEntry(( | |
330 | + | then if ((size(W) == 0)) | |
331 | + | then [StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
324 | 332 | else { | |
325 | - | let | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | [StringEntry(B( | |
333 | + | let Z = b(B(Y)) | |
334 | + | let ab = X(W, Y, Z) | |
335 | + | let R = toBase64String(toBytes(b(x(Y)))) | |
336 | + | let T = toBase64String(toBytes(b(A(Y)))) | |
337 | + | let ae = e(D(Y)) | |
338 | + | let aA = ad(R, T, toString(ae)) | |
339 | + | [StringEntry(B(Y), ab), DeleteEntry(((Z + "_") + Y)), StringEntry(((ab + "_") + Y), aA), StringEntry(F(Y), ay), StringEntry(G(Y), az)] | |
332 | 340 | } | |
333 | 341 | else throw("Not allowed to change user status") | |
334 | 342 | } | |
335 | 343 | ||
336 | 344 | ||
337 | 345 | ||
338 | - | @Callable( | |
339 | - | func deleteUser ( | |
340 | - | let w = toString( | |
341 | - | let | |
346 | + | @Callable(ao) | |
347 | + | func deleteUser (Y) = { | |
348 | + | let w = toString(ao.caller) | |
349 | + | let Z = b(B(Y)) | |
342 | 350 | if (containsElement([f, toString(this)], w)) | |
343 | - | then [DeleteEntry(D( | |
351 | + | then [DeleteEntry(D(Y)), DeleteEntry(v(Y)), DeleteEntry(x(Y)), DeleteEntry(y(Y)), DeleteEntry(z(Y)), DeleteEntry(A(Y)), DeleteEntry(("user_note_" + Y)), DeleteEntry(((Z + "_") + Y)), DeleteEntry(C(Y)), StringEntry(B(Y), r)] | |
344 | 352 | else throw("Not allowed") | |
345 | 353 | } | |
346 | 354 | ||
347 | 355 | ||
348 | 356 | ||
349 | - | @Callable( | |
350 | - | func setAgent ( | |
357 | + | @Callable(ak) | |
358 | + | func setAgent (I,K,aG,aH) = if (!(j)) | |
351 | 359 | then throw(k) | |
352 | 360 | else { | |
353 | - | let w = toString( | |
361 | + | let w = toString(ak.caller) | |
354 | 362 | if (containsElement([f, toString(this)], w)) | |
355 | - | then if (if ((size( | |
363 | + | then if (if ((size(I) != 35)) | |
356 | 364 | then true | |
357 | - | else (size( | |
365 | + | else (size(K) != 35)) | |
358 | 366 | then throw("Wrong address") | |
359 | - | else [StringEntry( | |
367 | + | else [StringEntry(H(I), K), StringEntry(J(K, I), I), IntegerEntry(L(I), aG), IntegerEntry(M(I), aH)] | |
360 | 368 | else throw("You are not allowed") | |
361 | 369 | } | |
362 | 370 | ||
363 | 371 | ||
364 | 372 | ||
365 | - | @Callable( | |
366 | - | func unsetAgent ( | |
373 | + | @Callable(ak) | |
374 | + | func unsetAgent (I,K) = if (!(j)) | |
367 | 375 | then throw(k) | |
368 | 376 | else { | |
369 | - | let w = toString( | |
377 | + | let w = toString(ak.caller) | |
370 | 378 | if (containsElement([f, toString(this)], w)) | |
371 | - | then if (if ((size( | |
379 | + | then if (if ((size(I) != 35)) | |
372 | 380 | then true | |
373 | - | else (size( | |
381 | + | else (size(K) != 35)) | |
374 | 382 | then throw("Wrong address") | |
375 | - | else [DeleteEntry( | |
383 | + | else [DeleteEntry(H(I)), DeleteEntry(J(K, I)), DeleteEntry(L(I)), DeleteEntry(M(I))] | |
376 | 384 | else throw("You are not allowed") | |
377 | 385 | } | |
378 | 386 | ||
379 | 387 | ||
380 | 388 | ||
381 | - | @Callable( | |
382 | - | func deleteEntry ( | |
383 | - | let w = toString( | |
389 | + | @Callable(ak) | |
390 | + | func deleteEntry (aI) = { | |
391 | + | let w = toString(ak.caller) | |
384 | 392 | if ((w == f)) | |
385 | - | then [DeleteEntry( | |
393 | + | then [DeleteEntry(aI)] | |
386 | 394 | else throw("no") | |
387 | 395 | } | |
388 | 396 | ||
389 | 397 | ||
390 | - | @Verifier( | |
391 | - | func | |
392 | - | let | |
393 | - | if ($isInstanceOf( | |
398 | + | @Verifier(aJ) | |
399 | + | func aK () = { | |
400 | + | let ah = aJ | |
401 | + | if ($isInstanceOf(ah, "InvokeScriptTransaction")) | |
394 | 402 | then { | |
395 | - | let | |
396 | - | if (if (if (if (( | |
397 | - | then ( | |
403 | + | let aL = ah | |
404 | + | if (if (if (if ((aL.function == "registerUser")) | |
405 | + | then (aL.dApp == this) | |
398 | 406 | else false) | |
399 | - | then ( | |
407 | + | then (aL.fee == 500000) | |
400 | 408 | else false) | |
401 | - | then ( | |
409 | + | then (aL.feeAssetId == unit) | |
402 | 410 | else false) | |
403 | - | then sigVerify( | |
404 | - | else if (if (if (if (( | |
405 | - | then ( | |
411 | + | then sigVerify(aJ.bodyBytes, aJ.proofs[0], fromBase58String(af(aL.args[5]))) | |
412 | + | else if (if (if (if ((aL.function == "updateUser")) | |
413 | + | then (aL.dApp == this) | |
406 | 414 | else false) | |
407 | - | then ( | |
415 | + | then (aL.fee == 500000) | |
408 | 416 | else false) | |
409 | - | then ( | |
417 | + | then (aL.feeAssetId == unit) | |
410 | 418 | else false) | |
411 | - | then sigVerify( | |
412 | - | else if (if (if (if (( | |
413 | - | then ( | |
419 | + | then sigVerify(aJ.bodyBytes, aJ.proofs[0], fromBase58String(af(aL.args[5]))) | |
420 | + | else if (if (if (if ((aL.function == "setERC20User")) | |
421 | + | then (aL.dApp == this) | |
414 | 422 | else false) | |
415 | - | then ( | |
423 | + | then (aL.fee == 500000) | |
416 | 424 | else false) | |
417 | - | then ( | |
425 | + | then (aL.feeAssetId == unit) | |
418 | 426 | else false) | |
419 | - | then sigVerify( | |
420 | - | else sigVerify( | |
427 | + | then sigVerify(aJ.bodyBytes, aJ.proofs[0], fromBase58String(af(aL.args[2]))) | |
428 | + | else sigVerify(aJ.bodyBytes, aJ.proofs[0], aJ.senderPublicKey) | |
421 | 429 | } | |
422 | - | else sigVerify( | |
430 | + | else sigVerify(aJ.bodyBytes, aJ.proofs[0], aJ.senderPublicKey) | |
423 | 431 | } | |
424 | 432 |
github/deemru/w8io/026f985 124.70 ms ◑