tx · 8ymj6hzeVJHuMzMvKGZC62TPWBytjr1WRWoRtavBd6WH 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV: -0.01500000 Waves 2022.09.02 11:04 [2211254] smart account 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV > SELF 0.00000000 Waves
{ "type": 13, "id": "8ymj6hzeVJHuMzMvKGZC62TPWBytjr1WRWoRtavBd6WH", "fee": 1500000, "feeAssetId": null, "timestamp": 1662105862730, "version": 2, "chainId": 84, "sender": "3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV", "senderPublicKey": "8KXPjDuC8ffL9qjNuDBLnkvJKbMojhZYcnm2o75UCyun", "proofs": [ "33fzBK5fDRraXg5NbePFgxJWwKjx3wrzhozPvprnYmwBC8NejAYq9G6n2hkqZq94gu2ZJ1PaAUpLYDrhRHftFMA7" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCAAAACMAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAAlpZHhMUEFzSWQAAAAAAAAAAAMAAAAACWlkeEFtQXNJZAAAAAAAAAAABAAAAAAJaWR4UHJBc0lkAAAAAAAAAAAFAAAAAA9pZHhGYWN0U3Rha0NudHIAAAAAAAAAAAEAAAAABWRlbGF5AgAAAAklc19fZGVsYXkBAAAAC2tleUZhY3RDbnRyAAAAAAIAAAATJXNfX2ZhY3RvcnlDb250cmFjdAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAALa2V5UG9vbEFkZHIAAAAAAgAAAA8lc19fcG9vbEFkZHJlc3MBAAAAC2tleUFtdEFzc2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WN0aW9uBAAAAAFzBQAAAAckbWF0Y2gwBAAAAAduZXdIYXNoCQAB9gAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAAFzAAAABnNjcmlwdAQAAAALYWxsb3dlZEhhc2gJAAJbAAAAAQkBAAAABXZhbHVlAAAAAQkABB0AAAACBQAAAA9mYWN0b3J5Q29udHJhY3QJAQAAACFrZXlBbGxvd2VkTHBTdGFibGVBZGRvblNjcmlwdEhhc2gAAAAABAAAAAtjdXJyZW50SGFzaAkAA/EAAAABBQAAAAR0aGlzAwMJAAAAAAAAAgUAAAALYWxsb3dlZEhhc2gFAAAAB25ld0hhc2gJAQAAAAIhPQAAAAIFAAAAC2N1cnJlbnRIYXNoBQAAAAduZXdIYXNoBwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXkJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXkEAUwr", "height": 2211254, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HGW6D3CpavRxM9jodJHUydkjwT4bSZPe9Q7FqUJwMTMd Next: 8ejagzni4ZP8hdKbfST6QzK9ZvUgYoDjpHGNPqeJDwb4 Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = 1 | |
17 | 17 | ||
18 | - | func h () = "%s__factoryContract" | |
18 | + | let h = "%s__delay" | |
19 | + | ||
20 | + | func i () = "%s__factoryContract" | |
19 | 21 | ||
20 | 22 | ||
21 | - | func | |
23 | + | func j () = "%s__managerPublicKey" | |
22 | 24 | ||
23 | 25 | ||
24 | - | func | |
26 | + | func k () = "%s__pendingManagerPublicKey" | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
29 | + | func l () = "%s__poolAddress" | |
28 | 30 | ||
29 | 31 | ||
30 | - | func | |
32 | + | func m () = "%s__amountAsset" | |
31 | 33 | ||
32 | 34 | ||
33 | - | func | |
35 | + | func n () = "%s__priceAsset" | |
34 | 36 | ||
35 | 37 | ||
36 | - | func | |
38 | + | func o () = "%s__adminPubKeys" | |
37 | 39 | ||
38 | 40 | ||
39 | - | func | |
41 | + | func p () = "%s__amp" | |
40 | 42 | ||
41 | 43 | ||
42 | - | func | |
44 | + | func q (r) = ("%s%d__amp__" + toString(r)) | |
43 | 45 | ||
44 | 46 | ||
45 | - | func | |
47 | + | func s (t) = makeString(["%s%s__lastGetOneTknCall", t], a) | |
46 | 48 | ||
47 | 49 | ||
48 | - | func | |
50 | + | func u (t) = makeString(["%s%s__lastPutOneTknCall", t], a) | |
49 | 51 | ||
50 | 52 | ||
51 | - | func v ( | |
53 | + | func v () = "%s__factoryConfig" | |
52 | 54 | ||
53 | 55 | ||
54 | - | func | |
56 | + | func w (x,y) = (((("%d%d%s__" + x) + "__") + y) + "__config") | |
55 | 57 | ||
56 | 58 | ||
57 | - | func | |
59 | + | func z (A) = ("%s%s%s__mappings__baseAsset2internalId__" + A) | |
58 | 60 | ||
59 | 61 | ||
60 | - | ||
62 | + | func B () = "%s__allowedLpStableAddonScriptHash" | |
61 | 63 | ||
62 | - | let C = addressFromStringValue(x(B, h())) | |
63 | 64 | ||
64 | - | func D () = { | |
65 | - | let E = x(B, l()) | |
66 | - | let F = x(B, m()) | |
67 | - | let G = A(C, v(F)) | |
68 | - | let t = A(C, v(E)) | |
69 | - | split(x(C, s(toString(t), toString(G))), a) | |
65 | + | func C (D,E) = valueOrErrorMessage(getString(D, E), makeString(["mandatory ", toString(D), ".", E, " not defined"], "")) | |
66 | + | ||
67 | + | ||
68 | + | func F (D,E) = valueOrErrorMessage(getInteger(D, E), makeString(["mandatory ", toString(D), ".", E, " not defined"], "")) | |
69 | + | ||
70 | + | ||
71 | + | let G = addressFromStringValue(C(this, l())) | |
72 | + | ||
73 | + | let H = addressFromStringValue(C(G, i())) | |
74 | + | ||
75 | + | func I () = { | |
76 | + | let J = C(G, m()) | |
77 | + | let K = C(G, n()) | |
78 | + | let L = F(H, z(K)) | |
79 | + | let x = F(H, z(J)) | |
80 | + | split(C(H, w(toString(x), toString(L))), a) | |
70 | 81 | } | |
71 | 82 | ||
72 | 83 | ||
73 | - | func | |
84 | + | func M () = split(C(H, v()), a) | |
74 | 85 | ||
75 | 86 | ||
76 | - | func | |
77 | - | let | |
78 | - | if ($isInstanceOf( | |
87 | + | func N () = { | |
88 | + | let O = getString(j()) | |
89 | + | if ($isInstanceOf(O, "String")) | |
79 | 90 | then { | |
80 | - | let | |
81 | - | fromBase58String( | |
91 | + | let P = O | |
92 | + | fromBase58String(P) | |
82 | 93 | } | |
83 | - | else if ($isInstanceOf( | |
94 | + | else if ($isInstanceOf(O, "Unit")) | |
84 | 95 | then unit | |
85 | 96 | else throw("Match error") | |
86 | 97 | } | |
87 | 98 | ||
88 | 99 | ||
89 | - | func | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
100 | + | func Q () = { | |
101 | + | let O = getString(k()) | |
102 | + | if ($isInstanceOf(O, "String")) | |
92 | 103 | then { | |
93 | - | let | |
94 | - | fromBase58String( | |
104 | + | let P = O | |
105 | + | fromBase58String(P) | |
95 | 106 | } | |
96 | - | else if ($isInstanceOf( | |
107 | + | else if ($isInstanceOf(O, "Unit")) | |
97 | 108 | then unit | |
98 | 109 | else throw("Match error") | |
99 | 110 | } | |
100 | 111 | ||
101 | 112 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | if ($isInstanceOf( | |
113 | + | func R (S) = { | |
114 | + | let T = throw("Permission denied") | |
115 | + | let O = N() | |
116 | + | if ($isInstanceOf(O, "ByteVector")) | |
106 | 117 | then { | |
107 | - | let | |
108 | - | if (( | |
118 | + | let U = O | |
119 | + | if ((S.callerPublicKey == U)) | |
109 | 120 | then true | |
110 | - | else | |
121 | + | else T | |
111 | 122 | } | |
112 | - | else if ($isInstanceOf( | |
113 | - | then if (( | |
123 | + | else if ($isInstanceOf(O, "Unit")) | |
124 | + | then if ((S.caller == this)) | |
114 | 125 | then true | |
115 | - | else | |
126 | + | else T | |
116 | 127 | else throw("Match error") | |
117 | 128 | } | |
118 | 129 | ||
119 | 130 | ||
120 | - | func | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
131 | + | func V () = { | |
132 | + | let O = getString(o()) | |
133 | + | if ($isInstanceOf(O, "String")) | |
123 | 134 | then { | |
124 | - | let | |
125 | - | if ((size( | |
135 | + | let P = O | |
136 | + | if ((size(P) == 0)) | |
126 | 137 | then nil | |
127 | - | else split( | |
138 | + | else split(P, a) | |
128 | 139 | } | |
129 | 140 | else nil | |
130 | 141 | } | |
131 | 142 | ||
132 | 143 | ||
133 | - | func | |
144 | + | func W (S) = if (containsElement(V(), toBase58String(S.callerPublicKey))) | |
134 | 145 | then true | |
135 | - | else | |
146 | + | else R(S) | |
136 | 147 | ||
137 | 148 | ||
138 | - | func | |
149 | + | func X (S) = if ((S.caller == G)) | |
139 | 150 | then true | |
140 | 151 | else throw("caller must be the pool") | |
141 | 152 | ||
142 | 153 | ||
143 | - | @Callable( | |
144 | - | func constructor ( | |
145 | - | let | |
146 | - | if (( | |
147 | - | then [StringEntry( | |
154 | + | @Callable(S) | |
155 | + | func constructor (Y) = { | |
156 | + | let Z = R(S) | |
157 | + | if ((Z == Z)) | |
158 | + | then [StringEntry(l(), Y)] | |
148 | 159 | else throw("Strict value is not equal to itself.") | |
149 | 160 | } | |
150 | 161 | ||
151 | 162 | ||
152 | 163 | ||
153 | - | @Callable( | |
154 | - | func setManager ( | |
155 | - | let | |
156 | - | if (( | |
164 | + | @Callable(S) | |
165 | + | func setManager (aa) = { | |
166 | + | let Z = R(S) | |
167 | + | if ((Z == Z)) | |
157 | 168 | then { | |
158 | - | let | |
159 | - | if (( | |
160 | - | then [StringEntry( | |
169 | + | let ab = fromBase58String(aa) | |
170 | + | if ((ab == ab)) | |
171 | + | then [StringEntry(k(), aa)] | |
161 | 172 | else throw("Strict value is not equal to itself.") | |
162 | 173 | } | |
163 | 174 | else throw("Strict value is not equal to itself.") | |
165 | 176 | ||
166 | 177 | ||
167 | 178 | ||
168 | - | @Callable( | |
179 | + | @Callable(S) | |
169 | 180 | func confirmManager () = { | |
170 | - | let | |
171 | - | let | |
181 | + | let ac = Q() | |
182 | + | let ad = if (isDefined(ac)) | |
172 | 183 | then true | |
173 | 184 | else throw("No pending manager") | |
174 | - | if (( | |
185 | + | if ((ad == ad)) | |
175 | 186 | then { | |
176 | - | let | |
187 | + | let ae = if ((S.callerPublicKey == value(ac))) | |
177 | 188 | then true | |
178 | 189 | else throw("You are not pending manager") | |
179 | - | if (( | |
180 | - | then [StringEntry( | |
190 | + | if ((ae == ae)) | |
191 | + | then [StringEntry(j(), toBase58String(value(ac))), DeleteEntry(k())] | |
181 | 192 | else throw("Strict value is not equal to itself.") | |
182 | 193 | } | |
183 | 194 | else throw("Strict value is not equal to itself.") | |
185 | 196 | ||
186 | 197 | ||
187 | 198 | ||
188 | - | @Callable( | |
189 | - | func setAdmins ( | |
190 | - | let | |
191 | - | if (( | |
192 | - | then [StringEntry( | |
199 | + | @Callable(S) | |
200 | + | func setAdmins (af) = { | |
201 | + | let Z = R(S) | |
202 | + | if ((Z == Z)) | |
203 | + | then [StringEntry(o(), makeString(af, a))] | |
193 | 204 | else throw("Strict value is not equal to itself.") | |
194 | 205 | } | |
195 | 206 | ||
196 | 207 | ||
197 | 208 | ||
198 | - | @Callable( | |
199 | - | func unstakeAndGetOneTkn ( | |
200 | - | let | |
209 | + | @Callable(S) | |
210 | + | func unstakeAndGetOneTkn (ag,ah,ai,aj,ak,al) = { | |
211 | + | let am = if ((size(S.payments) != 0)) | |
201 | 212 | then throw("No pmnts expd") | |
202 | 213 | else true | |
203 | - | if (( | |
214 | + | if ((am == am)) | |
204 | 215 | then { | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | if (( | |
216 | + | let an = I() | |
217 | + | let ao = M() | |
218 | + | let ap = fromBase58String(an[d]) | |
219 | + | let aq = valueOrErrorMessage(addressFromString(ao[g]), "Wr st addr") | |
220 | + | let ar = invoke(aq, "unstake", [toBase58String(ap), ag], nil) | |
221 | + | if ((ar == ar)) | |
211 | 222 | then { | |
212 | - | let | |
213 | - | if (( | |
223 | + | let as = reentrantInvoke(G, "getOneTkn", [ah, ai, aj, ak, al], [AttachedPayment(ap, ag)]) | |
224 | + | if ((as == as)) | |
214 | 225 | then nil | |
215 | 226 | else throw("Strict value is not equal to itself.") | |
216 | 227 | } | |
221 | 232 | ||
222 | 233 | ||
223 | 234 | ||
224 | - | @Callable( | |
225 | - | func setAmp ( | |
226 | - | let | |
227 | - | if (( | |
235 | + | @Callable(S) | |
236 | + | func setAmp (at) = { | |
237 | + | let Z = W(S) | |
238 | + | if ((Z == Z)) | |
228 | 239 | then { | |
229 | - | let | |
230 | - | let | |
231 | - | $Tuple2(nil, $Tuple2( | |
240 | + | let au = invoke(G, "setS", [p(), at], nil) | |
241 | + | let av = invoke(G, "setS", [q(height), at], nil) | |
242 | + | $Tuple2(nil, $Tuple2(au, av)) | |
232 | 243 | } | |
233 | 244 | else throw("Strict value is not equal to itself.") | |
234 | 245 | } | |
235 | 246 | ||
236 | 247 | ||
237 | - | @Verifier(ar) | |
238 | - | func as () = { | |
239 | - | let at = { | |
240 | - | let J = I() | |
241 | - | if ($isInstanceOf(J, "ByteVector")) | |
248 | + | ||
249 | + | @Callable(S) | |
250 | + | func ensureCanGetOneTkn (t) = { | |
251 | + | let Z = X(S) | |
252 | + | if ((Z == Z)) | |
253 | + | then { | |
254 | + | let aw = { | |
255 | + | let O = getInteger(G, u(t)) | |
256 | + | if ($isInstanceOf(O, "Int")) | |
257 | + | then { | |
258 | + | let ax = O | |
259 | + | let ay = (ax + value(getInteger(G, h))) | |
260 | + | let az = (height >= ay) | |
261 | + | let aA = (ay - height) | |
262 | + | if (az) | |
263 | + | then true | |
264 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
265 | + | } | |
266 | + | else true | |
267 | + | } | |
268 | + | if ((aw == aw)) | |
269 | + | then { | |
270 | + | let aB = { | |
271 | + | let O = getInteger(G, s(t)) | |
272 | + | if ($isInstanceOf(O, "Int")) | |
273 | + | then { | |
274 | + | let ax = O | |
275 | + | let ay = (ax + value(getInteger(G, h))) | |
276 | + | let aC = (height >= ay) | |
277 | + | let aA = (ay - height) | |
278 | + | if (aC) | |
279 | + | then true | |
280 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
281 | + | } | |
282 | + | else true | |
283 | + | } | |
284 | + | if ((aB == aB)) | |
285 | + | then { | |
286 | + | let aD = invoke(G, "setI", [u(t), height], nil) | |
287 | + | if ((aD == aD)) | |
288 | + | then nil | |
289 | + | else throw("Strict value is not equal to itself.") | |
290 | + | } | |
291 | + | else throw("Strict value is not equal to itself.") | |
292 | + | } | |
293 | + | else throw("Strict value is not equal to itself.") | |
294 | + | } | |
295 | + | else throw("Strict value is not equal to itself.") | |
296 | + | } | |
297 | + | ||
298 | + | ||
299 | + | ||
300 | + | @Callable(S) | |
301 | + | func ensureCanPutOneTkn (t) = { | |
302 | + | let Z = X(S) | |
303 | + | if ((Z == Z)) | |
304 | + | then { | |
305 | + | let aw = { | |
306 | + | let O = getInteger(G, u(t)) | |
307 | + | if ($isInstanceOf(O, "Int")) | |
308 | + | then { | |
309 | + | let ax = O | |
310 | + | let ay = (ax + value(getInteger(G, h))) | |
311 | + | let az = (height >= ay) | |
312 | + | let aA = (ay - height) | |
313 | + | if (az) | |
314 | + | then true | |
315 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
316 | + | } | |
317 | + | else true | |
318 | + | } | |
319 | + | if ((aw == aw)) | |
320 | + | then { | |
321 | + | let aB = { | |
322 | + | let O = getInteger(G, s(t)) | |
323 | + | if ($isInstanceOf(O, "Int")) | |
324 | + | then { | |
325 | + | let ax = O | |
326 | + | let ay = (ax + value(getInteger(G, h))) | |
327 | + | let aC = (height >= ay) | |
328 | + | let aA = (ay - height) | |
329 | + | if (aC) | |
330 | + | then true | |
331 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
332 | + | } | |
333 | + | else true | |
334 | + | } | |
335 | + | if ((aB == aB)) | |
336 | + | then { | |
337 | + | let aD = invoke(G, "setI", [u(t), height], nil) | |
338 | + | if ((aD == aD)) | |
339 | + | then nil | |
340 | + | else throw("Strict value is not equal to itself.") | |
341 | + | } | |
342 | + | else throw("Strict value is not equal to itself.") | |
343 | + | } | |
344 | + | else throw("Strict value is not equal to itself.") | |
345 | + | } | |
346 | + | else throw("Strict value is not equal to itself.") | |
347 | + | } | |
348 | + | ||
349 | + | ||
350 | + | @Verifier(aE) | |
351 | + | func aF () = { | |
352 | + | let aG = { | |
353 | + | let O = N() | |
354 | + | if ($isInstanceOf(O, "ByteVector")) | |
242 | 355 | then { | |
243 | - | let | |
244 | - | | |
356 | + | let U = O | |
357 | + | U | |
245 | 358 | } | |
246 | - | else if ($isInstanceOf( | |
247 | - | then | |
359 | + | else if ($isInstanceOf(O, "Unit")) | |
360 | + | then aE.senderPublicKey | |
248 | 361 | else throw("Match error") | |
249 | 362 | } | |
250 | - | sigVerify(ar.bodyBytes, ar.proofs[0], at) | |
363 | + | let O = aE | |
364 | + | if ($isInstanceOf(O, "SetScriptTransaction")) | |
365 | + | then { | |
366 | + | let P = O | |
367 | + | let aH = blake2b256(value(P.script)) | |
368 | + | let aI = fromBase64String(value(getString(H, B()))) | |
369 | + | let aJ = scriptHash(this) | |
370 | + | if (if ((aI == aH)) | |
371 | + | then (aJ != aH) | |
372 | + | else false) | |
373 | + | then true | |
374 | + | else sigVerify(aE.bodyBytes, aE.proofs[0], aG) | |
375 | + | } | |
376 | + | else sigVerify(aE.bodyBytes, aE.proofs[0], aG) | |
251 | 377 | } | |
252 | 378 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "" | |
7 | 7 | ||
8 | 8 | let c = 1 | |
9 | 9 | ||
10 | 10 | let d = 3 | |
11 | 11 | ||
12 | 12 | let e = 4 | |
13 | 13 | ||
14 | 14 | let f = 5 | |
15 | 15 | ||
16 | 16 | let g = 1 | |
17 | 17 | ||
18 | - | func h () = "%s__factoryContract" | |
18 | + | let h = "%s__delay" | |
19 | + | ||
20 | + | func i () = "%s__factoryContract" | |
19 | 21 | ||
20 | 22 | ||
21 | - | func | |
23 | + | func j () = "%s__managerPublicKey" | |
22 | 24 | ||
23 | 25 | ||
24 | - | func | |
26 | + | func k () = "%s__pendingManagerPublicKey" | |
25 | 27 | ||
26 | 28 | ||
27 | - | func | |
29 | + | func l () = "%s__poolAddress" | |
28 | 30 | ||
29 | 31 | ||
30 | - | func | |
32 | + | func m () = "%s__amountAsset" | |
31 | 33 | ||
32 | 34 | ||
33 | - | func | |
35 | + | func n () = "%s__priceAsset" | |
34 | 36 | ||
35 | 37 | ||
36 | - | func | |
38 | + | func o () = "%s__adminPubKeys" | |
37 | 39 | ||
38 | 40 | ||
39 | - | func | |
41 | + | func p () = "%s__amp" | |
40 | 42 | ||
41 | 43 | ||
42 | - | func | |
44 | + | func q (r) = ("%s%d__amp__" + toString(r)) | |
43 | 45 | ||
44 | 46 | ||
45 | - | func | |
47 | + | func s (t) = makeString(["%s%s__lastGetOneTknCall", t], a) | |
46 | 48 | ||
47 | 49 | ||
48 | - | func | |
50 | + | func u (t) = makeString(["%s%s__lastPutOneTknCall", t], a) | |
49 | 51 | ||
50 | 52 | ||
51 | - | func v ( | |
53 | + | func v () = "%s__factoryConfig" | |
52 | 54 | ||
53 | 55 | ||
54 | - | func | |
56 | + | func w (x,y) = (((("%d%d%s__" + x) + "__") + y) + "__config") | |
55 | 57 | ||
56 | 58 | ||
57 | - | func | |
59 | + | func z (A) = ("%s%s%s__mappings__baseAsset2internalId__" + A) | |
58 | 60 | ||
59 | 61 | ||
60 | - | ||
62 | + | func B () = "%s__allowedLpStableAddonScriptHash" | |
61 | 63 | ||
62 | - | let C = addressFromStringValue(x(B, h())) | |
63 | 64 | ||
64 | - | func D () = { | |
65 | - | let E = x(B, l()) | |
66 | - | let F = x(B, m()) | |
67 | - | let G = A(C, v(F)) | |
68 | - | let t = A(C, v(E)) | |
69 | - | split(x(C, s(toString(t), toString(G))), a) | |
65 | + | func C (D,E) = valueOrErrorMessage(getString(D, E), makeString(["mandatory ", toString(D), ".", E, " not defined"], "")) | |
66 | + | ||
67 | + | ||
68 | + | func F (D,E) = valueOrErrorMessage(getInteger(D, E), makeString(["mandatory ", toString(D), ".", E, " not defined"], "")) | |
69 | + | ||
70 | + | ||
71 | + | let G = addressFromStringValue(C(this, l())) | |
72 | + | ||
73 | + | let H = addressFromStringValue(C(G, i())) | |
74 | + | ||
75 | + | func I () = { | |
76 | + | let J = C(G, m()) | |
77 | + | let K = C(G, n()) | |
78 | + | let L = F(H, z(K)) | |
79 | + | let x = F(H, z(J)) | |
80 | + | split(C(H, w(toString(x), toString(L))), a) | |
70 | 81 | } | |
71 | 82 | ||
72 | 83 | ||
73 | - | func | |
84 | + | func M () = split(C(H, v()), a) | |
74 | 85 | ||
75 | 86 | ||
76 | - | func | |
77 | - | let | |
78 | - | if ($isInstanceOf( | |
87 | + | func N () = { | |
88 | + | let O = getString(j()) | |
89 | + | if ($isInstanceOf(O, "String")) | |
79 | 90 | then { | |
80 | - | let | |
81 | - | fromBase58String( | |
91 | + | let P = O | |
92 | + | fromBase58String(P) | |
82 | 93 | } | |
83 | - | else if ($isInstanceOf( | |
94 | + | else if ($isInstanceOf(O, "Unit")) | |
84 | 95 | then unit | |
85 | 96 | else throw("Match error") | |
86 | 97 | } | |
87 | 98 | ||
88 | 99 | ||
89 | - | func | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
100 | + | func Q () = { | |
101 | + | let O = getString(k()) | |
102 | + | if ($isInstanceOf(O, "String")) | |
92 | 103 | then { | |
93 | - | let | |
94 | - | fromBase58String( | |
104 | + | let P = O | |
105 | + | fromBase58String(P) | |
95 | 106 | } | |
96 | - | else if ($isInstanceOf( | |
107 | + | else if ($isInstanceOf(O, "Unit")) | |
97 | 108 | then unit | |
98 | 109 | else throw("Match error") | |
99 | 110 | } | |
100 | 111 | ||
101 | 112 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | if ($isInstanceOf( | |
113 | + | func R (S) = { | |
114 | + | let T = throw("Permission denied") | |
115 | + | let O = N() | |
116 | + | if ($isInstanceOf(O, "ByteVector")) | |
106 | 117 | then { | |
107 | - | let | |
108 | - | if (( | |
118 | + | let U = O | |
119 | + | if ((S.callerPublicKey == U)) | |
109 | 120 | then true | |
110 | - | else | |
121 | + | else T | |
111 | 122 | } | |
112 | - | else if ($isInstanceOf( | |
113 | - | then if (( | |
123 | + | else if ($isInstanceOf(O, "Unit")) | |
124 | + | then if ((S.caller == this)) | |
114 | 125 | then true | |
115 | - | else | |
126 | + | else T | |
116 | 127 | else throw("Match error") | |
117 | 128 | } | |
118 | 129 | ||
119 | 130 | ||
120 | - | func | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
131 | + | func V () = { | |
132 | + | let O = getString(o()) | |
133 | + | if ($isInstanceOf(O, "String")) | |
123 | 134 | then { | |
124 | - | let | |
125 | - | if ((size( | |
135 | + | let P = O | |
136 | + | if ((size(P) == 0)) | |
126 | 137 | then nil | |
127 | - | else split( | |
138 | + | else split(P, a) | |
128 | 139 | } | |
129 | 140 | else nil | |
130 | 141 | } | |
131 | 142 | ||
132 | 143 | ||
133 | - | func | |
144 | + | func W (S) = if (containsElement(V(), toBase58String(S.callerPublicKey))) | |
134 | 145 | then true | |
135 | - | else | |
146 | + | else R(S) | |
136 | 147 | ||
137 | 148 | ||
138 | - | func | |
149 | + | func X (S) = if ((S.caller == G)) | |
139 | 150 | then true | |
140 | 151 | else throw("caller must be the pool") | |
141 | 152 | ||
142 | 153 | ||
143 | - | @Callable( | |
144 | - | func constructor ( | |
145 | - | let | |
146 | - | if (( | |
147 | - | then [StringEntry( | |
154 | + | @Callable(S) | |
155 | + | func constructor (Y) = { | |
156 | + | let Z = R(S) | |
157 | + | if ((Z == Z)) | |
158 | + | then [StringEntry(l(), Y)] | |
148 | 159 | else throw("Strict value is not equal to itself.") | |
149 | 160 | } | |
150 | 161 | ||
151 | 162 | ||
152 | 163 | ||
153 | - | @Callable( | |
154 | - | func setManager ( | |
155 | - | let | |
156 | - | if (( | |
164 | + | @Callable(S) | |
165 | + | func setManager (aa) = { | |
166 | + | let Z = R(S) | |
167 | + | if ((Z == Z)) | |
157 | 168 | then { | |
158 | - | let | |
159 | - | if (( | |
160 | - | then [StringEntry( | |
169 | + | let ab = fromBase58String(aa) | |
170 | + | if ((ab == ab)) | |
171 | + | then [StringEntry(k(), aa)] | |
161 | 172 | else throw("Strict value is not equal to itself.") | |
162 | 173 | } | |
163 | 174 | else throw("Strict value is not equal to itself.") | |
164 | 175 | } | |
165 | 176 | ||
166 | 177 | ||
167 | 178 | ||
168 | - | @Callable( | |
179 | + | @Callable(S) | |
169 | 180 | func confirmManager () = { | |
170 | - | let | |
171 | - | let | |
181 | + | let ac = Q() | |
182 | + | let ad = if (isDefined(ac)) | |
172 | 183 | then true | |
173 | 184 | else throw("No pending manager") | |
174 | - | if (( | |
185 | + | if ((ad == ad)) | |
175 | 186 | then { | |
176 | - | let | |
187 | + | let ae = if ((S.callerPublicKey == value(ac))) | |
177 | 188 | then true | |
178 | 189 | else throw("You are not pending manager") | |
179 | - | if (( | |
180 | - | then [StringEntry( | |
190 | + | if ((ae == ae)) | |
191 | + | then [StringEntry(j(), toBase58String(value(ac))), DeleteEntry(k())] | |
181 | 192 | else throw("Strict value is not equal to itself.") | |
182 | 193 | } | |
183 | 194 | else throw("Strict value is not equal to itself.") | |
184 | 195 | } | |
185 | 196 | ||
186 | 197 | ||
187 | 198 | ||
188 | - | @Callable( | |
189 | - | func setAdmins ( | |
190 | - | let | |
191 | - | if (( | |
192 | - | then [StringEntry( | |
199 | + | @Callable(S) | |
200 | + | func setAdmins (af) = { | |
201 | + | let Z = R(S) | |
202 | + | if ((Z == Z)) | |
203 | + | then [StringEntry(o(), makeString(af, a))] | |
193 | 204 | else throw("Strict value is not equal to itself.") | |
194 | 205 | } | |
195 | 206 | ||
196 | 207 | ||
197 | 208 | ||
198 | - | @Callable( | |
199 | - | func unstakeAndGetOneTkn ( | |
200 | - | let | |
209 | + | @Callable(S) | |
210 | + | func unstakeAndGetOneTkn (ag,ah,ai,aj,ak,al) = { | |
211 | + | let am = if ((size(S.payments) != 0)) | |
201 | 212 | then throw("No pmnts expd") | |
202 | 213 | else true | |
203 | - | if (( | |
214 | + | if ((am == am)) | |
204 | 215 | then { | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | if (( | |
216 | + | let an = I() | |
217 | + | let ao = M() | |
218 | + | let ap = fromBase58String(an[d]) | |
219 | + | let aq = valueOrErrorMessage(addressFromString(ao[g]), "Wr st addr") | |
220 | + | let ar = invoke(aq, "unstake", [toBase58String(ap), ag], nil) | |
221 | + | if ((ar == ar)) | |
211 | 222 | then { | |
212 | - | let | |
213 | - | if (( | |
223 | + | let as = reentrantInvoke(G, "getOneTkn", [ah, ai, aj, ak, al], [AttachedPayment(ap, ag)]) | |
224 | + | if ((as == as)) | |
214 | 225 | then nil | |
215 | 226 | else throw("Strict value is not equal to itself.") | |
216 | 227 | } | |
217 | 228 | else throw("Strict value is not equal to itself.") | |
218 | 229 | } | |
219 | 230 | else throw("Strict value is not equal to itself.") | |
220 | 231 | } | |
221 | 232 | ||
222 | 233 | ||
223 | 234 | ||
224 | - | @Callable( | |
225 | - | func setAmp ( | |
226 | - | let | |
227 | - | if (( | |
235 | + | @Callable(S) | |
236 | + | func setAmp (at) = { | |
237 | + | let Z = W(S) | |
238 | + | if ((Z == Z)) | |
228 | 239 | then { | |
229 | - | let | |
230 | - | let | |
231 | - | $Tuple2(nil, $Tuple2( | |
240 | + | let au = invoke(G, "setS", [p(), at], nil) | |
241 | + | let av = invoke(G, "setS", [q(height), at], nil) | |
242 | + | $Tuple2(nil, $Tuple2(au, av)) | |
232 | 243 | } | |
233 | 244 | else throw("Strict value is not equal to itself.") | |
234 | 245 | } | |
235 | 246 | ||
236 | 247 | ||
237 | - | @Verifier(ar) | |
238 | - | func as () = { | |
239 | - | let at = { | |
240 | - | let J = I() | |
241 | - | if ($isInstanceOf(J, "ByteVector")) | |
248 | + | ||
249 | + | @Callable(S) | |
250 | + | func ensureCanGetOneTkn (t) = { | |
251 | + | let Z = X(S) | |
252 | + | if ((Z == Z)) | |
253 | + | then { | |
254 | + | let aw = { | |
255 | + | let O = getInteger(G, u(t)) | |
256 | + | if ($isInstanceOf(O, "Int")) | |
257 | + | then { | |
258 | + | let ax = O | |
259 | + | let ay = (ax + value(getInteger(G, h))) | |
260 | + | let az = (height >= ay) | |
261 | + | let aA = (ay - height) | |
262 | + | if (az) | |
263 | + | then true | |
264 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
265 | + | } | |
266 | + | else true | |
267 | + | } | |
268 | + | if ((aw == aw)) | |
269 | + | then { | |
270 | + | let aB = { | |
271 | + | let O = getInteger(G, s(t)) | |
272 | + | if ($isInstanceOf(O, "Int")) | |
273 | + | then { | |
274 | + | let ax = O | |
275 | + | let ay = (ax + value(getInteger(G, h))) | |
276 | + | let aC = (height >= ay) | |
277 | + | let aA = (ay - height) | |
278 | + | if (aC) | |
279 | + | then true | |
280 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
281 | + | } | |
282 | + | else true | |
283 | + | } | |
284 | + | if ((aB == aB)) | |
285 | + | then { | |
286 | + | let aD = invoke(G, "setI", [u(t), height], nil) | |
287 | + | if ((aD == aD)) | |
288 | + | then nil | |
289 | + | else throw("Strict value is not equal to itself.") | |
290 | + | } | |
291 | + | else throw("Strict value is not equal to itself.") | |
292 | + | } | |
293 | + | else throw("Strict value is not equal to itself.") | |
294 | + | } | |
295 | + | else throw("Strict value is not equal to itself.") | |
296 | + | } | |
297 | + | ||
298 | + | ||
299 | + | ||
300 | + | @Callable(S) | |
301 | + | func ensureCanPutOneTkn (t) = { | |
302 | + | let Z = X(S) | |
303 | + | if ((Z == Z)) | |
304 | + | then { | |
305 | + | let aw = { | |
306 | + | let O = getInteger(G, u(t)) | |
307 | + | if ($isInstanceOf(O, "Int")) | |
308 | + | then { | |
309 | + | let ax = O | |
310 | + | let ay = (ax + value(getInteger(G, h))) | |
311 | + | let az = (height >= ay) | |
312 | + | let aA = (ay - height) | |
313 | + | if (az) | |
314 | + | then true | |
315 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
316 | + | } | |
317 | + | else true | |
318 | + | } | |
319 | + | if ((aw == aw)) | |
320 | + | then { | |
321 | + | let aB = { | |
322 | + | let O = getInteger(G, s(t)) | |
323 | + | if ($isInstanceOf(O, "Int")) | |
324 | + | then { | |
325 | + | let ax = O | |
326 | + | let ay = (ax + value(getInteger(G, h))) | |
327 | + | let aC = (height >= ay) | |
328 | + | let aA = (ay - height) | |
329 | + | if (aC) | |
330 | + | then true | |
331 | + | else throw(makeString(["you should wait", toString(aA), "blocks more to perform the action"], " ")) | |
332 | + | } | |
333 | + | else true | |
334 | + | } | |
335 | + | if ((aB == aB)) | |
336 | + | then { | |
337 | + | let aD = invoke(G, "setI", [u(t), height], nil) | |
338 | + | if ((aD == aD)) | |
339 | + | then nil | |
340 | + | else throw("Strict value is not equal to itself.") | |
341 | + | } | |
342 | + | else throw("Strict value is not equal to itself.") | |
343 | + | } | |
344 | + | else throw("Strict value is not equal to itself.") | |
345 | + | } | |
346 | + | else throw("Strict value is not equal to itself.") | |
347 | + | } | |
348 | + | ||
349 | + | ||
350 | + | @Verifier(aE) | |
351 | + | func aF () = { | |
352 | + | let aG = { | |
353 | + | let O = N() | |
354 | + | if ($isInstanceOf(O, "ByteVector")) | |
242 | 355 | then { | |
243 | - | let | |
244 | - | | |
356 | + | let U = O | |
357 | + | U | |
245 | 358 | } | |
246 | - | else if ($isInstanceOf( | |
247 | - | then | |
359 | + | else if ($isInstanceOf(O, "Unit")) | |
360 | + | then aE.senderPublicKey | |
248 | 361 | else throw("Match error") | |
249 | 362 | } | |
250 | - | sigVerify(ar.bodyBytes, ar.proofs[0], at) | |
363 | + | let O = aE | |
364 | + | if ($isInstanceOf(O, "SetScriptTransaction")) | |
365 | + | then { | |
366 | + | let P = O | |
367 | + | let aH = blake2b256(value(P.script)) | |
368 | + | let aI = fromBase64String(value(getString(H, B()))) | |
369 | + | let aJ = scriptHash(this) | |
370 | + | if (if ((aI == aH)) | |
371 | + | then (aJ != aH) | |
372 | + | else false) | |
373 | + | then true | |
374 | + | else sigVerify(aE.bodyBytes, aE.proofs[0], aG) | |
375 | + | } | |
376 | + | else sigVerify(aE.bodyBytes, aE.proofs[0], aG) | |
251 | 377 | } | |
252 | 378 |
github/deemru/w8io/169f3d6 73.14 ms ◑