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