tx · wQqeHB3jR8k1L9HLbaQWGpm6CkrrV4fJb6SUmmx3Qco 3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a: -0.02900000 Waves 2022.10.31 13:15 [2296459] smart account 3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a > SELF 0.00000000 Waves
{ "type": 13, "id": "wQqeHB3jR8k1L9HLbaQWGpm6CkrrV4fJb6SUmmx3Qco", "fee": 2900000, "feeAssetId": null, "timestamp": 1667211145745, "version": 1, "sender": "3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a", "senderPublicKey": "3JAonT9h65iAMaQegaHVE8pCbEPHPXoARiimB7edrrTb", "proofs": [ "2MDkp3fmSVvymSvi5RZkNffou8gUDkHQorjxYnKKi9NcXBc8GmVBZKZUtV21iQCtsgEkmCFJiRELm2vip5quj9K8" ], "script": "base64:BgJvCAISCAoGCAgIAQEBEgMKAQESBQoDAQEBEgQKAgEBEgMKAQgSBAoCAQESBAoCAQESABIAEgMKAQgSBAoCAQESABIECgIBARIAEgASAwoBCBIAEgASAwoBARIAEgASAwoBBBIAEgASAwoBCBIDCgEIRQAHTl9DT0lOUwkBEUBleHRyTmF0aXZlKDEwNTApAgUEdGhpcwIHTl9DT0lOUwALTl9DT0lOU19iaWcJALYCAQUHTl9DT0lOUwALTl9DT0lOU19NQVgACgAOVE9LRU5fREVDSU1BTFMABgAKVE9LRU5fUkFURQDAhD0AD0ZFRV9ERU5PTUlOQVRPUgCAyK+gJQAJUFJFQ0lTSU9OAMCEPQAIREVDSU1BTFMABgANTUFYX0FETUlOX0ZFRQCAyK+gJQAHTUFYX0ZFRQCA5JfQEgAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgATQURNSU5fQUNUSU9OU19ERUxBWQkAaQIJAGgCAAMAgKMFADwADU1JTl9SQU1QX1RJTUUJAGkCAICjBQA8AA1WUF9MT0dfUEVSSU9EAIC4mSkADFZQX1BSRUNJU0lPTgCAoJSljR0ABWNvaW5zCQC1CQIJ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CAIAGQkAzAgCABoJAMwIAgAbCQDMCAIAHAkAzAgCAB0FA25pbAQHbGlzdDMwbQkAzAgCAP///////////wEJAMwIAgD+//////////8BCQDMCAIA/f//////////AQkAzAgCAPz//////////wEJAMwIAgD7//////////8BCQDMCAIA+v//////////AQkAzAgCAPn//////////wEJAMwIAgD4//////////8BCQDMCAIA9///////////AQkAzAgCAPb//////////wEJAMwIAgD1//////////8BCQDMCAIA9P//////////AQkAzAgCAPP//////////wEJAMwIAgDy//////////8BCQDMCAIA8f//////////AQkAzAgCAPD//////////wEJAMwIAgDv//////////8BCQDMCAIA7v//////////AQkAzAgCAO3//////////wEJAMwIAgDs//////////8BCQDMCAIA6///////////AQkAzAgCAOr//////////wEJAMwIAgDp//////////8BCQDMCAIA6P//////////AQkAzAgCAOf//////////wEJAMwIAgDm//////////8BCQDMCAIA5f//////////AQkAzAgCAOT//////////wEJAMwIAgDj//////////8BCQDMCAIA4v//////////AQUDbmlsBAh2YWx1ZTMwcAoAAiRsBQdsaXN0MzBwCgACJHMJAJADAQUCJGwKAAUkYWNjMAIACgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQRmb2xkAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAzMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRm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aGlzAgh2ZXJpZmllcgMJAAECBQckbWF0Y2gwAgZTdHJpbmcECHZlcmlmaWVyBQckbWF0Y2gwCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCHZlcmlmaWVyCQCsAgIJAKwCAgkArAICAgdzdGF0dXNfCQClCAEFBHRoaXMCAV8JANgEAQgFAnR4AmlkBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWNwgbA=", "chainId": 84, "height": 2296459, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AmkwiMwGk537QJXeqwLRYHMS59Y6nM6nsfnoYV8Zxcou Next: none Diff:
Old | New | Differences | |
---|---|---|---|
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | - | ||
209 | + | let ax = { | |
210 | 210 | let ay = B | |
211 | 211 | let az = y | |
212 | 212 | if ((ay > P)) | |
219 | 219 | } | |
220 | 220 | else az | |
221 | 221 | } | |
222 | - | ||
223 | 222 | ||
224 | 223 | func aC (T) = { | |
225 | 224 | func U (V,W) = (V + W) | |
259 | 258 | ||
260 | 259 | let aE = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
261 | 260 | ||
262 | - | func aF (aG, | |
263 | - | let | |
264 | - | if ((toInt( | |
261 | + | func aF (aG,ax) = { | |
262 | + | let aH = aC(aG) | |
263 | + | if ((toInt(aH) == 0)) | |
265 | 264 | then 0 | |
266 | 265 | else { | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | func | |
266 | + | let aI = (ax * a) | |
267 | + | let aJ = fraction(toBigInt(aI), aH, L) | |
268 | + | let aK = toBigInt((aI - 1)) | |
269 | + | let aL = aD(aG) | |
270 | + | let aM = (a + 1) | |
271 | + | let aN = toBigInt(aM) | |
272 | + | func aO (W) = { | |
274 | 273 | func U (V,al) = fraction(V, W, L) | |
275 | 274 | ||
276 | 275 | let X = an | |
287 | 286 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
288 | 287 | } | |
289 | 288 | ||
290 | - | func | |
289 | + | func aP (V,aQ) = if ((V._2 == true)) | |
291 | 290 | then V | |
292 | 291 | else { | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | if (( | |
297 | - | then if ((1 >= toInt(( | |
298 | - | then $Tuple2( | |
299 | - | else $Tuple2( | |
300 | - | else if ((1 >= toInt(( | |
301 | - | then $Tuple2( | |
302 | - | else $Tuple2( | |
292 | + | let aR = V._1 | |
293 | + | let aS = fraction(aO(aR), L, aL) | |
294 | + | let aT = fraction((aJ + fraction(b, aS, L)), aR, (fraction(aK, aR, L) + fraction(aN, aS, L))) | |
295 | + | if ((aT > aR)) | |
296 | + | then if ((1 >= toInt((aT - aR)))) | |
297 | + | then $Tuple2(aT, true) | |
298 | + | else $Tuple2(aT, false) | |
299 | + | else if ((1 >= toInt((aR - aT)))) | |
300 | + | then $Tuple2(aT, true) | |
301 | + | else $Tuple2(aT, false) | |
303 | 302 | } | |
304 | 303 | ||
305 | - | let | |
304 | + | let aU = { | |
306 | 305 | let X = aE | |
307 | 306 | let Y = size(X) | |
308 | - | let Z = $Tuple2( | |
307 | + | let Z = $Tuple2(aH, false) | |
309 | 308 | func aa (ab,ac) = if ((ac >= Y)) | |
310 | 309 | then ab | |
311 | - | else | |
310 | + | else aP(ab, X[ac]) | |
312 | 311 | ||
313 | 312 | func ad (ab,ac) = if ((ac >= Y)) | |
314 | 313 | then ab | |
316 | 315 | ||
317 | 316 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
318 | 317 | } | |
319 | - | let | |
320 | - | let | |
321 | - | if (( | |
322 | - | then throw(("D_proc() not finished with " + toString( | |
323 | - | else toInt( | |
318 | + | let aT = aU._1 | |
319 | + | let aV = aU._2 | |
320 | + | if ((aV == false)) | |
321 | + | then throw(("D_proc() not finished with " + toString(aT))) | |
322 | + | else toInt(aT) | |
324 | 323 | } | |
325 | 324 | } | |
326 | 325 | ||
327 | 326 | ||
328 | - | func | |
327 | + | func aW (au,aX,aY,aG) = if (Q((au != aX))) | |
329 | 328 | then throw("same coin") | |
330 | - | else if (Q(if (( | |
329 | + | else if (Q(if ((aX >= 0)) | |
331 | 330 | then (au >= 0) | |
332 | 331 | else false)) | |
333 | 332 | then throw("below zero") | |
334 | - | else if (Q(if ((a > | |
333 | + | else if (Q(if ((a > aX)) | |
335 | 334 | then (a > au) | |
336 | 335 | else false)) | |
337 | 336 | then throw("above N_COINS") | |
338 | 337 | else { | |
339 | - | let aH = ax() | |
340 | - | let aU = aF(aG, aH) | |
341 | - | let ba = toBigInt(aU) | |
342 | - | let bb = toBigInt((aH * a)) | |
343 | - | func bc (V,al) = { | |
344 | - | let bd = V | |
345 | - | let be = bd._1 | |
346 | - | let bf = bd._2 | |
347 | - | let bg = if ((al == au)) | |
348 | - | then toBigInt(fraction(aZ, e, ag[al])) | |
338 | + | let aT = aF(aG, ax) | |
339 | + | let aZ = toBigInt(aT) | |
340 | + | let ba = toBigInt((ax * a)) | |
341 | + | func bb (V,al) = { | |
342 | + | let bc = V | |
343 | + | let bd = bc._1 | |
344 | + | let be = bc._2 | |
345 | + | let bf = if ((al == au)) | |
346 | + | then toBigInt(fraction(aY, e, ag[al])) | |
349 | 347 | else aG[al] | |
350 | - | if ((al != | |
351 | - | then $Tuple2(( | |
352 | - | else $Tuple2( | |
348 | + | if ((al != aX)) | |
349 | + | then $Tuple2((bd + bf), fraction(be, aZ, fraction(bf, b, L))) | |
350 | + | else $Tuple2(bd, be) | |
353 | 351 | } | |
354 | 352 | ||
355 | - | let | |
353 | + | let bg = { | |
356 | 354 | let X = am | |
357 | 355 | let Y = size(X) | |
358 | - | let Z = $Tuple2(K, | |
356 | + | let Z = $Tuple2(K, aZ) | |
359 | 357 | func aa (ab,ac) = if ((ac >= Y)) | |
360 | 358 | then ab | |
361 | - | else | |
359 | + | else bb(ab, X[ac]) | |
362 | 360 | ||
363 | 361 | func ad (ab,ac) = if ((ac >= Y)) | |
364 | 362 | then ab | |
366 | 364 | ||
367 | 365 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
368 | 366 | } | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | func | |
367 | + | let bd = bg._1 | |
368 | + | let bh = bg._2 | |
369 | + | let be = fraction(bh, aZ, fraction(ba, b, L)) | |
370 | + | let bi = ((bd + fraction(aZ, L, ba)) - aZ) | |
371 | + | func bj (V,aQ) = if ((V._2 == true)) | |
374 | 372 | then V | |
375 | 373 | else { | |
376 | - | let | |
377 | - | let | |
378 | - | if (( | |
379 | - | then if ((1 >= toInt(( | |
380 | - | then $Tuple2( | |
381 | - | else $Tuple2( | |
382 | - | else if ((1 >= toInt(( | |
383 | - | then $Tuple2( | |
384 | - | else $Tuple2( | |
374 | + | let bk = V._1 | |
375 | + | let bl = fraction((fraction(bk, bk, L) + be), L, (fraction(M, bk, L) + bi)) | |
376 | + | if ((bl > bk)) | |
377 | + | then if ((1 >= toInt((bl - bk)))) | |
378 | + | then $Tuple2(bl, true) | |
379 | + | else $Tuple2(bl, false) | |
380 | + | else if ((1 >= toInt((bk - bl)))) | |
381 | + | then $Tuple2(bl, true) | |
382 | + | else $Tuple2(bl, false) | |
385 | 383 | } | |
386 | 384 | ||
387 | - | let | |
385 | + | let bm = { | |
388 | 386 | let X = aE | |
389 | 387 | let Y = size(X) | |
390 | - | let Z = $Tuple2(ba, false) | |
388 | + | let Z = $Tuple2(aZ, false) | |
389 | + | func bn (ab,ac) = if ((ac >= Y)) | |
390 | + | then ab | |
391 | + | else bj(ab, X[ac]) | |
392 | + | ||
391 | 393 | func bo (ab,ac) = if ((ac >= Y)) | |
392 | - | then ab | |
393 | - | else bk(ab, X[ac]) | |
394 | - | ||
395 | - | func bp (ab,ac) = if ((ac >= Y)) | |
396 | 394 | then ab | |
397 | 395 | else throw("List size exceeds 16") | |
398 | 396 | ||
399 | - | | |
397 | + | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
400 | 398 | } | |
401 | - | let | |
402 | - | let | |
403 | - | if (( | |
404 | - | then throw(("y_proc() not finished with " + toString( | |
405 | - | else $Tuple2(fraction(toInt( | |
399 | + | let bl = bm._1 | |
400 | + | let aV = bm._2 | |
401 | + | if ((aV == false)) | |
402 | + | then throw(("y_proc() not finished with " + toString(bl))) | |
403 | + | else $Tuple2(fraction(toInt(bl), ag[aX], e), aT) | |
406 | 404 | } | |
407 | 405 | ||
408 | 406 | ||
409 | - | func | |
407 | + | func bp (ax,au,aG,aT) = if (Q((au >= 0))) | |
410 | 408 | then throw("i below zero") | |
411 | 409 | else if (Q((a > au))) | |
412 | 410 | then throw("i above N_COINS") | |
413 | 411 | else { | |
414 | - | let | |
415 | - | let | |
416 | - | func | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
412 | + | let aZ = toBigInt(aT) | |
413 | + | let ba = toBigInt((ax * a)) | |
414 | + | func bb (V,al) = { | |
415 | + | let bq = V | |
416 | + | let bd = bq._1 | |
417 | + | let be = bq._2 | |
418 | + | let bf = if ((al == au)) | |
421 | 419 | then K | |
422 | 420 | else aG[al] | |
423 | 421 | if ((al != au)) | |
424 | - | then $Tuple2(( | |
425 | - | else $Tuple2( | |
422 | + | then $Tuple2((bd + bf), fraction(be, aZ, fraction(bf, b, L))) | |
423 | + | else $Tuple2(bd, be) | |
426 | 424 | } | |
427 | 425 | ||
428 | - | let | |
426 | + | let br = { | |
429 | 427 | let X = am | |
430 | 428 | let Y = size(X) | |
431 | - | let Z = $Tuple2(K, | |
429 | + | let Z = $Tuple2(K, aZ) | |
432 | 430 | func aa (ab,ac) = if ((ac >= Y)) | |
433 | 431 | then ab | |
434 | - | else | |
432 | + | else bb(ab, X[ac]) | |
435 | 433 | ||
436 | 434 | func ad (ab,ac) = if ((ac >= Y)) | |
437 | 435 | then ab | |
439 | 437 | ||
440 | 438 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
441 | 439 | } | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | func | |
440 | + | let bd = br._1 | |
441 | + | let bh = br._2 | |
442 | + | let be = fraction(bh, aZ, fraction(ba, b, L)) | |
443 | + | let bi = ((bd + fraction(aZ, L, ba)) - aZ) | |
444 | + | func bj (V,aQ) = if ((V._2 == true)) | |
447 | 445 | then V | |
448 | 446 | else { | |
449 | - | let | |
450 | - | let | |
451 | - | if (( | |
452 | - | then if ((1 >= toInt(( | |
453 | - | then $Tuple2( | |
454 | - | else $Tuple2( | |
455 | - | else if ((1 >= toInt(( | |
456 | - | then $Tuple2( | |
457 | - | else $Tuple2( | |
447 | + | let bk = V._1 | |
448 | + | let bl = fraction((fraction(bk, bk, L) + be), L, (fraction(M, bk, L) + bi)) | |
449 | + | if ((bl > bk)) | |
450 | + | then if ((1 >= toInt((bl - bk)))) | |
451 | + | then $Tuple2(bl, true) | |
452 | + | else $Tuple2(bl, false) | |
453 | + | else if ((1 >= toInt((bk - bl)))) | |
454 | + | then $Tuple2(bl, true) | |
455 | + | else $Tuple2(bl, false) | |
458 | 456 | } | |
459 | 457 | ||
460 | - | let | |
458 | + | let bs = { | |
461 | 459 | let X = aE | |
462 | 460 | let Y = size(X) | |
463 | - | let Z = $Tuple2(ba, false) | |
461 | + | let Z = $Tuple2(aZ, false) | |
462 | + | func bn (ab,ac) = if ((ac >= Y)) | |
463 | + | then ab | |
464 | + | else bj(ab, X[ac]) | |
465 | + | ||
464 | 466 | func bo (ab,ac) = if ((ac >= Y)) | |
465 | - | then ab | |
466 | - | else bk(ab, X[ac]) | |
467 | - | ||
468 | - | func bp (ab,ac) = if ((ac >= Y)) | |
469 | 467 | then ab | |
470 | 468 | else throw("List size exceeds 16") | |
471 | 469 | ||
472 | - | | |
470 | + | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
473 | 471 | } | |
474 | - | let | |
475 | - | let | |
476 | - | if (( | |
477 | - | then throw(("y_proc() not finished with " + toString( | |
478 | - | else fraction(toInt( | |
472 | + | let bl = bs._1 | |
473 | + | let aV = bs._2 | |
474 | + | if ((aV == false)) | |
475 | + | then throw(("y_proc() not finished with " + toString(bl))) | |
476 | + | else fraction(toInt(bl), ag[au], e) | |
479 | 477 | } | |
480 | 478 | ||
481 | 479 | ||
482 | - | func bu (bv,au) = { | |
483 | - | let aH = ax() | |
484 | - | let bw = ((r * a) / (4 * (a - 1))) | |
480 | + | func bt (bu,au) = { | |
481 | + | let bv = ((r * a) / (4 * (a - 1))) | |
485 | 482 | let aG = ao(af) | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
483 | + | let bw = aF(aG, ax) | |
484 | + | let bx = (bw - fraction(bu, bw, w)) | |
485 | + | let by = bp(ax, au, aG, bx) | |
486 | + | let bz = (af[au] - by) | |
490 | 487 | func U (V,al) = { | |
491 | - | let | |
492 | - | let | |
493 | - | then (fraction( | |
494 | - | else ( | |
495 | - | (V :+ ( | |
488 | + | let bA = af[al] | |
489 | + | let bB = if ((al == au)) | |
490 | + | then (fraction(bA, bx, bw) - by) | |
491 | + | else (bA - fraction(bA, bx, bw)) | |
492 | + | (V :+ (bA - fraction(bv, bB, f))) | |
496 | 493 | } | |
497 | 494 | ||
498 | - | let | |
495 | + | let bC = { | |
499 | 496 | let X = am | |
500 | 497 | let Y = size(X) | |
501 | 498 | let Z = nil | |
509 | 506 | ||
510 | 507 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
511 | 508 | } | |
512 | - | let | |
513 | - | let | |
514 | - | $Tuple3( | |
509 | + | let bD = bC[au] | |
510 | + | let bE = ((bD - bp(ax, au, ao(bC), bx)) - 1) | |
511 | + | $Tuple3(bE, (bz - bE), bw) | |
515 | 512 | } | |
516 | 513 | ||
517 | 514 | ||
518 | - | func | |
515 | + | func bF (aT) = fraction(aT, p, w) | |
519 | 516 | ||
520 | 517 | ||
521 | - | func | |
522 | - | let | |
523 | - | let | |
524 | - | ([StringEntry("vol", | |
525 | - | let | |
526 | - | let | |
527 | - | if (isDefined(getString( | |
518 | + | func bG (aT,bH) = { | |
519 | + | let bI = (parseBigIntValue(valueOrElse(getString("vol"), "0")) + toBigInt(bH)) | |
520 | + | let bJ = toString(bI) | |
521 | + | ([StringEntry("vol", bJ)] ++ { | |
522 | + | let bK = toString((lastBlock.timestamp / o)) | |
523 | + | let bL = ("log_" + bK) | |
524 | + | if (isDefined(getString(bL))) | |
528 | 525 | then nil | |
529 | - | else [StringEntry( | |
526 | + | else [StringEntry(bL, ((((toString(bF(aT)) + "_") + bJ) + "_") + toString(lastBlock.timestamp)))] | |
530 | 527 | }) | |
531 | 528 | } | |
532 | 529 | ||
533 | 530 | ||
534 | - | func | |
535 | - | func U (bP | |
536 | - | then | |
531 | + | func bM (bN) = { | |
532 | + | func U (bO,bP) = if ((bO != "")) | |
533 | + | then bO | |
537 | 534 | else { | |
538 | - | let | |
539 | - | valueOrElse(getString( | |
535 | + | let bL = ("log_" + toString((bN - bP))) | |
536 | + | valueOrElse(getString(bL), "") | |
540 | 537 | } | |
541 | 538 | ||
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let X = | |
539 | + | let bQ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] | |
540 | + | let bR = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30] | |
541 | + | let bS = { | |
542 | + | let X = bQ | |
546 | 543 | let Y = size(X) | |
547 | 544 | let Z = "" | |
548 | 545 | func aa (ab,ac) = if ((ac >= Y)) | |
555 | 552 | ||
556 | 553 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
557 | 554 | } | |
558 | - | if (( | |
559 | - | then | |
555 | + | if ((bS != "")) | |
556 | + | then bS | |
560 | 557 | else { | |
561 | - | let X = | |
558 | + | let X = bR | |
562 | 559 | let Y = size(X) | |
563 | 560 | let Z = "" | |
564 | - | func | |
561 | + | func bn (ab,ac) = if ((ac >= Y)) | |
565 | 562 | then ab | |
566 | 563 | else U(ab, X[ac]) | |
567 | 564 | ||
568 | - | func | |
565 | + | func bo (ab,ac) = if ((ac >= Y)) | |
569 | 566 | then ab | |
570 | 567 | else throw("List size exceeds 30") | |
571 | 568 | ||
572 | - | | |
569 | + | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
573 | 570 | } | |
574 | 571 | } | |
575 | 572 | ||
576 | 573 | ||
577 | - | func | |
578 | - | let | |
579 | - | let | |
580 | - | let aB = if ((0 >= | |
581 | - | then ( | |
582 | - | else | |
583 | - | let | |
584 | - | let | |
585 | - | if (( | |
586 | - | then $Tuple3( | |
574 | + | func bT (bU) = { | |
575 | + | let bV = bF(aF(ao(af), ax)) | |
576 | + | let bW = lastBlock.timestamp | |
577 | + | let aB = if ((0 >= bU)) | |
578 | + | then (bW + bU) | |
579 | + | else bU | |
580 | + | let bX = (aB / o) | |
581 | + | let bO = bM(bX) | |
582 | + | if ((bO == "")) | |
583 | + | then $Tuple3(bV, bV, 0) | |
587 | 584 | else { | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | $Tuple3( | |
585 | + | let bY = split(bO, "_") | |
586 | + | let bZ = parseIntValue(bY[0]) | |
587 | + | let ca = parseIntValue(bY[2]) | |
588 | + | $Tuple3(bV, bZ, (bW - ca)) | |
592 | 589 | } | |
593 | 590 | } | |
594 | 591 | ||
595 | 592 | ||
596 | - | func | |
597 | - | let | |
598 | - | let | |
599 | - | let aB = if ((0 >= | |
600 | - | then ( | |
601 | - | else | |
602 | - | let | |
603 | - | let | |
604 | - | if (( | |
605 | - | then $Tuple3( | |
593 | + | func cb (bU) = { | |
594 | + | let cc = parseBigIntValue(valueOrElse(getString("vol"), "0")) | |
595 | + | let cd = lastBlock.timestamp | |
596 | + | let aB = if ((0 >= bU)) | |
597 | + | then (cd + bU) | |
598 | + | else bU | |
599 | + | let bX = (aB / o) | |
600 | + | let bO = bM(bX) | |
601 | + | if ((bO == "")) | |
602 | + | then $Tuple3(cc, cc, 0) | |
606 | 603 | else { | |
607 | - | let | |
608 | - | let | |
609 | - | let | |
610 | - | $Tuple3( | |
604 | + | let bY = split(bO, "_") | |
605 | + | let ce = parseBigIntValue(bY[1]) | |
606 | + | let cf = parseIntValue(bY[2]) | |
607 | + | $Tuple3(cc, ce, (cd - cf)) | |
611 | 608 | } | |
612 | 609 | } | |
613 | 610 | ||
614 | 611 | ||
615 | - | @Callable(ch) | |
616 | - | func init (ci,cj,ck,ax,bw,cl) = if (!(isDataStorageUntouched(this))) | |
612 | + | func cg (ch) = { | |
613 | + | let bw = if ((w == 0)) | |
614 | + | then 0 | |
615 | + | else aF(ao(af), ax) | |
616 | + | let bx = aF(ao(ch), ax) | |
617 | + | if (Q((bx > bw))) | |
618 | + | then throw("D1 > D0") | |
619 | + | else { | |
620 | + | let ci = if ((w > 0)) | |
621 | + | then { | |
622 | + | func cj (ck,cl) = { | |
623 | + | let bv = ((r * a) / (4 * (a - 1))) | |
624 | + | let ak = size(ck) | |
625 | + | func U (V,al) = { | |
626 | + | let cm = ck[al] | |
627 | + | let cn = cl[al] | |
628 | + | let co = fraction(bx, cm, bw) | |
629 | + | let cp = if ((co > cn)) | |
630 | + | then (co - cn) | |
631 | + | else (cn - co) | |
632 | + | let cq = fraction(bv, cp, f) | |
633 | + | let cr = fraction(cq, s, f) | |
634 | + | $Tuple4((V._1 :+ (cn - cr)), (V._2 :+ (cn - cq)), if (if (t) | |
635 | + | then (cr > 0) | |
636 | + | else false) | |
637 | + | then (V._3 :+ ScriptTransfer(u, cr, fromBase58String(q[al]))) | |
638 | + | else V._3, (V._4 + fraction(cq, e, ag[al]))) | |
639 | + | } | |
640 | + | ||
641 | + | let X = am | |
642 | + | let Y = size(X) | |
643 | + | let Z = $Tuple4(nil, nil, nil, 0) | |
644 | + | func aa (ab,ac) = if ((ac >= Y)) | |
645 | + | then ab | |
646 | + | else U(ab, X[ac]) | |
647 | + | ||
648 | + | func ad (ab,ac) = if ((ac >= Y)) | |
649 | + | then ab | |
650 | + | else throw("List size exceeds 10") | |
651 | + | ||
652 | + | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
653 | + | } | |
654 | + | ||
655 | + | let cs = cj(af, ch) | |
656 | + | let ct = cs._1 | |
657 | + | let cu = cs._2 | |
658 | + | let cv = cs._3 | |
659 | + | let cw = cs._4 | |
660 | + | $Tuple3(ct, aF(ao(cu), ax), (cv ++ bG(bw, fraction(cw, f, r)))) | |
661 | + | } | |
662 | + | else $Tuple3(ch, bx, nil) | |
663 | + | let cx = ci._1 | |
664 | + | let cy = ci._2 | |
665 | + | let cz = ci._3 | |
666 | + | let cA = if ((w == 0)) | |
667 | + | then bx | |
668 | + | else fraction(w, (cy - bw), bw) | |
669 | + | $Tuple3(cx, cA, cz) | |
670 | + | } | |
671 | + | } | |
672 | + | ||
673 | + | ||
674 | + | @Callable(cB) | |
675 | + | func init (cC,cD,cE,cF,bv,cG) = if (!(isDataStorageUntouched(this))) | |
617 | 676 | then throw("already initialized") | |
618 | - | else if (( | |
677 | + | else if ((cB.caller != this)) | |
619 | 678 | then throw("self initialization only") | |
620 | 679 | else { | |
621 | - | let | |
622 | - | let ak = size( | |
680 | + | let cH = split(cD, ",") | |
681 | + | let ak = size(cH) | |
623 | 682 | if ((2 > ak)) | |
624 | 683 | then throw("too small coins") | |
625 | 684 | else if ((ak > c)) | |
626 | 685 | then throw("too many coins") | |
627 | 686 | else { | |
628 | - | func | |
687 | + | func cI (V,al) = if (if ((al >= ak)) | |
629 | 688 | then true | |
630 | 689 | else (V == false)) | |
631 | 690 | then V | |
632 | - | else (indexOf( | |
691 | + | else (indexOf(cH, cH[al]) == al) | |
633 | 692 | ||
634 | 693 | if ((false == { | |
635 | 694 | let X = ai | |
637 | 696 | let Z = true | |
638 | 697 | func aa (ab,ac) = if ((ac >= Y)) | |
639 | 698 | then ab | |
640 | - | else | |
699 | + | else cI(ab, X[ac]) | |
641 | 700 | ||
642 | 701 | func ad (ab,ac) = if ((ac >= Y)) | |
643 | 702 | then ab | |
647 | 706 | })) | |
648 | 707 | then throw("duplicate coin detected") | |
649 | 708 | else { | |
650 | - | func | |
709 | + | func cJ (cK) = valueOrErrorMessage(assetInfo(valueOrErrorMessage(fromBase58String(cK), ("fromBase58String: " + cK))), ("assetInfo: " + cK)).decimals | |
651 | 710 | ||
652 | - | func U (V, | |
711 | + | func U (V,cK) = $Tuple3((V._1 + 1), (V._2 :+ 0), (V._3 :+ pow(10, 0, cJ(cK), 0, 0, DOWN))) | |
653 | 712 | ||
654 | - | let | |
655 | - | let X = | |
713 | + | let cL = { | |
714 | + | let X = cH | |
656 | 715 | let Y = size(X) | |
657 | 716 | let Z = $Tuple3(0, nil, nil) | |
658 | 717 | func aa (ab,ac) = if ((ac >= Y)) | |
665 | 724 | ||
666 | 725 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
667 | 726 | } | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | [StringEntry("coins", | |
727 | + | let cM = cL._1 | |
728 | + | let cN = cL._2 | |
729 | + | let cO = cL._3 | |
730 | + | let cP = Issue(cE, ("LP token for " + cD), 0, d, true) | |
731 | + | let cQ = toBase58String(calculateAssetId(cP)) | |
732 | + | [StringEntry("coins", cD), StringEntry("rates", makeString(S(cO), ",")), StringEntry("balances", makeString(S(cN), ",")), IntegerEntry("N_COINS", cM), IntegerEntry("initial_A", cF), IntegerEntry("future_A", cF), IntegerEntry("fee", bv), IntegerEntry("admin_fee", cG), StringEntry("owner", av(cC)), IntegerEntry("kill_deadline", (height + J)), StringEntry("token", cQ), BooleanEntry("is_killed", false), BooleanEntry("is_auto_fees", true), cP] | |
674 | 733 | } | |
675 | 734 | } | |
676 | 735 | } | |
677 | 736 | ||
678 | 737 | ||
679 | 738 | ||
680 | - | @Callable( | |
681 | - | func add_liquidity ( | |
739 | + | @Callable(cB) | |
740 | + | func add_liquidity (cR) = if (Q(!(H))) | |
682 | 741 | then throw("is killed") | |
683 | 742 | else { | |
684 | - | let aH = ax() | |
685 | - | let cx = w | |
686 | - | let bx = if ((cx == 0)) | |
687 | - | then 0 | |
688 | - | else aF(ao(af), aH) | |
689 | - | func cy (cz,cA,cB) = { | |
690 | - | func U (V,al) = (V :+ (cz[al] + (if ((al == cA)) | |
691 | - | then cB | |
743 | + | func cS (cT,cU,cV) = { | |
744 | + | func U (V,al) = (V :+ (cT[al] + (if ((al == cU)) | |
745 | + | then cV | |
692 | 746 | else 0))) | |
693 | 747 | ||
694 | 748 | let X = am | |
705 | 759 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
706 | 760 | } | |
707 | 761 | ||
708 | - | func | |
709 | - | let ak = size( | |
762 | + | func cW (cT,cX) = { | |
763 | + | let ak = size(cX) | |
710 | 764 | if ((1 > ak)) | |
711 | 765 | then throw("payments size < 1") | |
712 | 766 | else if ((ak > c)) | |
713 | 767 | then throw("payments size > N_COINS_MAX") | |
714 | 768 | else { | |
715 | - | func U (V,aq) = | |
769 | + | func U (V,aq) = cS(V, ap(aq), aq.amount) | |
716 | 770 | ||
717 | - | let X = | |
771 | + | let X = cX | |
718 | 772 | let Y = size(X) | |
719 | - | let Z = | |
773 | + | let Z = cT | |
720 | 774 | func aa (ab,ac) = if ((ac >= Y)) | |
721 | 775 | then ab | |
722 | 776 | else U(ab, X[ac]) | |
729 | 783 | } | |
730 | 784 | } | |
731 | 785 | ||
732 | - | let | |
733 | - | if (if (( | |
734 | - | then (min( | |
786 | + | let ch = cW(af, cB.payments) | |
787 | + | if (if ((w == 0)) | |
788 | + | then (min(ch) == 0) | |
735 | 789 | else false) | |
736 | 790 | then throw("initial deposit requires all coins") | |
737 | 791 | else { | |
738 | - | let by = aF(ao(cE), aH) | |
739 | - | if (Q((by > bx))) | |
740 | - | then throw("D1 > D0") | |
741 | - | else { | |
742 | - | let cF = if ((cx > 0)) | |
743 | - | then { | |
744 | - | func cG (cH,cI) = { | |
745 | - | let bw = ((r * a) / (4 * (a - 1))) | |
746 | - | let ak = size(cH) | |
747 | - | func U (V,al) = { | |
748 | - | let cJ = cH[al] | |
749 | - | let cK = cI[al] | |
750 | - | let cL = fraction(by, cJ, bx) | |
751 | - | let cM = if ((cL > cK)) | |
752 | - | then (cL - cK) | |
753 | - | else (cK - cL) | |
754 | - | let cN = fraction(bw, cM, f) | |
755 | - | let cO = fraction(cN, s, f) | |
756 | - | $Tuple4((V._1 :+ (cK - cO)), (V._2 :+ (cK - cN)), if (if (t) | |
757 | - | then (cO > 0) | |
758 | - | else false) | |
759 | - | then (V._3 :+ ScriptTransfer(u, cO, fromBase58String(q[al]))) | |
760 | - | else V._3, (V._4 + fraction(cN, e, ag[al]))) | |
761 | - | } | |
762 | - | ||
763 | - | let X = am | |
764 | - | let Y = size(X) | |
765 | - | let Z = $Tuple4(nil, nil, nil, 0) | |
766 | - | func aa (ab,ac) = if ((ac >= Y)) | |
767 | - | then ab | |
768 | - | else U(ab, X[ac]) | |
769 | - | ||
770 | - | func ad (ab,ac) = if ((ac >= Y)) | |
771 | - | then ab | |
772 | - | else throw("List size exceeds 10") | |
773 | - | ||
774 | - | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
775 | - | } | |
776 | - | ||
777 | - | let cP = cG(af, cE) | |
778 | - | let cQ = cP._1 | |
779 | - | let cR = cP._2 | |
780 | - | let cS = cP._3 | |
781 | - | let cT = cP._4 | |
782 | - | $Tuple3(cQ, aF(ao(cR), aH), (cS ++ bH(bx, fraction(cT, f, r)))) | |
783 | - | } | |
784 | - | else $Tuple3(cE, by, nil) | |
785 | - | let cU = cF._1 | |
786 | - | let cV = cF._2 | |
787 | - | let cW = cF._3 | |
788 | - | let cX = if ((cx == 0)) | |
789 | - | then by | |
790 | - | else fraction(cx, (cV - bx), bx) | |
791 | - | if (Q((cX >= cw))) | |
792 | - | then throw("slippage screwed you") | |
793 | - | else ([StringEntry("balances", makeString(S(cU), ",")), Reissue(v, cX, true), ScriptTransfer(ch.caller, cX, v)] ++ cW) | |
794 | - | } | |
792 | + | let cY = cg(ch) | |
793 | + | let cx = cY._1 | |
794 | + | let cA = cY._2 | |
795 | + | let cz = cY._3 | |
796 | + | if (Q((cA >= cR))) | |
797 | + | then throw("slippage screwed you") | |
798 | + | else ([StringEntry("balances", makeString(S(cx), ",")), Reissue(v, cA, true), ScriptTransfer(cB.caller, cA, v)] ++ cz) | |
795 | 799 | } | |
796 | 800 | } | |
797 | 801 | ||
798 | 802 | ||
799 | 803 | ||
800 | - | @Callable( | |
801 | - | func get_dy (au, | |
802 | - | let | |
803 | - | let | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
811 | - | $Tuple2(nil, | |
804 | + | @Callable(cB) | |
805 | + | func get_dy (au,aX,cZ) = { | |
806 | + | let da = af[au] | |
807 | + | let bA = af[aX] | |
808 | + | let aY = (da + cZ) | |
809 | + | let db = aW(au, aX, aY, ao(af)) | |
810 | + | let bl = db._1 | |
811 | + | let aT = db._2 | |
812 | + | let dc = ((bA - bl) - 1) | |
813 | + | let dd = fraction(dc, r, f) | |
814 | + | let bE = (dc - dd) | |
815 | + | $Tuple2(nil, bE) | |
812 | 816 | } | |
813 | 817 | ||
814 | 818 | ||
815 | 819 | ||
816 | - | @Callable( | |
817 | - | func exchange ( | |
820 | + | @Callable(cB) | |
821 | + | func exchange (aX,de) = if (Q(!(H))) | |
818 | 822 | then throw("is killed") | |
819 | - | else if ((size( | |
823 | + | else if ((size(cB.payments) != 1)) | |
820 | 824 | then throw("size( payments ) != 1") | |
821 | 825 | else { | |
822 | - | let aq = | |
823 | - | let | |
826 | + | let aq = cB.payments[0] | |
827 | + | let cZ = aq.amount | |
824 | 828 | let au = ap(aq) | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | let | |
833 | - | let | |
834 | - | if (Q(( | |
829 | + | let da = af[au] | |
830 | + | let bA = af[aX] | |
831 | + | let aY = (da + cZ) | |
832 | + | let df = aW(au, aX, aY, ao(af)) | |
833 | + | let bl = df._1 | |
834 | + | let aT = df._2 | |
835 | + | let dc = ((bA - bl) - 1) | |
836 | + | let dd = fraction(dc, r, f) | |
837 | + | let bE = (dc - dd) | |
838 | + | if (Q((bE >= de))) | |
835 | 839 | then throw("exchange resulted in fewer coins than expected") | |
836 | 840 | else { | |
837 | - | let | |
841 | + | let dg = fraction(dd, s, f) | |
838 | 842 | func U (V,al) = (V :+ (if ((al == au)) | |
839 | - | then (af[al] + | |
840 | - | else if ((al == | |
841 | - | then ((af[al] - | |
843 | + | then (af[al] + cZ) | |
844 | + | else if ((al == aX)) | |
845 | + | then ((af[al] - bE) - dg) | |
842 | 846 | else af[al])) | |
843 | 847 | ||
844 | - | let | |
848 | + | let cx = { | |
845 | 849 | let X = am | |
846 | 850 | let Y = size(X) | |
847 | 851 | let Z = nil | |
855 | 859 | ||
856 | 860 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
857 | 861 | } | |
858 | - | let | |
859 | - | $Tuple2((([StringEntry("balances", makeString(S( | |
860 | - | then ( | |
862 | + | let dh = fromBase58String(q[aX]) | |
863 | + | $Tuple2((([StringEntry("balances", makeString(S(cx), ",")), ScriptTransfer(cB.caller, bE, dh)] ++ (if (if (t) | |
864 | + | then (dg > 0) | |
861 | 865 | else false) | |
862 | - | then [ScriptTransfer(u, | |
863 | - | else nil)) ++ | |
866 | + | then [ScriptTransfer(u, dg, dh)] | |
867 | + | else nil)) ++ bG(aT, fraction(cZ, e, ag[au]))), bE) | |
864 | 868 | } | |
865 | 869 | } | |
866 | 870 | ||
867 | 871 | ||
868 | 872 | ||
869 | - | @Callable( | |
870 | - | func remove_liquidity ( | |
873 | + | @Callable(cB) | |
874 | + | func remove_liquidity (di) = if ((size(cB.payments) != 1)) | |
871 | 875 | then throw("size( payments ) != 1") | |
872 | 876 | else { | |
873 | - | let aq = | |
877 | + | let aq = cB.payments[0] | |
874 | 878 | if ((aq.assetId != v)) | |
875 | 879 | then throw("unknown token") | |
876 | 880 | else { | |
877 | - | let | |
881 | + | let dj = if ((di == "0")) | |
878 | 882 | then nil | |
879 | - | else ae(split( | |
880 | - | if (if (( | |
881 | - | then (size( | |
883 | + | else ae(split(di, ",")) | |
884 | + | if (if ((di != "0")) | |
885 | + | then (size(dj) != a) | |
882 | 886 | else false) | |
883 | 887 | then throw("min_amounts.size() != N_COINS") | |
884 | 888 | else { | |
885 | - | let | |
886 | - | let | |
889 | + | let cV = aq.amount | |
890 | + | let dk = cB.caller | |
887 | 891 | func U (V,al) = { | |
888 | - | let | |
889 | - | let | |
890 | - | if (if (( | |
891 | - | then ( | |
892 | + | let dl = af[al] | |
893 | + | let dm = fraction(dl, cV, w) | |
894 | + | if (if ((di != "0")) | |
895 | + | then (dj[al] > dm) | |
892 | 896 | else false) | |
893 | 897 | then throw("withdrawal resulted in fewer coins than expected") | |
894 | - | else $Tuple2((V._1 :+ ScriptTransfer( | |
898 | + | else $Tuple2((V._1 :+ ScriptTransfer(dk, dm, fromBase58String(q[al]))), (V._2 :+ (dl - dm))) | |
895 | 899 | } | |
896 | 900 | ||
897 | - | let | |
901 | + | let dn = { | |
898 | 902 | let X = am | |
899 | 903 | let Y = size(X) | |
900 | 904 | let Z = $Tuple2(nil, nil) | |
908 | 912 | ||
909 | 913 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
910 | 914 | } | |
911 | - | let | |
912 | - | let | |
913 | - | ( | |
915 | + | let do = dn._1 | |
916 | + | let cx = dn._2 | |
917 | + | (do ++ [StringEntry("balances", makeString(S(cx), ",")), Burn(v, cV)]) | |
914 | 918 | } | |
915 | 919 | } | |
916 | 920 | } | |
917 | 921 | ||
918 | 922 | ||
919 | 923 | ||
920 | - | @Callable( | |
921 | - | func calc_withdraw_one_coin ( | |
924 | + | @Callable(cB) | |
925 | + | func calc_withdraw_one_coin (bu,au) = $Tuple2(nil, bt(bu, au)._1) | |
922 | 926 | ||
923 | 927 | ||
924 | 928 | ||
925 | - | @Callable( | |
926 | - | func remove_liquidity_one_coin (au, | |
929 | + | @Callable(cB) | |
930 | + | func remove_liquidity_one_coin (au,dp) = if (Q(!(H))) | |
927 | 931 | then throw("is killed") | |
928 | - | else if ((size( | |
932 | + | else if ((size(cB.payments) != 1)) | |
929 | 933 | then throw("size( payments ) != 1") | |
930 | 934 | else { | |
931 | - | let aq = | |
935 | + | let aq = cB.payments[0] | |
932 | 936 | if ((aq.assetId != v)) | |
933 | 937 | then throw("unknown token") | |
934 | 938 | else { | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | let | |
940 | - | if (Q(( | |
939 | + | let bu = aq.amount | |
940 | + | let dq = bt(bu, au) | |
941 | + | let bE = dq._1 | |
942 | + | let dd = dq._2 | |
943 | + | let aT = dq._3 | |
944 | + | if (Q((bE >= dp))) | |
941 | 945 | then throw("not enough coins removed") | |
942 | 946 | else { | |
943 | - | let | |
944 | - | let | |
947 | + | let dg = fraction(dd, s, f) | |
948 | + | let dr = (bE + dg) | |
945 | 949 | func U (V,al) = (V :+ (af[al] - (if ((al == au)) | |
946 | - | then | |
950 | + | then dr | |
947 | 951 | else 0))) | |
948 | 952 | ||
949 | - | let | |
953 | + | let cx = { | |
950 | 954 | let X = am | |
951 | 955 | let Y = size(X) | |
952 | 956 | let Z = nil | |
960 | 964 | ||
961 | 965 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
962 | 966 | } | |
963 | - | let | |
964 | - | $Tuple2((([StringEntry("balances", makeString(S( | |
965 | - | then ( | |
967 | + | let dh = fromBase58String(q[au]) | |
968 | + | $Tuple2((([StringEntry("balances", makeString(S(cx), ",")), ScriptTransfer(cB.caller, bE, dh), Burn(v, bu)] ++ (if (if (t) | |
969 | + | then (dg > 0) | |
966 | 970 | else false) | |
967 | - | then [ScriptTransfer(u, | |
968 | - | else nil)) ++ | |
971 | + | then [ScriptTransfer(u, dg, dh)] | |
972 | + | else nil)) ++ bG(aT, fraction(fraction(dd, e, ag[au]), f, r))), bE) | |
969 | 973 | } | |
970 | 974 | } | |
971 | 975 | } | |
972 | 976 | ||
973 | 977 | ||
974 | 978 | ||
975 | - | @Callable( | |
976 | - | func A () = $Tuple2(nil, ax | |
979 | + | @Callable(cB) | |
980 | + | func A () = $Tuple2(nil, ax) | |
977 | 981 | ||
978 | 982 | ||
979 | 983 | ||
980 | - | @Callable( | |
984 | + | @Callable(cB) | |
981 | 985 | func get_virtual_price () = { | |
982 | - | let | |
983 | - | $Tuple2(nil, | |
986 | + | let aT = aF(ao(af), ax) | |
987 | + | $Tuple2(nil, bF(aT)) | |
984 | 988 | } | |
985 | 989 | ||
986 | 990 | ||
987 | 991 | ||
988 | - | @Callable( | |
989 | - | func calc_token_amount ( | |
990 | - | let dt = ae(split( | |
992 | + | @Callable(cB) | |
993 | + | func calc_token_amount (ds) = { | |
994 | + | let dt = ae(split(ds, ",")) | |
991 | 995 | if ((size(dt) != a)) | |
992 | 996 | then throw("not enought amounts") | |
993 | 997 | else { | |
994 | - | let aH = ax() | |
995 | - | let bx = aF(ao(dt), aH) | |
996 | - | func U (V,al) = (V :+ (af[al] + (if (ds) | |
997 | - | then dt[al] | |
998 | - | else -(dt[al])))) | |
998 | + | func U (V,al) = (V :+ (af[al] + dt[al])) | |
999 | 999 | ||
1000 | - | let | |
1000 | + | let ch = { | |
1001 | 1001 | let X = am | |
1002 | 1002 | let Y = size(X) | |
1003 | 1003 | let Z = nil | |
1011 | 1011 | ||
1012 | 1012 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1013 | 1013 | } | |
1014 | - | let by = aF(ao(cE), aH) | |
1015 | - | let du = w | |
1016 | - | let dv = if (ds) | |
1017 | - | then (by - bx) | |
1018 | - | else (bx - by) | |
1019 | - | $Tuple2(nil, fraction(dv, du, bx)) | |
1014 | + | let du = cg(ch) | |
1015 | + | let cx = du._1 | |
1016 | + | let cA = du._2 | |
1017 | + | let cz = du._3 | |
1018 | + | $Tuple2(nil, cA) | |
1020 | 1019 | } | |
1021 | 1020 | } | |
1022 | 1021 | ||
1023 | 1022 | ||
1024 | 1023 | ||
1025 | - | @Callable( | |
1026 | - | func ramp_A (dw | |
1024 | + | @Callable(cB) | |
1025 | + | func ramp_A (dv,dw) = if (Q((cB.caller == u))) | |
1027 | 1026 | then throw("only owner") | |
1028 | 1027 | else if (Q((P >= (z + n)))) | |
1029 | 1028 | then throw("too often") | |
1030 | - | else if (Q(( | |
1029 | + | else if (Q((dw >= (P + n)))) | |
1031 | 1030 | then throw("insufficient time") | |
1032 | 1031 | else { | |
1033 | - | let | |
1034 | - | if (Q(if (( | |
1035 | - | then (k > | |
1032 | + | let dx = ax | |
1033 | + | if (Q(if ((dv > 0)) | |
1034 | + | then (k > dv) | |
1036 | 1035 | else false)) | |
1037 | 1036 | then throw("out of base range") | |
1038 | - | else if (Q(if (if (( | |
1039 | - | then (( | |
1037 | + | else if (Q(if (if ((dv >= dx)) | |
1038 | + | then ((dx * l) >= dv) | |
1040 | 1039 | else false) | |
1041 | 1040 | then true | |
1042 | - | else if (( | |
1043 | - | then (( | |
1041 | + | else if ((dx > dv)) | |
1042 | + | then ((dv * l) >= dx) | |
1044 | 1043 | else false)) | |
1045 | 1044 | then throw("out of range") | |
1046 | - | else [IntegerEntry("initial_A", | |
1045 | + | else [IntegerEntry("initial_A", dx), IntegerEntry("future_A", dv), IntegerEntry("initial_A_time", P), IntegerEntry("future_A_time", dw)] | |
1047 | 1046 | } | |
1048 | 1047 | ||
1049 | 1048 | ||
1050 | 1049 | ||
1051 | - | @Callable( | |
1052 | - | func stop_ramp_A () = if (Q(( | |
1050 | + | @Callable(cB) | |
1051 | + | func stop_ramp_A () = if (Q((cB.caller == u))) | |
1053 | 1052 | then throw("only owner") | |
1054 | 1053 | else { | |
1055 | - | let | |
1056 | - | [IntegerEntry("initial_A", | |
1054 | + | let dy = ax | |
1055 | + | [IntegerEntry("initial_A", dy), IntegerEntry("future_A", dy), IntegerEntry("initial_A_time", P), IntegerEntry("future_A_time", P)] | |
1057 | 1056 | } | |
1058 | 1057 | ||
1059 | 1058 | ||
1060 | 1059 | ||
1061 | - | @Callable( | |
1062 | - | func commit_new_fee (dA | |
1060 | + | @Callable(cB) | |
1061 | + | func commit_new_fee (dz,dA) = if (Q((cB.caller == u))) | |
1063 | 1062 | then throw("only owner") | |
1064 | 1063 | else if (Q((C == 0))) | |
1065 | 1064 | then throw("active action") | |
1066 | - | else if (Q((j >= | |
1065 | + | else if (Q((j >= dz))) | |
1067 | 1066 | then throw("fee exceeds maximum") | |
1068 | - | else if (Q((i >= | |
1067 | + | else if (Q((i >= dA))) | |
1069 | 1068 | then throw("admin fee exceeds maximum") | |
1070 | 1069 | else { | |
1071 | - | let | |
1072 | - | [IntegerEntry("admin_actions_deadline", | |
1070 | + | let dB = (P + m) | |
1071 | + | [IntegerEntry("admin_actions_deadline", dB), IntegerEntry("future_fee", dz), IntegerEntry("future_admin_fee", dA)] | |
1073 | 1072 | } | |
1074 | 1073 | ||
1075 | 1074 | ||
1076 | 1075 | ||
1077 | - | @Callable( | |
1078 | - | func apply_new_fee () = if (Q(( | |
1076 | + | @Callable(cB) | |
1077 | + | func apply_new_fee () = if (Q((cB.caller == u))) | |
1079 | 1078 | then throw("only owner") | |
1080 | 1079 | else if (Q((P >= C))) | |
1081 | 1080 | then throw("insufficient time") | |
1085 | 1084 | ||
1086 | 1085 | ||
1087 | 1086 | ||
1088 | - | @Callable( | |
1089 | - | func revert_new_parameters () = if (Q(( | |
1087 | + | @Callable(cB) | |
1088 | + | func revert_new_parameters () = if (Q((cB.caller == u))) | |
1090 | 1089 | then throw("only owner") | |
1091 | 1090 | else [IntegerEntry("admin_actions_deadline", 0)] | |
1092 | 1091 | ||
1093 | 1092 | ||
1094 | 1093 | ||
1095 | - | @Callable( | |
1096 | - | func commit_transfer_ownership ( | |
1094 | + | @Callable(cB) | |
1095 | + | func commit_transfer_ownership (cC) = if (Q((cB.caller == u))) | |
1097 | 1096 | then throw("only owner") | |
1098 | 1097 | else if (Q((D == 0))) | |
1099 | 1098 | then throw("active transfer") | |
1100 | 1099 | else { | |
1101 | - | let | |
1102 | - | [IntegerEntry("transfer_ownership_deadline", | |
1100 | + | let dB = (P + m) | |
1101 | + | [IntegerEntry("transfer_ownership_deadline", dB), StringEntry("future_owner", av(cC))] | |
1103 | 1102 | } | |
1104 | 1103 | ||
1105 | 1104 | ||
1106 | 1105 | ||
1107 | - | @Callable( | |
1108 | - | func apply_transfer_ownership () = if (Q(( | |
1106 | + | @Callable(cB) | |
1107 | + | func apply_transfer_ownership () = if (Q((cB.caller == u))) | |
1109 | 1108 | then throw("only owner") | |
1110 | 1109 | else if (Q((P >= D))) | |
1111 | 1110 | then throw("insufficient time") | |
1115 | 1114 | ||
1116 | 1115 | ||
1117 | 1116 | ||
1118 | - | @Callable( | |
1119 | - | func revert_transfer_ownership () = if (Q(( | |
1117 | + | @Callable(cB) | |
1118 | + | func revert_transfer_ownership () = if (Q((cB.caller == u))) | |
1120 | 1119 | then throw("only owner") | |
1121 | 1120 | else [IntegerEntry("transfer_ownership_deadline", 0)] | |
1122 | 1121 | ||
1123 | 1122 | ||
1124 | 1123 | ||
1125 | - | @Callable( | |
1124 | + | @Callable(cB) | |
1126 | 1125 | func admin_balances (au) = $Tuple2(nil, at(au)) | |
1127 | 1126 | ||
1128 | 1127 | ||
1129 | 1128 | ||
1130 | - | @Callable( | |
1131 | - | func withdraw_admin_fees () = if (Q(( | |
1129 | + | @Callable(cB) | |
1130 | + | func withdraw_admin_fees () = if (Q((cB.caller == u))) | |
1132 | 1131 | then throw("only owner") | |
1133 | 1132 | else { | |
1134 | 1133 | func U (V,al) = (V :+ ScriptTransfer(u, at(al), fromBase58String(q[al]))) | |
1149 | 1148 | ||
1150 | 1149 | ||
1151 | 1150 | ||
1152 | - | @Callable( | |
1153 | - | func donate_admin_fees () = if (Q(( | |
1151 | + | @Callable(cB) | |
1152 | + | func donate_admin_fees () = if (Q((cB.caller == u))) | |
1154 | 1153 | then throw("only owner") | |
1155 | 1154 | else { | |
1156 | 1155 | func U (V,al) = (V :+ (af[al] + at(al))) | |
1157 | 1156 | ||
1158 | - | let | |
1157 | + | let ch = { | |
1159 | 1158 | let X = am | |
1160 | 1159 | let Y = size(X) | |
1161 | 1160 | let Z = nil | |
1169 | 1168 | ||
1170 | 1169 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1171 | 1170 | } | |
1172 | - | [StringEntry("balances", makeString(S( | |
1171 | + | [StringEntry("balances", makeString(S(ch), ","))] | |
1173 | 1172 | } | |
1174 | 1173 | ||
1175 | 1174 | ||
1176 | 1175 | ||
1177 | - | @Callable( | |
1178 | - | func set_auto_fees ( | |
1176 | + | @Callable(cB) | |
1177 | + | func set_auto_fees (dC) = if (Q((cB.caller == u))) | |
1179 | 1178 | then throw("only owner") | |
1180 | - | else [BooleanEntry("is_auto_fees", | |
1179 | + | else [BooleanEntry("is_auto_fees", dC)] | |
1181 | 1180 | ||
1182 | 1181 | ||
1183 | 1182 | ||
1184 | - | @Callable( | |
1185 | - | func kill_me () = if (Q(( | |
1183 | + | @Callable(cB) | |
1184 | + | func kill_me () = if (Q((cB.caller == u))) | |
1186 | 1185 | then throw("only owner") | |
1187 | 1186 | else if (Q((I > P))) | |
1188 | 1187 | then throw("deadline has passed") | |
1190 | 1189 | ||
1191 | 1190 | ||
1192 | 1191 | ||
1193 | - | @Callable( | |
1194 | - | func unkill_me () = if (Q(( | |
1192 | + | @Callable(cB) | |
1193 | + | func unkill_me () = if (Q((cB.caller == u))) | |
1195 | 1194 | then throw("only owner") | |
1196 | 1195 | else [BooleanEntry("is_killed", false)] | |
1197 | 1196 | ||
1198 | 1197 | ||
1199 | 1198 | ||
1200 | - | @Callable( | |
1201 | - | func set_height_address ( | |
1199 | + | @Callable(cB) | |
1200 | + | func set_height_address (dD) = if ((cB.caller != u)) | |
1202 | 1201 | then throw("only owner") | |
1203 | - | else [StringEntry("heightAddress", av( | |
1202 | + | else [StringEntry("heightAddress", av(dD))] | |
1204 | 1203 | ||
1205 | 1204 | ||
1206 | 1205 | ||
1207 | 1206 | @Callable(au) | |
1208 | - | func set_verifier ( | |
1207 | + | func set_verifier (dE) = if ((au.caller != this)) | |
1209 | 1208 | then throw("self call only") | |
1210 | 1209 | else { | |
1211 | - | let | |
1212 | - | let ar = addressFromString( | |
1210 | + | let dF = { | |
1211 | + | let ar = addressFromString(dE) | |
1213 | 1212 | if ($isInstanceOf(ar, "Address")) | |
1214 | 1213 | then { | |
1215 | 1214 | let R = ar | |
1217 | 1216 | } | |
1218 | 1217 | else false | |
1219 | 1218 | } | |
1220 | - | if (!( | |
1221 | - | then throw(("verifier wrong address " + | |
1219 | + | if (!(dF)) | |
1220 | + | then throw(("verifier wrong address " + dE)) | |
1222 | 1221 | else if (isDefined(getString(this, "verifier"))) | |
1223 | 1222 | then throw("verifier already defined") | |
1224 | - | else [StringEntry("verifier", | |
1223 | + | else [StringEntry("verifier", dE)] | |
1225 | 1224 | } | |
1226 | 1225 | ||
1227 | 1226 | ||
1228 | - | @Verifier( | |
1229 | - | func | |
1227 | + | @Verifier(dG) | |
1228 | + | func dH () = { | |
1230 | 1229 | let ar = getString(this, "verifier") | |
1231 | 1230 | if ($isInstanceOf(ar, "String")) | |
1232 | 1231 | then { | |
1233 | - | let | |
1234 | - | valueOrElse(getBoolean(addressFromStringValue( | |
1232 | + | let dE = ar | |
1233 | + | valueOrElse(getBoolean(addressFromStringValue(dE), ((("status_" + toString(this)) + "_") + toBase58String(dG.id))), false) | |
1235 | 1234 | } | |
1236 | - | else sigVerify( | |
1235 | + | else sigVerify(dG.bodyBytes, dG.proofs[0], dG.senderPublicKey) | |
1237 | 1236 | } | |
1238 | 1237 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = getIntegerValue(this, "N_COINS") | |
5 | 5 | ||
6 | 6 | let b = toBigInt(a) | |
7 | 7 | ||
8 | 8 | let c = 10 | |
9 | 9 | ||
10 | 10 | let d = 6 | |
11 | 11 | ||
12 | 12 | let e = 1000000 | |
13 | 13 | ||
14 | 14 | let f = 10000000000 | |
15 | 15 | ||
16 | 16 | let g = 1000000 | |
17 | 17 | ||
18 | 18 | let h = 6 | |
19 | 19 | ||
20 | 20 | let i = 10000000000 | |
21 | 21 | ||
22 | 22 | let j = 5000000000 | |
23 | 23 | ||
24 | 24 | let k = 1000000 | |
25 | 25 | ||
26 | 26 | let l = 10 | |
27 | 27 | ||
28 | 28 | let m = ((3 * 86400) / 60) | |
29 | 29 | ||
30 | 30 | let n = (86400 / 60) | |
31 | 31 | ||
32 | 32 | let o = 86400000 | |
33 | 33 | ||
34 | 34 | let p = 1000000000000 | |
35 | 35 | ||
36 | 36 | let q = split(getStringValue(this, "coins"), ",") | |
37 | 37 | ||
38 | 38 | let r = getIntegerValue(this, "fee") | |
39 | 39 | ||
40 | 40 | let s = getIntegerValue(this, "admin_fee") | |
41 | 41 | ||
42 | 42 | let t = getBooleanValue(this, "is_auto_fees") | |
43 | 43 | ||
44 | 44 | let u = addressFromStringValue(getStringValue(this, "owner")) | |
45 | 45 | ||
46 | 46 | let v = fromBase58String(getStringValue(this, "token")) | |
47 | 47 | ||
48 | 48 | let w = value(assetInfo(v)).quantity | |
49 | 49 | ||
50 | 50 | let x = getIntegerValue(this, "initial_A") | |
51 | 51 | ||
52 | 52 | let y = getIntegerValue(this, "future_A") | |
53 | 53 | ||
54 | 54 | let z = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
55 | 55 | ||
56 | 56 | let B = valueOrElse(getInteger(this, "future_A_time"), 0) | |
57 | 57 | ||
58 | 58 | let C = valueOrElse(getInteger(this, "admin_actions_deadline"), 0) | |
59 | 59 | ||
60 | 60 | let D = valueOrElse(getInteger(this, "transfer_ownership_deadline"), 0) | |
61 | 61 | ||
62 | 62 | let E = getIntegerValue(this, "future_fee") | |
63 | 63 | ||
64 | 64 | let F = getIntegerValue(this, "future_admin_fee") | |
65 | 65 | ||
66 | 66 | let G = getStringValue(this, "future_owner") | |
67 | 67 | ||
68 | 68 | let H = getBooleanValue(this, "is_killed") | |
69 | 69 | ||
70 | 70 | let I = getIntegerValue(this, "kill_deadline") | |
71 | 71 | ||
72 | 72 | let J = (((2 * 30) * 86400) / 60) | |
73 | 73 | ||
74 | 74 | let K = toBigInt(0) | |
75 | 75 | ||
76 | 76 | let L = toBigInt(1) | |
77 | 77 | ||
78 | 78 | let M = toBigInt(2) | |
79 | 79 | ||
80 | 80 | let N = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, "heightAddress"), "no settings defined")), "bad settings address") | |
81 | 81 | ||
82 | 82 | let O = height | |
83 | 83 | ||
84 | 84 | let P = O | |
85 | 85 | ||
86 | 86 | func Q (R) = if (R) | |
87 | 87 | then false | |
88 | 88 | else true | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func S (T) = if ((size(T) > c)) | |
92 | 92 | then throw("list_itos: list.size() > N_COINS_MAX") | |
93 | 93 | else { | |
94 | 94 | func U (V,W) = (V :+ toString(W)) | |
95 | 95 | ||
96 | 96 | let X = T | |
97 | 97 | let Y = size(X) | |
98 | 98 | let Z = nil | |
99 | 99 | func aa (ab,ac) = if ((ac >= Y)) | |
100 | 100 | then ab | |
101 | 101 | else U(ab, X[ac]) | |
102 | 102 | ||
103 | 103 | func ad (ab,ac) = if ((ac >= Y)) | |
104 | 104 | then ab | |
105 | 105 | else throw("List size exceeds 10") | |
106 | 106 | ||
107 | 107 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func ae (T) = if ((size(T) > c)) | |
112 | 112 | then throw("list_stoi: list.size() > N_COINS_MAX") | |
113 | 113 | else { | |
114 | 114 | func U (V,W) = (V :+ parseIntValue(W)) | |
115 | 115 | ||
116 | 116 | let X = T | |
117 | 117 | let Y = size(X) | |
118 | 118 | let Z = nil | |
119 | 119 | func aa (ab,ac) = if ((ac >= Y)) | |
120 | 120 | then ab | |
121 | 121 | else U(ab, X[ac]) | |
122 | 122 | ||
123 | 123 | func ad (ab,ac) = if ((ac >= Y)) | |
124 | 124 | then ab | |
125 | 125 | else throw("List size exceeds 10") | |
126 | 126 | ||
127 | 127 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | let af = ae(split(getStringValue(this, "balances"), ",")) | |
132 | 132 | ||
133 | 133 | let ag = ae(split(getStringValue(this, "rates"), ",")) | |
134 | 134 | ||
135 | 135 | let ah = size(ag) | |
136 | 136 | ||
137 | 137 | let ai = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
138 | 138 | ||
139 | 139 | func aj (ak) = if ((ak > c)) | |
140 | 140 | then throw("index_n: n > N_COINS_MAX") | |
141 | 141 | else { | |
142 | 142 | func U (V,al) = if ((ak > al)) | |
143 | 143 | then (V :+ al) | |
144 | 144 | else V | |
145 | 145 | ||
146 | 146 | let X = ai | |
147 | 147 | let Y = size(X) | |
148 | 148 | let Z = nil | |
149 | 149 | func aa (ab,ac) = if ((ac >= Y)) | |
150 | 150 | then ab | |
151 | 151 | else U(ab, X[ac]) | |
152 | 152 | ||
153 | 153 | func ad (ab,ac) = if ((ac >= Y)) | |
154 | 154 | then ab | |
155 | 155 | else throw("List size exceeds 10") | |
156 | 156 | ||
157 | 157 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
158 | 158 | } | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | let am = aj(a) | |
162 | 162 | ||
163 | 163 | let an = (am :+ a) | |
164 | 164 | ||
165 | 165 | func ao (T) = if ((size(T) != a)) | |
166 | 166 | then throw("big_list: list.size() != N_COINS") | |
167 | 167 | else { | |
168 | 168 | func U (V,al) = (V :+ toBigInt(fraction(T[al], e, ag[al]))) | |
169 | 169 | ||
170 | 170 | let X = am | |
171 | 171 | let Y = size(X) | |
172 | 172 | let Z = nil | |
173 | 173 | func aa (ab,ac) = if ((ac >= Y)) | |
174 | 174 | then ab | |
175 | 175 | else U(ab, X[ac]) | |
176 | 176 | ||
177 | 177 | func ad (ab,ac) = if ((ac >= Y)) | |
178 | 178 | then ab | |
179 | 179 | else throw("List size exceeds 10") | |
180 | 180 | ||
181 | 181 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func ap (aq) = { | |
186 | 186 | let ar = aq.assetId | |
187 | 187 | if ($isInstanceOf(ar, "ByteVector")) | |
188 | 188 | then { | |
189 | 189 | let as = ar | |
190 | 190 | valueOrErrorMessage(indexOf(q, toBase58String(as)), (toBase58String(as) + " out of pool")) | |
191 | 191 | } | |
192 | 192 | else throw("unsupported assetId") | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func at (au) = if (if ((0 > au)) | |
197 | 197 | then true | |
198 | 198 | else (au > a)) | |
199 | 199 | then throw("i out of index") | |
200 | 200 | else (assetBalance(this, fromBase58String(q[au])) - af[au]) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func av (aw) = { | |
204 | 204 | let R = addressFromStringValue(aw) | |
205 | 205 | toString(R) | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | - | ||
209 | + | let ax = { | |
210 | 210 | let ay = B | |
211 | 211 | let az = y | |
212 | 212 | if ((ay > P)) | |
213 | 213 | then { | |
214 | 214 | let aA = x | |
215 | 215 | let aB = z | |
216 | 216 | if ((az > aA)) | |
217 | 217 | then (aA + (((az - aA) * (P - aB)) / (ay - aB))) | |
218 | 218 | else (aA - (((aA - az) * (P - aB)) / (ay - aB))) | |
219 | 219 | } | |
220 | 220 | else az | |
221 | 221 | } | |
222 | - | ||
223 | 222 | ||
224 | 223 | func aC (T) = { | |
225 | 224 | func U (V,W) = (V + W) | |
226 | 225 | ||
227 | 226 | let X = T | |
228 | 227 | let Y = size(X) | |
229 | 228 | let Z = K | |
230 | 229 | func aa (ab,ac) = if ((ac >= Y)) | |
231 | 230 | then ab | |
232 | 231 | else U(ab, X[ac]) | |
233 | 232 | ||
234 | 233 | func ad (ab,ac) = if ((ac >= Y)) | |
235 | 234 | then ab | |
236 | 235 | else throw("List size exceeds 10") | |
237 | 236 | ||
238 | 237 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
239 | 238 | } | |
240 | 239 | ||
241 | 240 | ||
242 | 241 | func aD (T) = { | |
243 | 242 | func U (V,W) = fraction(fraction(V, W, L), b, L) | |
244 | 243 | ||
245 | 244 | let X = T | |
246 | 245 | let Y = size(X) | |
247 | 246 | let Z = L | |
248 | 247 | func aa (ab,ac) = if ((ac >= Y)) | |
249 | 248 | then ab | |
250 | 249 | else U(ab, X[ac]) | |
251 | 250 | ||
252 | 251 | func ad (ab,ac) = if ((ac >= Y)) | |
253 | 252 | then ab | |
254 | 253 | else throw("List size exceeds 10") | |
255 | 254 | ||
256 | 255 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
257 | 256 | } | |
258 | 257 | ||
259 | 258 | ||
260 | 259 | let aE = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
261 | 260 | ||
262 | - | func aF (aG, | |
263 | - | let | |
264 | - | if ((toInt( | |
261 | + | func aF (aG,ax) = { | |
262 | + | let aH = aC(aG) | |
263 | + | if ((toInt(aH) == 0)) | |
265 | 264 | then 0 | |
266 | 265 | else { | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | func | |
266 | + | let aI = (ax * a) | |
267 | + | let aJ = fraction(toBigInt(aI), aH, L) | |
268 | + | let aK = toBigInt((aI - 1)) | |
269 | + | let aL = aD(aG) | |
270 | + | let aM = (a + 1) | |
271 | + | let aN = toBigInt(aM) | |
272 | + | func aO (W) = { | |
274 | 273 | func U (V,al) = fraction(V, W, L) | |
275 | 274 | ||
276 | 275 | let X = an | |
277 | 276 | let Y = size(X) | |
278 | 277 | let Z = L | |
279 | 278 | func aa (ab,ac) = if ((ac >= Y)) | |
280 | 279 | then ab | |
281 | 280 | else U(ab, X[ac]) | |
282 | 281 | ||
283 | 282 | func ad (ab,ac) = if ((ac >= Y)) | |
284 | 283 | then ab | |
285 | 284 | else throw("List size exceeds 10") | |
286 | 285 | ||
287 | 286 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
288 | 287 | } | |
289 | 288 | ||
290 | - | func | |
289 | + | func aP (V,aQ) = if ((V._2 == true)) | |
291 | 290 | then V | |
292 | 291 | else { | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | if (( | |
297 | - | then if ((1 >= toInt(( | |
298 | - | then $Tuple2( | |
299 | - | else $Tuple2( | |
300 | - | else if ((1 >= toInt(( | |
301 | - | then $Tuple2( | |
302 | - | else $Tuple2( | |
292 | + | let aR = V._1 | |
293 | + | let aS = fraction(aO(aR), L, aL) | |
294 | + | let aT = fraction((aJ + fraction(b, aS, L)), aR, (fraction(aK, aR, L) + fraction(aN, aS, L))) | |
295 | + | if ((aT > aR)) | |
296 | + | then if ((1 >= toInt((aT - aR)))) | |
297 | + | then $Tuple2(aT, true) | |
298 | + | else $Tuple2(aT, false) | |
299 | + | else if ((1 >= toInt((aR - aT)))) | |
300 | + | then $Tuple2(aT, true) | |
301 | + | else $Tuple2(aT, false) | |
303 | 302 | } | |
304 | 303 | ||
305 | - | let | |
304 | + | let aU = { | |
306 | 305 | let X = aE | |
307 | 306 | let Y = size(X) | |
308 | - | let Z = $Tuple2( | |
307 | + | let Z = $Tuple2(aH, false) | |
309 | 308 | func aa (ab,ac) = if ((ac >= Y)) | |
310 | 309 | then ab | |
311 | - | else | |
310 | + | else aP(ab, X[ac]) | |
312 | 311 | ||
313 | 312 | func ad (ab,ac) = if ((ac >= Y)) | |
314 | 313 | then ab | |
315 | 314 | else throw("List size exceeds 16") | |
316 | 315 | ||
317 | 316 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
318 | 317 | } | |
319 | - | let | |
320 | - | let | |
321 | - | if (( | |
322 | - | then throw(("D_proc() not finished with " + toString( | |
323 | - | else toInt( | |
318 | + | let aT = aU._1 | |
319 | + | let aV = aU._2 | |
320 | + | if ((aV == false)) | |
321 | + | then throw(("D_proc() not finished with " + toString(aT))) | |
322 | + | else toInt(aT) | |
324 | 323 | } | |
325 | 324 | } | |
326 | 325 | ||
327 | 326 | ||
328 | - | func | |
327 | + | func aW (au,aX,aY,aG) = if (Q((au != aX))) | |
329 | 328 | then throw("same coin") | |
330 | - | else if (Q(if (( | |
329 | + | else if (Q(if ((aX >= 0)) | |
331 | 330 | then (au >= 0) | |
332 | 331 | else false)) | |
333 | 332 | then throw("below zero") | |
334 | - | else if (Q(if ((a > | |
333 | + | else if (Q(if ((a > aX)) | |
335 | 334 | then (a > au) | |
336 | 335 | else false)) | |
337 | 336 | then throw("above N_COINS") | |
338 | 337 | else { | |
339 | - | let aH = ax() | |
340 | - | let aU = aF(aG, aH) | |
341 | - | let ba = toBigInt(aU) | |
342 | - | let bb = toBigInt((aH * a)) | |
343 | - | func bc (V,al) = { | |
344 | - | let bd = V | |
345 | - | let be = bd._1 | |
346 | - | let bf = bd._2 | |
347 | - | let bg = if ((al == au)) | |
348 | - | then toBigInt(fraction(aZ, e, ag[al])) | |
338 | + | let aT = aF(aG, ax) | |
339 | + | let aZ = toBigInt(aT) | |
340 | + | let ba = toBigInt((ax * a)) | |
341 | + | func bb (V,al) = { | |
342 | + | let bc = V | |
343 | + | let bd = bc._1 | |
344 | + | let be = bc._2 | |
345 | + | let bf = if ((al == au)) | |
346 | + | then toBigInt(fraction(aY, e, ag[al])) | |
349 | 347 | else aG[al] | |
350 | - | if ((al != | |
351 | - | then $Tuple2(( | |
352 | - | else $Tuple2( | |
348 | + | if ((al != aX)) | |
349 | + | then $Tuple2((bd + bf), fraction(be, aZ, fraction(bf, b, L))) | |
350 | + | else $Tuple2(bd, be) | |
353 | 351 | } | |
354 | 352 | ||
355 | - | let | |
353 | + | let bg = { | |
356 | 354 | let X = am | |
357 | 355 | let Y = size(X) | |
358 | - | let Z = $Tuple2(K, | |
356 | + | let Z = $Tuple2(K, aZ) | |
359 | 357 | func aa (ab,ac) = if ((ac >= Y)) | |
360 | 358 | then ab | |
361 | - | else | |
359 | + | else bb(ab, X[ac]) | |
362 | 360 | ||
363 | 361 | func ad (ab,ac) = if ((ac >= Y)) | |
364 | 362 | then ab | |
365 | 363 | else throw("List size exceeds 10") | |
366 | 364 | ||
367 | 365 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
368 | 366 | } | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | let | |
373 | - | func | |
367 | + | let bd = bg._1 | |
368 | + | let bh = bg._2 | |
369 | + | let be = fraction(bh, aZ, fraction(ba, b, L)) | |
370 | + | let bi = ((bd + fraction(aZ, L, ba)) - aZ) | |
371 | + | func bj (V,aQ) = if ((V._2 == true)) | |
374 | 372 | then V | |
375 | 373 | else { | |
376 | - | let | |
377 | - | let | |
378 | - | if (( | |
379 | - | then if ((1 >= toInt(( | |
380 | - | then $Tuple2( | |
381 | - | else $Tuple2( | |
382 | - | else if ((1 >= toInt(( | |
383 | - | then $Tuple2( | |
384 | - | else $Tuple2( | |
374 | + | let bk = V._1 | |
375 | + | let bl = fraction((fraction(bk, bk, L) + be), L, (fraction(M, bk, L) + bi)) | |
376 | + | if ((bl > bk)) | |
377 | + | then if ((1 >= toInt((bl - bk)))) | |
378 | + | then $Tuple2(bl, true) | |
379 | + | else $Tuple2(bl, false) | |
380 | + | else if ((1 >= toInt((bk - bl)))) | |
381 | + | then $Tuple2(bl, true) | |
382 | + | else $Tuple2(bl, false) | |
385 | 383 | } | |
386 | 384 | ||
387 | - | let | |
385 | + | let bm = { | |
388 | 386 | let X = aE | |
389 | 387 | let Y = size(X) | |
390 | - | let Z = $Tuple2(ba, false) | |
388 | + | let Z = $Tuple2(aZ, false) | |
389 | + | func bn (ab,ac) = if ((ac >= Y)) | |
390 | + | then ab | |
391 | + | else bj(ab, X[ac]) | |
392 | + | ||
391 | 393 | func bo (ab,ac) = if ((ac >= Y)) | |
392 | - | then ab | |
393 | - | else bk(ab, X[ac]) | |
394 | - | ||
395 | - | func bp (ab,ac) = if ((ac >= Y)) | |
396 | 394 | then ab | |
397 | 395 | else throw("List size exceeds 16") | |
398 | 396 | ||
399 | - | | |
397 | + | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
400 | 398 | } | |
401 | - | let | |
402 | - | let | |
403 | - | if (( | |
404 | - | then throw(("y_proc() not finished with " + toString( | |
405 | - | else $Tuple2(fraction(toInt( | |
399 | + | let bl = bm._1 | |
400 | + | let aV = bm._2 | |
401 | + | if ((aV == false)) | |
402 | + | then throw(("y_proc() not finished with " + toString(bl))) | |
403 | + | else $Tuple2(fraction(toInt(bl), ag[aX], e), aT) | |
406 | 404 | } | |
407 | 405 | ||
408 | 406 | ||
409 | - | func | |
407 | + | func bp (ax,au,aG,aT) = if (Q((au >= 0))) | |
410 | 408 | then throw("i below zero") | |
411 | 409 | else if (Q((a > au))) | |
412 | 410 | then throw("i above N_COINS") | |
413 | 411 | else { | |
414 | - | let | |
415 | - | let | |
416 | - | func | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
412 | + | let aZ = toBigInt(aT) | |
413 | + | let ba = toBigInt((ax * a)) | |
414 | + | func bb (V,al) = { | |
415 | + | let bq = V | |
416 | + | let bd = bq._1 | |
417 | + | let be = bq._2 | |
418 | + | let bf = if ((al == au)) | |
421 | 419 | then K | |
422 | 420 | else aG[al] | |
423 | 421 | if ((al != au)) | |
424 | - | then $Tuple2(( | |
425 | - | else $Tuple2( | |
422 | + | then $Tuple2((bd + bf), fraction(be, aZ, fraction(bf, b, L))) | |
423 | + | else $Tuple2(bd, be) | |
426 | 424 | } | |
427 | 425 | ||
428 | - | let | |
426 | + | let br = { | |
429 | 427 | let X = am | |
430 | 428 | let Y = size(X) | |
431 | - | let Z = $Tuple2(K, | |
429 | + | let Z = $Tuple2(K, aZ) | |
432 | 430 | func aa (ab,ac) = if ((ac >= Y)) | |
433 | 431 | then ab | |
434 | - | else | |
432 | + | else bb(ab, X[ac]) | |
435 | 433 | ||
436 | 434 | func ad (ab,ac) = if ((ac >= Y)) | |
437 | 435 | then ab | |
438 | 436 | else throw("List size exceeds 10") | |
439 | 437 | ||
440 | 438 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
441 | 439 | } | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | func | |
440 | + | let bd = br._1 | |
441 | + | let bh = br._2 | |
442 | + | let be = fraction(bh, aZ, fraction(ba, b, L)) | |
443 | + | let bi = ((bd + fraction(aZ, L, ba)) - aZ) | |
444 | + | func bj (V,aQ) = if ((V._2 == true)) | |
447 | 445 | then V | |
448 | 446 | else { | |
449 | - | let | |
450 | - | let | |
451 | - | if (( | |
452 | - | then if ((1 >= toInt(( | |
453 | - | then $Tuple2( | |
454 | - | else $Tuple2( | |
455 | - | else if ((1 >= toInt(( | |
456 | - | then $Tuple2( | |
457 | - | else $Tuple2( | |
447 | + | let bk = V._1 | |
448 | + | let bl = fraction((fraction(bk, bk, L) + be), L, (fraction(M, bk, L) + bi)) | |
449 | + | if ((bl > bk)) | |
450 | + | then if ((1 >= toInt((bl - bk)))) | |
451 | + | then $Tuple2(bl, true) | |
452 | + | else $Tuple2(bl, false) | |
453 | + | else if ((1 >= toInt((bk - bl)))) | |
454 | + | then $Tuple2(bl, true) | |
455 | + | else $Tuple2(bl, false) | |
458 | 456 | } | |
459 | 457 | ||
460 | - | let | |
458 | + | let bs = { | |
461 | 459 | let X = aE | |
462 | 460 | let Y = size(X) | |
463 | - | let Z = $Tuple2(ba, false) | |
461 | + | let Z = $Tuple2(aZ, false) | |
462 | + | func bn (ab,ac) = if ((ac >= Y)) | |
463 | + | then ab | |
464 | + | else bj(ab, X[ac]) | |
465 | + | ||
464 | 466 | func bo (ab,ac) = if ((ac >= Y)) | |
465 | - | then ab | |
466 | - | else bk(ab, X[ac]) | |
467 | - | ||
468 | - | func bp (ab,ac) = if ((ac >= Y)) | |
469 | 467 | then ab | |
470 | 468 | else throw("List size exceeds 16") | |
471 | 469 | ||
472 | - | | |
470 | + | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
473 | 471 | } | |
474 | - | let | |
475 | - | let | |
476 | - | if (( | |
477 | - | then throw(("y_proc() not finished with " + toString( | |
478 | - | else fraction(toInt( | |
472 | + | let bl = bs._1 | |
473 | + | let aV = bs._2 | |
474 | + | if ((aV == false)) | |
475 | + | then throw(("y_proc() not finished with " + toString(bl))) | |
476 | + | else fraction(toInt(bl), ag[au], e) | |
479 | 477 | } | |
480 | 478 | ||
481 | 479 | ||
482 | - | func bu (bv,au) = { | |
483 | - | let aH = ax() | |
484 | - | let bw = ((r * a) / (4 * (a - 1))) | |
480 | + | func bt (bu,au) = { | |
481 | + | let bv = ((r * a) / (4 * (a - 1))) | |
485 | 482 | let aG = ao(af) | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
483 | + | let bw = aF(aG, ax) | |
484 | + | let bx = (bw - fraction(bu, bw, w)) | |
485 | + | let by = bp(ax, au, aG, bx) | |
486 | + | let bz = (af[au] - by) | |
490 | 487 | func U (V,al) = { | |
491 | - | let | |
492 | - | let | |
493 | - | then (fraction( | |
494 | - | else ( | |
495 | - | (V :+ ( | |
488 | + | let bA = af[al] | |
489 | + | let bB = if ((al == au)) | |
490 | + | then (fraction(bA, bx, bw) - by) | |
491 | + | else (bA - fraction(bA, bx, bw)) | |
492 | + | (V :+ (bA - fraction(bv, bB, f))) | |
496 | 493 | } | |
497 | 494 | ||
498 | - | let | |
495 | + | let bC = { | |
499 | 496 | let X = am | |
500 | 497 | let Y = size(X) | |
501 | 498 | let Z = nil | |
502 | 499 | func aa (ab,ac) = if ((ac >= Y)) | |
503 | 500 | then ab | |
504 | 501 | else U(ab, X[ac]) | |
505 | 502 | ||
506 | 503 | func ad (ab,ac) = if ((ac >= Y)) | |
507 | 504 | then ab | |
508 | 505 | else throw("List size exceeds 10") | |
509 | 506 | ||
510 | 507 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
511 | 508 | } | |
512 | - | let | |
513 | - | let | |
514 | - | $Tuple3( | |
509 | + | let bD = bC[au] | |
510 | + | let bE = ((bD - bp(ax, au, ao(bC), bx)) - 1) | |
511 | + | $Tuple3(bE, (bz - bE), bw) | |
515 | 512 | } | |
516 | 513 | ||
517 | 514 | ||
518 | - | func | |
515 | + | func bF (aT) = fraction(aT, p, w) | |
519 | 516 | ||
520 | 517 | ||
521 | - | func | |
522 | - | let | |
523 | - | let | |
524 | - | ([StringEntry("vol", | |
525 | - | let | |
526 | - | let | |
527 | - | if (isDefined(getString( | |
518 | + | func bG (aT,bH) = { | |
519 | + | let bI = (parseBigIntValue(valueOrElse(getString("vol"), "0")) + toBigInt(bH)) | |
520 | + | let bJ = toString(bI) | |
521 | + | ([StringEntry("vol", bJ)] ++ { | |
522 | + | let bK = toString((lastBlock.timestamp / o)) | |
523 | + | let bL = ("log_" + bK) | |
524 | + | if (isDefined(getString(bL))) | |
528 | 525 | then nil | |
529 | - | else [StringEntry( | |
526 | + | else [StringEntry(bL, ((((toString(bF(aT)) + "_") + bJ) + "_") + toString(lastBlock.timestamp)))] | |
530 | 527 | }) | |
531 | 528 | } | |
532 | 529 | ||
533 | 530 | ||
534 | - | func | |
535 | - | func U (bP | |
536 | - | then | |
531 | + | func bM (bN) = { | |
532 | + | func U (bO,bP) = if ((bO != "")) | |
533 | + | then bO | |
537 | 534 | else { | |
538 | - | let | |
539 | - | valueOrElse(getString( | |
535 | + | let bL = ("log_" + toString((bN - bP))) | |
536 | + | valueOrElse(getString(bL), "") | |
540 | 537 | } | |
541 | 538 | ||
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let X = | |
539 | + | let bQ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] | |
540 | + | let bR = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30] | |
541 | + | let bS = { | |
542 | + | let X = bQ | |
546 | 543 | let Y = size(X) | |
547 | 544 | let Z = "" | |
548 | 545 | func aa (ab,ac) = if ((ac >= Y)) | |
549 | 546 | then ab | |
550 | 547 | else U(ab, X[ac]) | |
551 | 548 | ||
552 | 549 | func ad (ab,ac) = if ((ac >= Y)) | |
553 | 550 | then ab | |
554 | 551 | else throw("List size exceeds 30") | |
555 | 552 | ||
556 | 553 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
557 | 554 | } | |
558 | - | if (( | |
559 | - | then | |
555 | + | if ((bS != "")) | |
556 | + | then bS | |
560 | 557 | else { | |
561 | - | let X = | |
558 | + | let X = bR | |
562 | 559 | let Y = size(X) | |
563 | 560 | let Z = "" | |
564 | - | func | |
561 | + | func bn (ab,ac) = if ((ac >= Y)) | |
565 | 562 | then ab | |
566 | 563 | else U(ab, X[ac]) | |
567 | 564 | ||
568 | - | func | |
565 | + | func bo (ab,ac) = if ((ac >= Y)) | |
569 | 566 | then ab | |
570 | 567 | else throw("List size exceeds 30") | |
571 | 568 | ||
572 | - | | |
569 | + | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
573 | 570 | } | |
574 | 571 | } | |
575 | 572 | ||
576 | 573 | ||
577 | - | func | |
578 | - | let | |
579 | - | let | |
580 | - | let aB = if ((0 >= | |
581 | - | then ( | |
582 | - | else | |
583 | - | let | |
584 | - | let | |
585 | - | if (( | |
586 | - | then $Tuple3( | |
574 | + | func bT (bU) = { | |
575 | + | let bV = bF(aF(ao(af), ax)) | |
576 | + | let bW = lastBlock.timestamp | |
577 | + | let aB = if ((0 >= bU)) | |
578 | + | then (bW + bU) | |
579 | + | else bU | |
580 | + | let bX = (aB / o) | |
581 | + | let bO = bM(bX) | |
582 | + | if ((bO == "")) | |
583 | + | then $Tuple3(bV, bV, 0) | |
587 | 584 | else { | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | $Tuple3( | |
585 | + | let bY = split(bO, "_") | |
586 | + | let bZ = parseIntValue(bY[0]) | |
587 | + | let ca = parseIntValue(bY[2]) | |
588 | + | $Tuple3(bV, bZ, (bW - ca)) | |
592 | 589 | } | |
593 | 590 | } | |
594 | 591 | ||
595 | 592 | ||
596 | - | func | |
597 | - | let | |
598 | - | let | |
599 | - | let aB = if ((0 >= | |
600 | - | then ( | |
601 | - | else | |
602 | - | let | |
603 | - | let | |
604 | - | if (( | |
605 | - | then $Tuple3( | |
593 | + | func cb (bU) = { | |
594 | + | let cc = parseBigIntValue(valueOrElse(getString("vol"), "0")) | |
595 | + | let cd = lastBlock.timestamp | |
596 | + | let aB = if ((0 >= bU)) | |
597 | + | then (cd + bU) | |
598 | + | else bU | |
599 | + | let bX = (aB / o) | |
600 | + | let bO = bM(bX) | |
601 | + | if ((bO == "")) | |
602 | + | then $Tuple3(cc, cc, 0) | |
606 | 603 | else { | |
607 | - | let | |
608 | - | let | |
609 | - | let | |
610 | - | $Tuple3( | |
604 | + | let bY = split(bO, "_") | |
605 | + | let ce = parseBigIntValue(bY[1]) | |
606 | + | let cf = parseIntValue(bY[2]) | |
607 | + | $Tuple3(cc, ce, (cd - cf)) | |
611 | 608 | } | |
612 | 609 | } | |
613 | 610 | ||
614 | 611 | ||
615 | - | @Callable(ch) | |
616 | - | func init (ci,cj,ck,ax,bw,cl) = if (!(isDataStorageUntouched(this))) | |
612 | + | func cg (ch) = { | |
613 | + | let bw = if ((w == 0)) | |
614 | + | then 0 | |
615 | + | else aF(ao(af), ax) | |
616 | + | let bx = aF(ao(ch), ax) | |
617 | + | if (Q((bx > bw))) | |
618 | + | then throw("D1 > D0") | |
619 | + | else { | |
620 | + | let ci = if ((w > 0)) | |
621 | + | then { | |
622 | + | func cj (ck,cl) = { | |
623 | + | let bv = ((r * a) / (4 * (a - 1))) | |
624 | + | let ak = size(ck) | |
625 | + | func U (V,al) = { | |
626 | + | let cm = ck[al] | |
627 | + | let cn = cl[al] | |
628 | + | let co = fraction(bx, cm, bw) | |
629 | + | let cp = if ((co > cn)) | |
630 | + | then (co - cn) | |
631 | + | else (cn - co) | |
632 | + | let cq = fraction(bv, cp, f) | |
633 | + | let cr = fraction(cq, s, f) | |
634 | + | $Tuple4((V._1 :+ (cn - cr)), (V._2 :+ (cn - cq)), if (if (t) | |
635 | + | then (cr > 0) | |
636 | + | else false) | |
637 | + | then (V._3 :+ ScriptTransfer(u, cr, fromBase58String(q[al]))) | |
638 | + | else V._3, (V._4 + fraction(cq, e, ag[al]))) | |
639 | + | } | |
640 | + | ||
641 | + | let X = am | |
642 | + | let Y = size(X) | |
643 | + | let Z = $Tuple4(nil, nil, nil, 0) | |
644 | + | func aa (ab,ac) = if ((ac >= Y)) | |
645 | + | then ab | |
646 | + | else U(ab, X[ac]) | |
647 | + | ||
648 | + | func ad (ab,ac) = if ((ac >= Y)) | |
649 | + | then ab | |
650 | + | else throw("List size exceeds 10") | |
651 | + | ||
652 | + | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
653 | + | } | |
654 | + | ||
655 | + | let cs = cj(af, ch) | |
656 | + | let ct = cs._1 | |
657 | + | let cu = cs._2 | |
658 | + | let cv = cs._3 | |
659 | + | let cw = cs._4 | |
660 | + | $Tuple3(ct, aF(ao(cu), ax), (cv ++ bG(bw, fraction(cw, f, r)))) | |
661 | + | } | |
662 | + | else $Tuple3(ch, bx, nil) | |
663 | + | let cx = ci._1 | |
664 | + | let cy = ci._2 | |
665 | + | let cz = ci._3 | |
666 | + | let cA = if ((w == 0)) | |
667 | + | then bx | |
668 | + | else fraction(w, (cy - bw), bw) | |
669 | + | $Tuple3(cx, cA, cz) | |
670 | + | } | |
671 | + | } | |
672 | + | ||
673 | + | ||
674 | + | @Callable(cB) | |
675 | + | func init (cC,cD,cE,cF,bv,cG) = if (!(isDataStorageUntouched(this))) | |
617 | 676 | then throw("already initialized") | |
618 | - | else if (( | |
677 | + | else if ((cB.caller != this)) | |
619 | 678 | then throw("self initialization only") | |
620 | 679 | else { | |
621 | - | let | |
622 | - | let ak = size( | |
680 | + | let cH = split(cD, ",") | |
681 | + | let ak = size(cH) | |
623 | 682 | if ((2 > ak)) | |
624 | 683 | then throw("too small coins") | |
625 | 684 | else if ((ak > c)) | |
626 | 685 | then throw("too many coins") | |
627 | 686 | else { | |
628 | - | func | |
687 | + | func cI (V,al) = if (if ((al >= ak)) | |
629 | 688 | then true | |
630 | 689 | else (V == false)) | |
631 | 690 | then V | |
632 | - | else (indexOf( | |
691 | + | else (indexOf(cH, cH[al]) == al) | |
633 | 692 | ||
634 | 693 | if ((false == { | |
635 | 694 | let X = ai | |
636 | 695 | let Y = size(X) | |
637 | 696 | let Z = true | |
638 | 697 | func aa (ab,ac) = if ((ac >= Y)) | |
639 | 698 | then ab | |
640 | - | else | |
699 | + | else cI(ab, X[ac]) | |
641 | 700 | ||
642 | 701 | func ad (ab,ac) = if ((ac >= Y)) | |
643 | 702 | then ab | |
644 | 703 | else throw("List size exceeds 10") | |
645 | 704 | ||
646 | 705 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
647 | 706 | })) | |
648 | 707 | then throw("duplicate coin detected") | |
649 | 708 | else { | |
650 | - | func | |
709 | + | func cJ (cK) = valueOrErrorMessage(assetInfo(valueOrErrorMessage(fromBase58String(cK), ("fromBase58String: " + cK))), ("assetInfo: " + cK)).decimals | |
651 | 710 | ||
652 | - | func U (V, | |
711 | + | func U (V,cK) = $Tuple3((V._1 + 1), (V._2 :+ 0), (V._3 :+ pow(10, 0, cJ(cK), 0, 0, DOWN))) | |
653 | 712 | ||
654 | - | let | |
655 | - | let X = | |
713 | + | let cL = { | |
714 | + | let X = cH | |
656 | 715 | let Y = size(X) | |
657 | 716 | let Z = $Tuple3(0, nil, nil) | |
658 | 717 | func aa (ab,ac) = if ((ac >= Y)) | |
659 | 718 | then ab | |
660 | 719 | else U(ab, X[ac]) | |
661 | 720 | ||
662 | 721 | func ad (ab,ac) = if ((ac >= Y)) | |
663 | 722 | then ab | |
664 | 723 | else throw("List size exceeds 10") | |
665 | 724 | ||
666 | 725 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
667 | 726 | } | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | [StringEntry("coins", | |
727 | + | let cM = cL._1 | |
728 | + | let cN = cL._2 | |
729 | + | let cO = cL._3 | |
730 | + | let cP = Issue(cE, ("LP token for " + cD), 0, d, true) | |
731 | + | let cQ = toBase58String(calculateAssetId(cP)) | |
732 | + | [StringEntry("coins", cD), StringEntry("rates", makeString(S(cO), ",")), StringEntry("balances", makeString(S(cN), ",")), IntegerEntry("N_COINS", cM), IntegerEntry("initial_A", cF), IntegerEntry("future_A", cF), IntegerEntry("fee", bv), IntegerEntry("admin_fee", cG), StringEntry("owner", av(cC)), IntegerEntry("kill_deadline", (height + J)), StringEntry("token", cQ), BooleanEntry("is_killed", false), BooleanEntry("is_auto_fees", true), cP] | |
674 | 733 | } | |
675 | 734 | } | |
676 | 735 | } | |
677 | 736 | ||
678 | 737 | ||
679 | 738 | ||
680 | - | @Callable( | |
681 | - | func add_liquidity ( | |
739 | + | @Callable(cB) | |
740 | + | func add_liquidity (cR) = if (Q(!(H))) | |
682 | 741 | then throw("is killed") | |
683 | 742 | else { | |
684 | - | let aH = ax() | |
685 | - | let cx = w | |
686 | - | let bx = if ((cx == 0)) | |
687 | - | then 0 | |
688 | - | else aF(ao(af), aH) | |
689 | - | func cy (cz,cA,cB) = { | |
690 | - | func U (V,al) = (V :+ (cz[al] + (if ((al == cA)) | |
691 | - | then cB | |
743 | + | func cS (cT,cU,cV) = { | |
744 | + | func U (V,al) = (V :+ (cT[al] + (if ((al == cU)) | |
745 | + | then cV | |
692 | 746 | else 0))) | |
693 | 747 | ||
694 | 748 | let X = am | |
695 | 749 | let Y = size(X) | |
696 | 750 | let Z = nil | |
697 | 751 | func aa (ab,ac) = if ((ac >= Y)) | |
698 | 752 | then ab | |
699 | 753 | else U(ab, X[ac]) | |
700 | 754 | ||
701 | 755 | func ad (ab,ac) = if ((ac >= Y)) | |
702 | 756 | then ab | |
703 | 757 | else throw("List size exceeds 10") | |
704 | 758 | ||
705 | 759 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
706 | 760 | } | |
707 | 761 | ||
708 | - | func | |
709 | - | let ak = size( | |
762 | + | func cW (cT,cX) = { | |
763 | + | let ak = size(cX) | |
710 | 764 | if ((1 > ak)) | |
711 | 765 | then throw("payments size < 1") | |
712 | 766 | else if ((ak > c)) | |
713 | 767 | then throw("payments size > N_COINS_MAX") | |
714 | 768 | else { | |
715 | - | func U (V,aq) = | |
769 | + | func U (V,aq) = cS(V, ap(aq), aq.amount) | |
716 | 770 | ||
717 | - | let X = | |
771 | + | let X = cX | |
718 | 772 | let Y = size(X) | |
719 | - | let Z = | |
773 | + | let Z = cT | |
720 | 774 | func aa (ab,ac) = if ((ac >= Y)) | |
721 | 775 | then ab | |
722 | 776 | else U(ab, X[ac]) | |
723 | 777 | ||
724 | 778 | func ad (ab,ac) = if ((ac >= Y)) | |
725 | 779 | then ab | |
726 | 780 | else throw("List size exceeds 10") | |
727 | 781 | ||
728 | 782 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
729 | 783 | } | |
730 | 784 | } | |
731 | 785 | ||
732 | - | let | |
733 | - | if (if (( | |
734 | - | then (min( | |
786 | + | let ch = cW(af, cB.payments) | |
787 | + | if (if ((w == 0)) | |
788 | + | then (min(ch) == 0) | |
735 | 789 | else false) | |
736 | 790 | then throw("initial deposit requires all coins") | |
737 | 791 | else { | |
738 | - | let by = aF(ao(cE), aH) | |
739 | - | if (Q((by > bx))) | |
740 | - | then throw("D1 > D0") | |
741 | - | else { | |
742 | - | let cF = if ((cx > 0)) | |
743 | - | then { | |
744 | - | func cG (cH,cI) = { | |
745 | - | let bw = ((r * a) / (4 * (a - 1))) | |
746 | - | let ak = size(cH) | |
747 | - | func U (V,al) = { | |
748 | - | let cJ = cH[al] | |
749 | - | let cK = cI[al] | |
750 | - | let cL = fraction(by, cJ, bx) | |
751 | - | let cM = if ((cL > cK)) | |
752 | - | then (cL - cK) | |
753 | - | else (cK - cL) | |
754 | - | let cN = fraction(bw, cM, f) | |
755 | - | let cO = fraction(cN, s, f) | |
756 | - | $Tuple4((V._1 :+ (cK - cO)), (V._2 :+ (cK - cN)), if (if (t) | |
757 | - | then (cO > 0) | |
758 | - | else false) | |
759 | - | then (V._3 :+ ScriptTransfer(u, cO, fromBase58String(q[al]))) | |
760 | - | else V._3, (V._4 + fraction(cN, e, ag[al]))) | |
761 | - | } | |
762 | - | ||
763 | - | let X = am | |
764 | - | let Y = size(X) | |
765 | - | let Z = $Tuple4(nil, nil, nil, 0) | |
766 | - | func aa (ab,ac) = if ((ac >= Y)) | |
767 | - | then ab | |
768 | - | else U(ab, X[ac]) | |
769 | - | ||
770 | - | func ad (ab,ac) = if ((ac >= Y)) | |
771 | - | then ab | |
772 | - | else throw("List size exceeds 10") | |
773 | - | ||
774 | - | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
775 | - | } | |
776 | - | ||
777 | - | let cP = cG(af, cE) | |
778 | - | let cQ = cP._1 | |
779 | - | let cR = cP._2 | |
780 | - | let cS = cP._3 | |
781 | - | let cT = cP._4 | |
782 | - | $Tuple3(cQ, aF(ao(cR), aH), (cS ++ bH(bx, fraction(cT, f, r)))) | |
783 | - | } | |
784 | - | else $Tuple3(cE, by, nil) | |
785 | - | let cU = cF._1 | |
786 | - | let cV = cF._2 | |
787 | - | let cW = cF._3 | |
788 | - | let cX = if ((cx == 0)) | |
789 | - | then by | |
790 | - | else fraction(cx, (cV - bx), bx) | |
791 | - | if (Q((cX >= cw))) | |
792 | - | then throw("slippage screwed you") | |
793 | - | else ([StringEntry("balances", makeString(S(cU), ",")), Reissue(v, cX, true), ScriptTransfer(ch.caller, cX, v)] ++ cW) | |
794 | - | } | |
792 | + | let cY = cg(ch) | |
793 | + | let cx = cY._1 | |
794 | + | let cA = cY._2 | |
795 | + | let cz = cY._3 | |
796 | + | if (Q((cA >= cR))) | |
797 | + | then throw("slippage screwed you") | |
798 | + | else ([StringEntry("balances", makeString(S(cx), ",")), Reissue(v, cA, true), ScriptTransfer(cB.caller, cA, v)] ++ cz) | |
795 | 799 | } | |
796 | 800 | } | |
797 | 801 | ||
798 | 802 | ||
799 | 803 | ||
800 | - | @Callable( | |
801 | - | func get_dy (au, | |
802 | - | let | |
803 | - | let | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
811 | - | $Tuple2(nil, | |
804 | + | @Callable(cB) | |
805 | + | func get_dy (au,aX,cZ) = { | |
806 | + | let da = af[au] | |
807 | + | let bA = af[aX] | |
808 | + | let aY = (da + cZ) | |
809 | + | let db = aW(au, aX, aY, ao(af)) | |
810 | + | let bl = db._1 | |
811 | + | let aT = db._2 | |
812 | + | let dc = ((bA - bl) - 1) | |
813 | + | let dd = fraction(dc, r, f) | |
814 | + | let bE = (dc - dd) | |
815 | + | $Tuple2(nil, bE) | |
812 | 816 | } | |
813 | 817 | ||
814 | 818 | ||
815 | 819 | ||
816 | - | @Callable( | |
817 | - | func exchange ( | |
820 | + | @Callable(cB) | |
821 | + | func exchange (aX,de) = if (Q(!(H))) | |
818 | 822 | then throw("is killed") | |
819 | - | else if ((size( | |
823 | + | else if ((size(cB.payments) != 1)) | |
820 | 824 | then throw("size( payments ) != 1") | |
821 | 825 | else { | |
822 | - | let aq = | |
823 | - | let | |
826 | + | let aq = cB.payments[0] | |
827 | + | let cZ = aq.amount | |
824 | 828 | let au = ap(aq) | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | let | |
833 | - | let | |
834 | - | if (Q(( | |
829 | + | let da = af[au] | |
830 | + | let bA = af[aX] | |
831 | + | let aY = (da + cZ) | |
832 | + | let df = aW(au, aX, aY, ao(af)) | |
833 | + | let bl = df._1 | |
834 | + | let aT = df._2 | |
835 | + | let dc = ((bA - bl) - 1) | |
836 | + | let dd = fraction(dc, r, f) | |
837 | + | let bE = (dc - dd) | |
838 | + | if (Q((bE >= de))) | |
835 | 839 | then throw("exchange resulted in fewer coins than expected") | |
836 | 840 | else { | |
837 | - | let | |
841 | + | let dg = fraction(dd, s, f) | |
838 | 842 | func U (V,al) = (V :+ (if ((al == au)) | |
839 | - | then (af[al] + | |
840 | - | else if ((al == | |
841 | - | then ((af[al] - | |
843 | + | then (af[al] + cZ) | |
844 | + | else if ((al == aX)) | |
845 | + | then ((af[al] - bE) - dg) | |
842 | 846 | else af[al])) | |
843 | 847 | ||
844 | - | let | |
848 | + | let cx = { | |
845 | 849 | let X = am | |
846 | 850 | let Y = size(X) | |
847 | 851 | let Z = nil | |
848 | 852 | func aa (ab,ac) = if ((ac >= Y)) | |
849 | 853 | then ab | |
850 | 854 | else U(ab, X[ac]) | |
851 | 855 | ||
852 | 856 | func ad (ab,ac) = if ((ac >= Y)) | |
853 | 857 | then ab | |
854 | 858 | else throw("List size exceeds 10") | |
855 | 859 | ||
856 | 860 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
857 | 861 | } | |
858 | - | let | |
859 | - | $Tuple2((([StringEntry("balances", makeString(S( | |
860 | - | then ( | |
862 | + | let dh = fromBase58String(q[aX]) | |
863 | + | $Tuple2((([StringEntry("balances", makeString(S(cx), ",")), ScriptTransfer(cB.caller, bE, dh)] ++ (if (if (t) | |
864 | + | then (dg > 0) | |
861 | 865 | else false) | |
862 | - | then [ScriptTransfer(u, | |
863 | - | else nil)) ++ | |
866 | + | then [ScriptTransfer(u, dg, dh)] | |
867 | + | else nil)) ++ bG(aT, fraction(cZ, e, ag[au]))), bE) | |
864 | 868 | } | |
865 | 869 | } | |
866 | 870 | ||
867 | 871 | ||
868 | 872 | ||
869 | - | @Callable( | |
870 | - | func remove_liquidity ( | |
873 | + | @Callable(cB) | |
874 | + | func remove_liquidity (di) = if ((size(cB.payments) != 1)) | |
871 | 875 | then throw("size( payments ) != 1") | |
872 | 876 | else { | |
873 | - | let aq = | |
877 | + | let aq = cB.payments[0] | |
874 | 878 | if ((aq.assetId != v)) | |
875 | 879 | then throw("unknown token") | |
876 | 880 | else { | |
877 | - | let | |
881 | + | let dj = if ((di == "0")) | |
878 | 882 | then nil | |
879 | - | else ae(split( | |
880 | - | if (if (( | |
881 | - | then (size( | |
883 | + | else ae(split(di, ",")) | |
884 | + | if (if ((di != "0")) | |
885 | + | then (size(dj) != a) | |
882 | 886 | else false) | |
883 | 887 | then throw("min_amounts.size() != N_COINS") | |
884 | 888 | else { | |
885 | - | let | |
886 | - | let | |
889 | + | let cV = aq.amount | |
890 | + | let dk = cB.caller | |
887 | 891 | func U (V,al) = { | |
888 | - | let | |
889 | - | let | |
890 | - | if (if (( | |
891 | - | then ( | |
892 | + | let dl = af[al] | |
893 | + | let dm = fraction(dl, cV, w) | |
894 | + | if (if ((di != "0")) | |
895 | + | then (dj[al] > dm) | |
892 | 896 | else false) | |
893 | 897 | then throw("withdrawal resulted in fewer coins than expected") | |
894 | - | else $Tuple2((V._1 :+ ScriptTransfer( | |
898 | + | else $Tuple2((V._1 :+ ScriptTransfer(dk, dm, fromBase58String(q[al]))), (V._2 :+ (dl - dm))) | |
895 | 899 | } | |
896 | 900 | ||
897 | - | let | |
901 | + | let dn = { | |
898 | 902 | let X = am | |
899 | 903 | let Y = size(X) | |
900 | 904 | let Z = $Tuple2(nil, nil) | |
901 | 905 | func aa (ab,ac) = if ((ac >= Y)) | |
902 | 906 | then ab | |
903 | 907 | else U(ab, X[ac]) | |
904 | 908 | ||
905 | 909 | func ad (ab,ac) = if ((ac >= Y)) | |
906 | 910 | then ab | |
907 | 911 | else throw("List size exceeds 10") | |
908 | 912 | ||
909 | 913 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
910 | 914 | } | |
911 | - | let | |
912 | - | let | |
913 | - | ( | |
915 | + | let do = dn._1 | |
916 | + | let cx = dn._2 | |
917 | + | (do ++ [StringEntry("balances", makeString(S(cx), ",")), Burn(v, cV)]) | |
914 | 918 | } | |
915 | 919 | } | |
916 | 920 | } | |
917 | 921 | ||
918 | 922 | ||
919 | 923 | ||
920 | - | @Callable( | |
921 | - | func calc_withdraw_one_coin ( | |
924 | + | @Callable(cB) | |
925 | + | func calc_withdraw_one_coin (bu,au) = $Tuple2(nil, bt(bu, au)._1) | |
922 | 926 | ||
923 | 927 | ||
924 | 928 | ||
925 | - | @Callable( | |
926 | - | func remove_liquidity_one_coin (au, | |
929 | + | @Callable(cB) | |
930 | + | func remove_liquidity_one_coin (au,dp) = if (Q(!(H))) | |
927 | 931 | then throw("is killed") | |
928 | - | else if ((size( | |
932 | + | else if ((size(cB.payments) != 1)) | |
929 | 933 | then throw("size( payments ) != 1") | |
930 | 934 | else { | |
931 | - | let aq = | |
935 | + | let aq = cB.payments[0] | |
932 | 936 | if ((aq.assetId != v)) | |
933 | 937 | then throw("unknown token") | |
934 | 938 | else { | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | let | |
940 | - | if (Q(( | |
939 | + | let bu = aq.amount | |
940 | + | let dq = bt(bu, au) | |
941 | + | let bE = dq._1 | |
942 | + | let dd = dq._2 | |
943 | + | let aT = dq._3 | |
944 | + | if (Q((bE >= dp))) | |
941 | 945 | then throw("not enough coins removed") | |
942 | 946 | else { | |
943 | - | let | |
944 | - | let | |
947 | + | let dg = fraction(dd, s, f) | |
948 | + | let dr = (bE + dg) | |
945 | 949 | func U (V,al) = (V :+ (af[al] - (if ((al == au)) | |
946 | - | then | |
950 | + | then dr | |
947 | 951 | else 0))) | |
948 | 952 | ||
949 | - | let | |
953 | + | let cx = { | |
950 | 954 | let X = am | |
951 | 955 | let Y = size(X) | |
952 | 956 | let Z = nil | |
953 | 957 | func aa (ab,ac) = if ((ac >= Y)) | |
954 | 958 | then ab | |
955 | 959 | else U(ab, X[ac]) | |
956 | 960 | ||
957 | 961 | func ad (ab,ac) = if ((ac >= Y)) | |
958 | 962 | then ab | |
959 | 963 | else throw("List size exceeds 10") | |
960 | 964 | ||
961 | 965 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
962 | 966 | } | |
963 | - | let | |
964 | - | $Tuple2((([StringEntry("balances", makeString(S( | |
965 | - | then ( | |
967 | + | let dh = fromBase58String(q[au]) | |
968 | + | $Tuple2((([StringEntry("balances", makeString(S(cx), ",")), ScriptTransfer(cB.caller, bE, dh), Burn(v, bu)] ++ (if (if (t) | |
969 | + | then (dg > 0) | |
966 | 970 | else false) | |
967 | - | then [ScriptTransfer(u, | |
968 | - | else nil)) ++ | |
971 | + | then [ScriptTransfer(u, dg, dh)] | |
972 | + | else nil)) ++ bG(aT, fraction(fraction(dd, e, ag[au]), f, r))), bE) | |
969 | 973 | } | |
970 | 974 | } | |
971 | 975 | } | |
972 | 976 | ||
973 | 977 | ||
974 | 978 | ||
975 | - | @Callable( | |
976 | - | func A () = $Tuple2(nil, ax | |
979 | + | @Callable(cB) | |
980 | + | func A () = $Tuple2(nil, ax) | |
977 | 981 | ||
978 | 982 | ||
979 | 983 | ||
980 | - | @Callable( | |
984 | + | @Callable(cB) | |
981 | 985 | func get_virtual_price () = { | |
982 | - | let | |
983 | - | $Tuple2(nil, | |
986 | + | let aT = aF(ao(af), ax) | |
987 | + | $Tuple2(nil, bF(aT)) | |
984 | 988 | } | |
985 | 989 | ||
986 | 990 | ||
987 | 991 | ||
988 | - | @Callable( | |
989 | - | func calc_token_amount ( | |
990 | - | let dt = ae(split( | |
992 | + | @Callable(cB) | |
993 | + | func calc_token_amount (ds) = { | |
994 | + | let dt = ae(split(ds, ",")) | |
991 | 995 | if ((size(dt) != a)) | |
992 | 996 | then throw("not enought amounts") | |
993 | 997 | else { | |
994 | - | let aH = ax() | |
995 | - | let bx = aF(ao(dt), aH) | |
996 | - | func U (V,al) = (V :+ (af[al] + (if (ds) | |
997 | - | then dt[al] | |
998 | - | else -(dt[al])))) | |
998 | + | func U (V,al) = (V :+ (af[al] + dt[al])) | |
999 | 999 | ||
1000 | - | let | |
1000 | + | let ch = { | |
1001 | 1001 | let X = am | |
1002 | 1002 | let Y = size(X) | |
1003 | 1003 | let Z = nil | |
1004 | 1004 | func aa (ab,ac) = if ((ac >= Y)) | |
1005 | 1005 | then ab | |
1006 | 1006 | else U(ab, X[ac]) | |
1007 | 1007 | ||
1008 | 1008 | func ad (ab,ac) = if ((ac >= Y)) | |
1009 | 1009 | then ab | |
1010 | 1010 | else throw("List size exceeds 10") | |
1011 | 1011 | ||
1012 | 1012 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1013 | 1013 | } | |
1014 | - | let by = aF(ao(cE), aH) | |
1015 | - | let du = w | |
1016 | - | let dv = if (ds) | |
1017 | - | then (by - bx) | |
1018 | - | else (bx - by) | |
1019 | - | $Tuple2(nil, fraction(dv, du, bx)) | |
1014 | + | let du = cg(ch) | |
1015 | + | let cx = du._1 | |
1016 | + | let cA = du._2 | |
1017 | + | let cz = du._3 | |
1018 | + | $Tuple2(nil, cA) | |
1020 | 1019 | } | |
1021 | 1020 | } | |
1022 | 1021 | ||
1023 | 1022 | ||
1024 | 1023 | ||
1025 | - | @Callable( | |
1026 | - | func ramp_A (dw | |
1024 | + | @Callable(cB) | |
1025 | + | func ramp_A (dv,dw) = if (Q((cB.caller == u))) | |
1027 | 1026 | then throw("only owner") | |
1028 | 1027 | else if (Q((P >= (z + n)))) | |
1029 | 1028 | then throw("too often") | |
1030 | - | else if (Q(( | |
1029 | + | else if (Q((dw >= (P + n)))) | |
1031 | 1030 | then throw("insufficient time") | |
1032 | 1031 | else { | |
1033 | - | let | |
1034 | - | if (Q(if (( | |
1035 | - | then (k > | |
1032 | + | let dx = ax | |
1033 | + | if (Q(if ((dv > 0)) | |
1034 | + | then (k > dv) | |
1036 | 1035 | else false)) | |
1037 | 1036 | then throw("out of base range") | |
1038 | - | else if (Q(if (if (( | |
1039 | - | then (( | |
1037 | + | else if (Q(if (if ((dv >= dx)) | |
1038 | + | then ((dx * l) >= dv) | |
1040 | 1039 | else false) | |
1041 | 1040 | then true | |
1042 | - | else if (( | |
1043 | - | then (( | |
1041 | + | else if ((dx > dv)) | |
1042 | + | then ((dv * l) >= dx) | |
1044 | 1043 | else false)) | |
1045 | 1044 | then throw("out of range") | |
1046 | - | else [IntegerEntry("initial_A", | |
1045 | + | else [IntegerEntry("initial_A", dx), IntegerEntry("future_A", dv), IntegerEntry("initial_A_time", P), IntegerEntry("future_A_time", dw)] | |
1047 | 1046 | } | |
1048 | 1047 | ||
1049 | 1048 | ||
1050 | 1049 | ||
1051 | - | @Callable( | |
1052 | - | func stop_ramp_A () = if (Q(( | |
1050 | + | @Callable(cB) | |
1051 | + | func stop_ramp_A () = if (Q((cB.caller == u))) | |
1053 | 1052 | then throw("only owner") | |
1054 | 1053 | else { | |
1055 | - | let | |
1056 | - | [IntegerEntry("initial_A", | |
1054 | + | let dy = ax | |
1055 | + | [IntegerEntry("initial_A", dy), IntegerEntry("future_A", dy), IntegerEntry("initial_A_time", P), IntegerEntry("future_A_time", P)] | |
1057 | 1056 | } | |
1058 | 1057 | ||
1059 | 1058 | ||
1060 | 1059 | ||
1061 | - | @Callable( | |
1062 | - | func commit_new_fee (dA | |
1060 | + | @Callable(cB) | |
1061 | + | func commit_new_fee (dz,dA) = if (Q((cB.caller == u))) | |
1063 | 1062 | then throw("only owner") | |
1064 | 1063 | else if (Q((C == 0))) | |
1065 | 1064 | then throw("active action") | |
1066 | - | else if (Q((j >= | |
1065 | + | else if (Q((j >= dz))) | |
1067 | 1066 | then throw("fee exceeds maximum") | |
1068 | - | else if (Q((i >= | |
1067 | + | else if (Q((i >= dA))) | |
1069 | 1068 | then throw("admin fee exceeds maximum") | |
1070 | 1069 | else { | |
1071 | - | let | |
1072 | - | [IntegerEntry("admin_actions_deadline", | |
1070 | + | let dB = (P + m) | |
1071 | + | [IntegerEntry("admin_actions_deadline", dB), IntegerEntry("future_fee", dz), IntegerEntry("future_admin_fee", dA)] | |
1073 | 1072 | } | |
1074 | 1073 | ||
1075 | 1074 | ||
1076 | 1075 | ||
1077 | - | @Callable( | |
1078 | - | func apply_new_fee () = if (Q(( | |
1076 | + | @Callable(cB) | |
1077 | + | func apply_new_fee () = if (Q((cB.caller == u))) | |
1079 | 1078 | then throw("only owner") | |
1080 | 1079 | else if (Q((P >= C))) | |
1081 | 1080 | then throw("insufficient time") | |
1082 | 1081 | else if (Q((C != 0))) | |
1083 | 1082 | then throw("no active action") | |
1084 | 1083 | else [IntegerEntry("admin_actions_deadline", 0), IntegerEntry("fee", E), IntegerEntry("admin_fee", F)] | |
1085 | 1084 | ||
1086 | 1085 | ||
1087 | 1086 | ||
1088 | - | @Callable( | |
1089 | - | func revert_new_parameters () = if (Q(( | |
1087 | + | @Callable(cB) | |
1088 | + | func revert_new_parameters () = if (Q((cB.caller == u))) | |
1090 | 1089 | then throw("only owner") | |
1091 | 1090 | else [IntegerEntry("admin_actions_deadline", 0)] | |
1092 | 1091 | ||
1093 | 1092 | ||
1094 | 1093 | ||
1095 | - | @Callable( | |
1096 | - | func commit_transfer_ownership ( | |
1094 | + | @Callable(cB) | |
1095 | + | func commit_transfer_ownership (cC) = if (Q((cB.caller == u))) | |
1097 | 1096 | then throw("only owner") | |
1098 | 1097 | else if (Q((D == 0))) | |
1099 | 1098 | then throw("active transfer") | |
1100 | 1099 | else { | |
1101 | - | let | |
1102 | - | [IntegerEntry("transfer_ownership_deadline", | |
1100 | + | let dB = (P + m) | |
1101 | + | [IntegerEntry("transfer_ownership_deadline", dB), StringEntry("future_owner", av(cC))] | |
1103 | 1102 | } | |
1104 | 1103 | ||
1105 | 1104 | ||
1106 | 1105 | ||
1107 | - | @Callable( | |
1108 | - | func apply_transfer_ownership () = if (Q(( | |
1106 | + | @Callable(cB) | |
1107 | + | func apply_transfer_ownership () = if (Q((cB.caller == u))) | |
1109 | 1108 | then throw("only owner") | |
1110 | 1109 | else if (Q((P >= D))) | |
1111 | 1110 | then throw("insufficient time") | |
1112 | 1111 | else if (Q((D != 0))) | |
1113 | 1112 | then throw("no active transfer") | |
1114 | 1113 | else [IntegerEntry("transfer_ownership_deadline", 0), StringEntry("owner", G)] | |
1115 | 1114 | ||
1116 | 1115 | ||
1117 | 1116 | ||
1118 | - | @Callable( | |
1119 | - | func revert_transfer_ownership () = if (Q(( | |
1117 | + | @Callable(cB) | |
1118 | + | func revert_transfer_ownership () = if (Q((cB.caller == u))) | |
1120 | 1119 | then throw("only owner") | |
1121 | 1120 | else [IntegerEntry("transfer_ownership_deadline", 0)] | |
1122 | 1121 | ||
1123 | 1122 | ||
1124 | 1123 | ||
1125 | - | @Callable( | |
1124 | + | @Callable(cB) | |
1126 | 1125 | func admin_balances (au) = $Tuple2(nil, at(au)) | |
1127 | 1126 | ||
1128 | 1127 | ||
1129 | 1128 | ||
1130 | - | @Callable( | |
1131 | - | func withdraw_admin_fees () = if (Q(( | |
1129 | + | @Callable(cB) | |
1130 | + | func withdraw_admin_fees () = if (Q((cB.caller == u))) | |
1132 | 1131 | then throw("only owner") | |
1133 | 1132 | else { | |
1134 | 1133 | func U (V,al) = (V :+ ScriptTransfer(u, at(al), fromBase58String(q[al]))) | |
1135 | 1134 | ||
1136 | 1135 | let X = am | |
1137 | 1136 | let Y = size(X) | |
1138 | 1137 | let Z = nil | |
1139 | 1138 | func aa (ab,ac) = if ((ac >= Y)) | |
1140 | 1139 | then ab | |
1141 | 1140 | else U(ab, X[ac]) | |
1142 | 1141 | ||
1143 | 1142 | func ad (ab,ac) = if ((ac >= Y)) | |
1144 | 1143 | then ab | |
1145 | 1144 | else throw("List size exceeds 10") | |
1146 | 1145 | ||
1147 | 1146 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1148 | 1147 | } | |
1149 | 1148 | ||
1150 | 1149 | ||
1151 | 1150 | ||
1152 | - | @Callable( | |
1153 | - | func donate_admin_fees () = if (Q(( | |
1151 | + | @Callable(cB) | |
1152 | + | func donate_admin_fees () = if (Q((cB.caller == u))) | |
1154 | 1153 | then throw("only owner") | |
1155 | 1154 | else { | |
1156 | 1155 | func U (V,al) = (V :+ (af[al] + at(al))) | |
1157 | 1156 | ||
1158 | - | let | |
1157 | + | let ch = { | |
1159 | 1158 | let X = am | |
1160 | 1159 | let Y = size(X) | |
1161 | 1160 | let Z = nil | |
1162 | 1161 | func aa (ab,ac) = if ((ac >= Y)) | |
1163 | 1162 | then ab | |
1164 | 1163 | else U(ab, X[ac]) | |
1165 | 1164 | ||
1166 | 1165 | func ad (ab,ac) = if ((ac >= Y)) | |
1167 | 1166 | then ab | |
1168 | 1167 | else throw("List size exceeds 10") | |
1169 | 1168 | ||
1170 | 1169 | ad(aa(aa(aa(aa(aa(aa(aa(aa(aa(aa(Z, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1171 | 1170 | } | |
1172 | - | [StringEntry("balances", makeString(S( | |
1171 | + | [StringEntry("balances", makeString(S(ch), ","))] | |
1173 | 1172 | } | |
1174 | 1173 | ||
1175 | 1174 | ||
1176 | 1175 | ||
1177 | - | @Callable( | |
1178 | - | func set_auto_fees ( | |
1176 | + | @Callable(cB) | |
1177 | + | func set_auto_fees (dC) = if (Q((cB.caller == u))) | |
1179 | 1178 | then throw("only owner") | |
1180 | - | else [BooleanEntry("is_auto_fees", | |
1179 | + | else [BooleanEntry("is_auto_fees", dC)] | |
1181 | 1180 | ||
1182 | 1181 | ||
1183 | 1182 | ||
1184 | - | @Callable( | |
1185 | - | func kill_me () = if (Q(( | |
1183 | + | @Callable(cB) | |
1184 | + | func kill_me () = if (Q((cB.caller == u))) | |
1186 | 1185 | then throw("only owner") | |
1187 | 1186 | else if (Q((I > P))) | |
1188 | 1187 | then throw("deadline has passed") | |
1189 | 1188 | else [BooleanEntry("is_killed", true)] | |
1190 | 1189 | ||
1191 | 1190 | ||
1192 | 1191 | ||
1193 | - | @Callable( | |
1194 | - | func unkill_me () = if (Q(( | |
1192 | + | @Callable(cB) | |
1193 | + | func unkill_me () = if (Q((cB.caller == u))) | |
1195 | 1194 | then throw("only owner") | |
1196 | 1195 | else [BooleanEntry("is_killed", false)] | |
1197 | 1196 | ||
1198 | 1197 | ||
1199 | 1198 | ||
1200 | - | @Callable( | |
1201 | - | func set_height_address ( | |
1199 | + | @Callable(cB) | |
1200 | + | func set_height_address (dD) = if ((cB.caller != u)) | |
1202 | 1201 | then throw("only owner") | |
1203 | - | else [StringEntry("heightAddress", av( | |
1202 | + | else [StringEntry("heightAddress", av(dD))] | |
1204 | 1203 | ||
1205 | 1204 | ||
1206 | 1205 | ||
1207 | 1206 | @Callable(au) | |
1208 | - | func set_verifier ( | |
1207 | + | func set_verifier (dE) = if ((au.caller != this)) | |
1209 | 1208 | then throw("self call only") | |
1210 | 1209 | else { | |
1211 | - | let | |
1212 | - | let ar = addressFromString( | |
1210 | + | let dF = { | |
1211 | + | let ar = addressFromString(dE) | |
1213 | 1212 | if ($isInstanceOf(ar, "Address")) | |
1214 | 1213 | then { | |
1215 | 1214 | let R = ar | |
1216 | 1215 | true | |
1217 | 1216 | } | |
1218 | 1217 | else false | |
1219 | 1218 | } | |
1220 | - | if (!( | |
1221 | - | then throw(("verifier wrong address " + | |
1219 | + | if (!(dF)) | |
1220 | + | then throw(("verifier wrong address " + dE)) | |
1222 | 1221 | else if (isDefined(getString(this, "verifier"))) | |
1223 | 1222 | then throw("verifier already defined") | |
1224 | - | else [StringEntry("verifier", | |
1223 | + | else [StringEntry("verifier", dE)] | |
1225 | 1224 | } | |
1226 | 1225 | ||
1227 | 1226 | ||
1228 | - | @Verifier( | |
1229 | - | func | |
1227 | + | @Verifier(dG) | |
1228 | + | func dH () = { | |
1230 | 1229 | let ar = getString(this, "verifier") | |
1231 | 1230 | if ($isInstanceOf(ar, "String")) | |
1232 | 1231 | then { | |
1233 | - | let | |
1234 | - | valueOrElse(getBoolean(addressFromStringValue( | |
1232 | + | let dE = ar | |
1233 | + | valueOrElse(getBoolean(addressFromStringValue(dE), ((("status_" + toString(this)) + "_") + toBase58String(dG.id))), false) | |
1235 | 1234 | } | |
1236 | - | else sigVerify( | |
1235 | + | else sigVerify(dG.bodyBytes, dG.proofs[0], dG.senderPublicKey) | |
1237 | 1236 | } | |
1238 | 1237 |
github/deemru/w8io/169f3d6 415.46 ms ◑