tx · 2xcQGonpbu4n6oi6xiThD3xHcvBevv3C9TEUjk4h5vj2 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV: -0.01300000 Waves 2022.08.15 13:51 [2185486] smart account 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV > SELF 0.00000000 Waves
{ "type": 13, "id": "2xcQGonpbu4n6oi6xiThD3xHcvBevv3C9TEUjk4h5vj2", "fee": 1300000, "feeAssetId": null, "timestamp": 1660560775830, "version": 1, "sender": "3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV", "senderPublicKey": "8KXPjDuC8ffL9qjNuDBLnkvJKbMojhZYcnm2o75UCyun", "proofs": [ "3puY3pDTXqiRp32RD2MM8XCPbFkRe5wmvS5BkB4EXdRpJQnSkFdj9f2a5MyAFJ9SrrntGH5BHBJV3Yu6mPuMuAVJ" ], "script": "base64:AAIFAAAAAAAAACIIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIAAAAHwAAAAADU0VQAgAAAAJfXwAAAAAFRU1QVFkCAAAAAAAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAEAAAAACWlkeExQQXNJZAAAAAAAAAAAAwAAAAAJaWR4QW1Bc0lkAAAAAAAAAAAEAAAAAAlpZHhQckFzSWQAAAAAAAAAAAUAAAAAD2lkeEZhY3RTdGFrQ250cgAAAAAAAAAAAQEAAAALa2V5RmFjdENudHIAAAAAAgAAABMlc19fZmFjdG9yeUNvbnRyYWN0AQAAABNrZXlNYW5hZ2VyUHVibGljS2V5AAAAAAIAAAAUJXNfX21hbmFnZXJQdWJsaWNLZXkBAAAAGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAAAAAIAAAAbJXNfX3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5AQAAAAtrZXlQb29sQWRkcgAAAAACAAAADyVzX19wb29sQWRkcmVzcwEAAAALa2V5QW10QXNzZXQAAAAAAgAAAA8lc19fYW1vdW50QXNzZXQBAAAAD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CQEAAAAGa2V5QW1wAAAAAAkABEwAAAACBQAAAANhbXAFAAAAA25pbAUAAAADbmlsBAAAAARyZXMyCQAD/AAAAAQFAAAADHBvb2xDb250cmFjdAIAAAAEc2V0UwkABEwAAAACCQEAAAANa2V5QW1wSGlzdG9yeQAAAAEFAAAABmhlaWdodAkABEwAAAACBQAAAANhbXAFAAAAA25pbAUAAAADbmlsCQAFFAAAAAIFAAAAA25pbAkABRQAAAACBQAAAARyZXMxBQAAAARyZXMyCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXmJkpk6", "chainId": 84, "height": 2185486, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 61f7eCfJ5XsdPNP6twKgLH4KAiF64rw1hwPmhXZzmAiG Next: 9ZsynwPZVsS8Y9FVUQdXMQmjrjt5kyBEvGpRvTvzArr4 Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = 1 | |
17 | 17 | ||
18 | - | let h = "%s__delay" | |
19 | - | ||
20 | - | func i () = "%s__factoryContract" | |
18 | + | func h () = "%s__factoryContract" | |
21 | 19 | ||
22 | 20 | ||
23 | - | func | |
21 | + | func i () = "%s__managerPublicKey" | |
24 | 22 | ||
25 | 23 | ||
26 | - | func | |
24 | + | func j () = "%s__pendingManagerPublicKey" | |
27 | 25 | ||
28 | 26 | ||
29 | - | func | |
27 | + | func k () = "%s__poolAddress" | |
30 | 28 | ||
31 | 29 | ||
32 | - | func | |
30 | + | func l () = "%s__amountAsset" | |
33 | 31 | ||
34 | 32 | ||
35 | - | func | |
33 | + | func m () = "%s__priceAsset" | |
36 | 34 | ||
37 | 35 | ||
38 | - | func | |
36 | + | func n () = "%s__adminPubKeys" | |
39 | 37 | ||
40 | 38 | ||
41 | - | func | |
39 | + | func o () = "%s__amp" | |
42 | 40 | ||
43 | 41 | ||
44 | - | func | |
42 | + | func p (q) = ("%s%d__amp__" + toString(q)) | |
45 | 43 | ||
46 | 44 | ||
47 | - | func | |
45 | + | func r () = "%s__factoryConfig" | |
48 | 46 | ||
49 | 47 | ||
50 | - | func | |
48 | + | func s (t,u) = (((("%d%d%s__" + t) + "__") + u) + "__config") | |
51 | 49 | ||
52 | 50 | ||
53 | - | func v () = "%s__ | |
51 | + | func v (w) = ("%s%s%s__mappings__baseAsset2internalId__" + w) | |
54 | 52 | ||
55 | 53 | ||
56 | - | func | |
54 | + | func x (y,z) = valueOrErrorMessage(getString(y, z), makeString(["mandatory ", toString(y), ".", z, " not defined"], "")) | |
57 | 55 | ||
58 | 56 | ||
59 | - | func | |
57 | + | func A (y,z) = valueOrErrorMessage(getInteger(y, z), makeString(["mandatory ", toString(y), ".", z, " not defined"], "")) | |
60 | 58 | ||
61 | 59 | ||
62 | - | ||
60 | + | let B = addressFromStringValue(x(this, k())) | |
63 | 61 | ||
62 | + | let C = addressFromStringValue(x(B, h())) | |
64 | 63 | ||
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) | |
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) | |
78 | 70 | } | |
79 | 71 | ||
80 | 72 | ||
81 | - | func | |
73 | + | func H () = split(x(C, r()), a) | |
82 | 74 | ||
83 | 75 | ||
84 | - | func | |
85 | - | let | |
86 | - | if ($isInstanceOf( | |
76 | + | func I () = { | |
77 | + | let J = getString(i()) | |
78 | + | if ($isInstanceOf(J, "String")) | |
87 | 79 | then { | |
88 | - | let | |
89 | - | fromBase58String( | |
80 | + | let K = J | |
81 | + | fromBase58String(K) | |
90 | 82 | } | |
91 | - | else if ($isInstanceOf( | |
83 | + | else if ($isInstanceOf(J, "Unit")) | |
92 | 84 | then unit | |
93 | 85 | else throw("Match error") | |
94 | 86 | } | |
95 | 87 | ||
96 | 88 | ||
97 | - | func | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
89 | + | func L () = { | |
90 | + | let J = getString(j()) | |
91 | + | if ($isInstanceOf(J, "String")) | |
100 | 92 | then { | |
101 | - | let | |
102 | - | fromBase58String( | |
93 | + | let K = J | |
94 | + | fromBase58String(K) | |
103 | 95 | } | |
104 | - | else if ($isInstanceOf( | |
96 | + | else if ($isInstanceOf(J, "Unit")) | |
105 | 97 | then unit | |
106 | 98 | else throw("Match error") | |
107 | 99 | } | |
108 | 100 | ||
109 | 101 | ||
110 | - | func | |
111 | - | let | |
112 | - | let | |
113 | - | if ($isInstanceOf( | |
102 | + | func M (N) = { | |
103 | + | let O = throw("Permission denied") | |
104 | + | let J = I() | |
105 | + | if ($isInstanceOf(J, "ByteVector")) | |
114 | 106 | then { | |
115 | - | let | |
116 | - | if (( | |
107 | + | let P = J | |
108 | + | if ((N.callerPublicKey == P)) | |
117 | 109 | then true | |
118 | - | else | |
110 | + | else O | |
119 | 111 | } | |
120 | - | else if ($isInstanceOf( | |
121 | - | then if (( | |
112 | + | else if ($isInstanceOf(J, "Unit")) | |
113 | + | then if ((N.caller == this)) | |
122 | 114 | then true | |
123 | - | else | |
115 | + | else O | |
124 | 116 | else throw("Match error") | |
125 | 117 | } | |
126 | 118 | ||
127 | 119 | ||
128 | - | func | |
129 | - | let | |
130 | - | if ($isInstanceOf( | |
120 | + | func Q () = { | |
121 | + | let J = getString(n()) | |
122 | + | if ($isInstanceOf(J, "String")) | |
131 | 123 | then { | |
132 | - | let | |
133 | - | if ((size( | |
124 | + | let K = J | |
125 | + | if ((size(K) == 0)) | |
134 | 126 | then nil | |
135 | - | else split( | |
127 | + | else split(K, a) | |
136 | 128 | } | |
137 | 129 | else nil | |
138 | 130 | } | |
139 | 131 | ||
140 | 132 | ||
141 | - | func | |
133 | + | func R (N) = if (containsElement(Q(), toBase58String(N.callerPublicKey))) | |
142 | 134 | then true | |
143 | - | else | |
135 | + | else M(N) | |
144 | 136 | ||
145 | 137 | ||
146 | - | func | |
138 | + | func S (N) = if ((N.caller == B)) | |
147 | 139 | then true | |
148 | 140 | else throw("caller must be the pool") | |
149 | 141 | ||
150 | 142 | ||
151 | - | @Callable( | |
152 | - | func constructor ( | |
153 | - | let | |
154 | - | if (( | |
155 | - | then [StringEntry( | |
143 | + | @Callable(N) | |
144 | + | func constructor (T) = { | |
145 | + | let U = M(N) | |
146 | + | if ((U == U)) | |
147 | + | then [StringEntry(k(), T)] | |
156 | 148 | else throw("Strict value is not equal to itself.") | |
157 | 149 | } | |
158 | 150 | ||
159 | 151 | ||
160 | 152 | ||
161 | - | @Callable( | |
162 | - | func setManager ( | |
163 | - | let | |
164 | - | if (( | |
153 | + | @Callable(N) | |
154 | + | func setManager (V) = { | |
155 | + | let U = M(N) | |
156 | + | if ((U == U)) | |
165 | 157 | then { | |
166 | - | let | |
167 | - | if (( | |
168 | - | then [StringEntry( | |
158 | + | let W = fromBase58String(V) | |
159 | + | if ((W == W)) | |
160 | + | then [StringEntry(j(), V)] | |
169 | 161 | else throw("Strict value is not equal to itself.") | |
170 | 162 | } | |
171 | 163 | else throw("Strict value is not equal to itself.") | |
173 | 165 | ||
174 | 166 | ||
175 | 167 | ||
176 | - | @Callable( | |
168 | + | @Callable(N) | |
177 | 169 | func confirmManager () = { | |
178 | - | let | |
179 | - | let | |
170 | + | let X = L() | |
171 | + | let Y = if (isDefined(X)) | |
180 | 172 | then true | |
181 | 173 | else throw("No pending manager") | |
182 | - | if (( | |
174 | + | if ((Y == Y)) | |
183 | 175 | then { | |
184 | - | let | |
176 | + | let Z = if ((N.callerPublicKey == value(X))) | |
185 | 177 | then true | |
186 | 178 | else throw("You are not pending manager") | |
187 | - | if (( | |
188 | - | then [StringEntry( | |
179 | + | if ((Z == Z)) | |
180 | + | then [StringEntry(i(), toBase58String(value(X))), DeleteEntry(j())] | |
189 | 181 | else throw("Strict value is not equal to itself.") | |
190 | 182 | } | |
191 | 183 | else throw("Strict value is not equal to itself.") | |
193 | 185 | ||
194 | 186 | ||
195 | 187 | ||
196 | - | @Callable( | |
197 | - | func setAdmins ( | |
198 | - | let | |
199 | - | if (( | |
200 | - | then [StringEntry( | |
188 | + | @Callable(N) | |
189 | + | func setAdmins (aa) = { | |
190 | + | let U = M(N) | |
191 | + | if ((U == U)) | |
192 | + | then [StringEntry(n(), makeString(aa, a))] | |
201 | 193 | else throw("Strict value is not equal to itself.") | |
202 | 194 | } | |
203 | 195 | ||
204 | 196 | ||
205 | 197 | ||
206 | - | @Callable( | |
207 | - | func unstakeAndGetOneTkn (af,ag | |
208 | - | let | |
198 | + | @Callable(N) | |
199 | + | func unstakeAndGetOneTkn (ab,ac,ad,ae,af,ag) = { | |
200 | + | let ah = if ((size(N.payments) != 0)) | |
209 | 201 | then throw("No pmnts expd") | |
210 | 202 | else true | |
211 | - | if (( | |
203 | + | if ((ah == ah)) | |
212 | 204 | then { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | if (( | |
205 | + | let ai = D() | |
206 | + | let aj = H() | |
207 | + | let ak = fromBase58String(ai[d]) | |
208 | + | let al = valueOrErrorMessage(addressFromString(aj[g]), "Wr st addr") | |
209 | + | let am = invoke(al, "unstake", [toBase58String(ak), ab], nil) | |
210 | + | if ((am == am)) | |
219 | 211 | then { | |
220 | - | let | |
221 | - | if (( | |
212 | + | let an = invoke(B, "getOneTkn", [ac, ad, ae, af, ag], [AttachedPayment(ak, ab)]) | |
213 | + | if ((an == an)) | |
222 | 214 | then nil | |
223 | 215 | else throw("Strict value is not equal to itself.") | |
224 | 216 | } | |
229 | 221 | ||
230 | 222 | ||
231 | 223 | ||
232 | - | @Callable( | |
233 | - | func setAmp ( | |
234 | - | let | |
235 | - | if (( | |
224 | + | @Callable(N) | |
225 | + | func setAmp (ao) = { | |
226 | + | let U = R(N) | |
227 | + | if ((U == U)) | |
236 | 228 | then { | |
237 | - | let | |
238 | - | let | |
239 | - | $Tuple2(nil, $Tuple2( | |
229 | + | let ap = invoke(B, "setS", [o(), ao], nil) | |
230 | + | let aq = invoke(B, "setS", [p(height), ao], nil) | |
231 | + | $Tuple2(nil, $Tuple2(ap, aq)) | |
240 | 232 | } | |
241 | 233 | else throw("Strict value is not equal to itself.") | |
242 | 234 | } | |
243 | 235 | ||
244 | 236 | ||
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 | |
237 | + | @Verifier(ar) | |
238 | + | func as () = { | |
239 | + | let at = { | |
240 | + | let J = I() | |
241 | + | if ($isInstanceOf(J, "ByteVector")) | |
242 | + | then { | |
243 | + | let P = J | |
244 | + | P | |
264 | 245 | } | |
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")) | |
352 | - | then { | |
353 | - | let T = N | |
354 | - | T | |
355 | - | } | |
356 | - | else if ($isInstanceOf(N, "Unit")) | |
357 | - | then aD.senderPublicKey | |
246 | + | else if ($isInstanceOf(J, "Unit")) | |
247 | + | then ar.senderPublicKey | |
358 | 248 | else throw("Match error") | |
359 | 249 | } | |
360 | - | sigVerify( | |
250 | + | sigVerify(ar.bodyBytes, ar.proofs[0], at) | |
361 | 251 | } | |
362 | 252 |
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 | - | let h = "%s__delay" | |
19 | - | ||
20 | - | func i () = "%s__factoryContract" | |
18 | + | func h () = "%s__factoryContract" | |
21 | 19 | ||
22 | 20 | ||
23 | - | func | |
21 | + | func i () = "%s__managerPublicKey" | |
24 | 22 | ||
25 | 23 | ||
26 | - | func | |
24 | + | func j () = "%s__pendingManagerPublicKey" | |
27 | 25 | ||
28 | 26 | ||
29 | - | func | |
27 | + | func k () = "%s__poolAddress" | |
30 | 28 | ||
31 | 29 | ||
32 | - | func | |
30 | + | func l () = "%s__amountAsset" | |
33 | 31 | ||
34 | 32 | ||
35 | - | func | |
33 | + | func m () = "%s__priceAsset" | |
36 | 34 | ||
37 | 35 | ||
38 | - | func | |
36 | + | func n () = "%s__adminPubKeys" | |
39 | 37 | ||
40 | 38 | ||
41 | - | func | |
39 | + | func o () = "%s__amp" | |
42 | 40 | ||
43 | 41 | ||
44 | - | func | |
42 | + | func p (q) = ("%s%d__amp__" + toString(q)) | |
45 | 43 | ||
46 | 44 | ||
47 | - | func | |
45 | + | func r () = "%s__factoryConfig" | |
48 | 46 | ||
49 | 47 | ||
50 | - | func | |
48 | + | func s (t,u) = (((("%d%d%s__" + t) + "__") + u) + "__config") | |
51 | 49 | ||
52 | 50 | ||
53 | - | func v () = "%s__ | |
51 | + | func v (w) = ("%s%s%s__mappings__baseAsset2internalId__" + w) | |
54 | 52 | ||
55 | 53 | ||
56 | - | func | |
54 | + | func x (y,z) = valueOrErrorMessage(getString(y, z), makeString(["mandatory ", toString(y), ".", z, " not defined"], "")) | |
57 | 55 | ||
58 | 56 | ||
59 | - | func | |
57 | + | func A (y,z) = valueOrErrorMessage(getInteger(y, z), makeString(["mandatory ", toString(y), ".", z, " not defined"], "")) | |
60 | 58 | ||
61 | 59 | ||
62 | - | ||
60 | + | let B = addressFromStringValue(x(this, k())) | |
63 | 61 | ||
62 | + | let C = addressFromStringValue(x(B, h())) | |
64 | 63 | ||
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) | |
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) | |
78 | 70 | } | |
79 | 71 | ||
80 | 72 | ||
81 | - | func | |
73 | + | func H () = split(x(C, r()), a) | |
82 | 74 | ||
83 | 75 | ||
84 | - | func | |
85 | - | let | |
86 | - | if ($isInstanceOf( | |
76 | + | func I () = { | |
77 | + | let J = getString(i()) | |
78 | + | if ($isInstanceOf(J, "String")) | |
87 | 79 | then { | |
88 | - | let | |
89 | - | fromBase58String( | |
80 | + | let K = J | |
81 | + | fromBase58String(K) | |
90 | 82 | } | |
91 | - | else if ($isInstanceOf( | |
83 | + | else if ($isInstanceOf(J, "Unit")) | |
92 | 84 | then unit | |
93 | 85 | else throw("Match error") | |
94 | 86 | } | |
95 | 87 | ||
96 | 88 | ||
97 | - | func | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
89 | + | func L () = { | |
90 | + | let J = getString(j()) | |
91 | + | if ($isInstanceOf(J, "String")) | |
100 | 92 | then { | |
101 | - | let | |
102 | - | fromBase58String( | |
93 | + | let K = J | |
94 | + | fromBase58String(K) | |
103 | 95 | } | |
104 | - | else if ($isInstanceOf( | |
96 | + | else if ($isInstanceOf(J, "Unit")) | |
105 | 97 | then unit | |
106 | 98 | else throw("Match error") | |
107 | 99 | } | |
108 | 100 | ||
109 | 101 | ||
110 | - | func | |
111 | - | let | |
112 | - | let | |
113 | - | if ($isInstanceOf( | |
102 | + | func M (N) = { | |
103 | + | let O = throw("Permission denied") | |
104 | + | let J = I() | |
105 | + | if ($isInstanceOf(J, "ByteVector")) | |
114 | 106 | then { | |
115 | - | let | |
116 | - | if (( | |
107 | + | let P = J | |
108 | + | if ((N.callerPublicKey == P)) | |
117 | 109 | then true | |
118 | - | else | |
110 | + | else O | |
119 | 111 | } | |
120 | - | else if ($isInstanceOf( | |
121 | - | then if (( | |
112 | + | else if ($isInstanceOf(J, "Unit")) | |
113 | + | then if ((N.caller == this)) | |
122 | 114 | then true | |
123 | - | else | |
115 | + | else O | |
124 | 116 | else throw("Match error") | |
125 | 117 | } | |
126 | 118 | ||
127 | 119 | ||
128 | - | func | |
129 | - | let | |
130 | - | if ($isInstanceOf( | |
120 | + | func Q () = { | |
121 | + | let J = getString(n()) | |
122 | + | if ($isInstanceOf(J, "String")) | |
131 | 123 | then { | |
132 | - | let | |
133 | - | if ((size( | |
124 | + | let K = J | |
125 | + | if ((size(K) == 0)) | |
134 | 126 | then nil | |
135 | - | else split( | |
127 | + | else split(K, a) | |
136 | 128 | } | |
137 | 129 | else nil | |
138 | 130 | } | |
139 | 131 | ||
140 | 132 | ||
141 | - | func | |
133 | + | func R (N) = if (containsElement(Q(), toBase58String(N.callerPublicKey))) | |
142 | 134 | then true | |
143 | - | else | |
135 | + | else M(N) | |
144 | 136 | ||
145 | 137 | ||
146 | - | func | |
138 | + | func S (N) = if ((N.caller == B)) | |
147 | 139 | then true | |
148 | 140 | else throw("caller must be the pool") | |
149 | 141 | ||
150 | 142 | ||
151 | - | @Callable( | |
152 | - | func constructor ( | |
153 | - | let | |
154 | - | if (( | |
155 | - | then [StringEntry( | |
143 | + | @Callable(N) | |
144 | + | func constructor (T) = { | |
145 | + | let U = M(N) | |
146 | + | if ((U == U)) | |
147 | + | then [StringEntry(k(), T)] | |
156 | 148 | else throw("Strict value is not equal to itself.") | |
157 | 149 | } | |
158 | 150 | ||
159 | 151 | ||
160 | 152 | ||
161 | - | @Callable( | |
162 | - | func setManager ( | |
163 | - | let | |
164 | - | if (( | |
153 | + | @Callable(N) | |
154 | + | func setManager (V) = { | |
155 | + | let U = M(N) | |
156 | + | if ((U == U)) | |
165 | 157 | then { | |
166 | - | let | |
167 | - | if (( | |
168 | - | then [StringEntry( | |
158 | + | let W = fromBase58String(V) | |
159 | + | if ((W == W)) | |
160 | + | then [StringEntry(j(), V)] | |
169 | 161 | else throw("Strict value is not equal to itself.") | |
170 | 162 | } | |
171 | 163 | else throw("Strict value is not equal to itself.") | |
172 | 164 | } | |
173 | 165 | ||
174 | 166 | ||
175 | 167 | ||
176 | - | @Callable( | |
168 | + | @Callable(N) | |
177 | 169 | func confirmManager () = { | |
178 | - | let | |
179 | - | let | |
170 | + | let X = L() | |
171 | + | let Y = if (isDefined(X)) | |
180 | 172 | then true | |
181 | 173 | else throw("No pending manager") | |
182 | - | if (( | |
174 | + | if ((Y == Y)) | |
183 | 175 | then { | |
184 | - | let | |
176 | + | let Z = if ((N.callerPublicKey == value(X))) | |
185 | 177 | then true | |
186 | 178 | else throw("You are not pending manager") | |
187 | - | if (( | |
188 | - | then [StringEntry( | |
179 | + | if ((Z == Z)) | |
180 | + | then [StringEntry(i(), toBase58String(value(X))), DeleteEntry(j())] | |
189 | 181 | else throw("Strict value is not equal to itself.") | |
190 | 182 | } | |
191 | 183 | else throw("Strict value is not equal to itself.") | |
192 | 184 | } | |
193 | 185 | ||
194 | 186 | ||
195 | 187 | ||
196 | - | @Callable( | |
197 | - | func setAdmins ( | |
198 | - | let | |
199 | - | if (( | |
200 | - | then [StringEntry( | |
188 | + | @Callable(N) | |
189 | + | func setAdmins (aa) = { | |
190 | + | let U = M(N) | |
191 | + | if ((U == U)) | |
192 | + | then [StringEntry(n(), makeString(aa, a))] | |
201 | 193 | else throw("Strict value is not equal to itself.") | |
202 | 194 | } | |
203 | 195 | ||
204 | 196 | ||
205 | 197 | ||
206 | - | @Callable( | |
207 | - | func unstakeAndGetOneTkn (af,ag | |
208 | - | let | |
198 | + | @Callable(N) | |
199 | + | func unstakeAndGetOneTkn (ab,ac,ad,ae,af,ag) = { | |
200 | + | let ah = if ((size(N.payments) != 0)) | |
209 | 201 | then throw("No pmnts expd") | |
210 | 202 | else true | |
211 | - | if (( | |
203 | + | if ((ah == ah)) | |
212 | 204 | then { | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | if (( | |
205 | + | let ai = D() | |
206 | + | let aj = H() | |
207 | + | let ak = fromBase58String(ai[d]) | |
208 | + | let al = valueOrErrorMessage(addressFromString(aj[g]), "Wr st addr") | |
209 | + | let am = invoke(al, "unstake", [toBase58String(ak), ab], nil) | |
210 | + | if ((am == am)) | |
219 | 211 | then { | |
220 | - | let | |
221 | - | if (( | |
212 | + | let an = invoke(B, "getOneTkn", [ac, ad, ae, af, ag], [AttachedPayment(ak, ab)]) | |
213 | + | if ((an == an)) | |
222 | 214 | then nil | |
223 | 215 | else throw("Strict value is not equal to itself.") | |
224 | 216 | } | |
225 | 217 | else throw("Strict value is not equal to itself.") | |
226 | 218 | } | |
227 | 219 | else throw("Strict value is not equal to itself.") | |
228 | 220 | } | |
229 | 221 | ||
230 | 222 | ||
231 | 223 | ||
232 | - | @Callable( | |
233 | - | func setAmp ( | |
234 | - | let | |
235 | - | if (( | |
224 | + | @Callable(N) | |
225 | + | func setAmp (ao) = { | |
226 | + | let U = R(N) | |
227 | + | if ((U == U)) | |
236 | 228 | then { | |
237 | - | let | |
238 | - | let | |
239 | - | $Tuple2(nil, $Tuple2( | |
229 | + | let ap = invoke(B, "setS", [o(), ao], nil) | |
230 | + | let aq = invoke(B, "setS", [p(height), ao], nil) | |
231 | + | $Tuple2(nil, $Tuple2(ap, aq)) | |
240 | 232 | } | |
241 | 233 | else throw("Strict value is not equal to itself.") | |
242 | 234 | } | |
243 | 235 | ||
244 | 236 | ||
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 | |
237 | + | @Verifier(ar) | |
238 | + | func as () = { | |
239 | + | let at = { | |
240 | + | let J = I() | |
241 | + | if ($isInstanceOf(J, "ByteVector")) | |
242 | + | then { | |
243 | + | let P = J | |
244 | + | P | |
264 | 245 | } | |
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")) | |
352 | - | then { | |
353 | - | let T = N | |
354 | - | T | |
355 | - | } | |
356 | - | else if ($isInstanceOf(N, "Unit")) | |
357 | - | then aD.senderPublicKey | |
246 | + | else if ($isInstanceOf(J, "Unit")) | |
247 | + | then ar.senderPublicKey | |
358 | 248 | else throw("Match error") | |
359 | 249 | } | |
360 | - | sigVerify( | |
250 | + | sigVerify(ar.bodyBytes, ar.proofs[0], at) | |
361 | 251 | } | |
362 | 252 |
github/deemru/w8io/169f3d6 81.43 ms ◑