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