tx · 4DPD7nfTyXrocx8HxYNdS9LA6CuiztveyJH1ByJxgvAu 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA: -0.04100000 Waves 2023.05.05 11:41 [2564285] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves
{ "type": 13, "id": "4DPD7nfTyXrocx8HxYNdS9LA6CuiztveyJH1ByJxgvAu", "fee": 4100000, "feeAssetId": null, "timestamp": 1683276023058, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "fs2NBbXNBRzCSvaZDVzqvLfVGUH8XPL5fKKvC29A58xQXFWJZzwVQgLxwNF5EDWFFoY1hVsd8sKsAN9uNTz11qY" ], "script": "base64:BgK4LAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUH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Y Next: GHgFLNSm2sKo2Nx79EUFqCFZBaY1YxVZm5SG7wZHjjQw Diff:
Old | New | Differences | |
---|---|---|---|
23 | 23 | ||
24 | 24 | let k = "WAVES" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = "100" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "1" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "__" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = 1 | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 2 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 3 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 4 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 1 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 2 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 3 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 4 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 5 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 6 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 7 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 8 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 9 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 1 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 6 | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = 7 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 10 | |
67 | 67 | ||
68 | - | let G = 10 | |
68 | + | let G = fraction(10, a, 10000) | |
69 | 69 | ||
70 | - | let H = fraction(10, a, 10000) | |
71 | - | ||
72 | - | func I (J,K) = fraction(toBigInt(J), c, toBigInt(K)) | |
70 | + | func H (I,J) = fraction(toBigInt(I), c, toBigInt(J)) | |
73 | 71 | ||
74 | 72 | ||
75 | - | func | |
73 | + | func K (I,J) = fraction(I, c, J) | |
76 | 74 | ||
77 | 75 | ||
78 | - | func | |
76 | + | func L (M,N) = toInt(fraction(M, toBigInt(N), c)) | |
79 | 77 | ||
80 | 78 | ||
81 | - | func | |
79 | + | func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P)) | |
82 | 80 | ||
83 | 81 | ||
84 | - | func | |
82 | + | func Q (I,J) = fraction(I, c, toBigInt(J)) | |
85 | 83 | ||
86 | 84 | ||
87 | - | func | |
85 | + | func R (M,N) = fraction(M, toBigInt(N), c) | |
88 | 86 | ||
89 | 87 | ||
90 | - | func | |
88 | + | func S (T,U,V) = fraction(T, U, V) | |
91 | 89 | ||
92 | 90 | ||
93 | - | func | |
94 | - | then -( | |
95 | - | else | |
91 | + | func W (M) = if ((d > M)) | |
92 | + | then -(M) | |
93 | + | else M | |
96 | 94 | ||
97 | 95 | ||
98 | - | func | |
99 | - | then -( | |
100 | - | else | |
96 | + | func X (M) = if ((d > M)) | |
97 | + | then -(M) | |
98 | + | else M | |
101 | 99 | ||
102 | 100 | ||
103 | - | func | |
101 | + | func Y () = "%s__factoryContract" | |
104 | 102 | ||
105 | 103 | ||
106 | - | func | |
104 | + | func Z () = "%s__managerPublicKey" | |
107 | 105 | ||
108 | 106 | ||
109 | - | func | |
107 | + | func aa () = "%s__pendingManagerPublicKey" | |
110 | 108 | ||
111 | 109 | ||
112 | - | func | |
110 | + | func ab () = "%s%s__price__last" | |
113 | 111 | ||
114 | 112 | ||
115 | - | func | |
113 | + | func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n) | |
116 | 114 | ||
117 | 115 | ||
118 | - | func | |
116 | + | func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah) | |
119 | 117 | ||
120 | 118 | ||
121 | - | func | |
119 | + | func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah) | |
122 | 120 | ||
123 | 121 | ||
124 | - | func | |
122 | + | func aj () = "%s__amountAsset" | |
125 | 123 | ||
126 | 124 | ||
127 | - | func | |
125 | + | func ak () = "%s__priceAsset" | |
128 | 126 | ||
129 | 127 | ||
130 | - | func | |
128 | + | func al () = "%s__amp" | |
131 | 129 | ||
132 | 130 | ||
133 | - | func | |
131 | + | func am (an) = ("%s%d__amp__" + toString(an)) | |
134 | 132 | ||
135 | 133 | ||
136 | - | func | |
134 | + | func ao () = "%s__changeAmpLastCall" | |
137 | 135 | ||
138 | 136 | ||
139 | - | let | |
137 | + | let ap = "%s__fee" | |
140 | 138 | ||
141 | - | let | |
139 | + | let aq = valueOrElse(getInteger(this, ap), G) | |
142 | 140 | ||
143 | - | let | |
141 | + | let ar = makeString(["%s", "dLp"], n) | |
144 | 142 | ||
145 | - | let | |
143 | + | let as = makeString(["%s", "dLpRefreshedHeight"], n) | |
146 | 144 | ||
147 | - | let | |
145 | + | let at = makeString(["%s", "refreshDLpDelay"], n) | |
148 | 146 | ||
149 | - | let | |
147 | + | let au = 30 | |
150 | 148 | ||
151 | - | let | |
149 | + | let av = valueOrElse(getInteger(this, at), au) | |
152 | 150 | ||
153 | - | func | |
151 | + | func aw () = "%s__factoryConfig" | |
154 | 152 | ||
155 | 153 | ||
156 | - | func | |
154 | + | func ax () = "%s%s__matcher__publicKey" | |
157 | 155 | ||
158 | 156 | ||
159 | - | func | |
157 | + | func ay (az,aA) = (((("%d%d%s__" + az) + "__") + aA) + "__config") | |
160 | 158 | ||
161 | 159 | ||
162 | - | func | |
160 | + | func aB (aC) = ("%s%s%s__mappings__baseAsset2internalId__" + aC) | |
163 | 161 | ||
164 | 162 | ||
165 | - | func | |
163 | + | func aD () = "%s__shutdown" | |
166 | 164 | ||
167 | 165 | ||
168 | - | func | |
166 | + | func aE () = "%s__allowedLpStableScriptHash" | |
169 | 167 | ||
170 | 168 | ||
171 | - | func | |
169 | + | func aF () = "%s__feeCollectorAddress" | |
172 | 170 | ||
173 | 171 | ||
174 | - | func | |
172 | + | func aG (aH) = ("%s%s__skipOrderValidation__" + aH) | |
175 | 173 | ||
176 | 174 | ||
177 | - | func | |
175 | + | func aI (aJ,aK,aL,aM) = throw((((((((("order validation failed: orderValid=" + toString(aJ)) + " (") + aK) + ")") + " senderValid=") + toString(aL)) + " matcherValid=") + toString(aM))) | |
178 | 176 | ||
179 | 177 | ||
180 | - | func | |
178 | + | func aN (aO,aP) = valueOrErrorMessage(getString(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], "")) | |
181 | 179 | ||
182 | 180 | ||
183 | - | func | |
181 | + | func aQ (aO,aP) = valueOrErrorMessage(getInteger(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], "")) | |
184 | 182 | ||
185 | 183 | ||
186 | - | func | |
184 | + | func aR (aS) = throw(makeString(["lp_stable.ride:", aS], " ")) | |
187 | 185 | ||
188 | 186 | ||
189 | - | func | |
187 | + | func aT (aS) = makeString(["lp_stable.ride:", aS], " ") | |
190 | 188 | ||
191 | 189 | ||
192 | - | let | |
190 | + | let aU = addressFromStringValue(aN(this, Y())) | |
193 | 191 | ||
194 | - | let | |
195 | - | let | |
196 | - | if ($isInstanceOf( | |
197 | - | then | |
198 | - | else throw(($getType( | |
192 | + | let aV = { | |
193 | + | let aW = invoke(aU, "getInFeeREADONLY", [toString(this)], nil) | |
194 | + | if ($isInstanceOf(aW, "Int")) | |
195 | + | then aW | |
196 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
199 | 197 | } | |
200 | 198 | ||
201 | - | let | |
202 | - | let | |
203 | - | if ($isInstanceOf( | |
204 | - | then | |
205 | - | else throw(($getType( | |
199 | + | let aX = { | |
200 | + | let aW = invoke(aU, "getOutFeeREADONLY", [toString(this)], nil) | |
201 | + | if ($isInstanceOf(aW, "Int")) | |
202 | + | then aW | |
203 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
206 | 204 | } | |
207 | 205 | ||
208 | - | let | |
206 | + | let aY = aN(this, al()) | |
209 | 207 | ||
210 | - | func | |
208 | + | func aZ () = valueOrElse(getBoolean(aU, aD()), false) | |
211 | 209 | ||
212 | 210 | ||
213 | - | func | |
211 | + | func ba () = fromBase58String(aN(aU, ax())) | |
214 | 212 | ||
215 | 213 | ||
216 | - | let | |
214 | + | let bb = addressFromStringValue(aN(aU, aF())) | |
217 | 215 | ||
218 | - | func | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | split( | |
216 | + | func bc () = { | |
217 | + | let bd = aN(this, aj()) | |
218 | + | let be = aN(this, ak()) | |
219 | + | let bf = aQ(aU, aB(be)) | |
220 | + | let az = aQ(aU, aB(bd)) | |
221 | + | split(aN(aU, ay(toString(az), toString(bf))), n) | |
224 | 222 | } | |
225 | 223 | ||
226 | 224 | ||
227 | - | func | |
225 | + | func bg (bh) = if ((bh == k)) | |
228 | 226 | then unit | |
229 | - | else fromBase58String( | |
227 | + | else fromBase58String(bh) | |
230 | 228 | ||
231 | 229 | ||
232 | - | func | |
230 | + | func bi (bh) = if ((bh == unit)) | |
233 | 231 | then k | |
234 | - | else toBase58String(value( | |
232 | + | else toBase58String(value(bh)) | |
235 | 233 | ||
236 | 234 | ||
237 | - | func | |
235 | + | func bj (bk) = $Tuple9(addressFromStringValue(bk[t]), parseIntValue(bk[u]), fromBase58String(bk[v]), bg(bk[w]), bg(bk[x]), parseIntValue(bk[y]), parseIntValue(bk[z]), fromBase58String(bk[A]), fromBase58String(bk[B])) | |
238 | 236 | ||
239 | 237 | ||
240 | - | let | |
238 | + | let bl = bj(bc()) | |
241 | 239 | ||
242 | - | let | |
240 | + | let bm = bl | |
243 | 241 | ||
244 | - | let | |
242 | + | let bn = bm._1 | |
245 | 243 | ||
246 | - | let | |
244 | + | let bo = bm._2 | |
247 | 245 | ||
248 | - | let | |
246 | + | let bp = bm._3 | |
249 | 247 | ||
250 | - | let | |
248 | + | let bq = bm._4 | |
251 | 249 | ||
252 | - | let | |
250 | + | let br = bm._5 | |
253 | 251 | ||
254 | - | let | |
252 | + | let bs = bm._6 | |
255 | 253 | ||
256 | - | let | |
254 | + | let bt = bm._7 | |
257 | 255 | ||
258 | - | func bv () = split(aO(aV, ax()), o) | |
256 | + | let bu = bm._8 | |
257 | + | ||
258 | + | let bv = bm._9 | |
259 | + | ||
260 | + | func bw () = split(aN(aU, aw()), n) | |
259 | 261 | ||
260 | 262 | ||
261 | - | let | |
263 | + | let bx = bw() | |
262 | 264 | ||
263 | - | let | |
265 | + | let by = valueOrErrorMessage(addressFromString(bx[C]), "Invalid staking contract address") | |
264 | 266 | ||
265 | - | let | |
267 | + | let bz = valueOrErrorMessage(addressFromString(bx[E]), "Invalid slipage contract address") | |
266 | 268 | ||
267 | - | let | |
269 | + | let bA = valueOrErrorMessage(addressFromString(bx[F]), "Invalid gwx contract address") | |
268 | 270 | ||
269 | - | let | |
271 | + | let bB = valueOrErrorMessage(addressFromString(bx[D]), "Invalid gwx contract address") | |
270 | 272 | ||
271 | - | func | |
273 | + | func bC (bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM)], n) | |
272 | 274 | ||
273 | 275 | ||
274 | - | func | |
276 | + | func bN (bO,bP,bQ,bG,bJ,bK) = makeString(["%d%d%d%d%d%d", toString(bO), toString(bP), toString(bQ), toString(bG), toString(bJ), toString(bK)], n) | |
275 | 277 | ||
276 | 278 | ||
277 | - | func | |
279 | + | func bR (bS) = if ((bS == "WAVES")) | |
278 | 280 | then wavesBalance(this).available | |
279 | - | else assetBalance(this, fromBase58String( | |
281 | + | else assetBalance(this, fromBase58String(bS)) | |
280 | 282 | ||
281 | 283 | ||
282 | - | func | |
284 | + | func bT (bU,bV) = fraction(bU, c, bV) | |
283 | 285 | ||
284 | 286 | ||
285 | - | func | |
287 | + | func bW (bU,bV,P) = fraction(bU, c, bV, P) | |
286 | 288 | ||
287 | 289 | ||
288 | - | func | |
289 | - | let | |
290 | - | let | |
291 | - | if (!( | |
292 | - | then throw(("Big slpg: " + toString( | |
293 | - | else $Tuple2( | |
290 | + | func bX (bY,bZ,ca) = { | |
291 | + | let cb = fraction((bY - bZ), b, bZ) | |
292 | + | let cc = ((ca - W(cb)) > d) | |
293 | + | if (!(cc)) | |
294 | + | then throw(("Big slpg: " + toString(cb))) | |
295 | + | else $Tuple2(cc, min([bY, bZ])) | |
294 | 296 | } | |
295 | 297 | ||
296 | 298 | ||
297 | - | func | |
298 | - | let | |
299 | - | let | |
300 | - | if (if ( | |
299 | + | func cd (ce,cf,cg) = { | |
300 | + | let cb = fraction(cf, b, ce) | |
301 | + | let ch = (cg > cb) | |
302 | + | if (if (ch) | |
301 | 303 | then true | |
302 | - | else ( | |
303 | - | then throw(((((((toString( | |
304 | - | else | |
304 | + | else (cf > ce)) | |
305 | + | then throw(((((((toString(cf) + " ") + toString(ce)) + " ") + toString(cb)) + " ") + toString(cg))) | |
306 | + | else ch | |
305 | 307 | } | |
306 | 308 | ||
307 | 309 | ||
308 | - | func | |
309 | - | let | |
310 | - | let | |
311 | - | | |
310 | + | func ci (cj,ck,cl,cm) = { | |
311 | + | let cn = H(cl, cj) | |
312 | + | let co = H(cm, ck) | |
313 | + | bT(co, cn) | |
312 | 314 | } | |
313 | 315 | ||
314 | 316 | ||
315 | - | func | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | [ | |
317 | + | func cp (cl,cm,cq) = { | |
318 | + | let cr = bs | |
319 | + | let cs = bt | |
320 | + | let ct = ci(cr, cs, cl, cm) | |
321 | + | let bV = H(cl, cr) | |
322 | + | let bU = H(cm, cs) | |
323 | + | let cu = H(cq, a) | |
324 | + | let cv = bT(bV, cu) | |
325 | + | let cw = bT(bU, cu) | |
326 | + | [ct, cv, cw] | |
325 | 327 | } | |
326 | 328 | ||
327 | 329 | ||
328 | - | func | |
329 | - | let | |
330 | - | [ | |
330 | + | func cx (cl,cm,cq) = { | |
331 | + | let cy = cp(cl, cm, cq) | |
332 | + | [L(cy[0], a), L(cy[1], a), L(cy[2], a)] | |
331 | 333 | } | |
332 | 334 | ||
333 | 335 | ||
334 | - | func | |
335 | - | let | |
336 | + | func cz (cA,aq) = { | |
337 | + | let cB = if ((aq == 0)) | |
336 | 338 | then 0 | |
337 | - | else fraction( | |
338 | - | $Tuple2(( | |
339 | + | else fraction(cA, aq, a) | |
340 | + | $Tuple2((cA - cB), cB) | |
339 | 341 | } | |
340 | 342 | ||
341 | 343 | ||
342 | - | func | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | if (( | |
344 | + | func cC (cD) = { | |
345 | + | let cE = cD[0] | |
346 | + | let cF = cD[1] | |
347 | + | let cG = (cE + cF) | |
348 | + | if ((cG == e)) | |
347 | 349 | then e | |
348 | 350 | else { | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | func | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | fraction(( | |
351 | + | let cH = parseIntValue(aY) | |
352 | + | let cI = (cH * 2) | |
353 | + | let cy = fraction(cE, cF, f) | |
354 | + | let cJ = fraction(cy, i, f) | |
355 | + | let cK = fraction(toBigInt(cI), cG, f) | |
356 | + | let cL = toBigInt((cI - 1)) | |
357 | + | func cM (cN) = { | |
358 | + | let cO = fraction(cN, cN, f) | |
359 | + | let cP = fraction(cO, cN, f) | |
360 | + | let cQ = fraction(cP, f, cJ) | |
361 | + | fraction((cK + fraction(cQ, g, f)), cN, (fraction(cL, cN, f) + fraction(h, cQ, f))) | |
360 | 362 | } | |
361 | 363 | ||
362 | - | func | |
363 | - | then | |
364 | + | func cR (cS,cT) = if (cS._2) | |
365 | + | then cS | |
364 | 366 | else { | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | let | |
369 | - | then -( | |
370 | - | else | |
371 | - | if ((f >= | |
372 | - | then $Tuple2( | |
373 | - | else $Tuple2( | |
367 | + | let cN = cS._1 | |
368 | + | let cU = cM(cN) | |
369 | + | let cV = (cU - value(cN)) | |
370 | + | let cW = if ((e > cV)) | |
371 | + | then -(cV) | |
372 | + | else cV | |
373 | + | if ((f >= cW)) | |
374 | + | then $Tuple2(cU, true) | |
375 | + | else $Tuple2(cU, false) | |
374 | 376 | } | |
375 | 377 | ||
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | func | |
382 | - | then | |
383 | - | else | |
378 | + | let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
379 | + | let cY = { | |
380 | + | let cZ = cX | |
381 | + | let da = size(cZ) | |
382 | + | let db = $Tuple2(cG, false) | |
383 | + | func dc (dd,de) = if ((de >= da)) | |
384 | + | then dd | |
385 | + | else cR(dd, cZ[de]) | |
384 | 386 | ||
385 | - | func | |
386 | - | then | |
387 | + | func df (dd,de) = if ((de >= da)) | |
388 | + | then dd | |
387 | 389 | else throw("List size exceeds 17") | |
388 | 390 | ||
389 | - | | |
391 | + | df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
390 | 392 | } | |
391 | - | let | |
392 | - | let | |
393 | - | if ( | |
394 | - | then | |
395 | - | else throw(("D calculation error, D = " + toString( | |
393 | + | let cN = cY._1 | |
394 | + | let dg = cY._2 | |
395 | + | if (dg) | |
396 | + | then cN | |
397 | + | else throw(("D calculation error, D = " + toString(cN))) | |
396 | 398 | } | |
397 | 399 | } | |
398 | 400 | ||
399 | 401 | ||
400 | - | func | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | let | |
408 | - | if ((toBase58String( | |
402 | + | func dh (di,dj,dk,dl) = { | |
403 | + | let dm = bp | |
404 | + | let dn = toBase58String(value(bq)) | |
405 | + | let do = toBase58String(value(br)) | |
406 | + | let dp = bs | |
407 | + | let dq = bt | |
408 | + | let dr = toString(bo) | |
409 | + | let ds = valueOrErrorMessage(assetInfo(dm), "Wrong LP id").quantity | |
410 | + | if ((toBase58String(dm) != dj)) | |
409 | 411 | then throw("Wrong pmt asset") | |
410 | 412 | else { | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
413 | + | let dt = bR(dn) | |
414 | + | let du = H(dt, dp) | |
415 | + | let dv = bR(do) | |
416 | + | let dw = H(dv, dq) | |
417 | + | let dx = bT(dw, du) | |
418 | + | let dy = L(dx, a) | |
419 | + | let dz = H(dk, a) | |
420 | + | let dA = H(ds, a) | |
421 | + | let dB = fraction(du, dz, dA) | |
422 | + | let dC = fraction(dw, dz, dA) | |
423 | + | let dD = O(dB, dp, FLOOR) | |
424 | + | let dE = O(dC, dq, FLOOR) | |
425 | + | let dF = if ((di == "")) | |
424 | 426 | then nil | |
425 | - | else [ScriptTransfer( | |
427 | + | else [ScriptTransfer(dl, dD, if ((dn == "WAVES")) | |
426 | 428 | then unit | |
427 | - | else fromBase58String( | |
429 | + | else fromBase58String(dn)), ScriptTransfer(dl, dE, if ((do == "WAVES")) | |
428 | 430 | then unit | |
429 | - | else fromBase58String( | |
430 | - | $Tuple10( | |
431 | + | else fromBase58String(do)), StringEntry(ai(toString(dl), di), bN(dD, dE, dk, dy, height, lastBlock.timestamp)), IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy)] | |
432 | + | $Tuple10(dD, dE, dn, do, dt, dv, ds, dx, dr, dF) | |
431 | 433 | } | |
432 | 434 | } | |
433 | 435 | ||
434 | 436 | ||
435 | - | func dF (dh,bZ,dG,dH,dI,dJ,dk,dK,dL,dM,dN,dO,dP) = { | |
436 | - | let dl = bq | |
437 | - | let dQ = toBase58String(value(br)) | |
438 | - | let dR = toBase58String(value(bs)) | |
439 | - | let dS = bt | |
437 | + | func dG (di,ca,dH,dI,dJ,dK,dl,dL,dM,dN,dO,dP,dQ) = { | |
438 | + | let dm = bp | |
439 | + | let dR = toBase58String(value(bq)) | |
440 | + | let dS = toBase58String(value(br)) | |
440 | 441 | let dT = bu | |
441 | - | let dq = toString(bp) | |
442 | - | let dU = valueOrErrorMessage(assetInfo(dl), "Wr lp as").quantity | |
443 | - | let ds = if (dK) | |
444 | - | then bQ(dQ) | |
445 | - | else if (if (dM) | |
446 | - | then (dP == dQ) | |
442 | + | let dU = bv | |
443 | + | let dV = bs | |
444 | + | let dW = bt | |
445 | + | let dr = toString(bo) | |
446 | + | let dX = valueOrErrorMessage(assetInfo(dm), "Wr lp as").quantity | |
447 | + | let dt = if (dL) | |
448 | + | then bR(dR) | |
449 | + | else if (if (dN) | |
450 | + | then (dQ == dR) | |
447 | 451 | else false) | |
448 | - | then ( | |
449 | - | else if ( | |
450 | - | then | |
451 | - | else ( | |
452 | - | let | |
453 | - | then | |
454 | - | else if (if ( | |
455 | - | then ( | |
452 | + | then (bR(dR) - dP) | |
453 | + | else if (dN) | |
454 | + | then bR(dR) | |
455 | + | else (bR(dR) - dH) | |
456 | + | let dv = if (dL) | |
457 | + | then bR(dS) | |
458 | + | else if (if (dN) | |
459 | + | then (dQ == dS) | |
456 | 460 | else false) | |
457 | - | then ( | |
458 | - | else if ( | |
459 | - | then | |
460 | - | else ( | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
461 | + | then (bR(dS) - dP) | |
462 | + | else if (dN) | |
463 | + | then bR(dS) | |
464 | + | else (bR(dS) - dJ) | |
465 | + | let dY = H(dH, dV) | |
466 | + | let dZ = H(dJ, dW) | |
467 | + | let ea = bT(dZ, dY) | |
468 | + | let du = H(dt, dV) | |
469 | + | let dw = H(dv, dW) | |
470 | + | let cf = cC([du, dw]) | |
471 | + | let eb = if ((dX == 0)) | |
468 | 472 | then { | |
469 | - | let | |
470 | - | let | |
473 | + | let ce = cC([(du + dY), (dw + dZ)]) | |
474 | + | let ec = if ((ce > cf)) | |
471 | 475 | then true | |
472 | 476 | else throw("D1 should be greater than D0") | |
473 | - | if (( | |
477 | + | if ((ec == ec)) | |
474 | 478 | then { | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | $Tuple5( | |
479 | + | let dx = d | |
480 | + | let ed = d | |
481 | + | let cu = ce | |
482 | + | $Tuple5(L(cu, a), L(dY, dV), L(dZ, dW), bT((dw + dZ), (du + dY)), ed) | |
479 | 483 | } | |
480 | 484 | else throw("Strict value is not equal to itself.") | |
481 | 485 | } | |
482 | 486 | else { | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | if (if (if ( | |
487 | - | then ( | |
487 | + | let dx = bT(dw, du) | |
488 | + | let ee = fraction(W((dx - ea)), c, dx) | |
489 | + | let ed = H(ca, a) | |
490 | + | if (if (if (dO) | |
491 | + | then (dx != d) | |
488 | 492 | else false) | |
489 | - | then ( | |
493 | + | then (ee > ed) | |
490 | 494 | else false) | |
491 | - | then throw(((("Price slippage " + toString( | |
495 | + | then throw(((("Price slippage " + toString(ee)) + " > ") + toString(ed))) | |
492 | 496 | else { | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | then $Tuple2( | |
498 | - | else $Tuple2( | |
499 | - | let | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
497 | + | let ef = H(dX, a) | |
498 | + | let eg = fraction(dY, bW(dw, du, CEILING), c, CEILING) | |
499 | + | let eh = fraction(dZ, c, bW(dw, du, FLOOR), CEILING) | |
500 | + | let ei = if ((eg > dZ)) | |
501 | + | then $Tuple2(eh, dZ) | |
502 | + | else $Tuple2(dY, eg) | |
503 | + | let ej = ei._1 | |
504 | + | let ek = ei._2 | |
505 | + | let ce = cC([(du + ej), (dw + ek)]) | |
506 | + | let ec = if ((ce > cf)) | |
503 | 507 | then true | |
504 | 508 | else throw("D1 should be greater than D0") | |
505 | - | if (( | |
509 | + | if ((ec == ec)) | |
506 | 510 | then { | |
507 | - | let | |
508 | - | $Tuple5( | |
511 | + | let cu = fraction(ef, (ce - cf), cf) | |
512 | + | $Tuple5(O(cu, a, FLOOR), O(ej, dV, CEILING), O(ek, dW, CEILING), dx, ed) | |
509 | 513 | } | |
510 | 514 | else throw("Strict value is not equal to itself.") | |
511 | 515 | } | |
512 | 516 | } | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | if ((0 >= | |
517 | + | let el = eb._1 | |
518 | + | let em = eb._2 | |
519 | + | let en = eb._3 | |
520 | + | let dy = L(eb._4, a) | |
521 | + | let eo = L(eb._5, a) | |
522 | + | if ((0 >= el)) | |
519 | 523 | then throw("LP <= 0") | |
520 | 524 | else { | |
521 | - | let | |
525 | + | let ep = if (!(dM)) | |
522 | 526 | then 0 | |
523 | - | else | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | then ( | |
527 | + | else el | |
528 | + | let eq = (dH - em) | |
529 | + | let er = (dJ - en) | |
530 | + | let es = if (if (dN) | |
531 | + | then (dQ == dR) | |
528 | 532 | else false) | |
529 | - | then $Tuple2( | |
530 | - | else if (if ( | |
531 | - | then ( | |
533 | + | then $Tuple2(dP, 0) | |
534 | + | else if (if (dN) | |
535 | + | then (dQ == dS) | |
532 | 536 | else false) | |
533 | - | then $Tuple2(0, | |
534 | - | else $Tuple2( | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | $Tuple13( | |
537 | + | then $Tuple2(0, dP) | |
538 | + | else $Tuple2(em, en) | |
539 | + | let et = es._1 | |
540 | + | let eu = es._2 | |
541 | + | let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, di), bC(et, eu, ep, dy, ca, eo, height, lastBlock.timestamp, eq, er))] | |
542 | + | $Tuple13(el, ep, dy, dt, dv, dX, dm, dr, ev, eq, er, dI, dK) | |
539 | 543 | } | |
540 | 544 | } | |
541 | 545 | ||
542 | 546 | ||
543 | - | func | |
544 | - | let | |
545 | - | let | |
547 | + | func ew (cD,cT,ex) = { | |
548 | + | let ey = g | |
549 | + | let ez = cD[if ((cT == 0)) | |
546 | 550 | then 1 | |
547 | 551 | else 0] | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | func | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | if (( | |
559 | - | then | |
552 | + | let eA = parseBigIntValue(l) | |
553 | + | let cH = (parseBigIntValue(aY) * eA) | |
554 | + | let cG = ez | |
555 | + | let cI = (cH * ey) | |
556 | + | let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey)) | |
557 | + | let eC = ((cG + ((ex * eA) / cI)) - ex) | |
558 | + | func cR (cS,eD) = { | |
559 | + | let eE = cS | |
560 | + | let eF = eE._1 | |
561 | + | let dg = eE._2 | |
562 | + | if ((dg != unit)) | |
563 | + | then cS | |
560 | 564 | else { | |
561 | - | let | |
562 | - | let | |
563 | - | if ((f >= | |
564 | - | then $Tuple2( | |
565 | - | else $Tuple2( | |
565 | + | let eG = (((eF * eF) + eB) / ((g * eF) + eC)) | |
566 | + | let eH = X((eG - value(eF))) | |
567 | + | if ((f >= eH)) | |
568 | + | then $Tuple2(eG, eD) | |
569 | + | else $Tuple2(eG, unit) | |
566 | 570 | } | |
567 | 571 | } | |
568 | 572 | ||
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | func | |
575 | - | then | |
576 | - | else | |
573 | + | let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
574 | + | let eI = { | |
575 | + | let cZ = cX | |
576 | + | let da = size(cZ) | |
577 | + | let db = $Tuple2(ex, unit) | |
578 | + | func dc (dd,de) = if ((de >= da)) | |
579 | + | then dd | |
580 | + | else cR(dd, cZ[de]) | |
577 | 581 | ||
578 | - | func | |
579 | - | then | |
582 | + | func df (dd,de) = if ((de >= da)) | |
583 | + | then dd | |
580 | 584 | else throw("List size exceeds 15") | |
581 | 585 | ||
582 | - | | |
586 | + | df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
583 | 587 | } | |
584 | - | let | |
585 | - | let | |
586 | - | if (( | |
587 | - | then | |
588 | - | else throw(("Y calculation error, Y = " + toString( | |
588 | + | let eF = eI._1 | |
589 | + | let dg = eI._2 | |
590 | + | if ((dg != unit)) | |
591 | + | then eF | |
592 | + | else throw(("Y calculation error, Y = " + toString(eF))) | |
589 | 593 | } | |
590 | 594 | ||
591 | 595 | ||
592 | - | func | |
593 | - | let | |
594 | - | if (( | |
596 | + | func eJ (eK,eL,eM) = { | |
597 | + | let eN = fraction(cC([K(eK, toBigInt(bs)), K(eL, toBigInt(bt))]), c, eM) | |
598 | + | if ((eM == e)) | |
595 | 599 | then e | |
596 | - | else | |
600 | + | else eN | |
597 | 601 | } | |
598 | 602 | ||
599 | 603 | ||
600 | - | func | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | | |
604 | + | func eO (eP,eQ,eR) = { | |
605 | + | let eS = (toBigInt(bR(bi(bq))) - eP) | |
606 | + | let eT = (toBigInt(bR(bi(br))) - eQ) | |
607 | + | let eU = (toBigInt(value(assetInfo(bp)).quantity) - eR) | |
608 | + | let eV = eJ(eS, eT, eU) | |
609 | + | eV | |
606 | 610 | } | |
607 | 611 | ||
608 | 612 | ||
609 | - | func | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | $Tuple2( | |
613 | + | func eW (eX,eY,eR) = { | |
614 | + | let eS = (bR(bi(bq)) + eX) | |
615 | + | let eT = (bR(bi(br)) + eY) | |
616 | + | let eU = (value(assetInfo(bp)).quantity + eR) | |
617 | + | let eN = eJ(toBigInt(eS), toBigInt(eT), toBigInt(eU)) | |
618 | + | let eZ = [IntegerEntry(as, height), StringEntry(ar, toString(eN))] | |
619 | + | $Tuple2(eZ, eN) | |
616 | 620 | } | |
617 | 621 | ||
618 | 622 | ||
619 | - | func | |
623 | + | func fa (fb,eN) = if ((eN >= fb)) | |
620 | 624 | then true | |
621 | - | else | |
625 | + | else aR("updated DLp lower than current DLp") | |
622 | 626 | ||
623 | 627 | ||
624 | - | func | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | then $Tuple2( | |
631 | - | else $Tuple2(-( | |
632 | - | let | |
633 | - | let | |
634 | - | if (if (if ( | |
628 | + | func fc (fd) = { | |
629 | + | let eS = bR(bi(bq)) | |
630 | + | let eT = bR(bi(br)) | |
631 | + | let fe = fd.amount | |
632 | + | let ff = fraction(fd.amount, fd.price, a, FLOOR) | |
633 | + | let fg = if ((fd.orderType == Buy)) | |
634 | + | then $Tuple2(fe, -(ff)) | |
635 | + | else $Tuple2(-(fe), ff) | |
636 | + | let eX = fg._1 | |
637 | + | let eY = fg._2 | |
638 | + | if (if (if (aZ()) | |
635 | 639 | then true | |
636 | - | else ( | |
640 | + | else (bo == r)) | |
637 | 641 | then true | |
638 | - | else ( | |
642 | + | else (bo == s)) | |
639 | 643 | then throw("Admin blocked") | |
640 | - | else if (if (( | |
644 | + | else if (if ((fd.assetPair.amountAsset != bq)) | |
641 | 645 | then true | |
642 | - | else ( | |
646 | + | else (fd.assetPair.priceAsset != br)) | |
643 | 647 | then throw("Wr assets") | |
644 | 648 | else { | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | $Tuple2( | |
649 | + | let fh = parseBigIntValue(valueOrElse(getString(this, ar), "0")) | |
650 | + | let fi = eW(eX, eY, 0) | |
651 | + | let fj = fi._1 | |
652 | + | let fk = fi._2 | |
653 | + | let fl = (fk >= fh) | |
654 | + | let fm = makeString(["dLp=", toString(fh), " dLpNew=", toString(fk), " amountAssetBalance=", toString(eS), " priceAssetBalance=", toString(eT), " amountAssetBalanceDelta=", toString(eX), " priceAssetBalanceDelta=", toString(eY), " height=", toString(height)], "") | |
655 | + | $Tuple2(fl, fm) | |
652 | 656 | } | |
653 | 657 | } | |
654 | 658 | ||
655 | 659 | ||
656 | - | func | |
660 | + | func fn (cT) = if ((size(cT.payments) != 1)) | |
657 | 661 | then throw("1 pmnt exp") | |
658 | 662 | else { | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (if ( | |
663 | + | let fo = value(cT.payments[0]) | |
664 | + | let dj = value(fo.assetId) | |
665 | + | let dP = fo.amount | |
666 | + | let eb = dh(toBase58String(cT.transactionId), toBase58String(dj), dP, cT.caller) | |
667 | + | let dD = eb._1 | |
668 | + | let dE = eb._2 | |
669 | + | let dr = parseIntValue(eb._9) | |
670 | + | let dF = eb._10 | |
671 | + | if (if (aZ()) | |
668 | 672 | then true | |
669 | - | else ( | |
670 | - | then throw(("Admin blocked: " + toString( | |
671 | - | else $Tuple5( | |
673 | + | else (dr == s)) | |
674 | + | then throw(("Admin blocked: " + toString(dr))) | |
675 | + | else $Tuple5(dD, dE, dP, dj, dF) | |
672 | 676 | } | |
673 | 677 | ||
674 | 678 | ||
675 | - | func | |
676 | - | let | |
677 | - | let | |
678 | - | if (if (if ( | |
679 | + | func fp (fq,ah,fr,fs,ca,dM,dN,dO,dP,dQ) = { | |
680 | + | let eb = dG(ah, ca, value(fr).amount, value(fr).assetId, value(fs).amount, value(fs).assetId, fq, (ah == ""), dM, dN, dO, dP, dQ) | |
681 | + | let dr = parseIntValue(eb._8) | |
682 | + | if (if (if (aZ()) | |
679 | 683 | then true | |
680 | - | else ( | |
684 | + | else (dr == q)) | |
681 | 685 | then true | |
682 | - | else ( | |
683 | - | then throw(("Blocked:" + toString( | |
684 | - | else | |
686 | + | else (dr == s)) | |
687 | + | then throw(("Blocked:" + toString(dr))) | |
688 | + | else eb | |
685 | 689 | } | |
686 | 690 | ||
687 | 691 | ||
688 | - | func | |
689 | - | let | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
692 | + | func ft (fu,dj,dl,ah,fv) = { | |
693 | + | let dn = toBase58String(value(bq)) | |
694 | + | let do = toBase58String(value(br)) | |
695 | + | let dm = bp | |
696 | + | let dV = bs | |
697 | + | let dW = bt | |
698 | + | let eU = toBigInt(valueOrErrorMessage(assetInfo(dm), "invalid lp asset").quantity) | |
699 | + | let fw = if ((eU > e)) | |
696 | 700 | then true | |
697 | 701 | else throw("initial deposit requires all coins") | |
698 | - | if (( | |
702 | + | if ((fw == fw)) | |
699 | 703 | then { | |
700 | - | let | |
701 | - | let | |
702 | - | let | |
703 | - | then $Tuple2( | |
704 | - | else if (( | |
705 | - | then if (( | |
704 | + | let dt = bR(dn) | |
705 | + | let dv = bR(do) | |
706 | + | let fx = if ((ah == "")) | |
707 | + | then $Tuple2(dt, dv) | |
708 | + | else if ((dj == dn)) | |
709 | + | then if ((fu > dt)) | |
706 | 710 | then throw("invalid payment amount") | |
707 | - | else $Tuple2(( | |
708 | - | else if (( | |
709 | - | then if (( | |
711 | + | else $Tuple2((dt - fu), dv) | |
712 | + | else if ((dj == do)) | |
713 | + | then if ((fu > dv)) | |
710 | 714 | then throw("invalid payment amount") | |
711 | - | else $Tuple2( | |
715 | + | else $Tuple2(dt, (dv - fu)) | |
712 | 716 | else throw("wrong pmtAssetId") | |
713 | - | let fv = fu._1 | |
714 | - | let fw = fu._2 | |
715 | - | let fx = if ((di == dm)) | |
716 | - | then $Tuple2(fr, 0) | |
717 | - | else if ((di == dn)) | |
718 | - | then $Tuple2(0, fr) | |
719 | - | else throw("invalid payment") | |
720 | 717 | let fy = fx._1 | |
721 | 718 | let fz = fx._2 | |
722 | - | let fA = if (fs) | |
723 | - | then $Tuple3(cy(fy, aW)._1, cy(fz, aW)._1, cy(fr, aW)._2) | |
724 | - | else $Tuple3(fy, fz, 0) | |
719 | + | let fA = if ((dj == dn)) | |
720 | + | then $Tuple2(fu, 0) | |
721 | + | else if ((dj == do)) | |
722 | + | then $Tuple2(0, fu) | |
723 | + | else throw("invalid payment") | |
725 | 724 | let fB = fA._1 | |
726 | 725 | let fC = fA._2 | |
727 | - | let cA = fA._3 | |
728 | - | let fD = (fv + fB) | |
729 | - | let fE = (fw + fC) | |
730 | - | let ce = cB([I(fv, bt), I(fw, bu)]) | |
731 | - | let cd = cB([I(fD, bt), I(fE, bu)]) | |
732 | - | let dZ = if ((cd > ce)) | |
726 | + | let fD = if (fv) | |
727 | + | then $Tuple3(cz(fB, aV)._1, cz(fC, aV)._1, cz(fu, aV)._2) | |
728 | + | else $Tuple3(fB, fC, 0) | |
729 | + | let fE = fD._1 | |
730 | + | let fF = fD._2 | |
731 | + | let cB = fD._3 | |
732 | + | let fG = (fy + fE) | |
733 | + | let fH = (fz + fF) | |
734 | + | let cf = cC([H(fy, bs), H(fz, bt)]) | |
735 | + | let ce = cC([H(fG, bs), H(fH, bt)]) | |
736 | + | let ec = if ((ce > cf)) | |
733 | 737 | then true | |
734 | 738 | else throw() | |
735 | - | if (( | |
739 | + | if ((ec == ec)) | |
736 | 740 | then { | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | $Tuple4(toInt( | |
741 | + | let fI = fraction(eU, (ce - cf), cf, FLOOR) | |
742 | + | let dy = L(bT(H(fH, dW), H(fG, dV)), a) | |
743 | + | let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, ah), bC(fB, fC, toInt(fI), dy, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
744 | + | let fJ = fraction(fz, a, fy) | |
745 | + | let fK = fraction(fu, a, (fJ + a)) | |
746 | + | let fL = (fu - fK) | |
747 | + | let fM = fraction(eU, toBigInt(fL), toBigInt(fz)) | |
748 | + | let fN = toInt(fraction((fI - fM), b, fM)) | |
749 | + | $Tuple4(toInt(fI), ev, cB, fN) | |
746 | 750 | } | |
747 | 751 | else throw("Strict value is not equal to itself.") | |
748 | 752 | } | |
750 | 754 | } | |
751 | 755 | ||
752 | 756 | ||
753 | - | func | |
754 | - | let | |
755 | - | let | |
756 | - | let | |
757 | - | let | |
758 | - | let | |
759 | - | let | |
760 | - | let | |
761 | - | then | |
762 | - | else | |
763 | - | let | |
764 | - | let | |
765 | - | let | |
766 | - | let | |
767 | - | if (( | |
757 | + | func fO (fP,fQ,fR,fq,fS,fT) = { | |
758 | + | let dm = toBase58String(value(bp)) | |
759 | + | let dn = toBase58String(value(bq)) | |
760 | + | let do = toBase58String(value(br)) | |
761 | + | let fU = bs | |
762 | + | let fV = bt | |
763 | + | let fW = bo | |
764 | + | let dl = if ((fq == bB)) | |
765 | + | then fS | |
766 | + | else fq | |
767 | + | let fo = value(fR[0]) | |
768 | + | let dj = value(fo.assetId) | |
769 | + | let dP = fo.amount | |
770 | + | let eV = eO(e, e, e) | |
771 | + | if ((eV == eV)) | |
768 | 772 | then { | |
769 | - | let | |
770 | - | if (( | |
773 | + | let di = toBase58String(fT) | |
774 | + | if ((dm != toBase58String(dj))) | |
771 | 775 | then throw("Wrong LP") | |
772 | 776 | else { | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | let | |
777 | - | if ($isInstanceOf( | |
778 | - | then | |
779 | - | else throw(($getType( | |
777 | + | let dt = bR(dn) | |
778 | + | let dv = bR(do) | |
779 | + | let fX = { | |
780 | + | let aW = invoke(this, "getOneTknV2READONLY", [fP, dP], nil) | |
781 | + | if ($isInstanceOf(aW, "(Int, Int)")) | |
782 | + | then aW | |
783 | + | else throw(($getType(aW) + " couldn't be cast to (Int, Int)")) | |
780 | 784 | } | |
781 | - | if (( | |
785 | + | if ((fX == fX)) | |
782 | 786 | then { | |
783 | - | let | |
784 | - | let | |
785 | - | let | |
786 | - | then ( | |
787 | + | let cB = fX._2 | |
788 | + | let fY = fX._1 | |
789 | + | let fZ = if (if ((fQ > 0)) | |
790 | + | then (fQ > fY) | |
787 | 791 | else false) | |
788 | - | then | |
789 | - | else | |
790 | - | let | |
791 | - | then $Tuple4( | |
792 | - | else if (( | |
793 | - | then $Tuple4(0, | |
792 | + | then aR(makeString(["amount to receive is less than ", toString(fQ)], "")) | |
793 | + | else fY | |
794 | + | let ga = if ((fP == dn)) | |
795 | + | then $Tuple4(fZ, 0, ((dt - fZ) - cB), dv) | |
796 | + | else if ((fP == do)) | |
797 | + | then $Tuple4(0, fZ, dt, ((dv - fZ) - cB)) | |
794 | 798 | else throw("invalid out asset id") | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
799 | + | let gb = ga._1 | |
800 | + | let gc = ga._2 | |
801 | + | let fG = ga._3 | |
802 | + | let fH = ga._4 | |
803 | + | let gd = bT(H(fH, fV), H(fG, fU)) | |
804 | + | let ge = L(gd, a) | |
805 | + | let gf = if ((fP == "WAVES")) | |
802 | 806 | then unit | |
803 | - | else fromBase58String( | |
804 | - | let | |
805 | - | then [ScriptTransfer( | |
807 | + | else fromBase58String(fP) | |
808 | + | let gg = if ((cB > 0)) | |
809 | + | then [ScriptTransfer(bb, cB, gf)] | |
806 | 810 | else nil | |
807 | - | let | |
808 | - | if (( | |
811 | + | let dF = ([ScriptTransfer(dl, fZ, gf), StringEntry(ai(toString(dl), di), bN(gb, gc, dP, ge, height, lastBlock.timestamp)), IntegerEntry(ab(), ge), IntegerEntry(ac(height, lastBlock.timestamp), ge)] ++ gg) | |
812 | + | if ((dF == dF)) | |
809 | 813 | then { | |
810 | - | let | |
811 | - | if (( | |
814 | + | let gh = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)]) | |
815 | + | if ((gh == gh)) | |
812 | 816 | then { | |
813 | - | let | |
814 | - | let | |
817 | + | let gi = { | |
818 | + | let gj = if ((this == bb)) | |
815 | 819 | then 0 | |
816 | - | else | |
817 | - | let | |
820 | + | else cB | |
821 | + | let gk = if ((bg(fP) == bq)) | |
818 | 822 | then true | |
819 | 823 | else false | |
820 | - | if ( | |
821 | - | then $Tuple2(-(( | |
822 | - | else $Tuple2(0, -(( | |
824 | + | if (gk) | |
825 | + | then $Tuple2(-((fY + gj)), 0) | |
826 | + | else $Tuple2(0, -((fY + gj))) | |
823 | 827 | } | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | if (( | |
831 | - | then $Tuple2(( | |
828 | + | let eX = gi._1 | |
829 | + | let eY = gi._2 | |
830 | + | let gl = eW(eX, eY, 0) | |
831 | + | let gm = gl._1 | |
832 | + | let eN = gl._2 | |
833 | + | let gn = fa(eV, eN) | |
834 | + | if ((gn == gn)) | |
835 | + | then $Tuple2((dF ++ gm), fZ) | |
832 | 836 | else throw("Strict value is not equal to itself.") | |
833 | 837 | } | |
834 | 838 | else throw("Strict value is not equal to itself.") | |
842 | 846 | } | |
843 | 847 | ||
844 | 848 | ||
845 | - | func | |
846 | - | let | |
847 | - | if ($isInstanceOf( | |
849 | + | func go () = { | |
850 | + | let gp = getString(Z()) | |
851 | + | if ($isInstanceOf(gp, "String")) | |
848 | 852 | then { | |
849 | - | let | |
850 | - | fromBase58String( | |
853 | + | let cG = gp | |
854 | + | fromBase58String(cG) | |
851 | 855 | } | |
852 | - | else if ($isInstanceOf( | |
856 | + | else if ($isInstanceOf(gp, "Unit")) | |
853 | 857 | then unit | |
854 | 858 | else throw("Match error") | |
855 | 859 | } | |
856 | 860 | ||
857 | 861 | ||
858 | - | func | |
859 | - | let | |
860 | - | if ($isInstanceOf( | |
862 | + | func gq () = { | |
863 | + | let gp = getString(aa()) | |
864 | + | if ($isInstanceOf(gp, "String")) | |
861 | 865 | then { | |
862 | - | let | |
863 | - | fromBase58String( | |
866 | + | let cG = gp | |
867 | + | fromBase58String(cG) | |
864 | 868 | } | |
865 | - | else if ($isInstanceOf( | |
869 | + | else if ($isInstanceOf(gp, "Unit")) | |
866 | 870 | then unit | |
867 | 871 | else throw("Match error") | |
868 | 872 | } | |
869 | 873 | ||
870 | 874 | ||
871 | - | let | |
875 | + | let gr = throw("Permission denied") | |
872 | 876 | ||
873 | - | func | |
874 | - | let | |
875 | - | if ($isInstanceOf( | |
877 | + | func gs (cT) = { | |
878 | + | let gp = go() | |
879 | + | if ($isInstanceOf(gp, "ByteVector")) | |
876 | 880 | then { | |
877 | - | let | |
878 | - | ( | |
881 | + | let gt = gp | |
882 | + | (cT.callerPublicKey == gt) | |
879 | 883 | } | |
880 | - | else if ($isInstanceOf( | |
881 | - | then ( | |
884 | + | else if ($isInstanceOf(gp, "Unit")) | |
885 | + | then (cT.caller == this) | |
882 | 886 | else throw("Match error") | |
883 | 887 | } | |
884 | 888 | ||
885 | 889 | ||
886 | - | func | |
887 | - | let | |
888 | - | if ($isInstanceOf( | |
890 | + | func gu (cT) = { | |
891 | + | let gp = go() | |
892 | + | if ($isInstanceOf(gp, "ByteVector")) | |
889 | 893 | then { | |
890 | - | let | |
891 | - | if (( | |
894 | + | let gt = gp | |
895 | + | if ((cT.callerPublicKey == gt)) | |
892 | 896 | then true | |
893 | - | else | |
897 | + | else gr | |
894 | 898 | } | |
895 | - | else if ($isInstanceOf( | |
896 | - | then if (( | |
899 | + | else if ($isInstanceOf(gp, "Unit")) | |
900 | + | then if ((cT.caller == this)) | |
897 | 901 | then true | |
898 | - | else | |
902 | + | else gr | |
899 | 903 | else throw("Match error") | |
900 | 904 | } | |
901 | 905 | ||
902 | 906 | ||
903 | - | func | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | then [(toBigInt( | |
912 | - | else [(toBigInt( | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
916 | - | let | |
917 | - | let | |
918 | - | func | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | if (( | |
923 | - | then | |
907 | + | func gv (gw,ex,gx) = { | |
908 | + | let bk = bc() | |
909 | + | let dn = bk[w] | |
910 | + | let do = bk[x] | |
911 | + | let ey = g | |
912 | + | let eA = parseBigIntValue(l) | |
913 | + | let cH = (parseBigIntValue(aY) * eA) | |
914 | + | let cD = if ((gw == false)) | |
915 | + | then [(toBigInt(bR(dn)) + gx), toBigInt(bR(do))] | |
916 | + | else [(toBigInt(bR(do)) + gx), toBigInt(bR(dn))] | |
917 | + | let ez = cD[0] | |
918 | + | let cG = ez | |
919 | + | let cI = (cH * ey) | |
920 | + | let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey)) | |
921 | + | let eC = ((cG + ((ex * eA) / cI)) - ex) | |
922 | + | func cR (cS,eD) = { | |
923 | + | let gy = cS | |
924 | + | let eF = gy._1 | |
925 | + | let dg = gy._2 | |
926 | + | if ((dg != unit)) | |
927 | + | then cS | |
924 | 928 | else { | |
925 | - | let | |
926 | - | let | |
927 | - | if ((f >= | |
928 | - | then $Tuple2( | |
929 | - | else $Tuple2( | |
929 | + | let eG = (((eF * eF) + eB) / ((g * eF) + eC)) | |
930 | + | let eH = X((eG - value(eF))) | |
931 | + | if ((f >= eH)) | |
932 | + | then $Tuple2(eG, eD) | |
933 | + | else $Tuple2(eG, unit) | |
930 | 934 | } | |
931 | 935 | } | |
932 | 936 | ||
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | func | |
939 | - | then | |
940 | - | else | |
937 | + | let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
938 | + | let gz = { | |
939 | + | let cZ = cX | |
940 | + | let da = size(cZ) | |
941 | + | let db = $Tuple2(ex, unit) | |
942 | + | func dc (dd,de) = if ((de >= da)) | |
943 | + | then dd | |
944 | + | else cR(dd, cZ[de]) | |
941 | 945 | ||
942 | - | func | |
943 | - | then | |
946 | + | func df (dd,de) = if ((de >= da)) | |
947 | + | then dd | |
944 | 948 | else throw("List size exceeds 15") | |
945 | 949 | ||
946 | - | | |
950 | + | df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
947 | 951 | } | |
948 | - | let | |
949 | - | let | |
950 | - | if (( | |
951 | - | then | |
952 | - | else throw(("Y calculation error, Y = " + toString( | |
952 | + | let eF = gz._1 | |
953 | + | let dg = gz._2 | |
954 | + | if ((dg != unit)) | |
955 | + | then eF | |
956 | + | else throw(("Y calculation error, Y = " + toString(eF))) | |
953 | 957 | } | |
954 | 958 | ||
955 | 959 | ||
956 | - | func | |
960 | + | func gA () = valueOrElse(getBoolean(aU, aG(toString(this))), false) | |
957 | 961 | ||
958 | 962 | ||
959 | - | @Callable( | |
960 | - | func calculateAmountOutForSwapREADONLY ( | |
961 | - | let | |
963 | + | @Callable(cT) | |
964 | + | func calculateAmountOutForSwapREADONLY (gB,gw,gC) = { | |
965 | + | let gD = if ((gw == false)) | |
962 | 966 | then { | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2( | |
967 | + | let gE = aN(this, ak()) | |
968 | + | let gx = (toBigInt(bR(aN(this, aj()))) + toBigInt(gB)) | |
969 | + | $Tuple2(gE, gx) | |
966 | 970 | } | |
967 | 971 | else { | |
968 | - | let | |
969 | - | let | |
970 | - | $Tuple2( | |
972 | + | let gE = aN(this, aj()) | |
973 | + | let gx = (toBigInt(bR(aN(this, ak()))) + toBigInt(gB)) | |
974 | + | $Tuple2(gE, gx) | |
971 | 975 | } | |
972 | - | let | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
981 | - | let | |
982 | - | let | |
983 | - | then [((toBigInt( | |
984 | - | else [(toBigInt( | |
985 | - | let | |
986 | - | let | |
976 | + | let gE = gD._1 | |
977 | + | let gx = gD._2 | |
978 | + | let bk = bc() | |
979 | + | let dn = bk[w] | |
980 | + | let do = bk[x] | |
981 | + | let cD = [toBigInt(bR(dn)), toBigInt(bR(do))] | |
982 | + | let ex = cC(cD) | |
983 | + | let eF = gv(gw, ex, toBigInt(gB)) | |
984 | + | let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1)) | |
985 | + | let gG = max([0, toInt(gF)]) | |
986 | + | let gH = if ((gw == false)) | |
987 | + | then [((toBigInt(bR(dn)) + toBigInt(gB)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)] | |
988 | + | else [(toBigInt(bR(dn)) - gF), ((toBigInt(bR(do)) + toBigInt(gB)) + toBigInt(gC))] | |
989 | + | let gI = cC(gH) | |
990 | + | let ec = if ((gI >= ex)) | |
987 | 991 | then true | |
988 | - | else throw(makeString(["new D is fewer error", toString( | |
989 | - | if (( | |
990 | - | then $Tuple2(nil, | |
992 | + | else throw(makeString(["new D is fewer error", toString(ex), toString(gI)], "__")) | |
993 | + | if ((ec == ec)) | |
994 | + | then $Tuple2(nil, gG) | |
991 | 995 | else throw("Strict value is not equal to itself.") | |
992 | 996 | } | |
993 | 997 | ||
994 | 998 | ||
995 | 999 | ||
996 | - | @Callable( | |
997 | - | func calculateAmountOutForSwapAndSendTokens ( | |
998 | - | let | |
999 | - | let | |
1000 | - | if ($isInstanceOf( | |
1001 | - | then | |
1002 | - | else throw(($getType( | |
1000 | + | @Callable(cT) | |
1001 | + | func calculateAmountOutForSwapAndSendTokens (gB,gw,gJ,gK,gC) = { | |
1002 | + | let gL = { | |
1003 | + | let aW = invoke(aU, "getSwapContractREADONLY", nil, nil) | |
1004 | + | if ($isInstanceOf(aW, "String")) | |
1005 | + | then aW | |
1006 | + | else throw(($getType(aW) + " couldn't be cast to String")) | |
1003 | 1007 | } | |
1004 | - | let | |
1008 | + | let gM = [if ((value(cT.payments[0]).amount >= gB)) | |
1005 | 1009 | then true | |
1006 | - | else | |
1010 | + | else aR("Wrong amount"), if ((cT.caller == addressFromStringValue(gL))) | |
1007 | 1011 | then true | |
1008 | - | else | |
1009 | - | if (( | |
1012 | + | else aR("Permission denied")] | |
1013 | + | if ((gM == gM)) | |
1010 | 1014 | then { | |
1011 | - | let | |
1012 | - | let | |
1013 | - | let | |
1015 | + | let fo = value(cT.payments[0]) | |
1016 | + | let gN = bi(fo.assetId) | |
1017 | + | let gO = if ((gw == false)) | |
1014 | 1018 | then { | |
1015 | - | let | |
1016 | - | let | |
1017 | - | $Tuple2( | |
1019 | + | let gE = aN(this, ak()) | |
1020 | + | let gx = (bR(gN) - value(cT.payments[0]).amount) | |
1021 | + | $Tuple2(gE, gx) | |
1018 | 1022 | } | |
1019 | 1023 | else { | |
1020 | - | let | |
1021 | - | let | |
1022 | - | $Tuple2( | |
1024 | + | let gE = aN(this, aj()) | |
1025 | + | let gx = (bR(gN) - value(cT.payments[0]).amount) | |
1026 | + | $Tuple2(gE, gx) | |
1023 | 1027 | } | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | let | |
1028 | - | let | |
1029 | - | let | |
1030 | - | then [(toBigInt( | |
1031 | - | else [toBigInt( | |
1032 | - | let | |
1033 | - | let | |
1034 | - | let | |
1035 | - | let | |
1036 | - | let | |
1028 | + | let gE = gO._1 | |
1029 | + | let gx = gO._2 | |
1030 | + | let bk = bc() | |
1031 | + | let dn = bk[w] | |
1032 | + | let do = bk[x] | |
1033 | + | let cD = if ((gw == false)) | |
1034 | + | then [(toBigInt(bR(dn)) - toBigInt(value(cT.payments[0]).amount)), toBigInt(bR(do))] | |
1035 | + | else [toBigInt(bR(dn)), (toBigInt(bR(do)) - toBigInt(value(cT.payments[0]).amount))] | |
1036 | + | let ex = cC(cD) | |
1037 | + | let eF = gv(gw, ex, toBigInt(0)) | |
1038 | + | let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1)) | |
1039 | + | let gG = max([0, toInt(gF)]) | |
1040 | + | let gP = if ((gG >= gJ)) | |
1037 | 1041 | then true | |
1038 | 1042 | else throw("Exchange result is fewer coins than expected") | |
1039 | - | if (( | |
1043 | + | if ((gP == gP)) | |
1040 | 1044 | then { | |
1041 | - | let | |
1042 | - | then [(toBigInt( | |
1043 | - | else [(toBigInt( | |
1044 | - | let | |
1045 | - | let | |
1045 | + | let gH = if ((gw == false)) | |
1046 | + | then [(toBigInt(bR(dn)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)] | |
1047 | + | else [(toBigInt(bR(dn)) - gF), (toBigInt(bR(do)) + toBigInt(gC))] | |
1048 | + | let gI = cC(gH) | |
1049 | + | let ec = if ((gI >= ex)) | |
1046 | 1050 | then true | |
1047 | 1051 | else throw("new D is fewer error") | |
1048 | - | if (( | |
1049 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1052 | + | if ((ec == ec)) | |
1053 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gK), gG, bg(gE))], gG) | |
1050 | 1054 | else throw("Strict value is not equal to itself.") | |
1051 | 1055 | } | |
1052 | 1056 | else throw("Strict value is not equal to itself.") | |
1056 | 1060 | ||
1057 | 1061 | ||
1058 | 1062 | ||
1059 | - | @Callable( | |
1060 | - | func constructor ( | |
1061 | - | let | |
1062 | - | if (( | |
1063 | - | then [StringEntry( | |
1063 | + | @Callable(cT) | |
1064 | + | func constructor (Y) = { | |
1065 | + | let eB = gu(cT) | |
1066 | + | if ((eB == eB)) | |
1067 | + | then [StringEntry(Y(), Y)] | |
1064 | 1068 | else throw("Strict value is not equal to itself.") | |
1065 | 1069 | } | |
1066 | 1070 | ||
1067 | 1071 | ||
1068 | 1072 | ||
1069 | - | @Callable( | |
1070 | - | func setManager ( | |
1071 | - | let | |
1072 | - | if (( | |
1073 | + | @Callable(cT) | |
1074 | + | func setManager (gQ) = { | |
1075 | + | let eB = gu(cT) | |
1076 | + | if ((eB == eB)) | |
1073 | 1077 | then { | |
1074 | - | let | |
1075 | - | if (( | |
1076 | - | then [StringEntry( | |
1078 | + | let gR = fromBase58String(gQ) | |
1079 | + | if ((gR == gR)) | |
1080 | + | then [StringEntry(aa(), gQ)] | |
1077 | 1081 | else throw("Strict value is not equal to itself.") | |
1078 | 1082 | } | |
1079 | 1083 | else throw("Strict value is not equal to itself.") | |
1081 | 1085 | ||
1082 | 1086 | ||
1083 | 1087 | ||
1084 | - | @Callable( | |
1088 | + | @Callable(cT) | |
1085 | 1089 | func confirmManager () = { | |
1086 | - | let | |
1087 | - | let | |
1090 | + | let cy = gq() | |
1091 | + | let gS = if (isDefined(cy)) | |
1088 | 1092 | then true | |
1089 | 1093 | else throw("No pending manager") | |
1090 | - | if (( | |
1094 | + | if ((gS == gS)) | |
1091 | 1095 | then { | |
1092 | - | let | |
1096 | + | let gT = if ((cT.callerPublicKey == value(cy))) | |
1093 | 1097 | then true | |
1094 | 1098 | else throw("You are not pending manager") | |
1095 | - | if (( | |
1096 | - | then [StringEntry( | |
1099 | + | if ((gT == gT)) | |
1100 | + | then [StringEntry(Z(), toBase58String(value(cy))), DeleteEntry(aa())] | |
1097 | 1101 | else throw("Strict value is not equal to itself.") | |
1098 | 1102 | } | |
1099 | 1103 | else throw("Strict value is not equal to itself.") | |
1101 | 1105 | ||
1102 | 1106 | ||
1103 | 1107 | ||
1104 | - | @Callable( | |
1105 | - | func put ( | |
1106 | - | let | |
1107 | - | let | |
1108 | - | let | |
1109 | - | if ((0 > | |
1108 | + | @Callable(cT) | |
1109 | + | func put (gU,gV) = { | |
1110 | + | let gW = bw() | |
1111 | + | let gX = valueOrErrorMessage(addressFromString(gW[C]), "Wr st addr") | |
1112 | + | let gY = valueOrErrorMessage(addressFromString(gW[E]), "Wr sl addr") | |
1113 | + | if ((0 > gU)) | |
1110 | 1114 | then throw("Wrong slippage") | |
1111 | - | else if ((size( | |
1115 | + | else if ((size(cT.payments) != 2)) | |
1112 | 1116 | then throw("2 pmnts expd") | |
1113 | 1117 | else { | |
1114 | - | let | |
1115 | - | let | |
1116 | - | let | |
1117 | - | if (( | |
1118 | + | let gZ = toBigInt(value(cT.payments[0]).amount) | |
1119 | + | let ha = toBigInt(value(cT.payments[1]).amount) | |
1120 | + | let eS = (toBigInt(bR(bi(bq))) - gZ) | |
1121 | + | if ((eS == eS)) | |
1118 | 1122 | then { | |
1119 | - | let | |
1120 | - | if (( | |
1123 | + | let eT = (toBigInt(bR(bi(br))) - ha) | |
1124 | + | if ((eT == eT)) | |
1121 | 1125 | then { | |
1122 | - | let | |
1123 | - | if (( | |
1126 | + | let eU = toBigInt(value(assetInfo(bp)).quantity) | |
1127 | + | if ((eU == eU)) | |
1124 | 1128 | then { | |
1125 | - | let | |
1126 | - | if (( | |
1129 | + | let eV = eO(gZ, ha, toBigInt(0)) | |
1130 | + | if ((eV == eV)) | |
1127 | 1131 | then { | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | let | |
1133 | - | let | |
1134 | - | let | |
1135 | - | let | |
1136 | - | let | |
1137 | - | if (( | |
1132 | + | let hb = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], gU, true, false, true, 0, "") | |
1133 | + | let ep = hb._2 | |
1134 | + | let hc = hb._7 | |
1135 | + | let dF = hb._9 | |
1136 | + | let eq = hb._10 | |
1137 | + | let er = hb._11 | |
1138 | + | let dn = hb._12 | |
1139 | + | let do = hb._13 | |
1140 | + | let eb = invoke(aU, "emit", [ep], nil) | |
1141 | + | if ((eb == eb)) | |
1138 | 1142 | then { | |
1139 | - | let | |
1140 | - | let | |
1141 | - | if ($isInstanceOf( | |
1143 | + | let hd = { | |
1144 | + | let gp = eb | |
1145 | + | if ($isInstanceOf(gp, "Address")) | |
1142 | 1146 | then { | |
1143 | - | let | |
1144 | - | invoke( | |
1147 | + | let he = gp | |
1148 | + | invoke(he, "emit", [ep], nil) | |
1145 | 1149 | } | |
1146 | 1150 | else unit | |
1147 | 1151 | } | |
1148 | - | if (( | |
1152 | + | if ((hd == hd)) | |
1149 | 1153 | then { | |
1150 | - | let | |
1151 | - | then invoke( | |
1154 | + | let hf = if ((eq > 0)) | |
1155 | + | then invoke(gY, "put", nil, [AttachedPayment(dn, eq)]) | |
1152 | 1156 | else nil | |
1153 | - | if (( | |
1157 | + | if ((hf == hf)) | |
1154 | 1158 | then { | |
1155 | - | let | |
1156 | - | then invoke( | |
1159 | + | let hg = if ((er > 0)) | |
1160 | + | then invoke(gY, "put", nil, [AttachedPayment(do, er)]) | |
1157 | 1161 | else nil | |
1158 | - | if (( | |
1162 | + | if ((hg == hg)) | |
1159 | 1163 | then { | |
1160 | - | let | |
1164 | + | let hh = if (gV) | |
1161 | 1165 | then { | |
1162 | - | let | |
1163 | - | if (( | |
1166 | + | let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, ep)]) | |
1167 | + | if ((hi == hi)) | |
1164 | 1168 | then nil | |
1165 | 1169 | else throw("Strict value is not equal to itself.") | |
1166 | 1170 | } | |
1167 | - | else [ScriptTransfer( | |
1168 | - | let | |
1169 | - | let | |
1170 | - | let | |
1171 | - | let | |
1171 | + | else [ScriptTransfer(cT.caller, ep, hc)] | |
1172 | + | let hj = eW(0, 0, 0) | |
1173 | + | let gm = hj._1 | |
1174 | + | let eN = hj._2 | |
1175 | + | let hk = if ((eN >= eV)) | |
1172 | 1176 | then true | |
1173 | - | else | |
1174 | - | if (( | |
1177 | + | else aR(makeString(["updated DLp lower than current DLp", toString(eS), toString(eT), toString(eU), toString(eV), toString(eN), toString(eq), toString(er)], " ")) | |
1178 | + | if ((hk == hk)) | |
1175 | 1179 | then { | |
1176 | - | let | |
1177 | - | if (( | |
1178 | - | then (( | |
1180 | + | let hl = value(assetInfo(bp)).quantity | |
1181 | + | if ((hl == hl)) | |
1182 | + | then ((dF ++ hh) ++ gm) | |
1179 | 1183 | else throw("Strict value is not equal to itself.") | |
1180 | 1184 | } | |
1181 | 1185 | else throw("Strict value is not equal to itself.") | |
1200 | 1204 | ||
1201 | 1205 | ||
1202 | 1206 | ||
1203 | - | @Callable( | |
1204 | - | func putOneTknV2 ( | |
1205 | - | let | |
1206 | - | let | |
1207 | - | if ($isInstanceOf( | |
1208 | - | then | |
1209 | - | else throw(($getType( | |
1207 | + | @Callable(cT) | |
1208 | + | func putOneTknV2 (fQ,gV) = { | |
1209 | + | let hm = { | |
1210 | + | let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1211 | + | if ($isInstanceOf(aW, "Boolean")) | |
1212 | + | then aW | |
1213 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1210 | 1214 | } | |
1211 | - | let | |
1215 | + | let hn = if (if (if (aZ()) | |
1212 | 1216 | then true | |
1213 | - | else ( | |
1217 | + | else (bo == q)) | |
1214 | 1218 | then true | |
1215 | - | else ( | |
1219 | + | else (bo == s)) | |
1216 | 1220 | then true | |
1217 | - | else | |
1218 | - | let | |
1221 | + | else hm | |
1222 | + | let gM = [if (if (!(hn)) | |
1219 | 1223 | then true | |
1220 | - | else | |
1224 | + | else gs(cT)) | |
1221 | 1225 | then true | |
1222 | - | else | |
1226 | + | else aR("put operation is blocked by admin"), if ((size(cT.payments) == 1)) | |
1223 | 1227 | then true | |
1224 | - | else | |
1225 | - | if (( | |
1228 | + | else aR("exactly 1 payment are expected")] | |
1229 | + | if ((gM == gM)) | |
1226 | 1230 | then { | |
1227 | - | let | |
1228 | - | let | |
1229 | - | let | |
1230 | - | let | |
1231 | - | let | |
1232 | - | let | |
1233 | - | then | |
1234 | - | else | |
1235 | - | let | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | then | |
1240 | - | else | |
1241 | - | if (( | |
1231 | + | let dn = toBase58String(value(bq)) | |
1232 | + | let do = toBase58String(value(br)) | |
1233 | + | let dm = bp | |
1234 | + | let fU = bs | |
1235 | + | let fV = bt | |
1236 | + | let dl = if ((cT.caller == this)) | |
1237 | + | then cT.originCaller | |
1238 | + | else cT.caller | |
1239 | + | let fo = value(cT.payments[0]) | |
1240 | + | let dj = toBase58String(value(fo.assetId)) | |
1241 | + | let dP = fo.amount | |
1242 | + | let eV = if ((fo.assetId == bq)) | |
1243 | + | then eO(toBigInt(dP), toBigInt(0), toBigInt(0)) | |
1244 | + | else eO(toBigInt(0), toBigInt(dP), toBigInt(0)) | |
1245 | + | if ((eV == eV)) | |
1242 | 1246 | then { | |
1243 | - | let | |
1244 | - | if (( | |
1247 | + | let ho = ft(dP, dj, toString(dl), toBase58String(cT.transactionId), true) | |
1248 | + | if ((ho == ho)) | |
1245 | 1249 | then { | |
1246 | - | let | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | then ( | |
1250 | + | let cB = ho._3 | |
1251 | + | let dF = ho._2 | |
1252 | + | let hp = ho._1 | |
1253 | + | let ep = if (if ((fQ > 0)) | |
1254 | + | then (fQ > hp) | |
1251 | 1255 | else false) | |
1252 | - | then | |
1253 | - | else | |
1254 | - | let | |
1255 | - | if (( | |
1256 | + | then aR(makeString(["amount to receive is less than ", toString(fQ)], "")) | |
1257 | + | else hp | |
1258 | + | let hb = invoke(aU, "emit", [ep], nil) | |
1259 | + | if ((hb == hb)) | |
1256 | 1260 | then { | |
1257 | - | let | |
1258 | - | let | |
1259 | - | if ($isInstanceOf( | |
1261 | + | let hd = { | |
1262 | + | let gp = hb | |
1263 | + | if ($isInstanceOf(gp, "Address")) | |
1260 | 1264 | then { | |
1261 | - | let | |
1262 | - | invoke( | |
1265 | + | let he = gp | |
1266 | + | invoke(he, "emit", [ep], nil) | |
1263 | 1267 | } | |
1264 | 1268 | else unit | |
1265 | 1269 | } | |
1266 | - | if (( | |
1270 | + | if ((hd == hd)) | |
1267 | 1271 | then { | |
1268 | - | let | |
1272 | + | let hh = if (gV) | |
1269 | 1273 | then { | |
1270 | - | let | |
1271 | - | if (( | |
1274 | + | let hi = invoke(by, "stakeFor", [toString(cT.caller)], [AttachedPayment(dm, ep)]) | |
1275 | + | if ((hi == hi)) | |
1272 | 1276 | then nil | |
1273 | 1277 | else throw("Strict value is not equal to itself.") | |
1274 | 1278 | } | |
1275 | - | else [ScriptTransfer( | |
1276 | - | let | |
1277 | - | then [ScriptTransfer( | |
1279 | + | else [ScriptTransfer(cT.caller, ep, dm)] | |
1280 | + | let gg = if ((cB > 0)) | |
1281 | + | then [ScriptTransfer(bb, cB, fromBase58String(dj))] | |
1278 | 1282 | else nil | |
1279 | - | let | |
1283 | + | let hq = if ((this == bb)) | |
1280 | 1284 | then $Tuple2(0, 0) | |
1281 | 1285 | else { | |
1282 | - | let | |
1286 | + | let hr = if ((fo.assetId == bq)) | |
1283 | 1287 | then true | |
1284 | 1288 | else false | |
1285 | - | if ( | |
1286 | - | then $Tuple2(-( | |
1287 | - | else $Tuple2(0, -( | |
1289 | + | if (hr) | |
1290 | + | then $Tuple2(-(cB), 0) | |
1291 | + | else $Tuple2(0, -(cB)) | |
1288 | 1292 | } | |
1289 | - | let | |
1290 | - | let | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let | |
1295 | - | if (( | |
1296 | - | then $Tuple2(((( | |
1293 | + | let eX = hq._1 | |
1294 | + | let eY = hq._2 | |
1295 | + | let hs = eW(eX, eY, 0) | |
1296 | + | let gm = hs._1 | |
1297 | + | let eN = hs._2 | |
1298 | + | let gn = fa(eV, eN) | |
1299 | + | if ((gn == gn)) | |
1300 | + | then $Tuple2((((dF ++ hh) ++ gg) ++ gm), ep) | |
1297 | 1301 | else throw("Strict value is not equal to itself.") | |
1298 | 1302 | } | |
1299 | 1303 | else throw("Strict value is not equal to itself.") | |
1309 | 1313 | ||
1310 | 1314 | ||
1311 | 1315 | ||
1312 | - | @Callable( | |
1313 | - | func putForFree ( | |
1316 | + | @Callable(cT) | |
1317 | + | func putForFree (ht) = if ((0 > ht)) | |
1314 | 1318 | then throw("Wrong slpg") | |
1315 | - | else if ((size( | |
1319 | + | else if ((size(cT.payments) != 2)) | |
1316 | 1320 | then throw("2 pmnts expd") | |
1317 | 1321 | else { | |
1318 | - | let | |
1319 | - | let | |
1320 | - | let | |
1321 | - | let | |
1322 | - | let | |
1323 | - | if (( | |
1322 | + | let hu = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], ht, false, false, true, 0, "") | |
1323 | + | let dF = hu._9 | |
1324 | + | let gZ = toBigInt(value(cT.payments[0]).amount) | |
1325 | + | let ha = toBigInt(value(cT.payments[1]).amount) | |
1326 | + | let eV = eO(gZ, ha, toBigInt(0)) | |
1327 | + | if ((eV == eV)) | |
1324 | 1328 | then { | |
1325 | - | let | |
1326 | - | let | |
1327 | - | let | |
1328 | - | let | |
1329 | - | if (( | |
1330 | - | then ( | |
1329 | + | let hv = eW(0, 0, 0) | |
1330 | + | let gm = hv._1 | |
1331 | + | let eN = hv._2 | |
1332 | + | let gn = fa(eV, eN) | |
1333 | + | if ((gn == gn)) | |
1334 | + | then (dF ++ gm) | |
1331 | 1335 | else throw("Strict value is not equal to itself.") | |
1332 | 1336 | } | |
1333 | 1337 | else throw("Strict value is not equal to itself.") | |
1335 | 1339 | ||
1336 | 1340 | ||
1337 | 1341 | ||
1338 | - | @Callable( | |
1342 | + | @Callable(cT) | |
1339 | 1343 | func get () = { | |
1340 | - | let | |
1341 | - | if (( | |
1344 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1345 | + | if ((eV == eV)) | |
1342 | 1346 | then { | |
1343 | - | let | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | let | |
1348 | - | let | |
1349 | - | let | |
1350 | - | if (( | |
1347 | + | let eb = fn(cT) | |
1348 | + | let hw = eb._1 | |
1349 | + | let dE = eb._2 | |
1350 | + | let dP = eb._3 | |
1351 | + | let dj = eb._4 | |
1352 | + | let dF = eb._5 | |
1353 | + | let eC = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)]) | |
1354 | + | if ((eC == eC)) | |
1351 | 1355 | then { | |
1352 | - | let | |
1353 | - | let | |
1354 | - | let | |
1355 | - | let | |
1356 | - | if (( | |
1357 | - | then ( | |
1356 | + | let hx = eW(-(hw), -(dE), 0) | |
1357 | + | let gm = hx._1 | |
1358 | + | let eN = hx._2 | |
1359 | + | let gn = fa(eV, eN) | |
1360 | + | if ((gn == gn)) | |
1361 | + | then (dF ++ gm) | |
1358 | 1362 | else throw("Strict value is not equal to itself.") | |
1359 | 1363 | } | |
1360 | 1364 | else throw("Strict value is not equal to itself.") | |
1364 | 1368 | ||
1365 | 1369 | ||
1366 | 1370 | ||
1367 | - | @Callable( | |
1368 | - | func getOneTknV2 ( | |
1369 | - | let | |
1370 | - | let | |
1371 | - | if ($isInstanceOf( | |
1372 | - | then | |
1373 | - | else throw(($getType( | |
1371 | + | @Callable(cT) | |
1372 | + | func getOneTknV2 (fP,fQ) = { | |
1373 | + | let hm = { | |
1374 | + | let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1375 | + | if ($isInstanceOf(aW, "Boolean")) | |
1376 | + | then aW | |
1377 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1374 | 1378 | } | |
1375 | - | let | |
1379 | + | let hy = if (if (aZ()) | |
1376 | 1380 | then true | |
1377 | - | else ( | |
1381 | + | else (bo == s)) | |
1378 | 1382 | then true | |
1379 | - | else | |
1380 | - | let | |
1383 | + | else hm | |
1384 | + | let gM = [if (if (!(hy)) | |
1381 | 1385 | then true | |
1382 | - | else | |
1386 | + | else gs(cT)) | |
1383 | 1387 | then true | |
1384 | - | else | |
1388 | + | else aR("get operation is blocked by admin"), if ((size(cT.payments) == 1)) | |
1385 | 1389 | then true | |
1386 | - | else | |
1387 | - | if (( | |
1390 | + | else aR("exactly 1 payment are expected")] | |
1391 | + | if ((gM == gM)) | |
1388 | 1392 | then { | |
1389 | - | let | |
1390 | - | let | |
1391 | - | let | |
1392 | - | $Tuple2( | |
1393 | + | let hz = fO(fP, fQ, cT.payments, cT.caller, cT.originCaller, cT.transactionId) | |
1394 | + | let dF = hz._1 | |
1395 | + | let fZ = hz._2 | |
1396 | + | $Tuple2(dF, fZ) | |
1393 | 1397 | } | |
1394 | 1398 | else throw("Strict value is not equal to itself.") | |
1395 | 1399 | } | |
1396 | 1400 | ||
1397 | 1401 | ||
1398 | 1402 | ||
1399 | - | @Callable( | |
1403 | + | @Callable(cT) | |
1400 | 1404 | func refreshDLp () = { | |
1401 | - | let | |
1402 | - | let | |
1405 | + | let hA = valueOrElse(getInteger(as), 0) | |
1406 | + | let hB = if (((height - hA) >= av)) | |
1403 | 1407 | then unit | |
1404 | - | else | |
1405 | - | if (( | |
1408 | + | else aR(makeString([toString(av), " blocks have not passed since the previous call"], "")) | |
1409 | + | if ((hB == hB)) | |
1406 | 1410 | then { | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | then | |
1413 | - | else | |
1414 | - | $Tuple2( | |
1411 | + | let fh = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), aT("invalid dLp")) | |
1412 | + | let hC = eW(0, 0, 0) | |
1413 | + | let hD = hC._1 | |
1414 | + | let eN = hC._2 | |
1415 | + | let eZ = if ((fh != eN)) | |
1416 | + | then hD | |
1417 | + | else aR("nothing to refresh") | |
1418 | + | $Tuple2(eZ, toString(eN)) | |
1415 | 1419 | } | |
1416 | 1420 | else throw("Strict value is not equal to itself.") | |
1417 | 1421 | } | |
1418 | 1422 | ||
1419 | 1423 | ||
1420 | 1424 | ||
1421 | - | @Callable( | |
1422 | - | func getOneTknV2READONLY ( | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | let | |
1429 | - | let | |
1430 | - | let | |
1425 | + | @Callable(cT) | |
1426 | + | func getOneTknV2READONLY (fP,hE) = { | |
1427 | + | let dn = toBase58String(value(bq)) | |
1428 | + | let do = toBase58String(value(br)) | |
1429 | + | let dm = toBase58String(value(bp)) | |
1430 | + | let cD = [toBigInt(bR(dn)), toBigInt(bR(do))] | |
1431 | + | let eM = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dm)), "invalid lp asset").quantity) | |
1432 | + | let cf = cC(cD) | |
1433 | + | let ce = (cf - fraction(toBigInt(hE), cf, eM)) | |
1434 | + | let hF = if ((fP == dn)) | |
1431 | 1435 | then 0 | |
1432 | - | else if (( | |
1436 | + | else if ((fP == do)) | |
1433 | 1437 | then 1 | |
1434 | 1438 | else throw("invalid out asset id") | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | $Tuple2(nil, $Tuple2( | |
1439 | + | let hG = ew(cD, hF, ce) | |
1440 | + | let gF = (cD[hF] - hG) | |
1441 | + | let gG = max([0, toInt((gF - f))]) | |
1442 | + | let hH = cz(gG, aX) | |
1443 | + | let fY = hH._1 | |
1444 | + | let cB = hH._2 | |
1445 | + | $Tuple2(nil, $Tuple2(fY, cB)) | |
1442 | 1446 | } | |
1443 | 1447 | ||
1444 | 1448 | ||
1445 | 1449 | ||
1446 | - | @Callable( | |
1447 | - | func getOneTknV2WithBonusREADONLY ( | |
1448 | - | let | |
1449 | - | let | |
1450 | - | let | |
1451 | - | let | |
1452 | - | let | |
1453 | - | let | |
1454 | - | let | |
1455 | - | if ($isInstanceOf( | |
1456 | - | then | |
1457 | - | else throw(($getType( | |
1450 | + | @Callable(cT) | |
1451 | + | func getOneTknV2WithBonusREADONLY (fP,hE) = { | |
1452 | + | let dn = toBase58String(value(bq)) | |
1453 | + | let do = toBase58String(value(br)) | |
1454 | + | let dm = toBase58String(value(bp)) | |
1455 | + | let dt = bR(dn) | |
1456 | + | let dv = bR(do) | |
1457 | + | let hI = { | |
1458 | + | let aW = invoke(this, "getOneTknV2READONLY", [fP, hE], nil) | |
1459 | + | if ($isInstanceOf(aW, "(Int, Int)")) | |
1460 | + | then aW | |
1461 | + | else throw(($getType(aW) + " couldn't be cast to (Int, Int)")) | |
1458 | 1462 | } | |
1459 | - | let | |
1460 | - | let | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | then if (( | |
1463 | + | let fY = hI._1 | |
1464 | + | let cB = hI._2 | |
1465 | + | let eb = dh("", dm, hE, this) | |
1466 | + | let dD = eb._1 | |
1467 | + | let dE = eb._2 | |
1468 | + | let hJ = (dD + dE) | |
1469 | + | let fN = if ((hJ == 0)) | |
1470 | + | then if ((fY == 0)) | |
1467 | 1471 | then 0 | |
1468 | 1472 | else throw("bonus calculation error") | |
1469 | - | else fraction(( | |
1470 | - | $Tuple2(nil, $Tuple3( | |
1473 | + | else fraction((fY - hJ), a, hJ) | |
1474 | + | $Tuple2(nil, $Tuple3(fY, cB, fN)) | |
1471 | 1475 | } | |
1472 | 1476 | ||
1473 | 1477 | ||
1474 | 1478 | ||
1475 | - | @Callable( | |
1476 | - | func getNoLess ( | |
1477 | - | let | |
1478 | - | let | |
1479 | - | let | |
1480 | - | let | |
1481 | - | let | |
1482 | - | let | |
1483 | - | if (( | |
1484 | - | then throw(((("Failed: " + toString( | |
1485 | - | else if (( | |
1486 | - | then throw(((("Failed: " + toString( | |
1479 | + | @Callable(cT) | |
1480 | + | func getNoLess (hK,hL) = { | |
1481 | + | let eb = fn(cT) | |
1482 | + | let dD = eb._1 | |
1483 | + | let dE = eb._2 | |
1484 | + | let dP = eb._3 | |
1485 | + | let dj = eb._4 | |
1486 | + | let dF = eb._5 | |
1487 | + | if ((hK > dD)) | |
1488 | + | then throw(((("Failed: " + toString(dD)) + " < ") + toString(hK))) | |
1489 | + | else if ((hL > dE)) | |
1490 | + | then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL))) | |
1487 | 1491 | else { | |
1488 | - | let | |
1489 | - | if (( | |
1492 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1493 | + | if ((eV == eV)) | |
1490 | 1494 | then { | |
1491 | - | let | |
1492 | - | if (( | |
1495 | + | let hM = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)]) | |
1496 | + | if ((hM == hM)) | |
1493 | 1497 | then { | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | let | |
1498 | - | if (( | |
1499 | - | then ( | |
1498 | + | let hN = eW(-(dD), -(dE), 0) | |
1499 | + | let gm = hN._1 | |
1500 | + | let eN = hN._2 | |
1501 | + | let gn = fa(eV, eN) | |
1502 | + | if ((gn == gn)) | |
1503 | + | then (dF ++ gm) | |
1500 | 1504 | else throw("Strict value is not equal to itself.") | |
1501 | 1505 | } | |
1502 | 1506 | else throw("Strict value is not equal to itself.") | |
1507 | 1511 | ||
1508 | 1512 | ||
1509 | 1513 | ||
1510 | - | @Callable( | |
1511 | - | func unstakeAndGet ( | |
1512 | - | let | |
1514 | + | @Callable(cT) | |
1515 | + | func unstakeAndGet (cA) = { | |
1516 | + | let hO = if ((size(cT.payments) != 0)) | |
1513 | 1517 | then throw("No pmnts expd") | |
1514 | 1518 | else true | |
1515 | - | if (( | |
1519 | + | if ((hO == hO)) | |
1516 | 1520 | then { | |
1517 | - | let | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | if (( | |
1521 | + | let hP = bw() | |
1522 | + | let hc = bp | |
1523 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1524 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1525 | + | if ((eV == eV)) | |
1522 | 1526 | then { | |
1523 | - | let | |
1524 | - | if (( | |
1527 | + | let hR = invoke(hQ, "unstake", [toBase58String(hc), cA], nil) | |
1528 | + | if ((hR == hR)) | |
1525 | 1529 | then { | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | let | |
1530 | - | let | |
1531 | - | let | |
1530 | + | let eb = dh(toBase58String(cT.transactionId), toBase58String(hc), cA, cT.caller) | |
1531 | + | let dD = eb._1 | |
1532 | + | let dE = eb._2 | |
1533 | + | let dr = parseIntValue(eb._9) | |
1534 | + | let dF = eb._10 | |
1535 | + | let hS = if (if (aZ()) | |
1532 | 1536 | then true | |
1533 | - | else ( | |
1534 | - | then throw(("Blocked: " + toString( | |
1537 | + | else (dr == s)) | |
1538 | + | then throw(("Blocked: " + toString(dr))) | |
1535 | 1539 | else true | |
1536 | - | if (( | |
1540 | + | if ((hS == hS)) | |
1537 | 1541 | then { | |
1538 | - | let | |
1539 | - | if (( | |
1542 | + | let hT = invoke(aU, "burn", [cA], [AttachedPayment(hc, cA)]) | |
1543 | + | if ((hT == hT)) | |
1540 | 1544 | then { | |
1541 | - | let | |
1542 | - | let | |
1543 | - | let | |
1544 | - | let | |
1545 | - | if (( | |
1546 | - | then ( | |
1545 | + | let hU = eW(-(dD), -(dE), 0) | |
1546 | + | let gm = hU._1 | |
1547 | + | let eN = hU._2 | |
1548 | + | let gn = fa(eV, eN) | |
1549 | + | if ((gn == gn)) | |
1550 | + | then (dF ++ gm) | |
1547 | 1551 | else throw("Strict value is not equal to itself.") | |
1548 | 1552 | } | |
1549 | 1553 | else throw("Strict value is not equal to itself.") | |
1559 | 1563 | ||
1560 | 1564 | ||
1561 | 1565 | ||
1562 | - | @Callable( | |
1563 | - | func unstakeAndGetNoLess ( | |
1564 | - | let | |
1566 | + | @Callable(cT) | |
1567 | + | func unstakeAndGetNoLess (hV,hW,hL) = { | |
1568 | + | let hy = if (aZ()) | |
1565 | 1569 | then true | |
1566 | - | else ( | |
1567 | - | let | |
1570 | + | else (bo == s) | |
1571 | + | let gM = [if (!(hy)) | |
1568 | 1572 | then true | |
1569 | - | else throw("get operation is blocked by admin"), if ((size( | |
1573 | + | else throw("get operation is blocked by admin"), if ((size(cT.payments) == 0)) | |
1570 | 1574 | then true | |
1571 | 1575 | else throw("no payments are expected")] | |
1572 | - | if (( | |
1576 | + | if ((gM == gM)) | |
1573 | 1577 | then { | |
1574 | - | let | |
1575 | - | if (( | |
1578 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1579 | + | if ((eV == eV)) | |
1576 | 1580 | then { | |
1577 | - | let | |
1578 | - | if (( | |
1581 | + | let hR = invoke(by, "unstake", [toBase58String(bp), hV], nil) | |
1582 | + | if ((hR == hR)) | |
1579 | 1583 | then { | |
1580 | - | let | |
1581 | - | let | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1584 | + | let hX = dh(toBase58String(cT.transactionId), toBase58String(bp), hV, cT.caller) | |
1585 | + | let dD = hX._1 | |
1586 | + | let dE = hX._2 | |
1587 | + | let dF = hX._10 | |
1588 | + | let hY = [if ((dD >= hW)) | |
1585 | 1589 | then true | |
1586 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1590 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dE >= hL)) | |
1587 | 1591 | then true | |
1588 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1589 | - | if (( | |
1592 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hL)], ""))] | |
1593 | + | if ((hY == hY)) | |
1590 | 1594 | then { | |
1591 | - | let | |
1592 | - | if (( | |
1595 | + | let hM = invoke(aU, "burn", [hV], [AttachedPayment(bp, hV)]) | |
1596 | + | if ((hM == hM)) | |
1593 | 1597 | then { | |
1594 | - | let | |
1595 | - | let | |
1596 | - | let | |
1597 | - | let | |
1598 | - | if (( | |
1599 | - | then ( | |
1598 | + | let hZ = eW(-(dD), -(dE), 0) | |
1599 | + | let gm = hZ._1 | |
1600 | + | let eN = hZ._2 | |
1601 | + | let gn = fa(eV, eN) | |
1602 | + | if ((gn == gn)) | |
1603 | + | then (dF ++ gm) | |
1600 | 1604 | else throw("Strict value is not equal to itself.") | |
1601 | 1605 | } | |
1602 | 1606 | else throw("Strict value is not equal to itself.") | |
1612 | 1616 | ||
1613 | 1617 | ||
1614 | 1618 | ||
1615 | - | @Callable( | |
1616 | - | func unstakeAndGetOneTknV2 ( | |
1617 | - | let | |
1618 | - | let | |
1619 | - | if ($isInstanceOf( | |
1620 | - | then | |
1621 | - | else throw(($getType( | |
1619 | + | @Callable(cT) | |
1620 | + | func unstakeAndGetOneTknV2 (hV,fP,fQ) = { | |
1621 | + | let hm = { | |
1622 | + | let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1623 | + | if ($isInstanceOf(aW, "Boolean")) | |
1624 | + | then aW | |
1625 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1622 | 1626 | } | |
1623 | - | let | |
1627 | + | let hy = if (if (aZ()) | |
1624 | 1628 | then true | |
1625 | - | else ( | |
1629 | + | else (bo == s)) | |
1626 | 1630 | then true | |
1627 | - | else | |
1628 | - | let | |
1631 | + | else hm | |
1632 | + | let gM = [if (if (!(hy)) | |
1629 | 1633 | then true | |
1630 | - | else | |
1634 | + | else gs(cT)) | |
1631 | 1635 | then true | |
1632 | - | else | |
1636 | + | else aR("get operation is blocked by admin"), if ((size(cT.payments) == 0)) | |
1633 | 1637 | then true | |
1634 | - | else | |
1635 | - | if (( | |
1638 | + | else aR("no payments are expected")] | |
1639 | + | if ((gM == gM)) | |
1636 | 1640 | then { | |
1637 | - | let | |
1638 | - | let | |
1639 | - | let | |
1640 | - | let | |
1641 | - | let | |
1642 | - | let | |
1643 | - | if (( | |
1641 | + | let hP = bw() | |
1642 | + | let hc = bp | |
1643 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1644 | + | let dl = cT.caller | |
1645 | + | let ia = this | |
1646 | + | let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dl.bytes, ia.bytes], nil) | |
1647 | + | if ((hR == hR)) | |
1644 | 1648 | then { | |
1645 | - | let | |
1646 | - | let | |
1647 | - | let | |
1648 | - | $Tuple2( | |
1649 | + | let ib = fO(fP, fQ, [AttachedPayment(hc, hV)], cT.caller, cT.originCaller, cT.transactionId) | |
1650 | + | let dF = ib._1 | |
1651 | + | let fZ = ib._2 | |
1652 | + | $Tuple2(dF, fZ) | |
1649 | 1653 | } | |
1650 | 1654 | else throw("Strict value is not equal to itself.") | |
1651 | 1655 | } | |
1654 | 1658 | ||
1655 | 1659 | ||
1656 | 1660 | ||
1657 | - | @Callable( | |
1658 | - | func putOneTknV2WithBonusREADONLY ( | |
1659 | - | let | |
1660 | - | let | |
1661 | - | let | |
1662 | - | let | |
1663 | - | let | |
1664 | - | $Tuple2(nil, $Tuple3( | |
1661 | + | @Callable(cT) | |
1662 | + | func putOneTknV2WithBonusREADONLY (ic,id) = { | |
1663 | + | let ie = ft(ic, id, "", "", true) | |
1664 | + | let fI = ie._1 | |
1665 | + | let dF = ie._2 | |
1666 | + | let cB = ie._3 | |
1667 | + | let fN = ie._4 | |
1668 | + | $Tuple2(nil, $Tuple3(fI, cB, fN)) | |
1665 | 1669 | } | |
1666 | 1670 | ||
1667 | 1671 | ||
1668 | 1672 | ||
1669 | - | @Callable( | |
1670 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1671 | - | let | |
1672 | - | let | |
1673 | - | let | |
1674 | - | let | |
1675 | - | let | |
1676 | - | $Tuple2(nil, $Tuple3( | |
1673 | + | @Callable(cT) | |
1674 | + | func putOneTknV2WithoutTakeFeeREADONLY (ic,id) = { | |
1675 | + | let if = ft(ic, id, "", "", false) | |
1676 | + | let fI = if._1 | |
1677 | + | let dF = if._2 | |
1678 | + | let cB = if._3 | |
1679 | + | let fN = if._4 | |
1680 | + | $Tuple2(nil, $Tuple3(fI, cB, fN)) | |
1677 | 1681 | } | |
1678 | 1682 | ||
1679 | 1683 | ||
1680 | 1684 | ||
1681 | - | @Callable( | |
1682 | - | func activate ( | |
1685 | + | @Callable(cT) | |
1686 | + | func activate (ig,ih) = if ((toString(cT.caller) != toString(aU))) | |
1683 | 1687 | then throw("denied") | |
1684 | - | else $Tuple2([StringEntry(ak(), | |
1688 | + | else $Tuple2([StringEntry(aj(), ig), StringEntry(ak(), ih)], "success") | |
1685 | 1689 | ||
1686 | 1690 | ||
1687 | 1691 | ||
1688 | - | @Callable( | |
1689 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1692 | + | @Callable(cT) | |
1693 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc()) | |
1690 | 1694 | ||
1691 | 1695 | ||
1692 | 1696 | ||
1693 | - | @Callable( | |
1694 | - | func getAccBalanceWrapperREADONLY ( | |
1697 | + | @Callable(cT) | |
1698 | + | func getAccBalanceWrapperREADONLY (bS) = $Tuple2(nil, bR(bS)) | |
1695 | 1699 | ||
1696 | 1700 | ||
1697 | 1701 | ||
1698 | - | @Callable( | |
1699 | - | func calcPricesWrapperREADONLY ( | |
1700 | - | let | |
1701 | - | $Tuple2(nil, [toString( | |
1702 | + | @Callable(cT) | |
1703 | + | func calcPricesWrapperREADONLY (cl,cm,cq) = { | |
1704 | + | let ii = cp(cl, cm, cq) | |
1705 | + | $Tuple2(nil, [toString(ii[0]), toString(ii[1]), toString(ii[2])]) | |
1702 | 1706 | } | |
1703 | 1707 | ||
1704 | 1708 | ||
1705 | 1709 | ||
1706 | - | @Callable( | |
1707 | - | func fromX18WrapperREADONLY ( | |
1710 | + | @Callable(cT) | |
1711 | + | func fromX18WrapperREADONLY (M,ij) = $Tuple2(nil, L(parseBigIntValue(M), ij)) | |
1708 | 1712 | ||
1709 | 1713 | ||
1710 | 1714 | ||
1711 | - | @Callable( | |
1712 | - | func toX18WrapperREADONLY (J | |
1715 | + | @Callable(cT) | |
1716 | + | func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J))) | |
1713 | 1717 | ||
1714 | 1718 | ||
1715 | 1719 | ||
1716 | - | @Callable( | |
1717 | - | func calcPriceBigIntWrapperREADONLY ( | |
1720 | + | @Callable(cT) | |
1721 | + | func calcPriceBigIntWrapperREADONLY (bU,bV) = $Tuple2(nil, toString(bT(parseBigIntValue(bU), parseBigIntValue(bV)))) | |
1718 | 1722 | ||
1719 | 1723 | ||
1720 | 1724 | ||
1721 | - | @Callable( | |
1722 | - | func estimatePutOperationWrapperREADONLY ( | |
1725 | + | @Callable(cT) | |
1726 | + | func estimatePutOperationWrapperREADONLY (di,ca,dH,dI,dJ,dK,ik,dL,dM) = $Tuple2(nil, dG(di, ca, dH, dI, dJ, dK, ik, dL, dM, true, false, 0, "")) | |
1723 | 1727 | ||
1724 | 1728 | ||
1725 | 1729 | ||
1726 | - | @Callable( | |
1727 | - | func estimateGetOperationWrapperREADONLY ( | |
1728 | - | let | |
1729 | - | $Tuple2(nil, $Tuple10( | |
1730 | + | @Callable(cT) | |
1731 | + | func estimateGetOperationWrapperREADONLY (di,il,dk,ik) = { | |
1732 | + | let eb = dh(di, il, dk, addressFromStringValue(ik)) | |
1733 | + | $Tuple2(nil, $Tuple10(eb._1, eb._2, eb._3, eb._4, eb._5, eb._6, eb._7, toString(eb._8), eb._9, eb._10)) | |
1730 | 1734 | } | |
1731 | 1735 | ||
1732 | 1736 | ||
1733 | 1737 | ||
1734 | - | @Callable( | |
1738 | + | @Callable(cT) | |
1735 | 1739 | func changeAmp () = { | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | if ($isInstanceOf( | |
1740 | + | let im = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil) | |
1741 | + | let in = { | |
1742 | + | let gp = im | |
1743 | + | if ($isInstanceOf(gp, "List[Any]")) | |
1740 | 1744 | then { | |
1741 | - | let | |
1745 | + | let io = gp | |
1742 | 1746 | $Tuple3({ | |
1743 | - | let | |
1744 | - | if ($isInstanceOf( | |
1745 | - | then | |
1746 | - | else throw(($getType( | |
1747 | + | let aW = io[0] | |
1748 | + | if ($isInstanceOf(aW, "Int")) | |
1749 | + | then aW | |
1750 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
1747 | 1751 | }, { | |
1748 | - | let | |
1749 | - | if ($isInstanceOf( | |
1750 | - | then | |
1751 | - | else throw(($getType( | |
1752 | + | let aW = io[1] | |
1753 | + | if ($isInstanceOf(aW, "Int")) | |
1754 | + | then aW | |
1755 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
1752 | 1756 | }, { | |
1753 | - | let | |
1754 | - | if ($isInstanceOf( | |
1755 | - | then | |
1756 | - | else throw(($getType( | |
1757 | + | let aW = io[2] | |
1758 | + | if ($isInstanceOf(aW, "Int")) | |
1759 | + | then aW | |
1760 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
1757 | 1761 | }) | |
1758 | 1762 | } | |
1759 | - | else | |
1763 | + | else aR("invalid entry type") | |
1760 | 1764 | } | |
1761 | - | let | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | then if (( | |
1768 | - | then | |
1769 | - | else | |
1770 | - | else if (( | |
1771 | - | then | |
1772 | - | else | |
1773 | - | let | |
1774 | - | let | |
1775 | - | let | |
1765 | + | let ip = in._1 | |
1766 | + | let iq = in._2 | |
1767 | + | let ir = in._3 | |
1768 | + | let is = parseIntValue(getStringValue(al())) | |
1769 | + | let it = (is + iq) | |
1770 | + | let iu = if ((0 > iq)) | |
1771 | + | then if ((ir > it)) | |
1772 | + | then ir | |
1773 | + | else it | |
1774 | + | else if ((it > ir)) | |
1775 | + | then ir | |
1776 | + | else it | |
1777 | + | let iv = valueOrElse(getInteger(ao()), 0) | |
1778 | + | let iw = (iv + ip) | |
1779 | + | let gM = [if ((height > iw)) | |
1776 | 1780 | then true | |
1777 | - | else | |
1781 | + | else aR("try again in few blocks"), if ((is != iu)) | |
1778 | 1782 | then true | |
1779 | - | else | |
1780 | - | if (( | |
1781 | - | then [IntegerEntry( | |
1783 | + | else aR("already reached target")] | |
1784 | + | if ((gM == gM)) | |
1785 | + | then [IntegerEntry(ao(), height), StringEntry(al(), toString(iu)), StringEntry(am(height), toString(iu))] | |
1782 | 1786 | else throw("Strict value is not equal to itself.") | |
1783 | 1787 | } | |
1784 | 1788 | ||
1785 | 1789 | ||
1786 | - | @Verifier( | |
1787 | - | func | |
1788 | - | let | |
1789 | - | let | |
1790 | - | if ($isInstanceOf( | |
1790 | + | @Verifier(ix) | |
1791 | + | func iy () = { | |
1792 | + | let iz = { | |
1793 | + | let gp = go() | |
1794 | + | if ($isInstanceOf(gp, "ByteVector")) | |
1791 | 1795 | then { | |
1792 | - | let | |
1793 | - | | |
1796 | + | let gt = gp | |
1797 | + | gt | |
1794 | 1798 | } | |
1795 | - | else if ($isInstanceOf( | |
1796 | - | then | |
1799 | + | else if ($isInstanceOf(gp, "Unit")) | |
1800 | + | then ix.senderPublicKey | |
1797 | 1801 | else throw("Match error") | |
1798 | 1802 | } | |
1799 | - | let | |
1800 | - | if ($isInstanceOf( | |
1803 | + | let gp = ix | |
1804 | + | if ($isInstanceOf(gp, "Order")) | |
1801 | 1805 | then { | |
1802 | - | let | |
1803 | - | let | |
1804 | - | let | |
1806 | + | let fd = gp | |
1807 | + | let iA = ba() | |
1808 | + | let iB = if (gA()) | |
1805 | 1809 | then $Tuple2(true, "") | |
1806 | - | else eZ(fa) | |
1807 | - | let aK = iy._1 | |
1808 | - | let aL = iy._2 | |
1809 | - | let aM = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey) | |
1810 | - | let aN = sigVerify(fa.bodyBytes, fa.proofs[1], ix) | |
1811 | - | if (if (if (aK) | |
1810 | + | else fc(fd) | |
1811 | + | let aJ = iB._1 | |
1812 | + | let aK = iB._2 | |
1813 | + | let aL = sigVerify(fd.bodyBytes, fd.proofs[0], fd.senderPublicKey) | |
1814 | + | let aM = sigVerify(fd.bodyBytes, fd.proofs[1], iA) | |
1815 | + | if (if (if (aJ) | |
1816 | + | then aL | |
1817 | + | else false) | |
1812 | 1818 | then aM | |
1813 | 1819 | else false) | |
1814 | - | then aN | |
1815 | - | else false) | |
1816 | 1820 | then true | |
1817 | - | else aJ | |
1821 | + | else aI(aJ, aK, aL, aM) | |
1818 | 1822 | } | |
1819 | - | else if ($isInstanceOf( | |
1823 | + | else if ($isInstanceOf(gp, "SetScriptTransaction")) | |
1820 | 1824 | then { | |
1821 | - | let | |
1822 | - | if (sigVerify( | |
1825 | + | let cG = gp | |
1826 | + | if (sigVerify(ix.bodyBytes, ix.proofs[0], iz)) | |
1823 | 1827 | then true | |
1824 | 1828 | else { | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | if (( | |
1829 | - | then ( | |
1829 | + | let iC = blake2b256(value(cG.script)) | |
1830 | + | let iD = fromBase64String(value(getString(aU, aE()))) | |
1831 | + | let iE = scriptHash(this) | |
1832 | + | if ((iD == iC)) | |
1833 | + | then (iE != iC) | |
1830 | 1834 | else false | |
1831 | 1835 | } | |
1832 | 1836 | } | |
1833 | - | else sigVerify( | |
1837 | + | else sigVerify(ix.bodyBytes, ix.proofs[0], iz) | |
1834 | 1838 | } | |
1835 | 1839 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100000000 | |
5 | 5 | ||
6 | 6 | let b = toBigInt(100000000) | |
7 | 7 | ||
8 | 8 | let c = toBigInt(1000000000000000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(1) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(3) | |
19 | 19 | ||
20 | 20 | let i = toBigInt(4) | |
21 | 21 | ||
22 | 22 | let j = toBigInt((a - ((a * 1) / a))) | |
23 | 23 | ||
24 | 24 | let k = "WAVES" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = "100" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "1" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "__" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = 1 | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 2 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 3 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 4 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 1 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 2 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 3 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 4 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 5 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 6 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 7 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 8 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 9 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 1 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 6 | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = 7 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 10 | |
67 | 67 | ||
68 | - | let G = 10 | |
68 | + | let G = fraction(10, a, 10000) | |
69 | 69 | ||
70 | - | let H = fraction(10, a, 10000) | |
71 | - | ||
72 | - | func I (J,K) = fraction(toBigInt(J), c, toBigInt(K)) | |
70 | + | func H (I,J) = fraction(toBigInt(I), c, toBigInt(J)) | |
73 | 71 | ||
74 | 72 | ||
75 | - | func | |
73 | + | func K (I,J) = fraction(I, c, J) | |
76 | 74 | ||
77 | 75 | ||
78 | - | func | |
76 | + | func L (M,N) = toInt(fraction(M, toBigInt(N), c)) | |
79 | 77 | ||
80 | 78 | ||
81 | - | func | |
79 | + | func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P)) | |
82 | 80 | ||
83 | 81 | ||
84 | - | func | |
82 | + | func Q (I,J) = fraction(I, c, toBigInt(J)) | |
85 | 83 | ||
86 | 84 | ||
87 | - | func | |
85 | + | func R (M,N) = fraction(M, toBigInt(N), c) | |
88 | 86 | ||
89 | 87 | ||
90 | - | func | |
88 | + | func S (T,U,V) = fraction(T, U, V) | |
91 | 89 | ||
92 | 90 | ||
93 | - | func | |
94 | - | then -( | |
95 | - | else | |
91 | + | func W (M) = if ((d > M)) | |
92 | + | then -(M) | |
93 | + | else M | |
96 | 94 | ||
97 | 95 | ||
98 | - | func | |
99 | - | then -( | |
100 | - | else | |
96 | + | func X (M) = if ((d > M)) | |
97 | + | then -(M) | |
98 | + | else M | |
101 | 99 | ||
102 | 100 | ||
103 | - | func | |
101 | + | func Y () = "%s__factoryContract" | |
104 | 102 | ||
105 | 103 | ||
106 | - | func | |
104 | + | func Z () = "%s__managerPublicKey" | |
107 | 105 | ||
108 | 106 | ||
109 | - | func | |
107 | + | func aa () = "%s__pendingManagerPublicKey" | |
110 | 108 | ||
111 | 109 | ||
112 | - | func | |
110 | + | func ab () = "%s%s__price__last" | |
113 | 111 | ||
114 | 112 | ||
115 | - | func | |
113 | + | func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n) | |
116 | 114 | ||
117 | 115 | ||
118 | - | func | |
116 | + | func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah) | |
119 | 117 | ||
120 | 118 | ||
121 | - | func | |
119 | + | func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah) | |
122 | 120 | ||
123 | 121 | ||
124 | - | func | |
122 | + | func aj () = "%s__amountAsset" | |
125 | 123 | ||
126 | 124 | ||
127 | - | func | |
125 | + | func ak () = "%s__priceAsset" | |
128 | 126 | ||
129 | 127 | ||
130 | - | func | |
128 | + | func al () = "%s__amp" | |
131 | 129 | ||
132 | 130 | ||
133 | - | func | |
131 | + | func am (an) = ("%s%d__amp__" + toString(an)) | |
134 | 132 | ||
135 | 133 | ||
136 | - | func | |
134 | + | func ao () = "%s__changeAmpLastCall" | |
137 | 135 | ||
138 | 136 | ||
139 | - | let | |
137 | + | let ap = "%s__fee" | |
140 | 138 | ||
141 | - | let | |
139 | + | let aq = valueOrElse(getInteger(this, ap), G) | |
142 | 140 | ||
143 | - | let | |
141 | + | let ar = makeString(["%s", "dLp"], n) | |
144 | 142 | ||
145 | - | let | |
143 | + | let as = makeString(["%s", "dLpRefreshedHeight"], n) | |
146 | 144 | ||
147 | - | let | |
145 | + | let at = makeString(["%s", "refreshDLpDelay"], n) | |
148 | 146 | ||
149 | - | let | |
147 | + | let au = 30 | |
150 | 148 | ||
151 | - | let | |
149 | + | let av = valueOrElse(getInteger(this, at), au) | |
152 | 150 | ||
153 | - | func | |
151 | + | func aw () = "%s__factoryConfig" | |
154 | 152 | ||
155 | 153 | ||
156 | - | func | |
154 | + | func ax () = "%s%s__matcher__publicKey" | |
157 | 155 | ||
158 | 156 | ||
159 | - | func | |
157 | + | func ay (az,aA) = (((("%d%d%s__" + az) + "__") + aA) + "__config") | |
160 | 158 | ||
161 | 159 | ||
162 | - | func | |
160 | + | func aB (aC) = ("%s%s%s__mappings__baseAsset2internalId__" + aC) | |
163 | 161 | ||
164 | 162 | ||
165 | - | func | |
163 | + | func aD () = "%s__shutdown" | |
166 | 164 | ||
167 | 165 | ||
168 | - | func | |
166 | + | func aE () = "%s__allowedLpStableScriptHash" | |
169 | 167 | ||
170 | 168 | ||
171 | - | func | |
169 | + | func aF () = "%s__feeCollectorAddress" | |
172 | 170 | ||
173 | 171 | ||
174 | - | func | |
172 | + | func aG (aH) = ("%s%s__skipOrderValidation__" + aH) | |
175 | 173 | ||
176 | 174 | ||
177 | - | func | |
175 | + | func aI (aJ,aK,aL,aM) = throw((((((((("order validation failed: orderValid=" + toString(aJ)) + " (") + aK) + ")") + " senderValid=") + toString(aL)) + " matcherValid=") + toString(aM))) | |
178 | 176 | ||
179 | 177 | ||
180 | - | func | |
178 | + | func aN (aO,aP) = valueOrErrorMessage(getString(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], "")) | |
181 | 179 | ||
182 | 180 | ||
183 | - | func | |
181 | + | func aQ (aO,aP) = valueOrErrorMessage(getInteger(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], "")) | |
184 | 182 | ||
185 | 183 | ||
186 | - | func | |
184 | + | func aR (aS) = throw(makeString(["lp_stable.ride:", aS], " ")) | |
187 | 185 | ||
188 | 186 | ||
189 | - | func | |
187 | + | func aT (aS) = makeString(["lp_stable.ride:", aS], " ") | |
190 | 188 | ||
191 | 189 | ||
192 | - | let | |
190 | + | let aU = addressFromStringValue(aN(this, Y())) | |
193 | 191 | ||
194 | - | let | |
195 | - | let | |
196 | - | if ($isInstanceOf( | |
197 | - | then | |
198 | - | else throw(($getType( | |
192 | + | let aV = { | |
193 | + | let aW = invoke(aU, "getInFeeREADONLY", [toString(this)], nil) | |
194 | + | if ($isInstanceOf(aW, "Int")) | |
195 | + | then aW | |
196 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
199 | 197 | } | |
200 | 198 | ||
201 | - | let | |
202 | - | let | |
203 | - | if ($isInstanceOf( | |
204 | - | then | |
205 | - | else throw(($getType( | |
199 | + | let aX = { | |
200 | + | let aW = invoke(aU, "getOutFeeREADONLY", [toString(this)], nil) | |
201 | + | if ($isInstanceOf(aW, "Int")) | |
202 | + | then aW | |
203 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
206 | 204 | } | |
207 | 205 | ||
208 | - | let | |
206 | + | let aY = aN(this, al()) | |
209 | 207 | ||
210 | - | func | |
208 | + | func aZ () = valueOrElse(getBoolean(aU, aD()), false) | |
211 | 209 | ||
212 | 210 | ||
213 | - | func | |
211 | + | func ba () = fromBase58String(aN(aU, ax())) | |
214 | 212 | ||
215 | 213 | ||
216 | - | let | |
214 | + | let bb = addressFromStringValue(aN(aU, aF())) | |
217 | 215 | ||
218 | - | func | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | split( | |
216 | + | func bc () = { | |
217 | + | let bd = aN(this, aj()) | |
218 | + | let be = aN(this, ak()) | |
219 | + | let bf = aQ(aU, aB(be)) | |
220 | + | let az = aQ(aU, aB(bd)) | |
221 | + | split(aN(aU, ay(toString(az), toString(bf))), n) | |
224 | 222 | } | |
225 | 223 | ||
226 | 224 | ||
227 | - | func | |
225 | + | func bg (bh) = if ((bh == k)) | |
228 | 226 | then unit | |
229 | - | else fromBase58String( | |
227 | + | else fromBase58String(bh) | |
230 | 228 | ||
231 | 229 | ||
232 | - | func | |
230 | + | func bi (bh) = if ((bh == unit)) | |
233 | 231 | then k | |
234 | - | else toBase58String(value( | |
232 | + | else toBase58String(value(bh)) | |
235 | 233 | ||
236 | 234 | ||
237 | - | func | |
235 | + | func bj (bk) = $Tuple9(addressFromStringValue(bk[t]), parseIntValue(bk[u]), fromBase58String(bk[v]), bg(bk[w]), bg(bk[x]), parseIntValue(bk[y]), parseIntValue(bk[z]), fromBase58String(bk[A]), fromBase58String(bk[B])) | |
238 | 236 | ||
239 | 237 | ||
240 | - | let | |
238 | + | let bl = bj(bc()) | |
241 | 239 | ||
242 | - | let | |
240 | + | let bm = bl | |
243 | 241 | ||
244 | - | let | |
242 | + | let bn = bm._1 | |
245 | 243 | ||
246 | - | let | |
244 | + | let bo = bm._2 | |
247 | 245 | ||
248 | - | let | |
246 | + | let bp = bm._3 | |
249 | 247 | ||
250 | - | let | |
248 | + | let bq = bm._4 | |
251 | 249 | ||
252 | - | let | |
250 | + | let br = bm._5 | |
253 | 251 | ||
254 | - | let | |
252 | + | let bs = bm._6 | |
255 | 253 | ||
256 | - | let | |
254 | + | let bt = bm._7 | |
257 | 255 | ||
258 | - | func bv () = split(aO(aV, ax()), o) | |
256 | + | let bu = bm._8 | |
257 | + | ||
258 | + | let bv = bm._9 | |
259 | + | ||
260 | + | func bw () = split(aN(aU, aw()), n) | |
259 | 261 | ||
260 | 262 | ||
261 | - | let | |
263 | + | let bx = bw() | |
262 | 264 | ||
263 | - | let | |
265 | + | let by = valueOrErrorMessage(addressFromString(bx[C]), "Invalid staking contract address") | |
264 | 266 | ||
265 | - | let | |
267 | + | let bz = valueOrErrorMessage(addressFromString(bx[E]), "Invalid slipage contract address") | |
266 | 268 | ||
267 | - | let | |
269 | + | let bA = valueOrErrorMessage(addressFromString(bx[F]), "Invalid gwx contract address") | |
268 | 270 | ||
269 | - | let | |
271 | + | let bB = valueOrErrorMessage(addressFromString(bx[D]), "Invalid gwx contract address") | |
270 | 272 | ||
271 | - | func | |
273 | + | func bC (bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM)], n) | |
272 | 274 | ||
273 | 275 | ||
274 | - | func | |
276 | + | func bN (bO,bP,bQ,bG,bJ,bK) = makeString(["%d%d%d%d%d%d", toString(bO), toString(bP), toString(bQ), toString(bG), toString(bJ), toString(bK)], n) | |
275 | 277 | ||
276 | 278 | ||
277 | - | func | |
279 | + | func bR (bS) = if ((bS == "WAVES")) | |
278 | 280 | then wavesBalance(this).available | |
279 | - | else assetBalance(this, fromBase58String( | |
281 | + | else assetBalance(this, fromBase58String(bS)) | |
280 | 282 | ||
281 | 283 | ||
282 | - | func | |
284 | + | func bT (bU,bV) = fraction(bU, c, bV) | |
283 | 285 | ||
284 | 286 | ||
285 | - | func | |
287 | + | func bW (bU,bV,P) = fraction(bU, c, bV, P) | |
286 | 288 | ||
287 | 289 | ||
288 | - | func | |
289 | - | let | |
290 | - | let | |
291 | - | if (!( | |
292 | - | then throw(("Big slpg: " + toString( | |
293 | - | else $Tuple2( | |
290 | + | func bX (bY,bZ,ca) = { | |
291 | + | let cb = fraction((bY - bZ), b, bZ) | |
292 | + | let cc = ((ca - W(cb)) > d) | |
293 | + | if (!(cc)) | |
294 | + | then throw(("Big slpg: " + toString(cb))) | |
295 | + | else $Tuple2(cc, min([bY, bZ])) | |
294 | 296 | } | |
295 | 297 | ||
296 | 298 | ||
297 | - | func | |
298 | - | let | |
299 | - | let | |
300 | - | if (if ( | |
299 | + | func cd (ce,cf,cg) = { | |
300 | + | let cb = fraction(cf, b, ce) | |
301 | + | let ch = (cg > cb) | |
302 | + | if (if (ch) | |
301 | 303 | then true | |
302 | - | else ( | |
303 | - | then throw(((((((toString( | |
304 | - | else | |
304 | + | else (cf > ce)) | |
305 | + | then throw(((((((toString(cf) + " ") + toString(ce)) + " ") + toString(cb)) + " ") + toString(cg))) | |
306 | + | else ch | |
305 | 307 | } | |
306 | 308 | ||
307 | 309 | ||
308 | - | func | |
309 | - | let | |
310 | - | let | |
311 | - | | |
310 | + | func ci (cj,ck,cl,cm) = { | |
311 | + | let cn = H(cl, cj) | |
312 | + | let co = H(cm, ck) | |
313 | + | bT(co, cn) | |
312 | 314 | } | |
313 | 315 | ||
314 | 316 | ||
315 | - | func | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | [ | |
317 | + | func cp (cl,cm,cq) = { | |
318 | + | let cr = bs | |
319 | + | let cs = bt | |
320 | + | let ct = ci(cr, cs, cl, cm) | |
321 | + | let bV = H(cl, cr) | |
322 | + | let bU = H(cm, cs) | |
323 | + | let cu = H(cq, a) | |
324 | + | let cv = bT(bV, cu) | |
325 | + | let cw = bT(bU, cu) | |
326 | + | [ct, cv, cw] | |
325 | 327 | } | |
326 | 328 | ||
327 | 329 | ||
328 | - | func | |
329 | - | let | |
330 | - | [ | |
330 | + | func cx (cl,cm,cq) = { | |
331 | + | let cy = cp(cl, cm, cq) | |
332 | + | [L(cy[0], a), L(cy[1], a), L(cy[2], a)] | |
331 | 333 | } | |
332 | 334 | ||
333 | 335 | ||
334 | - | func | |
335 | - | let | |
336 | + | func cz (cA,aq) = { | |
337 | + | let cB = if ((aq == 0)) | |
336 | 338 | then 0 | |
337 | - | else fraction( | |
338 | - | $Tuple2(( | |
339 | + | else fraction(cA, aq, a) | |
340 | + | $Tuple2((cA - cB), cB) | |
339 | 341 | } | |
340 | 342 | ||
341 | 343 | ||
342 | - | func | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | if (( | |
344 | + | func cC (cD) = { | |
345 | + | let cE = cD[0] | |
346 | + | let cF = cD[1] | |
347 | + | let cG = (cE + cF) | |
348 | + | if ((cG == e)) | |
347 | 349 | then e | |
348 | 350 | else { | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | func | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | fraction(( | |
351 | + | let cH = parseIntValue(aY) | |
352 | + | let cI = (cH * 2) | |
353 | + | let cy = fraction(cE, cF, f) | |
354 | + | let cJ = fraction(cy, i, f) | |
355 | + | let cK = fraction(toBigInt(cI), cG, f) | |
356 | + | let cL = toBigInt((cI - 1)) | |
357 | + | func cM (cN) = { | |
358 | + | let cO = fraction(cN, cN, f) | |
359 | + | let cP = fraction(cO, cN, f) | |
360 | + | let cQ = fraction(cP, f, cJ) | |
361 | + | fraction((cK + fraction(cQ, g, f)), cN, (fraction(cL, cN, f) + fraction(h, cQ, f))) | |
360 | 362 | } | |
361 | 363 | ||
362 | - | func | |
363 | - | then | |
364 | + | func cR (cS,cT) = if (cS._2) | |
365 | + | then cS | |
364 | 366 | else { | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | let | |
369 | - | then -( | |
370 | - | else | |
371 | - | if ((f >= | |
372 | - | then $Tuple2( | |
373 | - | else $Tuple2( | |
367 | + | let cN = cS._1 | |
368 | + | let cU = cM(cN) | |
369 | + | let cV = (cU - value(cN)) | |
370 | + | let cW = if ((e > cV)) | |
371 | + | then -(cV) | |
372 | + | else cV | |
373 | + | if ((f >= cW)) | |
374 | + | then $Tuple2(cU, true) | |
375 | + | else $Tuple2(cU, false) | |
374 | 376 | } | |
375 | 377 | ||
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | func | |
382 | - | then | |
383 | - | else | |
378 | + | let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
379 | + | let cY = { | |
380 | + | let cZ = cX | |
381 | + | let da = size(cZ) | |
382 | + | let db = $Tuple2(cG, false) | |
383 | + | func dc (dd,de) = if ((de >= da)) | |
384 | + | then dd | |
385 | + | else cR(dd, cZ[de]) | |
384 | 386 | ||
385 | - | func | |
386 | - | then | |
387 | + | func df (dd,de) = if ((de >= da)) | |
388 | + | then dd | |
387 | 389 | else throw("List size exceeds 17") | |
388 | 390 | ||
389 | - | | |
391 | + | df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
390 | 392 | } | |
391 | - | let | |
392 | - | let | |
393 | - | if ( | |
394 | - | then | |
395 | - | else throw(("D calculation error, D = " + toString( | |
393 | + | let cN = cY._1 | |
394 | + | let dg = cY._2 | |
395 | + | if (dg) | |
396 | + | then cN | |
397 | + | else throw(("D calculation error, D = " + toString(cN))) | |
396 | 398 | } | |
397 | 399 | } | |
398 | 400 | ||
399 | 401 | ||
400 | - | func | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | let | |
408 | - | if ((toBase58String( | |
402 | + | func dh (di,dj,dk,dl) = { | |
403 | + | let dm = bp | |
404 | + | let dn = toBase58String(value(bq)) | |
405 | + | let do = toBase58String(value(br)) | |
406 | + | let dp = bs | |
407 | + | let dq = bt | |
408 | + | let dr = toString(bo) | |
409 | + | let ds = valueOrErrorMessage(assetInfo(dm), "Wrong LP id").quantity | |
410 | + | if ((toBase58String(dm) != dj)) | |
409 | 411 | then throw("Wrong pmt asset") | |
410 | 412 | else { | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
413 | + | let dt = bR(dn) | |
414 | + | let du = H(dt, dp) | |
415 | + | let dv = bR(do) | |
416 | + | let dw = H(dv, dq) | |
417 | + | let dx = bT(dw, du) | |
418 | + | let dy = L(dx, a) | |
419 | + | let dz = H(dk, a) | |
420 | + | let dA = H(ds, a) | |
421 | + | let dB = fraction(du, dz, dA) | |
422 | + | let dC = fraction(dw, dz, dA) | |
423 | + | let dD = O(dB, dp, FLOOR) | |
424 | + | let dE = O(dC, dq, FLOOR) | |
425 | + | let dF = if ((di == "")) | |
424 | 426 | then nil | |
425 | - | else [ScriptTransfer( | |
427 | + | else [ScriptTransfer(dl, dD, if ((dn == "WAVES")) | |
426 | 428 | then unit | |
427 | - | else fromBase58String( | |
429 | + | else fromBase58String(dn)), ScriptTransfer(dl, dE, if ((do == "WAVES")) | |
428 | 430 | then unit | |
429 | - | else fromBase58String( | |
430 | - | $Tuple10( | |
431 | + | else fromBase58String(do)), StringEntry(ai(toString(dl), di), bN(dD, dE, dk, dy, height, lastBlock.timestamp)), IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy)] | |
432 | + | $Tuple10(dD, dE, dn, do, dt, dv, ds, dx, dr, dF) | |
431 | 433 | } | |
432 | 434 | } | |
433 | 435 | ||
434 | 436 | ||
435 | - | func dF (dh,bZ,dG,dH,dI,dJ,dk,dK,dL,dM,dN,dO,dP) = { | |
436 | - | let dl = bq | |
437 | - | let dQ = toBase58String(value(br)) | |
438 | - | let dR = toBase58String(value(bs)) | |
439 | - | let dS = bt | |
437 | + | func dG (di,ca,dH,dI,dJ,dK,dl,dL,dM,dN,dO,dP,dQ) = { | |
438 | + | let dm = bp | |
439 | + | let dR = toBase58String(value(bq)) | |
440 | + | let dS = toBase58String(value(br)) | |
440 | 441 | let dT = bu | |
441 | - | let dq = toString(bp) | |
442 | - | let dU = valueOrErrorMessage(assetInfo(dl), "Wr lp as").quantity | |
443 | - | let ds = if (dK) | |
444 | - | then bQ(dQ) | |
445 | - | else if (if (dM) | |
446 | - | then (dP == dQ) | |
442 | + | let dU = bv | |
443 | + | let dV = bs | |
444 | + | let dW = bt | |
445 | + | let dr = toString(bo) | |
446 | + | let dX = valueOrErrorMessage(assetInfo(dm), "Wr lp as").quantity | |
447 | + | let dt = if (dL) | |
448 | + | then bR(dR) | |
449 | + | else if (if (dN) | |
450 | + | then (dQ == dR) | |
447 | 451 | else false) | |
448 | - | then ( | |
449 | - | else if ( | |
450 | - | then | |
451 | - | else ( | |
452 | - | let | |
453 | - | then | |
454 | - | else if (if ( | |
455 | - | then ( | |
452 | + | then (bR(dR) - dP) | |
453 | + | else if (dN) | |
454 | + | then bR(dR) | |
455 | + | else (bR(dR) - dH) | |
456 | + | let dv = if (dL) | |
457 | + | then bR(dS) | |
458 | + | else if (if (dN) | |
459 | + | then (dQ == dS) | |
456 | 460 | else false) | |
457 | - | then ( | |
458 | - | else if ( | |
459 | - | then | |
460 | - | else ( | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
461 | + | then (bR(dS) - dP) | |
462 | + | else if (dN) | |
463 | + | then bR(dS) | |
464 | + | else (bR(dS) - dJ) | |
465 | + | let dY = H(dH, dV) | |
466 | + | let dZ = H(dJ, dW) | |
467 | + | let ea = bT(dZ, dY) | |
468 | + | let du = H(dt, dV) | |
469 | + | let dw = H(dv, dW) | |
470 | + | let cf = cC([du, dw]) | |
471 | + | let eb = if ((dX == 0)) | |
468 | 472 | then { | |
469 | - | let | |
470 | - | let | |
473 | + | let ce = cC([(du + dY), (dw + dZ)]) | |
474 | + | let ec = if ((ce > cf)) | |
471 | 475 | then true | |
472 | 476 | else throw("D1 should be greater than D0") | |
473 | - | if (( | |
477 | + | if ((ec == ec)) | |
474 | 478 | then { | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | $Tuple5( | |
479 | + | let dx = d | |
480 | + | let ed = d | |
481 | + | let cu = ce | |
482 | + | $Tuple5(L(cu, a), L(dY, dV), L(dZ, dW), bT((dw + dZ), (du + dY)), ed) | |
479 | 483 | } | |
480 | 484 | else throw("Strict value is not equal to itself.") | |
481 | 485 | } | |
482 | 486 | else { | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | if (if (if ( | |
487 | - | then ( | |
487 | + | let dx = bT(dw, du) | |
488 | + | let ee = fraction(W((dx - ea)), c, dx) | |
489 | + | let ed = H(ca, a) | |
490 | + | if (if (if (dO) | |
491 | + | then (dx != d) | |
488 | 492 | else false) | |
489 | - | then ( | |
493 | + | then (ee > ed) | |
490 | 494 | else false) | |
491 | - | then throw(((("Price slippage " + toString( | |
495 | + | then throw(((("Price slippage " + toString(ee)) + " > ") + toString(ed))) | |
492 | 496 | else { | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | then $Tuple2( | |
498 | - | else $Tuple2( | |
499 | - | let | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
497 | + | let ef = H(dX, a) | |
498 | + | let eg = fraction(dY, bW(dw, du, CEILING), c, CEILING) | |
499 | + | let eh = fraction(dZ, c, bW(dw, du, FLOOR), CEILING) | |
500 | + | let ei = if ((eg > dZ)) | |
501 | + | then $Tuple2(eh, dZ) | |
502 | + | else $Tuple2(dY, eg) | |
503 | + | let ej = ei._1 | |
504 | + | let ek = ei._2 | |
505 | + | let ce = cC([(du + ej), (dw + ek)]) | |
506 | + | let ec = if ((ce > cf)) | |
503 | 507 | then true | |
504 | 508 | else throw("D1 should be greater than D0") | |
505 | - | if (( | |
509 | + | if ((ec == ec)) | |
506 | 510 | then { | |
507 | - | let | |
508 | - | $Tuple5( | |
511 | + | let cu = fraction(ef, (ce - cf), cf) | |
512 | + | $Tuple5(O(cu, a, FLOOR), O(ej, dV, CEILING), O(ek, dW, CEILING), dx, ed) | |
509 | 513 | } | |
510 | 514 | else throw("Strict value is not equal to itself.") | |
511 | 515 | } | |
512 | 516 | } | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | if ((0 >= | |
517 | + | let el = eb._1 | |
518 | + | let em = eb._2 | |
519 | + | let en = eb._3 | |
520 | + | let dy = L(eb._4, a) | |
521 | + | let eo = L(eb._5, a) | |
522 | + | if ((0 >= el)) | |
519 | 523 | then throw("LP <= 0") | |
520 | 524 | else { | |
521 | - | let | |
525 | + | let ep = if (!(dM)) | |
522 | 526 | then 0 | |
523 | - | else | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | then ( | |
527 | + | else el | |
528 | + | let eq = (dH - em) | |
529 | + | let er = (dJ - en) | |
530 | + | let es = if (if (dN) | |
531 | + | then (dQ == dR) | |
528 | 532 | else false) | |
529 | - | then $Tuple2( | |
530 | - | else if (if ( | |
531 | - | then ( | |
533 | + | then $Tuple2(dP, 0) | |
534 | + | else if (if (dN) | |
535 | + | then (dQ == dS) | |
532 | 536 | else false) | |
533 | - | then $Tuple2(0, | |
534 | - | else $Tuple2( | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | $Tuple13( | |
537 | + | then $Tuple2(0, dP) | |
538 | + | else $Tuple2(em, en) | |
539 | + | let et = es._1 | |
540 | + | let eu = es._2 | |
541 | + | let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, di), bC(et, eu, ep, dy, ca, eo, height, lastBlock.timestamp, eq, er))] | |
542 | + | $Tuple13(el, ep, dy, dt, dv, dX, dm, dr, ev, eq, er, dI, dK) | |
539 | 543 | } | |
540 | 544 | } | |
541 | 545 | ||
542 | 546 | ||
543 | - | func | |
544 | - | let | |
545 | - | let | |
547 | + | func ew (cD,cT,ex) = { | |
548 | + | let ey = g | |
549 | + | let ez = cD[if ((cT == 0)) | |
546 | 550 | then 1 | |
547 | 551 | else 0] | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | func | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | if (( | |
559 | - | then | |
552 | + | let eA = parseBigIntValue(l) | |
553 | + | let cH = (parseBigIntValue(aY) * eA) | |
554 | + | let cG = ez | |
555 | + | let cI = (cH * ey) | |
556 | + | let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey)) | |
557 | + | let eC = ((cG + ((ex * eA) / cI)) - ex) | |
558 | + | func cR (cS,eD) = { | |
559 | + | let eE = cS | |
560 | + | let eF = eE._1 | |
561 | + | let dg = eE._2 | |
562 | + | if ((dg != unit)) | |
563 | + | then cS | |
560 | 564 | else { | |
561 | - | let | |
562 | - | let | |
563 | - | if ((f >= | |
564 | - | then $Tuple2( | |
565 | - | else $Tuple2( | |
565 | + | let eG = (((eF * eF) + eB) / ((g * eF) + eC)) | |
566 | + | let eH = X((eG - value(eF))) | |
567 | + | if ((f >= eH)) | |
568 | + | then $Tuple2(eG, eD) | |
569 | + | else $Tuple2(eG, unit) | |
566 | 570 | } | |
567 | 571 | } | |
568 | 572 | ||
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | func | |
575 | - | then | |
576 | - | else | |
573 | + | let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
574 | + | let eI = { | |
575 | + | let cZ = cX | |
576 | + | let da = size(cZ) | |
577 | + | let db = $Tuple2(ex, unit) | |
578 | + | func dc (dd,de) = if ((de >= da)) | |
579 | + | then dd | |
580 | + | else cR(dd, cZ[de]) | |
577 | 581 | ||
578 | - | func | |
579 | - | then | |
582 | + | func df (dd,de) = if ((de >= da)) | |
583 | + | then dd | |
580 | 584 | else throw("List size exceeds 15") | |
581 | 585 | ||
582 | - | | |
586 | + | df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
583 | 587 | } | |
584 | - | let | |
585 | - | let | |
586 | - | if (( | |
587 | - | then | |
588 | - | else throw(("Y calculation error, Y = " + toString( | |
588 | + | let eF = eI._1 | |
589 | + | let dg = eI._2 | |
590 | + | if ((dg != unit)) | |
591 | + | then eF | |
592 | + | else throw(("Y calculation error, Y = " + toString(eF))) | |
589 | 593 | } | |
590 | 594 | ||
591 | 595 | ||
592 | - | func | |
593 | - | let | |
594 | - | if (( | |
596 | + | func eJ (eK,eL,eM) = { | |
597 | + | let eN = fraction(cC([K(eK, toBigInt(bs)), K(eL, toBigInt(bt))]), c, eM) | |
598 | + | if ((eM == e)) | |
595 | 599 | then e | |
596 | - | else | |
600 | + | else eN | |
597 | 601 | } | |
598 | 602 | ||
599 | 603 | ||
600 | - | func | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | | |
604 | + | func eO (eP,eQ,eR) = { | |
605 | + | let eS = (toBigInt(bR(bi(bq))) - eP) | |
606 | + | let eT = (toBigInt(bR(bi(br))) - eQ) | |
607 | + | let eU = (toBigInt(value(assetInfo(bp)).quantity) - eR) | |
608 | + | let eV = eJ(eS, eT, eU) | |
609 | + | eV | |
606 | 610 | } | |
607 | 611 | ||
608 | 612 | ||
609 | - | func | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | $Tuple2( | |
613 | + | func eW (eX,eY,eR) = { | |
614 | + | let eS = (bR(bi(bq)) + eX) | |
615 | + | let eT = (bR(bi(br)) + eY) | |
616 | + | let eU = (value(assetInfo(bp)).quantity + eR) | |
617 | + | let eN = eJ(toBigInt(eS), toBigInt(eT), toBigInt(eU)) | |
618 | + | let eZ = [IntegerEntry(as, height), StringEntry(ar, toString(eN))] | |
619 | + | $Tuple2(eZ, eN) | |
616 | 620 | } | |
617 | 621 | ||
618 | 622 | ||
619 | - | func | |
623 | + | func fa (fb,eN) = if ((eN >= fb)) | |
620 | 624 | then true | |
621 | - | else | |
625 | + | else aR("updated DLp lower than current DLp") | |
622 | 626 | ||
623 | 627 | ||
624 | - | func | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | then $Tuple2( | |
631 | - | else $Tuple2(-( | |
632 | - | let | |
633 | - | let | |
634 | - | if (if (if ( | |
628 | + | func fc (fd) = { | |
629 | + | let eS = bR(bi(bq)) | |
630 | + | let eT = bR(bi(br)) | |
631 | + | let fe = fd.amount | |
632 | + | let ff = fraction(fd.amount, fd.price, a, FLOOR) | |
633 | + | let fg = if ((fd.orderType == Buy)) | |
634 | + | then $Tuple2(fe, -(ff)) | |
635 | + | else $Tuple2(-(fe), ff) | |
636 | + | let eX = fg._1 | |
637 | + | let eY = fg._2 | |
638 | + | if (if (if (aZ()) | |
635 | 639 | then true | |
636 | - | else ( | |
640 | + | else (bo == r)) | |
637 | 641 | then true | |
638 | - | else ( | |
642 | + | else (bo == s)) | |
639 | 643 | then throw("Admin blocked") | |
640 | - | else if (if (( | |
644 | + | else if (if ((fd.assetPair.amountAsset != bq)) | |
641 | 645 | then true | |
642 | - | else ( | |
646 | + | else (fd.assetPair.priceAsset != br)) | |
643 | 647 | then throw("Wr assets") | |
644 | 648 | else { | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | $Tuple2( | |
649 | + | let fh = parseBigIntValue(valueOrElse(getString(this, ar), "0")) | |
650 | + | let fi = eW(eX, eY, 0) | |
651 | + | let fj = fi._1 | |
652 | + | let fk = fi._2 | |
653 | + | let fl = (fk >= fh) | |
654 | + | let fm = makeString(["dLp=", toString(fh), " dLpNew=", toString(fk), " amountAssetBalance=", toString(eS), " priceAssetBalance=", toString(eT), " amountAssetBalanceDelta=", toString(eX), " priceAssetBalanceDelta=", toString(eY), " height=", toString(height)], "") | |
655 | + | $Tuple2(fl, fm) | |
652 | 656 | } | |
653 | 657 | } | |
654 | 658 | ||
655 | 659 | ||
656 | - | func | |
660 | + | func fn (cT) = if ((size(cT.payments) != 1)) | |
657 | 661 | then throw("1 pmnt exp") | |
658 | 662 | else { | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (if ( | |
663 | + | let fo = value(cT.payments[0]) | |
664 | + | let dj = value(fo.assetId) | |
665 | + | let dP = fo.amount | |
666 | + | let eb = dh(toBase58String(cT.transactionId), toBase58String(dj), dP, cT.caller) | |
667 | + | let dD = eb._1 | |
668 | + | let dE = eb._2 | |
669 | + | let dr = parseIntValue(eb._9) | |
670 | + | let dF = eb._10 | |
671 | + | if (if (aZ()) | |
668 | 672 | then true | |
669 | - | else ( | |
670 | - | then throw(("Admin blocked: " + toString( | |
671 | - | else $Tuple5( | |
673 | + | else (dr == s)) | |
674 | + | then throw(("Admin blocked: " + toString(dr))) | |
675 | + | else $Tuple5(dD, dE, dP, dj, dF) | |
672 | 676 | } | |
673 | 677 | ||
674 | 678 | ||
675 | - | func | |
676 | - | let | |
677 | - | let | |
678 | - | if (if (if ( | |
679 | + | func fp (fq,ah,fr,fs,ca,dM,dN,dO,dP,dQ) = { | |
680 | + | let eb = dG(ah, ca, value(fr).amount, value(fr).assetId, value(fs).amount, value(fs).assetId, fq, (ah == ""), dM, dN, dO, dP, dQ) | |
681 | + | let dr = parseIntValue(eb._8) | |
682 | + | if (if (if (aZ()) | |
679 | 683 | then true | |
680 | - | else ( | |
684 | + | else (dr == q)) | |
681 | 685 | then true | |
682 | - | else ( | |
683 | - | then throw(("Blocked:" + toString( | |
684 | - | else | |
686 | + | else (dr == s)) | |
687 | + | then throw(("Blocked:" + toString(dr))) | |
688 | + | else eb | |
685 | 689 | } | |
686 | 690 | ||
687 | 691 | ||
688 | - | func | |
689 | - | let | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
692 | + | func ft (fu,dj,dl,ah,fv) = { | |
693 | + | let dn = toBase58String(value(bq)) | |
694 | + | let do = toBase58String(value(br)) | |
695 | + | let dm = bp | |
696 | + | let dV = bs | |
697 | + | let dW = bt | |
698 | + | let eU = toBigInt(valueOrErrorMessage(assetInfo(dm), "invalid lp asset").quantity) | |
699 | + | let fw = if ((eU > e)) | |
696 | 700 | then true | |
697 | 701 | else throw("initial deposit requires all coins") | |
698 | - | if (( | |
702 | + | if ((fw == fw)) | |
699 | 703 | then { | |
700 | - | let | |
701 | - | let | |
702 | - | let | |
703 | - | then $Tuple2( | |
704 | - | else if (( | |
705 | - | then if (( | |
704 | + | let dt = bR(dn) | |
705 | + | let dv = bR(do) | |
706 | + | let fx = if ((ah == "")) | |
707 | + | then $Tuple2(dt, dv) | |
708 | + | else if ((dj == dn)) | |
709 | + | then if ((fu > dt)) | |
706 | 710 | then throw("invalid payment amount") | |
707 | - | else $Tuple2(( | |
708 | - | else if (( | |
709 | - | then if (( | |
711 | + | else $Tuple2((dt - fu), dv) | |
712 | + | else if ((dj == do)) | |
713 | + | then if ((fu > dv)) | |
710 | 714 | then throw("invalid payment amount") | |
711 | - | else $Tuple2( | |
715 | + | else $Tuple2(dt, (dv - fu)) | |
712 | 716 | else throw("wrong pmtAssetId") | |
713 | - | let fv = fu._1 | |
714 | - | let fw = fu._2 | |
715 | - | let fx = if ((di == dm)) | |
716 | - | then $Tuple2(fr, 0) | |
717 | - | else if ((di == dn)) | |
718 | - | then $Tuple2(0, fr) | |
719 | - | else throw("invalid payment") | |
720 | 717 | let fy = fx._1 | |
721 | 718 | let fz = fx._2 | |
722 | - | let fA = if (fs) | |
723 | - | then $Tuple3(cy(fy, aW)._1, cy(fz, aW)._1, cy(fr, aW)._2) | |
724 | - | else $Tuple3(fy, fz, 0) | |
719 | + | let fA = if ((dj == dn)) | |
720 | + | then $Tuple2(fu, 0) | |
721 | + | else if ((dj == do)) | |
722 | + | then $Tuple2(0, fu) | |
723 | + | else throw("invalid payment") | |
725 | 724 | let fB = fA._1 | |
726 | 725 | let fC = fA._2 | |
727 | - | let cA = fA._3 | |
728 | - | let fD = (fv + fB) | |
729 | - | let fE = (fw + fC) | |
730 | - | let ce = cB([I(fv, bt), I(fw, bu)]) | |
731 | - | let cd = cB([I(fD, bt), I(fE, bu)]) | |
732 | - | let dZ = if ((cd > ce)) | |
726 | + | let fD = if (fv) | |
727 | + | then $Tuple3(cz(fB, aV)._1, cz(fC, aV)._1, cz(fu, aV)._2) | |
728 | + | else $Tuple3(fB, fC, 0) | |
729 | + | let fE = fD._1 | |
730 | + | let fF = fD._2 | |
731 | + | let cB = fD._3 | |
732 | + | let fG = (fy + fE) | |
733 | + | let fH = (fz + fF) | |
734 | + | let cf = cC([H(fy, bs), H(fz, bt)]) | |
735 | + | let ce = cC([H(fG, bs), H(fH, bt)]) | |
736 | + | let ec = if ((ce > cf)) | |
733 | 737 | then true | |
734 | 738 | else throw() | |
735 | - | if (( | |
739 | + | if ((ec == ec)) | |
736 | 740 | then { | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | $Tuple4(toInt( | |
741 | + | let fI = fraction(eU, (ce - cf), cf, FLOOR) | |
742 | + | let dy = L(bT(H(fH, dW), H(fG, dV)), a) | |
743 | + | let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, ah), bC(fB, fC, toInt(fI), dy, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
744 | + | let fJ = fraction(fz, a, fy) | |
745 | + | let fK = fraction(fu, a, (fJ + a)) | |
746 | + | let fL = (fu - fK) | |
747 | + | let fM = fraction(eU, toBigInt(fL), toBigInt(fz)) | |
748 | + | let fN = toInt(fraction((fI - fM), b, fM)) | |
749 | + | $Tuple4(toInt(fI), ev, cB, fN) | |
746 | 750 | } | |
747 | 751 | else throw("Strict value is not equal to itself.") | |
748 | 752 | } | |
749 | 753 | else throw("Strict value is not equal to itself.") | |
750 | 754 | } | |
751 | 755 | ||
752 | 756 | ||
753 | - | func | |
754 | - | let | |
755 | - | let | |
756 | - | let | |
757 | - | let | |
758 | - | let | |
759 | - | let | |
760 | - | let | |
761 | - | then | |
762 | - | else | |
763 | - | let | |
764 | - | let | |
765 | - | let | |
766 | - | let | |
767 | - | if (( | |
757 | + | func fO (fP,fQ,fR,fq,fS,fT) = { | |
758 | + | let dm = toBase58String(value(bp)) | |
759 | + | let dn = toBase58String(value(bq)) | |
760 | + | let do = toBase58String(value(br)) | |
761 | + | let fU = bs | |
762 | + | let fV = bt | |
763 | + | let fW = bo | |
764 | + | let dl = if ((fq == bB)) | |
765 | + | then fS | |
766 | + | else fq | |
767 | + | let fo = value(fR[0]) | |
768 | + | let dj = value(fo.assetId) | |
769 | + | let dP = fo.amount | |
770 | + | let eV = eO(e, e, e) | |
771 | + | if ((eV == eV)) | |
768 | 772 | then { | |
769 | - | let | |
770 | - | if (( | |
773 | + | let di = toBase58String(fT) | |
774 | + | if ((dm != toBase58String(dj))) | |
771 | 775 | then throw("Wrong LP") | |
772 | 776 | else { | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | let | |
777 | - | if ($isInstanceOf( | |
778 | - | then | |
779 | - | else throw(($getType( | |
777 | + | let dt = bR(dn) | |
778 | + | let dv = bR(do) | |
779 | + | let fX = { | |
780 | + | let aW = invoke(this, "getOneTknV2READONLY", [fP, dP], nil) | |
781 | + | if ($isInstanceOf(aW, "(Int, Int)")) | |
782 | + | then aW | |
783 | + | else throw(($getType(aW) + " couldn't be cast to (Int, Int)")) | |
780 | 784 | } | |
781 | - | if (( | |
785 | + | if ((fX == fX)) | |
782 | 786 | then { | |
783 | - | let | |
784 | - | let | |
785 | - | let | |
786 | - | then ( | |
787 | + | let cB = fX._2 | |
788 | + | let fY = fX._1 | |
789 | + | let fZ = if (if ((fQ > 0)) | |
790 | + | then (fQ > fY) | |
787 | 791 | else false) | |
788 | - | then | |
789 | - | else | |
790 | - | let | |
791 | - | then $Tuple4( | |
792 | - | else if (( | |
793 | - | then $Tuple4(0, | |
792 | + | then aR(makeString(["amount to receive is less than ", toString(fQ)], "")) | |
793 | + | else fY | |
794 | + | let ga = if ((fP == dn)) | |
795 | + | then $Tuple4(fZ, 0, ((dt - fZ) - cB), dv) | |
796 | + | else if ((fP == do)) | |
797 | + | then $Tuple4(0, fZ, dt, ((dv - fZ) - cB)) | |
794 | 798 | else throw("invalid out asset id") | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
799 | + | let gb = ga._1 | |
800 | + | let gc = ga._2 | |
801 | + | let fG = ga._3 | |
802 | + | let fH = ga._4 | |
803 | + | let gd = bT(H(fH, fV), H(fG, fU)) | |
804 | + | let ge = L(gd, a) | |
805 | + | let gf = if ((fP == "WAVES")) | |
802 | 806 | then unit | |
803 | - | else fromBase58String( | |
804 | - | let | |
805 | - | then [ScriptTransfer( | |
807 | + | else fromBase58String(fP) | |
808 | + | let gg = if ((cB > 0)) | |
809 | + | then [ScriptTransfer(bb, cB, gf)] | |
806 | 810 | else nil | |
807 | - | let | |
808 | - | if (( | |
811 | + | let dF = ([ScriptTransfer(dl, fZ, gf), StringEntry(ai(toString(dl), di), bN(gb, gc, dP, ge, height, lastBlock.timestamp)), IntegerEntry(ab(), ge), IntegerEntry(ac(height, lastBlock.timestamp), ge)] ++ gg) | |
812 | + | if ((dF == dF)) | |
809 | 813 | then { | |
810 | - | let | |
811 | - | if (( | |
814 | + | let gh = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)]) | |
815 | + | if ((gh == gh)) | |
812 | 816 | then { | |
813 | - | let | |
814 | - | let | |
817 | + | let gi = { | |
818 | + | let gj = if ((this == bb)) | |
815 | 819 | then 0 | |
816 | - | else | |
817 | - | let | |
820 | + | else cB | |
821 | + | let gk = if ((bg(fP) == bq)) | |
818 | 822 | then true | |
819 | 823 | else false | |
820 | - | if ( | |
821 | - | then $Tuple2(-(( | |
822 | - | else $Tuple2(0, -(( | |
824 | + | if (gk) | |
825 | + | then $Tuple2(-((fY + gj)), 0) | |
826 | + | else $Tuple2(0, -((fY + gj))) | |
823 | 827 | } | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | if (( | |
831 | - | then $Tuple2(( | |
828 | + | let eX = gi._1 | |
829 | + | let eY = gi._2 | |
830 | + | let gl = eW(eX, eY, 0) | |
831 | + | let gm = gl._1 | |
832 | + | let eN = gl._2 | |
833 | + | let gn = fa(eV, eN) | |
834 | + | if ((gn == gn)) | |
835 | + | then $Tuple2((dF ++ gm), fZ) | |
832 | 836 | else throw("Strict value is not equal to itself.") | |
833 | 837 | } | |
834 | 838 | else throw("Strict value is not equal to itself.") | |
835 | 839 | } | |
836 | 840 | else throw("Strict value is not equal to itself.") | |
837 | 841 | } | |
838 | 842 | else throw("Strict value is not equal to itself.") | |
839 | 843 | } | |
840 | 844 | } | |
841 | 845 | else throw("Strict value is not equal to itself.") | |
842 | 846 | } | |
843 | 847 | ||
844 | 848 | ||
845 | - | func | |
846 | - | let | |
847 | - | if ($isInstanceOf( | |
849 | + | func go () = { | |
850 | + | let gp = getString(Z()) | |
851 | + | if ($isInstanceOf(gp, "String")) | |
848 | 852 | then { | |
849 | - | let | |
850 | - | fromBase58String( | |
853 | + | let cG = gp | |
854 | + | fromBase58String(cG) | |
851 | 855 | } | |
852 | - | else if ($isInstanceOf( | |
856 | + | else if ($isInstanceOf(gp, "Unit")) | |
853 | 857 | then unit | |
854 | 858 | else throw("Match error") | |
855 | 859 | } | |
856 | 860 | ||
857 | 861 | ||
858 | - | func | |
859 | - | let | |
860 | - | if ($isInstanceOf( | |
862 | + | func gq () = { | |
863 | + | let gp = getString(aa()) | |
864 | + | if ($isInstanceOf(gp, "String")) | |
861 | 865 | then { | |
862 | - | let | |
863 | - | fromBase58String( | |
866 | + | let cG = gp | |
867 | + | fromBase58String(cG) | |
864 | 868 | } | |
865 | - | else if ($isInstanceOf( | |
869 | + | else if ($isInstanceOf(gp, "Unit")) | |
866 | 870 | then unit | |
867 | 871 | else throw("Match error") | |
868 | 872 | } | |
869 | 873 | ||
870 | 874 | ||
871 | - | let | |
875 | + | let gr = throw("Permission denied") | |
872 | 876 | ||
873 | - | func | |
874 | - | let | |
875 | - | if ($isInstanceOf( | |
877 | + | func gs (cT) = { | |
878 | + | let gp = go() | |
879 | + | if ($isInstanceOf(gp, "ByteVector")) | |
876 | 880 | then { | |
877 | - | let | |
878 | - | ( | |
881 | + | let gt = gp | |
882 | + | (cT.callerPublicKey == gt) | |
879 | 883 | } | |
880 | - | else if ($isInstanceOf( | |
881 | - | then ( | |
884 | + | else if ($isInstanceOf(gp, "Unit")) | |
885 | + | then (cT.caller == this) | |
882 | 886 | else throw("Match error") | |
883 | 887 | } | |
884 | 888 | ||
885 | 889 | ||
886 | - | func | |
887 | - | let | |
888 | - | if ($isInstanceOf( | |
890 | + | func gu (cT) = { | |
891 | + | let gp = go() | |
892 | + | if ($isInstanceOf(gp, "ByteVector")) | |
889 | 893 | then { | |
890 | - | let | |
891 | - | if (( | |
894 | + | let gt = gp | |
895 | + | if ((cT.callerPublicKey == gt)) | |
892 | 896 | then true | |
893 | - | else | |
897 | + | else gr | |
894 | 898 | } | |
895 | - | else if ($isInstanceOf( | |
896 | - | then if (( | |
899 | + | else if ($isInstanceOf(gp, "Unit")) | |
900 | + | then if ((cT.caller == this)) | |
897 | 901 | then true | |
898 | - | else | |
902 | + | else gr | |
899 | 903 | else throw("Match error") | |
900 | 904 | } | |
901 | 905 | ||
902 | 906 | ||
903 | - | func | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | then [(toBigInt( | |
912 | - | else [(toBigInt( | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
916 | - | let | |
917 | - | let | |
918 | - | func | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | if (( | |
923 | - | then | |
907 | + | func gv (gw,ex,gx) = { | |
908 | + | let bk = bc() | |
909 | + | let dn = bk[w] | |
910 | + | let do = bk[x] | |
911 | + | let ey = g | |
912 | + | let eA = parseBigIntValue(l) | |
913 | + | let cH = (parseBigIntValue(aY) * eA) | |
914 | + | let cD = if ((gw == false)) | |
915 | + | then [(toBigInt(bR(dn)) + gx), toBigInt(bR(do))] | |
916 | + | else [(toBigInt(bR(do)) + gx), toBigInt(bR(dn))] | |
917 | + | let ez = cD[0] | |
918 | + | let cG = ez | |
919 | + | let cI = (cH * ey) | |
920 | + | let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey)) | |
921 | + | let eC = ((cG + ((ex * eA) / cI)) - ex) | |
922 | + | func cR (cS,eD) = { | |
923 | + | let gy = cS | |
924 | + | let eF = gy._1 | |
925 | + | let dg = gy._2 | |
926 | + | if ((dg != unit)) | |
927 | + | then cS | |
924 | 928 | else { | |
925 | - | let | |
926 | - | let | |
927 | - | if ((f >= | |
928 | - | then $Tuple2( | |
929 | - | else $Tuple2( | |
929 | + | let eG = (((eF * eF) + eB) / ((g * eF) + eC)) | |
930 | + | let eH = X((eG - value(eF))) | |
931 | + | if ((f >= eH)) | |
932 | + | then $Tuple2(eG, eD) | |
933 | + | else $Tuple2(eG, unit) | |
930 | 934 | } | |
931 | 935 | } | |
932 | 936 | ||
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | func | |
939 | - | then | |
940 | - | else | |
937 | + | let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
938 | + | let gz = { | |
939 | + | let cZ = cX | |
940 | + | let da = size(cZ) | |
941 | + | let db = $Tuple2(ex, unit) | |
942 | + | func dc (dd,de) = if ((de >= da)) | |
943 | + | then dd | |
944 | + | else cR(dd, cZ[de]) | |
941 | 945 | ||
942 | - | func | |
943 | - | then | |
946 | + | func df (dd,de) = if ((de >= da)) | |
947 | + | then dd | |
944 | 948 | else throw("List size exceeds 15") | |
945 | 949 | ||
946 | - | | |
950 | + | df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
947 | 951 | } | |
948 | - | let | |
949 | - | let | |
950 | - | if (( | |
951 | - | then | |
952 | - | else throw(("Y calculation error, Y = " + toString( | |
952 | + | let eF = gz._1 | |
953 | + | let dg = gz._2 | |
954 | + | if ((dg != unit)) | |
955 | + | then eF | |
956 | + | else throw(("Y calculation error, Y = " + toString(eF))) | |
953 | 957 | } | |
954 | 958 | ||
955 | 959 | ||
956 | - | func | |
960 | + | func gA () = valueOrElse(getBoolean(aU, aG(toString(this))), false) | |
957 | 961 | ||
958 | 962 | ||
959 | - | @Callable( | |
960 | - | func calculateAmountOutForSwapREADONLY ( | |
961 | - | let | |
963 | + | @Callable(cT) | |
964 | + | func calculateAmountOutForSwapREADONLY (gB,gw,gC) = { | |
965 | + | let gD = if ((gw == false)) | |
962 | 966 | then { | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2( | |
967 | + | let gE = aN(this, ak()) | |
968 | + | let gx = (toBigInt(bR(aN(this, aj()))) + toBigInt(gB)) | |
969 | + | $Tuple2(gE, gx) | |
966 | 970 | } | |
967 | 971 | else { | |
968 | - | let | |
969 | - | let | |
970 | - | $Tuple2( | |
972 | + | let gE = aN(this, aj()) | |
973 | + | let gx = (toBigInt(bR(aN(this, ak()))) + toBigInt(gB)) | |
974 | + | $Tuple2(gE, gx) | |
971 | 975 | } | |
972 | - | let | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
981 | - | let | |
982 | - | let | |
983 | - | then [((toBigInt( | |
984 | - | else [(toBigInt( | |
985 | - | let | |
986 | - | let | |
976 | + | let gE = gD._1 | |
977 | + | let gx = gD._2 | |
978 | + | let bk = bc() | |
979 | + | let dn = bk[w] | |
980 | + | let do = bk[x] | |
981 | + | let cD = [toBigInt(bR(dn)), toBigInt(bR(do))] | |
982 | + | let ex = cC(cD) | |
983 | + | let eF = gv(gw, ex, toBigInt(gB)) | |
984 | + | let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1)) | |
985 | + | let gG = max([0, toInt(gF)]) | |
986 | + | let gH = if ((gw == false)) | |
987 | + | then [((toBigInt(bR(dn)) + toBigInt(gB)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)] | |
988 | + | else [(toBigInt(bR(dn)) - gF), ((toBigInt(bR(do)) + toBigInt(gB)) + toBigInt(gC))] | |
989 | + | let gI = cC(gH) | |
990 | + | let ec = if ((gI >= ex)) | |
987 | 991 | then true | |
988 | - | else throw(makeString(["new D is fewer error", toString( | |
989 | - | if (( | |
990 | - | then $Tuple2(nil, | |
992 | + | else throw(makeString(["new D is fewer error", toString(ex), toString(gI)], "__")) | |
993 | + | if ((ec == ec)) | |
994 | + | then $Tuple2(nil, gG) | |
991 | 995 | else throw("Strict value is not equal to itself.") | |
992 | 996 | } | |
993 | 997 | ||
994 | 998 | ||
995 | 999 | ||
996 | - | @Callable( | |
997 | - | func calculateAmountOutForSwapAndSendTokens ( | |
998 | - | let | |
999 | - | let | |
1000 | - | if ($isInstanceOf( | |
1001 | - | then | |
1002 | - | else throw(($getType( | |
1000 | + | @Callable(cT) | |
1001 | + | func calculateAmountOutForSwapAndSendTokens (gB,gw,gJ,gK,gC) = { | |
1002 | + | let gL = { | |
1003 | + | let aW = invoke(aU, "getSwapContractREADONLY", nil, nil) | |
1004 | + | if ($isInstanceOf(aW, "String")) | |
1005 | + | then aW | |
1006 | + | else throw(($getType(aW) + " couldn't be cast to String")) | |
1003 | 1007 | } | |
1004 | - | let | |
1008 | + | let gM = [if ((value(cT.payments[0]).amount >= gB)) | |
1005 | 1009 | then true | |
1006 | - | else | |
1010 | + | else aR("Wrong amount"), if ((cT.caller == addressFromStringValue(gL))) | |
1007 | 1011 | then true | |
1008 | - | else | |
1009 | - | if (( | |
1012 | + | else aR("Permission denied")] | |
1013 | + | if ((gM == gM)) | |
1010 | 1014 | then { | |
1011 | - | let | |
1012 | - | let | |
1013 | - | let | |
1015 | + | let fo = value(cT.payments[0]) | |
1016 | + | let gN = bi(fo.assetId) | |
1017 | + | let gO = if ((gw == false)) | |
1014 | 1018 | then { | |
1015 | - | let | |
1016 | - | let | |
1017 | - | $Tuple2( | |
1019 | + | let gE = aN(this, ak()) | |
1020 | + | let gx = (bR(gN) - value(cT.payments[0]).amount) | |
1021 | + | $Tuple2(gE, gx) | |
1018 | 1022 | } | |
1019 | 1023 | else { | |
1020 | - | let | |
1021 | - | let | |
1022 | - | $Tuple2( | |
1024 | + | let gE = aN(this, aj()) | |
1025 | + | let gx = (bR(gN) - value(cT.payments[0]).amount) | |
1026 | + | $Tuple2(gE, gx) | |
1023 | 1027 | } | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | let | |
1028 | - | let | |
1029 | - | let | |
1030 | - | then [(toBigInt( | |
1031 | - | else [toBigInt( | |
1032 | - | let | |
1033 | - | let | |
1034 | - | let | |
1035 | - | let | |
1036 | - | let | |
1028 | + | let gE = gO._1 | |
1029 | + | let gx = gO._2 | |
1030 | + | let bk = bc() | |
1031 | + | let dn = bk[w] | |
1032 | + | let do = bk[x] | |
1033 | + | let cD = if ((gw == false)) | |
1034 | + | then [(toBigInt(bR(dn)) - toBigInt(value(cT.payments[0]).amount)), toBigInt(bR(do))] | |
1035 | + | else [toBigInt(bR(dn)), (toBigInt(bR(do)) - toBigInt(value(cT.payments[0]).amount))] | |
1036 | + | let ex = cC(cD) | |
1037 | + | let eF = gv(gw, ex, toBigInt(0)) | |
1038 | + | let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1)) | |
1039 | + | let gG = max([0, toInt(gF)]) | |
1040 | + | let gP = if ((gG >= gJ)) | |
1037 | 1041 | then true | |
1038 | 1042 | else throw("Exchange result is fewer coins than expected") | |
1039 | - | if (( | |
1043 | + | if ((gP == gP)) | |
1040 | 1044 | then { | |
1041 | - | let | |
1042 | - | then [(toBigInt( | |
1043 | - | else [(toBigInt( | |
1044 | - | let | |
1045 | - | let | |
1045 | + | let gH = if ((gw == false)) | |
1046 | + | then [(toBigInt(bR(dn)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)] | |
1047 | + | else [(toBigInt(bR(dn)) - gF), (toBigInt(bR(do)) + toBigInt(gC))] | |
1048 | + | let gI = cC(gH) | |
1049 | + | let ec = if ((gI >= ex)) | |
1046 | 1050 | then true | |
1047 | 1051 | else throw("new D is fewer error") | |
1048 | - | if (( | |
1049 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1052 | + | if ((ec == ec)) | |
1053 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gK), gG, bg(gE))], gG) | |
1050 | 1054 | else throw("Strict value is not equal to itself.") | |
1051 | 1055 | } | |
1052 | 1056 | else throw("Strict value is not equal to itself.") | |
1053 | 1057 | } | |
1054 | 1058 | else throw("Strict value is not equal to itself.") | |
1055 | 1059 | } | |
1056 | 1060 | ||
1057 | 1061 | ||
1058 | 1062 | ||
1059 | - | @Callable( | |
1060 | - | func constructor ( | |
1061 | - | let | |
1062 | - | if (( | |
1063 | - | then [StringEntry( | |
1063 | + | @Callable(cT) | |
1064 | + | func constructor (Y) = { | |
1065 | + | let eB = gu(cT) | |
1066 | + | if ((eB == eB)) | |
1067 | + | then [StringEntry(Y(), Y)] | |
1064 | 1068 | else throw("Strict value is not equal to itself.") | |
1065 | 1069 | } | |
1066 | 1070 | ||
1067 | 1071 | ||
1068 | 1072 | ||
1069 | - | @Callable( | |
1070 | - | func setManager ( | |
1071 | - | let | |
1072 | - | if (( | |
1073 | + | @Callable(cT) | |
1074 | + | func setManager (gQ) = { | |
1075 | + | let eB = gu(cT) | |
1076 | + | if ((eB == eB)) | |
1073 | 1077 | then { | |
1074 | - | let | |
1075 | - | if (( | |
1076 | - | then [StringEntry( | |
1078 | + | let gR = fromBase58String(gQ) | |
1079 | + | if ((gR == gR)) | |
1080 | + | then [StringEntry(aa(), gQ)] | |
1077 | 1081 | else throw("Strict value is not equal to itself.") | |
1078 | 1082 | } | |
1079 | 1083 | else throw("Strict value is not equal to itself.") | |
1080 | 1084 | } | |
1081 | 1085 | ||
1082 | 1086 | ||
1083 | 1087 | ||
1084 | - | @Callable( | |
1088 | + | @Callable(cT) | |
1085 | 1089 | func confirmManager () = { | |
1086 | - | let | |
1087 | - | let | |
1090 | + | let cy = gq() | |
1091 | + | let gS = if (isDefined(cy)) | |
1088 | 1092 | then true | |
1089 | 1093 | else throw("No pending manager") | |
1090 | - | if (( | |
1094 | + | if ((gS == gS)) | |
1091 | 1095 | then { | |
1092 | - | let | |
1096 | + | let gT = if ((cT.callerPublicKey == value(cy))) | |
1093 | 1097 | then true | |
1094 | 1098 | else throw("You are not pending manager") | |
1095 | - | if (( | |
1096 | - | then [StringEntry( | |
1099 | + | if ((gT == gT)) | |
1100 | + | then [StringEntry(Z(), toBase58String(value(cy))), DeleteEntry(aa())] | |
1097 | 1101 | else throw("Strict value is not equal to itself.") | |
1098 | 1102 | } | |
1099 | 1103 | else throw("Strict value is not equal to itself.") | |
1100 | 1104 | } | |
1101 | 1105 | ||
1102 | 1106 | ||
1103 | 1107 | ||
1104 | - | @Callable( | |
1105 | - | func put ( | |
1106 | - | let | |
1107 | - | let | |
1108 | - | let | |
1109 | - | if ((0 > | |
1108 | + | @Callable(cT) | |
1109 | + | func put (gU,gV) = { | |
1110 | + | let gW = bw() | |
1111 | + | let gX = valueOrErrorMessage(addressFromString(gW[C]), "Wr st addr") | |
1112 | + | let gY = valueOrErrorMessage(addressFromString(gW[E]), "Wr sl addr") | |
1113 | + | if ((0 > gU)) | |
1110 | 1114 | then throw("Wrong slippage") | |
1111 | - | else if ((size( | |
1115 | + | else if ((size(cT.payments) != 2)) | |
1112 | 1116 | then throw("2 pmnts expd") | |
1113 | 1117 | else { | |
1114 | - | let | |
1115 | - | let | |
1116 | - | let | |
1117 | - | if (( | |
1118 | + | let gZ = toBigInt(value(cT.payments[0]).amount) | |
1119 | + | let ha = toBigInt(value(cT.payments[1]).amount) | |
1120 | + | let eS = (toBigInt(bR(bi(bq))) - gZ) | |
1121 | + | if ((eS == eS)) | |
1118 | 1122 | then { | |
1119 | - | let | |
1120 | - | if (( | |
1123 | + | let eT = (toBigInt(bR(bi(br))) - ha) | |
1124 | + | if ((eT == eT)) | |
1121 | 1125 | then { | |
1122 | - | let | |
1123 | - | if (( | |
1126 | + | let eU = toBigInt(value(assetInfo(bp)).quantity) | |
1127 | + | if ((eU == eU)) | |
1124 | 1128 | then { | |
1125 | - | let | |
1126 | - | if (( | |
1129 | + | let eV = eO(gZ, ha, toBigInt(0)) | |
1130 | + | if ((eV == eV)) | |
1127 | 1131 | then { | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | let | |
1133 | - | let | |
1134 | - | let | |
1135 | - | let | |
1136 | - | let | |
1137 | - | if (( | |
1132 | + | let hb = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], gU, true, false, true, 0, "") | |
1133 | + | let ep = hb._2 | |
1134 | + | let hc = hb._7 | |
1135 | + | let dF = hb._9 | |
1136 | + | let eq = hb._10 | |
1137 | + | let er = hb._11 | |
1138 | + | let dn = hb._12 | |
1139 | + | let do = hb._13 | |
1140 | + | let eb = invoke(aU, "emit", [ep], nil) | |
1141 | + | if ((eb == eb)) | |
1138 | 1142 | then { | |
1139 | - | let | |
1140 | - | let | |
1141 | - | if ($isInstanceOf( | |
1143 | + | let hd = { | |
1144 | + | let gp = eb | |
1145 | + | if ($isInstanceOf(gp, "Address")) | |
1142 | 1146 | then { | |
1143 | - | let | |
1144 | - | invoke( | |
1147 | + | let he = gp | |
1148 | + | invoke(he, "emit", [ep], nil) | |
1145 | 1149 | } | |
1146 | 1150 | else unit | |
1147 | 1151 | } | |
1148 | - | if (( | |
1152 | + | if ((hd == hd)) | |
1149 | 1153 | then { | |
1150 | - | let | |
1151 | - | then invoke( | |
1154 | + | let hf = if ((eq > 0)) | |
1155 | + | then invoke(gY, "put", nil, [AttachedPayment(dn, eq)]) | |
1152 | 1156 | else nil | |
1153 | - | if (( | |
1157 | + | if ((hf == hf)) | |
1154 | 1158 | then { | |
1155 | - | let | |
1156 | - | then invoke( | |
1159 | + | let hg = if ((er > 0)) | |
1160 | + | then invoke(gY, "put", nil, [AttachedPayment(do, er)]) | |
1157 | 1161 | else nil | |
1158 | - | if (( | |
1162 | + | if ((hg == hg)) | |
1159 | 1163 | then { | |
1160 | - | let | |
1164 | + | let hh = if (gV) | |
1161 | 1165 | then { | |
1162 | - | let | |
1163 | - | if (( | |
1166 | + | let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, ep)]) | |
1167 | + | if ((hi == hi)) | |
1164 | 1168 | then nil | |
1165 | 1169 | else throw("Strict value is not equal to itself.") | |
1166 | 1170 | } | |
1167 | - | else [ScriptTransfer( | |
1168 | - | let | |
1169 | - | let | |
1170 | - | let | |
1171 | - | let | |
1171 | + | else [ScriptTransfer(cT.caller, ep, hc)] | |
1172 | + | let hj = eW(0, 0, 0) | |
1173 | + | let gm = hj._1 | |
1174 | + | let eN = hj._2 | |
1175 | + | let hk = if ((eN >= eV)) | |
1172 | 1176 | then true | |
1173 | - | else | |
1174 | - | if (( | |
1177 | + | else aR(makeString(["updated DLp lower than current DLp", toString(eS), toString(eT), toString(eU), toString(eV), toString(eN), toString(eq), toString(er)], " ")) | |
1178 | + | if ((hk == hk)) | |
1175 | 1179 | then { | |
1176 | - | let | |
1177 | - | if (( | |
1178 | - | then (( | |
1180 | + | let hl = value(assetInfo(bp)).quantity | |
1181 | + | if ((hl == hl)) | |
1182 | + | then ((dF ++ hh) ++ gm) | |
1179 | 1183 | else throw("Strict value is not equal to itself.") | |
1180 | 1184 | } | |
1181 | 1185 | else throw("Strict value is not equal to itself.") | |
1182 | 1186 | } | |
1183 | 1187 | else throw("Strict value is not equal to itself.") | |
1184 | 1188 | } | |
1185 | 1189 | else throw("Strict value is not equal to itself.") | |
1186 | 1190 | } | |
1187 | 1191 | else throw("Strict value is not equal to itself.") | |
1188 | 1192 | } | |
1189 | 1193 | else throw("Strict value is not equal to itself.") | |
1190 | 1194 | } | |
1191 | 1195 | else throw("Strict value is not equal to itself.") | |
1192 | 1196 | } | |
1193 | 1197 | else throw("Strict value is not equal to itself.") | |
1194 | 1198 | } | |
1195 | 1199 | else throw("Strict value is not equal to itself.") | |
1196 | 1200 | } | |
1197 | 1201 | else throw("Strict value is not equal to itself.") | |
1198 | 1202 | } | |
1199 | 1203 | } | |
1200 | 1204 | ||
1201 | 1205 | ||
1202 | 1206 | ||
1203 | - | @Callable( | |
1204 | - | func putOneTknV2 ( | |
1205 | - | let | |
1206 | - | let | |
1207 | - | if ($isInstanceOf( | |
1208 | - | then | |
1209 | - | else throw(($getType( | |
1207 | + | @Callable(cT) | |
1208 | + | func putOneTknV2 (fQ,gV) = { | |
1209 | + | let hm = { | |
1210 | + | let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1211 | + | if ($isInstanceOf(aW, "Boolean")) | |
1212 | + | then aW | |
1213 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1210 | 1214 | } | |
1211 | - | let | |
1215 | + | let hn = if (if (if (aZ()) | |
1212 | 1216 | then true | |
1213 | - | else ( | |
1217 | + | else (bo == q)) | |
1214 | 1218 | then true | |
1215 | - | else ( | |
1219 | + | else (bo == s)) | |
1216 | 1220 | then true | |
1217 | - | else | |
1218 | - | let | |
1221 | + | else hm | |
1222 | + | let gM = [if (if (!(hn)) | |
1219 | 1223 | then true | |
1220 | - | else | |
1224 | + | else gs(cT)) | |
1221 | 1225 | then true | |
1222 | - | else | |
1226 | + | else aR("put operation is blocked by admin"), if ((size(cT.payments) == 1)) | |
1223 | 1227 | then true | |
1224 | - | else | |
1225 | - | if (( | |
1228 | + | else aR("exactly 1 payment are expected")] | |
1229 | + | if ((gM == gM)) | |
1226 | 1230 | then { | |
1227 | - | let | |
1228 | - | let | |
1229 | - | let | |
1230 | - | let | |
1231 | - | let | |
1232 | - | let | |
1233 | - | then | |
1234 | - | else | |
1235 | - | let | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | then | |
1240 | - | else | |
1241 | - | if (( | |
1231 | + | let dn = toBase58String(value(bq)) | |
1232 | + | let do = toBase58String(value(br)) | |
1233 | + | let dm = bp | |
1234 | + | let fU = bs | |
1235 | + | let fV = bt | |
1236 | + | let dl = if ((cT.caller == this)) | |
1237 | + | then cT.originCaller | |
1238 | + | else cT.caller | |
1239 | + | let fo = value(cT.payments[0]) | |
1240 | + | let dj = toBase58String(value(fo.assetId)) | |
1241 | + | let dP = fo.amount | |
1242 | + | let eV = if ((fo.assetId == bq)) | |
1243 | + | then eO(toBigInt(dP), toBigInt(0), toBigInt(0)) | |
1244 | + | else eO(toBigInt(0), toBigInt(dP), toBigInt(0)) | |
1245 | + | if ((eV == eV)) | |
1242 | 1246 | then { | |
1243 | - | let | |
1244 | - | if (( | |
1247 | + | let ho = ft(dP, dj, toString(dl), toBase58String(cT.transactionId), true) | |
1248 | + | if ((ho == ho)) | |
1245 | 1249 | then { | |
1246 | - | let | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | then ( | |
1250 | + | let cB = ho._3 | |
1251 | + | let dF = ho._2 | |
1252 | + | let hp = ho._1 | |
1253 | + | let ep = if (if ((fQ > 0)) | |
1254 | + | then (fQ > hp) | |
1251 | 1255 | else false) | |
1252 | - | then | |
1253 | - | else | |
1254 | - | let | |
1255 | - | if (( | |
1256 | + | then aR(makeString(["amount to receive is less than ", toString(fQ)], "")) | |
1257 | + | else hp | |
1258 | + | let hb = invoke(aU, "emit", [ep], nil) | |
1259 | + | if ((hb == hb)) | |
1256 | 1260 | then { | |
1257 | - | let | |
1258 | - | let | |
1259 | - | if ($isInstanceOf( | |
1261 | + | let hd = { | |
1262 | + | let gp = hb | |
1263 | + | if ($isInstanceOf(gp, "Address")) | |
1260 | 1264 | then { | |
1261 | - | let | |
1262 | - | invoke( | |
1265 | + | let he = gp | |
1266 | + | invoke(he, "emit", [ep], nil) | |
1263 | 1267 | } | |
1264 | 1268 | else unit | |
1265 | 1269 | } | |
1266 | - | if (( | |
1270 | + | if ((hd == hd)) | |
1267 | 1271 | then { | |
1268 | - | let | |
1272 | + | let hh = if (gV) | |
1269 | 1273 | then { | |
1270 | - | let | |
1271 | - | if (( | |
1274 | + | let hi = invoke(by, "stakeFor", [toString(cT.caller)], [AttachedPayment(dm, ep)]) | |
1275 | + | if ((hi == hi)) | |
1272 | 1276 | then nil | |
1273 | 1277 | else throw("Strict value is not equal to itself.") | |
1274 | 1278 | } | |
1275 | - | else [ScriptTransfer( | |
1276 | - | let | |
1277 | - | then [ScriptTransfer( | |
1279 | + | else [ScriptTransfer(cT.caller, ep, dm)] | |
1280 | + | let gg = if ((cB > 0)) | |
1281 | + | then [ScriptTransfer(bb, cB, fromBase58String(dj))] | |
1278 | 1282 | else nil | |
1279 | - | let | |
1283 | + | let hq = if ((this == bb)) | |
1280 | 1284 | then $Tuple2(0, 0) | |
1281 | 1285 | else { | |
1282 | - | let | |
1286 | + | let hr = if ((fo.assetId == bq)) | |
1283 | 1287 | then true | |
1284 | 1288 | else false | |
1285 | - | if ( | |
1286 | - | then $Tuple2(-( | |
1287 | - | else $Tuple2(0, -( | |
1289 | + | if (hr) | |
1290 | + | then $Tuple2(-(cB), 0) | |
1291 | + | else $Tuple2(0, -(cB)) | |
1288 | 1292 | } | |
1289 | - | let | |
1290 | - | let | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let | |
1295 | - | if (( | |
1296 | - | then $Tuple2(((( | |
1293 | + | let eX = hq._1 | |
1294 | + | let eY = hq._2 | |
1295 | + | let hs = eW(eX, eY, 0) | |
1296 | + | let gm = hs._1 | |
1297 | + | let eN = hs._2 | |
1298 | + | let gn = fa(eV, eN) | |
1299 | + | if ((gn == gn)) | |
1300 | + | then $Tuple2((((dF ++ hh) ++ gg) ++ gm), ep) | |
1297 | 1301 | else throw("Strict value is not equal to itself.") | |
1298 | 1302 | } | |
1299 | 1303 | else throw("Strict value is not equal to itself.") | |
1300 | 1304 | } | |
1301 | 1305 | else throw("Strict value is not equal to itself.") | |
1302 | 1306 | } | |
1303 | 1307 | else throw("Strict value is not equal to itself.") | |
1304 | 1308 | } | |
1305 | 1309 | else throw("Strict value is not equal to itself.") | |
1306 | 1310 | } | |
1307 | 1311 | else throw("Strict value is not equal to itself.") | |
1308 | 1312 | } | |
1309 | 1313 | ||
1310 | 1314 | ||
1311 | 1315 | ||
1312 | - | @Callable( | |
1313 | - | func putForFree ( | |
1316 | + | @Callable(cT) | |
1317 | + | func putForFree (ht) = if ((0 > ht)) | |
1314 | 1318 | then throw("Wrong slpg") | |
1315 | - | else if ((size( | |
1319 | + | else if ((size(cT.payments) != 2)) | |
1316 | 1320 | then throw("2 pmnts expd") | |
1317 | 1321 | else { | |
1318 | - | let | |
1319 | - | let | |
1320 | - | let | |
1321 | - | let | |
1322 | - | let | |
1323 | - | if (( | |
1322 | + | let hu = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], ht, false, false, true, 0, "") | |
1323 | + | let dF = hu._9 | |
1324 | + | let gZ = toBigInt(value(cT.payments[0]).amount) | |
1325 | + | let ha = toBigInt(value(cT.payments[1]).amount) | |
1326 | + | let eV = eO(gZ, ha, toBigInt(0)) | |
1327 | + | if ((eV == eV)) | |
1324 | 1328 | then { | |
1325 | - | let | |
1326 | - | let | |
1327 | - | let | |
1328 | - | let | |
1329 | - | if (( | |
1330 | - | then ( | |
1329 | + | let hv = eW(0, 0, 0) | |
1330 | + | let gm = hv._1 | |
1331 | + | let eN = hv._2 | |
1332 | + | let gn = fa(eV, eN) | |
1333 | + | if ((gn == gn)) | |
1334 | + | then (dF ++ gm) | |
1331 | 1335 | else throw("Strict value is not equal to itself.") | |
1332 | 1336 | } | |
1333 | 1337 | else throw("Strict value is not equal to itself.") | |
1334 | 1338 | } | |
1335 | 1339 | ||
1336 | 1340 | ||
1337 | 1341 | ||
1338 | - | @Callable( | |
1342 | + | @Callable(cT) | |
1339 | 1343 | func get () = { | |
1340 | - | let | |
1341 | - | if (( | |
1344 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1345 | + | if ((eV == eV)) | |
1342 | 1346 | then { | |
1343 | - | let | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | let | |
1348 | - | let | |
1349 | - | let | |
1350 | - | if (( | |
1347 | + | let eb = fn(cT) | |
1348 | + | let hw = eb._1 | |
1349 | + | let dE = eb._2 | |
1350 | + | let dP = eb._3 | |
1351 | + | let dj = eb._4 | |
1352 | + | let dF = eb._5 | |
1353 | + | let eC = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)]) | |
1354 | + | if ((eC == eC)) | |
1351 | 1355 | then { | |
1352 | - | let | |
1353 | - | let | |
1354 | - | let | |
1355 | - | let | |
1356 | - | if (( | |
1357 | - | then ( | |
1356 | + | let hx = eW(-(hw), -(dE), 0) | |
1357 | + | let gm = hx._1 | |
1358 | + | let eN = hx._2 | |
1359 | + | let gn = fa(eV, eN) | |
1360 | + | if ((gn == gn)) | |
1361 | + | then (dF ++ gm) | |
1358 | 1362 | else throw("Strict value is not equal to itself.") | |
1359 | 1363 | } | |
1360 | 1364 | else throw("Strict value is not equal to itself.") | |
1361 | 1365 | } | |
1362 | 1366 | else throw("Strict value is not equal to itself.") | |
1363 | 1367 | } | |
1364 | 1368 | ||
1365 | 1369 | ||
1366 | 1370 | ||
1367 | - | @Callable( | |
1368 | - | func getOneTknV2 ( | |
1369 | - | let | |
1370 | - | let | |
1371 | - | if ($isInstanceOf( | |
1372 | - | then | |
1373 | - | else throw(($getType( | |
1371 | + | @Callable(cT) | |
1372 | + | func getOneTknV2 (fP,fQ) = { | |
1373 | + | let hm = { | |
1374 | + | let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1375 | + | if ($isInstanceOf(aW, "Boolean")) | |
1376 | + | then aW | |
1377 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1374 | 1378 | } | |
1375 | - | let | |
1379 | + | let hy = if (if (aZ()) | |
1376 | 1380 | then true | |
1377 | - | else ( | |
1381 | + | else (bo == s)) | |
1378 | 1382 | then true | |
1379 | - | else | |
1380 | - | let | |
1383 | + | else hm | |
1384 | + | let gM = [if (if (!(hy)) | |
1381 | 1385 | then true | |
1382 | - | else | |
1386 | + | else gs(cT)) | |
1383 | 1387 | then true | |
1384 | - | else | |
1388 | + | else aR("get operation is blocked by admin"), if ((size(cT.payments) == 1)) | |
1385 | 1389 | then true | |
1386 | - | else | |
1387 | - | if (( | |
1390 | + | else aR("exactly 1 payment are expected")] | |
1391 | + | if ((gM == gM)) | |
1388 | 1392 | then { | |
1389 | - | let | |
1390 | - | let | |
1391 | - | let | |
1392 | - | $Tuple2( | |
1393 | + | let hz = fO(fP, fQ, cT.payments, cT.caller, cT.originCaller, cT.transactionId) | |
1394 | + | let dF = hz._1 | |
1395 | + | let fZ = hz._2 | |
1396 | + | $Tuple2(dF, fZ) | |
1393 | 1397 | } | |
1394 | 1398 | else throw("Strict value is not equal to itself.") | |
1395 | 1399 | } | |
1396 | 1400 | ||
1397 | 1401 | ||
1398 | 1402 | ||
1399 | - | @Callable( | |
1403 | + | @Callable(cT) | |
1400 | 1404 | func refreshDLp () = { | |
1401 | - | let | |
1402 | - | let | |
1405 | + | let hA = valueOrElse(getInteger(as), 0) | |
1406 | + | let hB = if (((height - hA) >= av)) | |
1403 | 1407 | then unit | |
1404 | - | else | |
1405 | - | if (( | |
1408 | + | else aR(makeString([toString(av), " blocks have not passed since the previous call"], "")) | |
1409 | + | if ((hB == hB)) | |
1406 | 1410 | then { | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | then | |
1413 | - | else | |
1414 | - | $Tuple2( | |
1411 | + | let fh = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), aT("invalid dLp")) | |
1412 | + | let hC = eW(0, 0, 0) | |
1413 | + | let hD = hC._1 | |
1414 | + | let eN = hC._2 | |
1415 | + | let eZ = if ((fh != eN)) | |
1416 | + | then hD | |
1417 | + | else aR("nothing to refresh") | |
1418 | + | $Tuple2(eZ, toString(eN)) | |
1415 | 1419 | } | |
1416 | 1420 | else throw("Strict value is not equal to itself.") | |
1417 | 1421 | } | |
1418 | 1422 | ||
1419 | 1423 | ||
1420 | 1424 | ||
1421 | - | @Callable( | |
1422 | - | func getOneTknV2READONLY ( | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | let | |
1429 | - | let | |
1430 | - | let | |
1425 | + | @Callable(cT) | |
1426 | + | func getOneTknV2READONLY (fP,hE) = { | |
1427 | + | let dn = toBase58String(value(bq)) | |
1428 | + | let do = toBase58String(value(br)) | |
1429 | + | let dm = toBase58String(value(bp)) | |
1430 | + | let cD = [toBigInt(bR(dn)), toBigInt(bR(do))] | |
1431 | + | let eM = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dm)), "invalid lp asset").quantity) | |
1432 | + | let cf = cC(cD) | |
1433 | + | let ce = (cf - fraction(toBigInt(hE), cf, eM)) | |
1434 | + | let hF = if ((fP == dn)) | |
1431 | 1435 | then 0 | |
1432 | - | else if (( | |
1436 | + | else if ((fP == do)) | |
1433 | 1437 | then 1 | |
1434 | 1438 | else throw("invalid out asset id") | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | $Tuple2(nil, $Tuple2( | |
1439 | + | let hG = ew(cD, hF, ce) | |
1440 | + | let gF = (cD[hF] - hG) | |
1441 | + | let gG = max([0, toInt((gF - f))]) | |
1442 | + | let hH = cz(gG, aX) | |
1443 | + | let fY = hH._1 | |
1444 | + | let cB = hH._2 | |
1445 | + | $Tuple2(nil, $Tuple2(fY, cB)) | |
1442 | 1446 | } | |
1443 | 1447 | ||
1444 | 1448 | ||
1445 | 1449 | ||
1446 | - | @Callable( | |
1447 | - | func getOneTknV2WithBonusREADONLY ( | |
1448 | - | let | |
1449 | - | let | |
1450 | - | let | |
1451 | - | let | |
1452 | - | let | |
1453 | - | let | |
1454 | - | let | |
1455 | - | if ($isInstanceOf( | |
1456 | - | then | |
1457 | - | else throw(($getType( | |
1450 | + | @Callable(cT) | |
1451 | + | func getOneTknV2WithBonusREADONLY (fP,hE) = { | |
1452 | + | let dn = toBase58String(value(bq)) | |
1453 | + | let do = toBase58String(value(br)) | |
1454 | + | let dm = toBase58String(value(bp)) | |
1455 | + | let dt = bR(dn) | |
1456 | + | let dv = bR(do) | |
1457 | + | let hI = { | |
1458 | + | let aW = invoke(this, "getOneTknV2READONLY", [fP, hE], nil) | |
1459 | + | if ($isInstanceOf(aW, "(Int, Int)")) | |
1460 | + | then aW | |
1461 | + | else throw(($getType(aW) + " couldn't be cast to (Int, Int)")) | |
1458 | 1462 | } | |
1459 | - | let | |
1460 | - | let | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | then if (( | |
1463 | + | let fY = hI._1 | |
1464 | + | let cB = hI._2 | |
1465 | + | let eb = dh("", dm, hE, this) | |
1466 | + | let dD = eb._1 | |
1467 | + | let dE = eb._2 | |
1468 | + | let hJ = (dD + dE) | |
1469 | + | let fN = if ((hJ == 0)) | |
1470 | + | then if ((fY == 0)) | |
1467 | 1471 | then 0 | |
1468 | 1472 | else throw("bonus calculation error") | |
1469 | - | else fraction(( | |
1470 | - | $Tuple2(nil, $Tuple3( | |
1473 | + | else fraction((fY - hJ), a, hJ) | |
1474 | + | $Tuple2(nil, $Tuple3(fY, cB, fN)) | |
1471 | 1475 | } | |
1472 | 1476 | ||
1473 | 1477 | ||
1474 | 1478 | ||
1475 | - | @Callable( | |
1476 | - | func getNoLess ( | |
1477 | - | let | |
1478 | - | let | |
1479 | - | let | |
1480 | - | let | |
1481 | - | let | |
1482 | - | let | |
1483 | - | if (( | |
1484 | - | then throw(((("Failed: " + toString( | |
1485 | - | else if (( | |
1486 | - | then throw(((("Failed: " + toString( | |
1479 | + | @Callable(cT) | |
1480 | + | func getNoLess (hK,hL) = { | |
1481 | + | let eb = fn(cT) | |
1482 | + | let dD = eb._1 | |
1483 | + | let dE = eb._2 | |
1484 | + | let dP = eb._3 | |
1485 | + | let dj = eb._4 | |
1486 | + | let dF = eb._5 | |
1487 | + | if ((hK > dD)) | |
1488 | + | then throw(((("Failed: " + toString(dD)) + " < ") + toString(hK))) | |
1489 | + | else if ((hL > dE)) | |
1490 | + | then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL))) | |
1487 | 1491 | else { | |
1488 | - | let | |
1489 | - | if (( | |
1492 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1493 | + | if ((eV == eV)) | |
1490 | 1494 | then { | |
1491 | - | let | |
1492 | - | if (( | |
1495 | + | let hM = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)]) | |
1496 | + | if ((hM == hM)) | |
1493 | 1497 | then { | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | let | |
1498 | - | if (( | |
1499 | - | then ( | |
1498 | + | let hN = eW(-(dD), -(dE), 0) | |
1499 | + | let gm = hN._1 | |
1500 | + | let eN = hN._2 | |
1501 | + | let gn = fa(eV, eN) | |
1502 | + | if ((gn == gn)) | |
1503 | + | then (dF ++ gm) | |
1500 | 1504 | else throw("Strict value is not equal to itself.") | |
1501 | 1505 | } | |
1502 | 1506 | else throw("Strict value is not equal to itself.") | |
1503 | 1507 | } | |
1504 | 1508 | else throw("Strict value is not equal to itself.") | |
1505 | 1509 | } | |
1506 | 1510 | } | |
1507 | 1511 | ||
1508 | 1512 | ||
1509 | 1513 | ||
1510 | - | @Callable( | |
1511 | - | func unstakeAndGet ( | |
1512 | - | let | |
1514 | + | @Callable(cT) | |
1515 | + | func unstakeAndGet (cA) = { | |
1516 | + | let hO = if ((size(cT.payments) != 0)) | |
1513 | 1517 | then throw("No pmnts expd") | |
1514 | 1518 | else true | |
1515 | - | if (( | |
1519 | + | if ((hO == hO)) | |
1516 | 1520 | then { | |
1517 | - | let | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | if (( | |
1521 | + | let hP = bw() | |
1522 | + | let hc = bp | |
1523 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1524 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1525 | + | if ((eV == eV)) | |
1522 | 1526 | then { | |
1523 | - | let | |
1524 | - | if (( | |
1527 | + | let hR = invoke(hQ, "unstake", [toBase58String(hc), cA], nil) | |
1528 | + | if ((hR == hR)) | |
1525 | 1529 | then { | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | let | |
1530 | - | let | |
1531 | - | let | |
1530 | + | let eb = dh(toBase58String(cT.transactionId), toBase58String(hc), cA, cT.caller) | |
1531 | + | let dD = eb._1 | |
1532 | + | let dE = eb._2 | |
1533 | + | let dr = parseIntValue(eb._9) | |
1534 | + | let dF = eb._10 | |
1535 | + | let hS = if (if (aZ()) | |
1532 | 1536 | then true | |
1533 | - | else ( | |
1534 | - | then throw(("Blocked: " + toString( | |
1537 | + | else (dr == s)) | |
1538 | + | then throw(("Blocked: " + toString(dr))) | |
1535 | 1539 | else true | |
1536 | - | if (( | |
1540 | + | if ((hS == hS)) | |
1537 | 1541 | then { | |
1538 | - | let | |
1539 | - | if (( | |
1542 | + | let hT = invoke(aU, "burn", [cA], [AttachedPayment(hc, cA)]) | |
1543 | + | if ((hT == hT)) | |
1540 | 1544 | then { | |
1541 | - | let | |
1542 | - | let | |
1543 | - | let | |
1544 | - | let | |
1545 | - | if (( | |
1546 | - | then ( | |
1545 | + | let hU = eW(-(dD), -(dE), 0) | |
1546 | + | let gm = hU._1 | |
1547 | + | let eN = hU._2 | |
1548 | + | let gn = fa(eV, eN) | |
1549 | + | if ((gn == gn)) | |
1550 | + | then (dF ++ gm) | |
1547 | 1551 | else throw("Strict value is not equal to itself.") | |
1548 | 1552 | } | |
1549 | 1553 | else throw("Strict value is not equal to itself.") | |
1550 | 1554 | } | |
1551 | 1555 | else throw("Strict value is not equal to itself.") | |
1552 | 1556 | } | |
1553 | 1557 | else throw("Strict value is not equal to itself.") | |
1554 | 1558 | } | |
1555 | 1559 | else throw("Strict value is not equal to itself.") | |
1556 | 1560 | } | |
1557 | 1561 | else throw("Strict value is not equal to itself.") | |
1558 | 1562 | } | |
1559 | 1563 | ||
1560 | 1564 | ||
1561 | 1565 | ||
1562 | - | @Callable( | |
1563 | - | func unstakeAndGetNoLess ( | |
1564 | - | let | |
1566 | + | @Callable(cT) | |
1567 | + | func unstakeAndGetNoLess (hV,hW,hL) = { | |
1568 | + | let hy = if (aZ()) | |
1565 | 1569 | then true | |
1566 | - | else ( | |
1567 | - | let | |
1570 | + | else (bo == s) | |
1571 | + | let gM = [if (!(hy)) | |
1568 | 1572 | then true | |
1569 | - | else throw("get operation is blocked by admin"), if ((size( | |
1573 | + | else throw("get operation is blocked by admin"), if ((size(cT.payments) == 0)) | |
1570 | 1574 | then true | |
1571 | 1575 | else throw("no payments are expected")] | |
1572 | - | if (( | |
1576 | + | if ((gM == gM)) | |
1573 | 1577 | then { | |
1574 | - | let | |
1575 | - | if (( | |
1578 | + | let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1579 | + | if ((eV == eV)) | |
1576 | 1580 | then { | |
1577 | - | let | |
1578 | - | if (( | |
1581 | + | let hR = invoke(by, "unstake", [toBase58String(bp), hV], nil) | |
1582 | + | if ((hR == hR)) | |
1579 | 1583 | then { | |
1580 | - | let | |
1581 | - | let | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1584 | + | let hX = dh(toBase58String(cT.transactionId), toBase58String(bp), hV, cT.caller) | |
1585 | + | let dD = hX._1 | |
1586 | + | let dE = hX._2 | |
1587 | + | let dF = hX._10 | |
1588 | + | let hY = [if ((dD >= hW)) | |
1585 | 1589 | then true | |
1586 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1590 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dE >= hL)) | |
1587 | 1591 | then true | |
1588 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1589 | - | if (( | |
1592 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hL)], ""))] | |
1593 | + | if ((hY == hY)) | |
1590 | 1594 | then { | |
1591 | - | let | |
1592 | - | if (( | |
1595 | + | let hM = invoke(aU, "burn", [hV], [AttachedPayment(bp, hV)]) | |
1596 | + | if ((hM == hM)) | |
1593 | 1597 | then { | |
1594 | - | let | |
1595 | - | let | |
1596 | - | let | |
1597 | - | let | |
1598 | - | if (( | |
1599 | - | then ( | |
1598 | + | let hZ = eW(-(dD), -(dE), 0) | |
1599 | + | let gm = hZ._1 | |
1600 | + | let eN = hZ._2 | |
1601 | + | let gn = fa(eV, eN) | |
1602 | + | if ((gn == gn)) | |
1603 | + | then (dF ++ gm) | |
1600 | 1604 | else throw("Strict value is not equal to itself.") | |
1601 | 1605 | } | |
1602 | 1606 | else throw("Strict value is not equal to itself.") | |
1603 | 1607 | } | |
1604 | 1608 | else throw("Strict value is not equal to itself.") | |
1605 | 1609 | } | |
1606 | 1610 | else throw("Strict value is not equal to itself.") | |
1607 | 1611 | } | |
1608 | 1612 | else throw("Strict value is not equal to itself.") | |
1609 | 1613 | } | |
1610 | 1614 | else throw("Strict value is not equal to itself.") | |
1611 | 1615 | } | |
1612 | 1616 | ||
1613 | 1617 | ||
1614 | 1618 | ||
1615 | - | @Callable( | |
1616 | - | func unstakeAndGetOneTknV2 ( | |
1617 | - | let | |
1618 | - | let | |
1619 | - | if ($isInstanceOf( | |
1620 | - | then | |
1621 | - | else throw(($getType( | |
1619 | + | @Callable(cT) | |
1620 | + | func unstakeAndGetOneTknV2 (hV,fP,fQ) = { | |
1621 | + | let hm = { | |
1622 | + | let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1623 | + | if ($isInstanceOf(aW, "Boolean")) | |
1624 | + | then aW | |
1625 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1622 | 1626 | } | |
1623 | - | let | |
1627 | + | let hy = if (if (aZ()) | |
1624 | 1628 | then true | |
1625 | - | else ( | |
1629 | + | else (bo == s)) | |
1626 | 1630 | then true | |
1627 | - | else | |
1628 | - | let | |
1631 | + | else hm | |
1632 | + | let gM = [if (if (!(hy)) | |
1629 | 1633 | then true | |
1630 | - | else | |
1634 | + | else gs(cT)) | |
1631 | 1635 | then true | |
1632 | - | else | |
1636 | + | else aR("get operation is blocked by admin"), if ((size(cT.payments) == 0)) | |
1633 | 1637 | then true | |
1634 | - | else | |
1635 | - | if (( | |
1638 | + | else aR("no payments are expected")] | |
1639 | + | if ((gM == gM)) | |
1636 | 1640 | then { | |
1637 | - | let | |
1638 | - | let | |
1639 | - | let | |
1640 | - | let | |
1641 | - | let | |
1642 | - | let | |
1643 | - | if (( | |
1641 | + | let hP = bw() | |
1642 | + | let hc = bp | |
1643 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1644 | + | let dl = cT.caller | |
1645 | + | let ia = this | |
1646 | + | let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dl.bytes, ia.bytes], nil) | |
1647 | + | if ((hR == hR)) | |
1644 | 1648 | then { | |
1645 | - | let | |
1646 | - | let | |
1647 | - | let | |
1648 | - | $Tuple2( | |
1649 | + | let ib = fO(fP, fQ, [AttachedPayment(hc, hV)], cT.caller, cT.originCaller, cT.transactionId) | |
1650 | + | let dF = ib._1 | |
1651 | + | let fZ = ib._2 | |
1652 | + | $Tuple2(dF, fZ) | |
1649 | 1653 | } | |
1650 | 1654 | else throw("Strict value is not equal to itself.") | |
1651 | 1655 | } | |
1652 | 1656 | else throw("Strict value is not equal to itself.") | |
1653 | 1657 | } | |
1654 | 1658 | ||
1655 | 1659 | ||
1656 | 1660 | ||
1657 | - | @Callable( | |
1658 | - | func putOneTknV2WithBonusREADONLY ( | |
1659 | - | let | |
1660 | - | let | |
1661 | - | let | |
1662 | - | let | |
1663 | - | let | |
1664 | - | $Tuple2(nil, $Tuple3( | |
1661 | + | @Callable(cT) | |
1662 | + | func putOneTknV2WithBonusREADONLY (ic,id) = { | |
1663 | + | let ie = ft(ic, id, "", "", true) | |
1664 | + | let fI = ie._1 | |
1665 | + | let dF = ie._2 | |
1666 | + | let cB = ie._3 | |
1667 | + | let fN = ie._4 | |
1668 | + | $Tuple2(nil, $Tuple3(fI, cB, fN)) | |
1665 | 1669 | } | |
1666 | 1670 | ||
1667 | 1671 | ||
1668 | 1672 | ||
1669 | - | @Callable( | |
1670 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1671 | - | let | |
1672 | - | let | |
1673 | - | let | |
1674 | - | let | |
1675 | - | let | |
1676 | - | $Tuple2(nil, $Tuple3( | |
1673 | + | @Callable(cT) | |
1674 | + | func putOneTknV2WithoutTakeFeeREADONLY (ic,id) = { | |
1675 | + | let if = ft(ic, id, "", "", false) | |
1676 | + | let fI = if._1 | |
1677 | + | let dF = if._2 | |
1678 | + | let cB = if._3 | |
1679 | + | let fN = if._4 | |
1680 | + | $Tuple2(nil, $Tuple3(fI, cB, fN)) | |
1677 | 1681 | } | |
1678 | 1682 | ||
1679 | 1683 | ||
1680 | 1684 | ||
1681 | - | @Callable( | |
1682 | - | func activate ( | |
1685 | + | @Callable(cT) | |
1686 | + | func activate (ig,ih) = if ((toString(cT.caller) != toString(aU))) | |
1683 | 1687 | then throw("denied") | |
1684 | - | else $Tuple2([StringEntry(ak(), | |
1688 | + | else $Tuple2([StringEntry(aj(), ig), StringEntry(ak(), ih)], "success") | |
1685 | 1689 | ||
1686 | 1690 | ||
1687 | 1691 | ||
1688 | - | @Callable( | |
1689 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1692 | + | @Callable(cT) | |
1693 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc()) | |
1690 | 1694 | ||
1691 | 1695 | ||
1692 | 1696 | ||
1693 | - | @Callable( | |
1694 | - | func getAccBalanceWrapperREADONLY ( | |
1697 | + | @Callable(cT) | |
1698 | + | func getAccBalanceWrapperREADONLY (bS) = $Tuple2(nil, bR(bS)) | |
1695 | 1699 | ||
1696 | 1700 | ||
1697 | 1701 | ||
1698 | - | @Callable( | |
1699 | - | func calcPricesWrapperREADONLY ( | |
1700 | - | let | |
1701 | - | $Tuple2(nil, [toString( | |
1702 | + | @Callable(cT) | |
1703 | + | func calcPricesWrapperREADONLY (cl,cm,cq) = { | |
1704 | + | let ii = cp(cl, cm, cq) | |
1705 | + | $Tuple2(nil, [toString(ii[0]), toString(ii[1]), toString(ii[2])]) | |
1702 | 1706 | } | |
1703 | 1707 | ||
1704 | 1708 | ||
1705 | 1709 | ||
1706 | - | @Callable( | |
1707 | - | func fromX18WrapperREADONLY ( | |
1710 | + | @Callable(cT) | |
1711 | + | func fromX18WrapperREADONLY (M,ij) = $Tuple2(nil, L(parseBigIntValue(M), ij)) | |
1708 | 1712 | ||
1709 | 1713 | ||
1710 | 1714 | ||
1711 | - | @Callable( | |
1712 | - | func toX18WrapperREADONLY (J | |
1715 | + | @Callable(cT) | |
1716 | + | func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J))) | |
1713 | 1717 | ||
1714 | 1718 | ||
1715 | 1719 | ||
1716 | - | @Callable( | |
1717 | - | func calcPriceBigIntWrapperREADONLY ( | |
1720 | + | @Callable(cT) | |
1721 | + | func calcPriceBigIntWrapperREADONLY (bU,bV) = $Tuple2(nil, toString(bT(parseBigIntValue(bU), parseBigIntValue(bV)))) | |
1718 | 1722 | ||
1719 | 1723 | ||
1720 | 1724 | ||
1721 | - | @Callable( | |
1722 | - | func estimatePutOperationWrapperREADONLY ( | |
1725 | + | @Callable(cT) | |
1726 | + | func estimatePutOperationWrapperREADONLY (di,ca,dH,dI,dJ,dK,ik,dL,dM) = $Tuple2(nil, dG(di, ca, dH, dI, dJ, dK, ik, dL, dM, true, false, 0, "")) | |
1723 | 1727 | ||
1724 | 1728 | ||
1725 | 1729 | ||
1726 | - | @Callable( | |
1727 | - | func estimateGetOperationWrapperREADONLY ( | |
1728 | - | let | |
1729 | - | $Tuple2(nil, $Tuple10( | |
1730 | + | @Callable(cT) | |
1731 | + | func estimateGetOperationWrapperREADONLY (di,il,dk,ik) = { | |
1732 | + | let eb = dh(di, il, dk, addressFromStringValue(ik)) | |
1733 | + | $Tuple2(nil, $Tuple10(eb._1, eb._2, eb._3, eb._4, eb._5, eb._6, eb._7, toString(eb._8), eb._9, eb._10)) | |
1730 | 1734 | } | |
1731 | 1735 | ||
1732 | 1736 | ||
1733 | 1737 | ||
1734 | - | @Callable( | |
1738 | + | @Callable(cT) | |
1735 | 1739 | func changeAmp () = { | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | if ($isInstanceOf( | |
1740 | + | let im = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil) | |
1741 | + | let in = { | |
1742 | + | let gp = im | |
1743 | + | if ($isInstanceOf(gp, "List[Any]")) | |
1740 | 1744 | then { | |
1741 | - | let | |
1745 | + | let io = gp | |
1742 | 1746 | $Tuple3({ | |
1743 | - | let | |
1744 | - | if ($isInstanceOf( | |
1745 | - | then | |
1746 | - | else throw(($getType( | |
1747 | + | let aW = io[0] | |
1748 | + | if ($isInstanceOf(aW, "Int")) | |
1749 | + | then aW | |
1750 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
1747 | 1751 | }, { | |
1748 | - | let | |
1749 | - | if ($isInstanceOf( | |
1750 | - | then | |
1751 | - | else throw(($getType( | |
1752 | + | let aW = io[1] | |
1753 | + | if ($isInstanceOf(aW, "Int")) | |
1754 | + | then aW | |
1755 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
1752 | 1756 | }, { | |
1753 | - | let | |
1754 | - | if ($isInstanceOf( | |
1755 | - | then | |
1756 | - | else throw(($getType( | |
1757 | + | let aW = io[2] | |
1758 | + | if ($isInstanceOf(aW, "Int")) | |
1759 | + | then aW | |
1760 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
1757 | 1761 | }) | |
1758 | 1762 | } | |
1759 | - | else | |
1763 | + | else aR("invalid entry type") | |
1760 | 1764 | } | |
1761 | - | let | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | then if (( | |
1768 | - | then | |
1769 | - | else | |
1770 | - | else if (( | |
1771 | - | then | |
1772 | - | else | |
1773 | - | let | |
1774 | - | let | |
1775 | - | let | |
1765 | + | let ip = in._1 | |
1766 | + | let iq = in._2 | |
1767 | + | let ir = in._3 | |
1768 | + | let is = parseIntValue(getStringValue(al())) | |
1769 | + | let it = (is + iq) | |
1770 | + | let iu = if ((0 > iq)) | |
1771 | + | then if ((ir > it)) | |
1772 | + | then ir | |
1773 | + | else it | |
1774 | + | else if ((it > ir)) | |
1775 | + | then ir | |
1776 | + | else it | |
1777 | + | let iv = valueOrElse(getInteger(ao()), 0) | |
1778 | + | let iw = (iv + ip) | |
1779 | + | let gM = [if ((height > iw)) | |
1776 | 1780 | then true | |
1777 | - | else | |
1781 | + | else aR("try again in few blocks"), if ((is != iu)) | |
1778 | 1782 | then true | |
1779 | - | else | |
1780 | - | if (( | |
1781 | - | then [IntegerEntry( | |
1783 | + | else aR("already reached target")] | |
1784 | + | if ((gM == gM)) | |
1785 | + | then [IntegerEntry(ao(), height), StringEntry(al(), toString(iu)), StringEntry(am(height), toString(iu))] | |
1782 | 1786 | else throw("Strict value is not equal to itself.") | |
1783 | 1787 | } | |
1784 | 1788 | ||
1785 | 1789 | ||
1786 | - | @Verifier( | |
1787 | - | func | |
1788 | - | let | |
1789 | - | let | |
1790 | - | if ($isInstanceOf( | |
1790 | + | @Verifier(ix) | |
1791 | + | func iy () = { | |
1792 | + | let iz = { | |
1793 | + | let gp = go() | |
1794 | + | if ($isInstanceOf(gp, "ByteVector")) | |
1791 | 1795 | then { | |
1792 | - | let | |
1793 | - | | |
1796 | + | let gt = gp | |
1797 | + | gt | |
1794 | 1798 | } | |
1795 | - | else if ($isInstanceOf( | |
1796 | - | then | |
1799 | + | else if ($isInstanceOf(gp, "Unit")) | |
1800 | + | then ix.senderPublicKey | |
1797 | 1801 | else throw("Match error") | |
1798 | 1802 | } | |
1799 | - | let | |
1800 | - | if ($isInstanceOf( | |
1803 | + | let gp = ix | |
1804 | + | if ($isInstanceOf(gp, "Order")) | |
1801 | 1805 | then { | |
1802 | - | let | |
1803 | - | let | |
1804 | - | let | |
1806 | + | let fd = gp | |
1807 | + | let iA = ba() | |
1808 | + | let iB = if (gA()) | |
1805 | 1809 | then $Tuple2(true, "") | |
1806 | - | else eZ(fa) | |
1807 | - | let aK = iy._1 | |
1808 | - | let aL = iy._2 | |
1809 | - | let aM = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey) | |
1810 | - | let aN = sigVerify(fa.bodyBytes, fa.proofs[1], ix) | |
1811 | - | if (if (if (aK) | |
1810 | + | else fc(fd) | |
1811 | + | let aJ = iB._1 | |
1812 | + | let aK = iB._2 | |
1813 | + | let aL = sigVerify(fd.bodyBytes, fd.proofs[0], fd.senderPublicKey) | |
1814 | + | let aM = sigVerify(fd.bodyBytes, fd.proofs[1], iA) | |
1815 | + | if (if (if (aJ) | |
1816 | + | then aL | |
1817 | + | else false) | |
1812 | 1818 | then aM | |
1813 | 1819 | else false) | |
1814 | - | then aN | |
1815 | - | else false) | |
1816 | 1820 | then true | |
1817 | - | else aJ | |
1821 | + | else aI(aJ, aK, aL, aM) | |
1818 | 1822 | } | |
1819 | - | else if ($isInstanceOf( | |
1823 | + | else if ($isInstanceOf(gp, "SetScriptTransaction")) | |
1820 | 1824 | then { | |
1821 | - | let | |
1822 | - | if (sigVerify( | |
1825 | + | let cG = gp | |
1826 | + | if (sigVerify(ix.bodyBytes, ix.proofs[0], iz)) | |
1823 | 1827 | then true | |
1824 | 1828 | else { | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | if (( | |
1829 | - | then ( | |
1829 | + | let iC = blake2b256(value(cG.script)) | |
1830 | + | let iD = fromBase64String(value(getString(aU, aE()))) | |
1831 | + | let iE = scriptHash(this) | |
1832 | + | if ((iD == iC)) | |
1833 | + | then (iE != iC) | |
1830 | 1834 | else false | |
1831 | 1835 | } | |
1832 | 1836 | } | |
1833 | - | else sigVerify( | |
1837 | + | else sigVerify(ix.bodyBytes, ix.proofs[0], iz) | |
1834 | 1838 | } | |
1835 | 1839 |
github/deemru/w8io/026f985 816.74 ms ◑