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