tx · 7xcn3V31q7UwN2HMFibSaj3zQtRMec2wXCxuN5XkK86V 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV: -0.01500000 Waves 2022.08.18 15:37 [2189920] smart account 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV > SELF 0.00000000 Waves
{ "type": 13, "id": "7xcn3V31q7UwN2HMFibSaj3zQtRMec2wXCxuN5XkK86V", "fee": 1500000, "feeAssetId": null, "timestamp": 1660826313645, "version": 1, "sender": "3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV", "senderPublicKey": "8KXPjDuC8ffL9qjNuDBLnkvJKbMojhZYcnm2o75UCyun", "proofs": [ "3gMUC8o3ANq6whCGZUyWShMAY2mcN6H9y4RqQbK4Fm7pcVdTzyresnWmviwUsWP2srfSeZLPJgzw1X5BNR3ZCcfF" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCAAAACIAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAAlpZHhMUEFzSWQAAAAAAAAAAAMAAAAACWlkeEFtQXNJZAAAAAAAAAAABAAAAAAJaWR4UHJBc0lkAAAAAAAAAAAFAAAAAA9pZHhGYWN0U3Rha0NudHIAAAAAAAAAAAEAAAAABWRlbGF5AgAAAAklc19fZGVsYXkBAAAAC2tleUZhY3RDbnRyAAAAAAIAAAATJXNfX2ZhY3RvcnlDb250cmFjdAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAALa2V5UG9vbEFkZHIAAAAAAgAAAA8lc19fcG9vbEFkZHJlc3MBAAAAC2tleUFtdEFzc2V0AAAAAA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hlIGFjdGlvbgUAAAADbmlsAgAAAAEgBgMJAAAAAAAAAgUAAAAMZW5zdXJlQ2FuR2V0BQAAAAxlbnN1cmVDYW5HZXQEAAAABHNldEkJAAP8AAAABAUAAAAMcG9vbENvbnRyYWN0AgAAAARzZXRJCQAETAAAAAIJAQAAABFsYXN0UHV0T25lVGtuQ2FsbAAAAAEFAAAABmNhbGxlcgkABEwAAAACBQAAAAZoZWlnaHQFAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAARzZXRJBQAAAARzZXRJBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleQ7KSFU=", "chainId": 84, "height": 2189920, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 43M1iQHGWVQYJZUbakYaWq6WtKtYShR5yZKZkGg29GV3 Next: AjrZYyknhMQJfF39Xkg6GTfMnwUnNN7fcACqoLA54hSA 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 (C,D) = valueOrErrorMessage(getString(C, D), makeString(["mandatory ", toString(C), ".", D, " not defined"], "")) | |
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 E (C,D) = valueOrErrorMessage(getInteger(C, D), makeString(["mandatory ", toString(C), ".", D, " not defined"], "")) | |
66 | + | ||
67 | + | ||
68 | + | let F = addressFromStringValue(B(this, l())) | |
69 | + | ||
70 | + | let G = addressFromStringValue(B(F, i())) | |
71 | + | ||
72 | + | func H () = { | |
73 | + | let I = B(F, m()) | |
74 | + | let J = B(F, n()) | |
75 | + | let K = E(G, z(J)) | |
76 | + | let x = E(G, z(I)) | |
77 | + | split(B(G, w(toString(x), toString(K))), a) | |
70 | 78 | } | |
71 | 79 | ||
72 | 80 | ||
73 | - | func | |
81 | + | func L () = split(B(G, v()), a) | |
74 | 82 | ||
75 | 83 | ||
76 | - | func | |
77 | - | let | |
78 | - | if ($isInstanceOf( | |
84 | + | func M () = { | |
85 | + | let N = getString(j()) | |
86 | + | if ($isInstanceOf(N, "String")) | |
79 | 87 | then { | |
80 | - | let | |
81 | - | fromBase58String( | |
88 | + | let O = N | |
89 | + | fromBase58String(O) | |
82 | 90 | } | |
83 | - | else if ($isInstanceOf( | |
91 | + | else if ($isInstanceOf(N, "Unit")) | |
84 | 92 | then unit | |
85 | 93 | else throw("Match error") | |
86 | 94 | } | |
87 | 95 | ||
88 | 96 | ||
89 | - | func | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
97 | + | func P () = { | |
98 | + | let N = getString(k()) | |
99 | + | if ($isInstanceOf(N, "String")) | |
92 | 100 | then { | |
93 | - | let | |
94 | - | fromBase58String( | |
101 | + | let O = N | |
102 | + | fromBase58String(O) | |
95 | 103 | } | |
96 | - | else if ($isInstanceOf( | |
104 | + | else if ($isInstanceOf(N, "Unit")) | |
97 | 105 | then unit | |
98 | 106 | else throw("Match error") | |
99 | 107 | } | |
100 | 108 | ||
101 | 109 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | if ($isInstanceOf( | |
110 | + | func Q (R) = { | |
111 | + | let S = throw("Permission denied") | |
112 | + | let N = M() | |
113 | + | if ($isInstanceOf(N, "ByteVector")) | |
106 | 114 | then { | |
107 | - | let | |
108 | - | if (( | |
115 | + | let T = N | |
116 | + | if ((R.callerPublicKey == T)) | |
109 | 117 | then true | |
110 | - | else | |
118 | + | else S | |
111 | 119 | } | |
112 | - | else if ($isInstanceOf( | |
113 | - | then if (( | |
120 | + | else if ($isInstanceOf(N, "Unit")) | |
121 | + | then if ((R.caller == this)) | |
114 | 122 | then true | |
115 | - | else | |
123 | + | else S | |
116 | 124 | else throw("Match error") | |
117 | 125 | } | |
118 | 126 | ||
119 | 127 | ||
120 | - | func | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
128 | + | func U () = { | |
129 | + | let N = getString(o()) | |
130 | + | if ($isInstanceOf(N, "String")) | |
123 | 131 | then { | |
124 | - | let | |
125 | - | if ((size( | |
132 | + | let O = N | |
133 | + | if ((size(O) == 0)) | |
126 | 134 | then nil | |
127 | - | else split( | |
135 | + | else split(O, a) | |
128 | 136 | } | |
129 | 137 | else nil | |
130 | 138 | } | |
131 | 139 | ||
132 | 140 | ||
133 | - | func | |
141 | + | func V (R) = if (containsElement(U(), toBase58String(R.callerPublicKey))) | |
134 | 142 | then true | |
135 | - | else | |
143 | + | else Q(R) | |
136 | 144 | ||
137 | 145 | ||
138 | - | func | |
146 | + | func W (R) = if ((R.caller == F)) | |
139 | 147 | then true | |
140 | 148 | else throw("caller must be the pool") | |
141 | 149 | ||
142 | 150 | ||
143 | - | @Callable( | |
144 | - | func constructor ( | |
145 | - | let | |
146 | - | if (( | |
147 | - | then [StringEntry( | |
151 | + | @Callable(R) | |
152 | + | func constructor (X) = { | |
153 | + | let Y = Q(R) | |
154 | + | if ((Y == Y)) | |
155 | + | then [StringEntry(l(), X)] | |
148 | 156 | else throw("Strict value is not equal to itself.") | |
149 | 157 | } | |
150 | 158 | ||
151 | 159 | ||
152 | 160 | ||
153 | - | @Callable( | |
154 | - | func setManager ( | |
155 | - | let | |
156 | - | if (( | |
161 | + | @Callable(R) | |
162 | + | func setManager (Z) = { | |
163 | + | let Y = Q(R) | |
164 | + | if ((Y == Y)) | |
157 | 165 | then { | |
158 | - | let | |
159 | - | if (( | |
160 | - | then [StringEntry( | |
166 | + | let aa = fromBase58String(Z) | |
167 | + | if ((aa == aa)) | |
168 | + | then [StringEntry(k(), Z)] | |
161 | 169 | else throw("Strict value is not equal to itself.") | |
162 | 170 | } | |
163 | 171 | else throw("Strict value is not equal to itself.") | |
165 | 173 | ||
166 | 174 | ||
167 | 175 | ||
168 | - | @Callable( | |
176 | + | @Callable(R) | |
169 | 177 | func confirmManager () = { | |
170 | - | let | |
171 | - | let | |
178 | + | let ab = P() | |
179 | + | let ac = if (isDefined(ab)) | |
172 | 180 | then true | |
173 | 181 | else throw("No pending manager") | |
174 | - | if (( | |
182 | + | if ((ac == ac)) | |
175 | 183 | then { | |
176 | - | let | |
184 | + | let ad = if ((R.callerPublicKey == value(ab))) | |
177 | 185 | then true | |
178 | 186 | else throw("You are not pending manager") | |
179 | - | if (( | |
180 | - | then [StringEntry( | |
187 | + | if ((ad == ad)) | |
188 | + | then [StringEntry(j(), toBase58String(value(ab))), DeleteEntry(k())] | |
181 | 189 | else throw("Strict value is not equal to itself.") | |
182 | 190 | } | |
183 | 191 | else throw("Strict value is not equal to itself.") | |
185 | 193 | ||
186 | 194 | ||
187 | 195 | ||
188 | - | @Callable( | |
189 | - | func setAdmins ( | |
190 | - | let | |
191 | - | if (( | |
192 | - | then [StringEntry( | |
196 | + | @Callable(R) | |
197 | + | func setAdmins (ae) = { | |
198 | + | let Y = Q(R) | |
199 | + | if ((Y == Y)) | |
200 | + | then [StringEntry(o(), makeString(ae, a))] | |
193 | 201 | else throw("Strict value is not equal to itself.") | |
194 | 202 | } | |
195 | 203 | ||
196 | 204 | ||
197 | 205 | ||
198 | - | @Callable( | |
199 | - | func unstakeAndGetOneTkn ( | |
200 | - | let | |
206 | + | @Callable(R) | |
207 | + | func unstakeAndGetOneTkn (af,ag,ah,ai,aj,ak) = { | |
208 | + | let al = if ((size(R.payments) != 0)) | |
201 | 209 | then throw("No pmnts expd") | |
202 | 210 | else true | |
203 | - | if (( | |
211 | + | if ((al == al)) | |
204 | 212 | then { | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | if (( | |
213 | + | let am = H() | |
214 | + | let an = L() | |
215 | + | let ao = fromBase58String(am[d]) | |
216 | + | let ap = valueOrErrorMessage(addressFromString(an[g]), "Wr st addr") | |
217 | + | let aq = invoke(ap, "unstake", [toBase58String(ao), af], nil) | |
218 | + | if ((aq == aq)) | |
211 | 219 | then { | |
212 | - | let | |
213 | - | if (( | |
220 | + | let ar = reentrantInvoke(F, "getOneTkn", [ag, ah, ai, aj, ak], [AttachedPayment(ao, af)]) | |
221 | + | if ((ar == ar)) | |
214 | 222 | then nil | |
215 | 223 | else throw("Strict value is not equal to itself.") | |
216 | 224 | } | |
221 | 229 | ||
222 | 230 | ||
223 | 231 | ||
224 | - | @Callable( | |
225 | - | func setAmp ( | |
226 | - | let | |
227 | - | if (( | |
232 | + | @Callable(R) | |
233 | + | func setAmp (as) = { | |
234 | + | let Y = V(R) | |
235 | + | if ((Y == Y)) | |
228 | 236 | then { | |
229 | - | let | |
230 | - | let | |
231 | - | $Tuple2(nil, $Tuple2( | |
237 | + | let at = invoke(F, "setS", [p(), as], nil) | |
238 | + | let au = invoke(F, "setS", [q(height), as], nil) | |
239 | + | $Tuple2(nil, $Tuple2(at, au)) | |
232 | 240 | } | |
233 | 241 | else throw("Strict value is not equal to itself.") | |
234 | 242 | } | |
235 | 243 | ||
236 | 244 | ||
237 | - | @Verifier(ar) | |
238 | - | func as () = { | |
239 | - | let at = { | |
240 | - | let J = I() | |
241 | - | if ($isInstanceOf(J, "ByteVector")) | |
245 | + | ||
246 | + | @Callable(R) | |
247 | + | func ensureCanGetOneTkn (t) = { | |
248 | + | let Y = W(R) | |
249 | + | if ((Y == Y)) | |
250 | + | then { | |
251 | + | let av = { | |
252 | + | let N = getInteger(F, u(t)) | |
253 | + | if ($isInstanceOf(N, "Int")) | |
254 | + | then { | |
255 | + | let aw = N | |
256 | + | let ax = (aw + value(getInteger(F, h))) | |
257 | + | let ay = (height >= ax) | |
258 | + | let az = (ax - height) | |
259 | + | if (ay) | |
260 | + | then true | |
261 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
262 | + | } | |
263 | + | else true | |
264 | + | } | |
265 | + | if ((av == av)) | |
266 | + | then { | |
267 | + | let aA = { | |
268 | + | let N = getInteger(F, s(t)) | |
269 | + | if ($isInstanceOf(N, "Int")) | |
270 | + | then { | |
271 | + | let aw = N | |
272 | + | let ax = (aw + value(getInteger(F, h))) | |
273 | + | let aB = (height >= ax) | |
274 | + | let az = (ax - height) | |
275 | + | if (aB) | |
276 | + | then true | |
277 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
278 | + | } | |
279 | + | else true | |
280 | + | } | |
281 | + | if ((aA == aA)) | |
282 | + | then { | |
283 | + | let aC = invoke(F, "setI", [u(t), height], nil) | |
284 | + | if ((aC == aC)) | |
285 | + | then nil | |
286 | + | else throw("Strict value is not equal to itself.") | |
287 | + | } | |
288 | + | else throw("Strict value is not equal to itself.") | |
289 | + | } | |
290 | + | else throw("Strict value is not equal to itself.") | |
291 | + | } | |
292 | + | else throw("Strict value is not equal to itself.") | |
293 | + | } | |
294 | + | ||
295 | + | ||
296 | + | ||
297 | + | @Callable(R) | |
298 | + | func ensureCanPutOneTkn (t) = { | |
299 | + | let Y = W(R) | |
300 | + | if ((Y == Y)) | |
301 | + | then { | |
302 | + | let av = { | |
303 | + | let N = getInteger(F, u(t)) | |
304 | + | if ($isInstanceOf(N, "Int")) | |
305 | + | then { | |
306 | + | let aw = N | |
307 | + | let ax = (aw + value(getInteger(F, h))) | |
308 | + | let ay = (height >= ax) | |
309 | + | let az = (ax - height) | |
310 | + | if (ay) | |
311 | + | then true | |
312 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
313 | + | } | |
314 | + | else true | |
315 | + | } | |
316 | + | if ((av == av)) | |
317 | + | then { | |
318 | + | let aA = { | |
319 | + | let N = getInteger(F, s(t)) | |
320 | + | if ($isInstanceOf(N, "Int")) | |
321 | + | then { | |
322 | + | let aw = N | |
323 | + | let ax = (aw + value(getInteger(F, h))) | |
324 | + | let aB = (height >= ax) | |
325 | + | let az = (ax - height) | |
326 | + | if (aB) | |
327 | + | then true | |
328 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
329 | + | } | |
330 | + | else true | |
331 | + | } | |
332 | + | if ((aA == aA)) | |
333 | + | then { | |
334 | + | let aC = invoke(F, "setI", [u(t), height], nil) | |
335 | + | if ((aC == aC)) | |
336 | + | then nil | |
337 | + | else throw("Strict value is not equal to itself.") | |
338 | + | } | |
339 | + | else throw("Strict value is not equal to itself.") | |
340 | + | } | |
341 | + | else throw("Strict value is not equal to itself.") | |
342 | + | } | |
343 | + | else throw("Strict value is not equal to itself.") | |
344 | + | } | |
345 | + | ||
346 | + | ||
347 | + | @Verifier(aD) | |
348 | + | func aE () = { | |
349 | + | let aF = { | |
350 | + | let N = M() | |
351 | + | if ($isInstanceOf(N, "ByteVector")) | |
242 | 352 | then { | |
243 | - | let | |
244 | - | | |
353 | + | let T = N | |
354 | + | T | |
245 | 355 | } | |
246 | - | else if ($isInstanceOf( | |
247 | - | then | |
356 | + | else if ($isInstanceOf(N, "Unit")) | |
357 | + | then aD.senderPublicKey | |
248 | 358 | else throw("Match error") | |
249 | 359 | } | |
250 | - | sigVerify( | |
360 | + | sigVerify(aD.bodyBytes, aD.proofs[0], aF) | |
251 | 361 | } | |
252 | 362 |
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 (C,D) = valueOrErrorMessage(getString(C, D), makeString(["mandatory ", toString(C), ".", D, " not defined"], "")) | |
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 E (C,D) = valueOrErrorMessage(getInteger(C, D), makeString(["mandatory ", toString(C), ".", D, " not defined"], "")) | |
66 | + | ||
67 | + | ||
68 | + | let F = addressFromStringValue(B(this, l())) | |
69 | + | ||
70 | + | let G = addressFromStringValue(B(F, i())) | |
71 | + | ||
72 | + | func H () = { | |
73 | + | let I = B(F, m()) | |
74 | + | let J = B(F, n()) | |
75 | + | let K = E(G, z(J)) | |
76 | + | let x = E(G, z(I)) | |
77 | + | split(B(G, w(toString(x), toString(K))), a) | |
70 | 78 | } | |
71 | 79 | ||
72 | 80 | ||
73 | - | func | |
81 | + | func L () = split(B(G, v()), a) | |
74 | 82 | ||
75 | 83 | ||
76 | - | func | |
77 | - | let | |
78 | - | if ($isInstanceOf( | |
84 | + | func M () = { | |
85 | + | let N = getString(j()) | |
86 | + | if ($isInstanceOf(N, "String")) | |
79 | 87 | then { | |
80 | - | let | |
81 | - | fromBase58String( | |
88 | + | let O = N | |
89 | + | fromBase58String(O) | |
82 | 90 | } | |
83 | - | else if ($isInstanceOf( | |
91 | + | else if ($isInstanceOf(N, "Unit")) | |
84 | 92 | then unit | |
85 | 93 | else throw("Match error") | |
86 | 94 | } | |
87 | 95 | ||
88 | 96 | ||
89 | - | func | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
97 | + | func P () = { | |
98 | + | let N = getString(k()) | |
99 | + | if ($isInstanceOf(N, "String")) | |
92 | 100 | then { | |
93 | - | let | |
94 | - | fromBase58String( | |
101 | + | let O = N | |
102 | + | fromBase58String(O) | |
95 | 103 | } | |
96 | - | else if ($isInstanceOf( | |
104 | + | else if ($isInstanceOf(N, "Unit")) | |
97 | 105 | then unit | |
98 | 106 | else throw("Match error") | |
99 | 107 | } | |
100 | 108 | ||
101 | 109 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | if ($isInstanceOf( | |
110 | + | func Q (R) = { | |
111 | + | let S = throw("Permission denied") | |
112 | + | let N = M() | |
113 | + | if ($isInstanceOf(N, "ByteVector")) | |
106 | 114 | then { | |
107 | - | let | |
108 | - | if (( | |
115 | + | let T = N | |
116 | + | if ((R.callerPublicKey == T)) | |
109 | 117 | then true | |
110 | - | else | |
118 | + | else S | |
111 | 119 | } | |
112 | - | else if ($isInstanceOf( | |
113 | - | then if (( | |
120 | + | else if ($isInstanceOf(N, "Unit")) | |
121 | + | then if ((R.caller == this)) | |
114 | 122 | then true | |
115 | - | else | |
123 | + | else S | |
116 | 124 | else throw("Match error") | |
117 | 125 | } | |
118 | 126 | ||
119 | 127 | ||
120 | - | func | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
128 | + | func U () = { | |
129 | + | let N = getString(o()) | |
130 | + | if ($isInstanceOf(N, "String")) | |
123 | 131 | then { | |
124 | - | let | |
125 | - | if ((size( | |
132 | + | let O = N | |
133 | + | if ((size(O) == 0)) | |
126 | 134 | then nil | |
127 | - | else split( | |
135 | + | else split(O, a) | |
128 | 136 | } | |
129 | 137 | else nil | |
130 | 138 | } | |
131 | 139 | ||
132 | 140 | ||
133 | - | func | |
141 | + | func V (R) = if (containsElement(U(), toBase58String(R.callerPublicKey))) | |
134 | 142 | then true | |
135 | - | else | |
143 | + | else Q(R) | |
136 | 144 | ||
137 | 145 | ||
138 | - | func | |
146 | + | func W (R) = if ((R.caller == F)) | |
139 | 147 | then true | |
140 | 148 | else throw("caller must be the pool") | |
141 | 149 | ||
142 | 150 | ||
143 | - | @Callable( | |
144 | - | func constructor ( | |
145 | - | let | |
146 | - | if (( | |
147 | - | then [StringEntry( | |
151 | + | @Callable(R) | |
152 | + | func constructor (X) = { | |
153 | + | let Y = Q(R) | |
154 | + | if ((Y == Y)) | |
155 | + | then [StringEntry(l(), X)] | |
148 | 156 | else throw("Strict value is not equal to itself.") | |
149 | 157 | } | |
150 | 158 | ||
151 | 159 | ||
152 | 160 | ||
153 | - | @Callable( | |
154 | - | func setManager ( | |
155 | - | let | |
156 | - | if (( | |
161 | + | @Callable(R) | |
162 | + | func setManager (Z) = { | |
163 | + | let Y = Q(R) | |
164 | + | if ((Y == Y)) | |
157 | 165 | then { | |
158 | - | let | |
159 | - | if (( | |
160 | - | then [StringEntry( | |
166 | + | let aa = fromBase58String(Z) | |
167 | + | if ((aa == aa)) | |
168 | + | then [StringEntry(k(), Z)] | |
161 | 169 | else throw("Strict value is not equal to itself.") | |
162 | 170 | } | |
163 | 171 | else throw("Strict value is not equal to itself.") | |
164 | 172 | } | |
165 | 173 | ||
166 | 174 | ||
167 | 175 | ||
168 | - | @Callable( | |
176 | + | @Callable(R) | |
169 | 177 | func confirmManager () = { | |
170 | - | let | |
171 | - | let | |
178 | + | let ab = P() | |
179 | + | let ac = if (isDefined(ab)) | |
172 | 180 | then true | |
173 | 181 | else throw("No pending manager") | |
174 | - | if (( | |
182 | + | if ((ac == ac)) | |
175 | 183 | then { | |
176 | - | let | |
184 | + | let ad = if ((R.callerPublicKey == value(ab))) | |
177 | 185 | then true | |
178 | 186 | else throw("You are not pending manager") | |
179 | - | if (( | |
180 | - | then [StringEntry( | |
187 | + | if ((ad == ad)) | |
188 | + | then [StringEntry(j(), toBase58String(value(ab))), DeleteEntry(k())] | |
181 | 189 | else throw("Strict value is not equal to itself.") | |
182 | 190 | } | |
183 | 191 | else throw("Strict value is not equal to itself.") | |
184 | 192 | } | |
185 | 193 | ||
186 | 194 | ||
187 | 195 | ||
188 | - | @Callable( | |
189 | - | func setAdmins ( | |
190 | - | let | |
191 | - | if (( | |
192 | - | then [StringEntry( | |
196 | + | @Callable(R) | |
197 | + | func setAdmins (ae) = { | |
198 | + | let Y = Q(R) | |
199 | + | if ((Y == Y)) | |
200 | + | then [StringEntry(o(), makeString(ae, a))] | |
193 | 201 | else throw("Strict value is not equal to itself.") | |
194 | 202 | } | |
195 | 203 | ||
196 | 204 | ||
197 | 205 | ||
198 | - | @Callable( | |
199 | - | func unstakeAndGetOneTkn ( | |
200 | - | let | |
206 | + | @Callable(R) | |
207 | + | func unstakeAndGetOneTkn (af,ag,ah,ai,aj,ak) = { | |
208 | + | let al = if ((size(R.payments) != 0)) | |
201 | 209 | then throw("No pmnts expd") | |
202 | 210 | else true | |
203 | - | if (( | |
211 | + | if ((al == al)) | |
204 | 212 | then { | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | if (( | |
213 | + | let am = H() | |
214 | + | let an = L() | |
215 | + | let ao = fromBase58String(am[d]) | |
216 | + | let ap = valueOrErrorMessage(addressFromString(an[g]), "Wr st addr") | |
217 | + | let aq = invoke(ap, "unstake", [toBase58String(ao), af], nil) | |
218 | + | if ((aq == aq)) | |
211 | 219 | then { | |
212 | - | let | |
213 | - | if (( | |
220 | + | let ar = reentrantInvoke(F, "getOneTkn", [ag, ah, ai, aj, ak], [AttachedPayment(ao, af)]) | |
221 | + | if ((ar == ar)) | |
214 | 222 | then nil | |
215 | 223 | else throw("Strict value is not equal to itself.") | |
216 | 224 | } | |
217 | 225 | else throw("Strict value is not equal to itself.") | |
218 | 226 | } | |
219 | 227 | else throw("Strict value is not equal to itself.") | |
220 | 228 | } | |
221 | 229 | ||
222 | 230 | ||
223 | 231 | ||
224 | - | @Callable( | |
225 | - | func setAmp ( | |
226 | - | let | |
227 | - | if (( | |
232 | + | @Callable(R) | |
233 | + | func setAmp (as) = { | |
234 | + | let Y = V(R) | |
235 | + | if ((Y == Y)) | |
228 | 236 | then { | |
229 | - | let | |
230 | - | let | |
231 | - | $Tuple2(nil, $Tuple2( | |
237 | + | let at = invoke(F, "setS", [p(), as], nil) | |
238 | + | let au = invoke(F, "setS", [q(height), as], nil) | |
239 | + | $Tuple2(nil, $Tuple2(at, au)) | |
232 | 240 | } | |
233 | 241 | else throw("Strict value is not equal to itself.") | |
234 | 242 | } | |
235 | 243 | ||
236 | 244 | ||
237 | - | @Verifier(ar) | |
238 | - | func as () = { | |
239 | - | let at = { | |
240 | - | let J = I() | |
241 | - | if ($isInstanceOf(J, "ByteVector")) | |
245 | + | ||
246 | + | @Callable(R) | |
247 | + | func ensureCanGetOneTkn (t) = { | |
248 | + | let Y = W(R) | |
249 | + | if ((Y == Y)) | |
250 | + | then { | |
251 | + | let av = { | |
252 | + | let N = getInteger(F, u(t)) | |
253 | + | if ($isInstanceOf(N, "Int")) | |
254 | + | then { | |
255 | + | let aw = N | |
256 | + | let ax = (aw + value(getInteger(F, h))) | |
257 | + | let ay = (height >= ax) | |
258 | + | let az = (ax - height) | |
259 | + | if (ay) | |
260 | + | then true | |
261 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
262 | + | } | |
263 | + | else true | |
264 | + | } | |
265 | + | if ((av == av)) | |
266 | + | then { | |
267 | + | let aA = { | |
268 | + | let N = getInteger(F, s(t)) | |
269 | + | if ($isInstanceOf(N, "Int")) | |
270 | + | then { | |
271 | + | let aw = N | |
272 | + | let ax = (aw + value(getInteger(F, h))) | |
273 | + | let aB = (height >= ax) | |
274 | + | let az = (ax - height) | |
275 | + | if (aB) | |
276 | + | then true | |
277 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
278 | + | } | |
279 | + | else true | |
280 | + | } | |
281 | + | if ((aA == aA)) | |
282 | + | then { | |
283 | + | let aC = invoke(F, "setI", [u(t), height], nil) | |
284 | + | if ((aC == aC)) | |
285 | + | then nil | |
286 | + | else throw("Strict value is not equal to itself.") | |
287 | + | } | |
288 | + | else throw("Strict value is not equal to itself.") | |
289 | + | } | |
290 | + | else throw("Strict value is not equal to itself.") | |
291 | + | } | |
292 | + | else throw("Strict value is not equal to itself.") | |
293 | + | } | |
294 | + | ||
295 | + | ||
296 | + | ||
297 | + | @Callable(R) | |
298 | + | func ensureCanPutOneTkn (t) = { | |
299 | + | let Y = W(R) | |
300 | + | if ((Y == Y)) | |
301 | + | then { | |
302 | + | let av = { | |
303 | + | let N = getInteger(F, u(t)) | |
304 | + | if ($isInstanceOf(N, "Int")) | |
305 | + | then { | |
306 | + | let aw = N | |
307 | + | let ax = (aw + value(getInteger(F, h))) | |
308 | + | let ay = (height >= ax) | |
309 | + | let az = (ax - height) | |
310 | + | if (ay) | |
311 | + | then true | |
312 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
313 | + | } | |
314 | + | else true | |
315 | + | } | |
316 | + | if ((av == av)) | |
317 | + | then { | |
318 | + | let aA = { | |
319 | + | let N = getInteger(F, s(t)) | |
320 | + | if ($isInstanceOf(N, "Int")) | |
321 | + | then { | |
322 | + | let aw = N | |
323 | + | let ax = (aw + value(getInteger(F, h))) | |
324 | + | let aB = (height >= ax) | |
325 | + | let az = (ax - height) | |
326 | + | if (aB) | |
327 | + | then true | |
328 | + | else throw(makeString(["you should wait", toString(az), "blocks more to perform the action"], " ")) | |
329 | + | } | |
330 | + | else true | |
331 | + | } | |
332 | + | if ((aA == aA)) | |
333 | + | then { | |
334 | + | let aC = invoke(F, "setI", [u(t), height], nil) | |
335 | + | if ((aC == aC)) | |
336 | + | then nil | |
337 | + | else throw("Strict value is not equal to itself.") | |
338 | + | } | |
339 | + | else throw("Strict value is not equal to itself.") | |
340 | + | } | |
341 | + | else throw("Strict value is not equal to itself.") | |
342 | + | } | |
343 | + | else throw("Strict value is not equal to itself.") | |
344 | + | } | |
345 | + | ||
346 | + | ||
347 | + | @Verifier(aD) | |
348 | + | func aE () = { | |
349 | + | let aF = { | |
350 | + | let N = M() | |
351 | + | if ($isInstanceOf(N, "ByteVector")) | |
242 | 352 | then { | |
243 | - | let | |
244 | - | | |
353 | + | let T = N | |
354 | + | T | |
245 | 355 | } | |
246 | - | else if ($isInstanceOf( | |
247 | - | then | |
356 | + | else if ($isInstanceOf(N, "Unit")) | |
357 | + | then aD.senderPublicKey | |
248 | 358 | else throw("Match error") | |
249 | 359 | } | |
250 | - | sigVerify( | |
360 | + | sigVerify(aD.bodyBytes, aD.proofs[0], aF) | |
251 | 361 | } | |
252 | 362 |
github/deemru/w8io/169f3d6 72.47 ms ◑