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