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