tx · 2WvpyRX92MBL8E4jkqkyMEwAGQWM72jb79cJ97WDrV3P
3MyVUAzWpL91WbpgccHK5Arq5hu2xN2hXrj: -0.01000000 Waves
2021.12.23 14:49 [1846870] smart account 3MyVUAzWpL91WbpgccHK5Arq5hu2xN2hXrj > SELF 0.00000000 Waves
{
"type": 13,
"id": "2WvpyRX92MBL8E4jkqkyMEwAGQWM72jb79cJ97WDrV3P",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1640260191000,
"version": 2,
"chainId": 84,
"sender": "3MyVUAzWpL91WbpgccHK5Arq5hu2xN2hXrj",
"senderPublicKey": "Dvg2md8dJaE7kjnrJpoXiK7eSTQQ9kJRnVM58d3H4piA",
"proofs": [
"3Bhp9y2zmQawCcBzkBE1BTeq3ySDBNRHLvy7Xip2S4FFCViqzhv2DqVLdXpqCGLBBEALkh8mCKJfGEpkvZFTPBnX"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIFCgMICAgAAAAFAAAAAAZuQ29pbnMJAAE2AAAAAQAAAAAAAAAAAgAAAAAKYVByZWNpc2lvbgkAATYAAAABAAAAAAAF9eEAAAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAAD3RhcmdldFByZWNpc2lvbgkAATYAAAABAAAAAAAAAAABAQAAAANhYnMAAAABAAAAA3ZhbAMJAAE/AAAAAgUAAAAKemVyb0JpZ0ludAUAAAADdmFsCQABPgAAAAEFAAAAA3ZhbAUAAAADdmFsAAAAAQAAAAFpAQAAAAVjYWxjRAAAAAMAAAAFeDFTdHIAAAAFeDJTdHIAAAAGYW1wU3RyBAAAAAJ4MQkAAacAAAABBQAAAAV4MVN0cgQAAAACeDIJAAGnAAAAAQUAAAAFeDJTdHIEAAAAA2FtcAkAAacAAAABBQAAAAZhbXBTdHIEAAAAAXMJAAE3AAAAAgUAAAACeDEFAAAAAngyAwkAAAAAAAACBQAAAAFzBQAAAAp6ZXJvQmlnSW50CQAFFAAAAAIFAAAAA25pbAkAAaYA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nAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyAzCQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwQAAAAFZE5leHQIBQAAAAokdDA5MDExMDE1AAAAAl8xBAAAAAVkUHJldggFAAAACiR0MDkwMTEwMTUAAAACXzIJAAUUAAAAAgUAAAADbmlsCQAETAAAAAIJAAGmAAAAAQUAAAAFZE5leHQJAARMAAAAAgkAAaYAAAABCQEAAAAFdmFsdWUAAAABBQAAAAVkUHJldgUAAAADbmlsAAAAAAJWc1Q=",
"height": 1846870,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 51M1An1wg9dK9kQaGNsnR2AuXPKpLGA4ux8sY25zg1RC
Next: 271APKeYbUAo1eYFEJPMdHQVCT11nVYTjtFvqMXXzRxu
Diff:
Old | New | | Differences |
---|
24 | 24 | | then $Tuple2(nil, toString(zeroBigInt)) |
---|
25 | 25 | | else { |
---|
26 | 26 | | let ann = (amp * nCoins) |
---|
27 | | - | let arr = [1, 2, 3, 4, 5] |
---|
| 27 | + | let arr = [1, 2, 3] |
---|
28 | 28 | | func calc (acc,cur) = { |
---|
29 | | - | let $t0673693 = acc |
---|
30 | | - | let d = $t0673693._1 |
---|
31 | | - | let dPrev = $t0673693._2 |
---|
| 29 | + | let $t0667687 = acc |
---|
| 30 | + | let d = $t0667687._1 |
---|
| 31 | + | let dPrev = $t0667687._2 |
---|
32 | 32 | | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) |
---|
33 | 33 | | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) |
---|
34 | 34 | | $Tuple2(dNext, d) |
---|
35 | 35 | | } |
---|
36 | 36 | | |
---|
37 | | - | let $t09071021 = { |
---|
| 37 | + | let $t09011015 = { |
---|
38 | 38 | | let $l = arr |
---|
39 | 39 | | let $s = size($l) |
---|
40 | 40 | | let $acc0 = $Tuple2(s, unit) |
---|
|
48 | 48 | | |
---|
49 | 49 | | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) |
---|
50 | 50 | | } |
---|
51 | | - | let dNext = $t09071021._1 |
---|
52 | | - | let dPrev = $t09071021._2 |
---|
| 51 | + | let dNext = $t09011015._1 |
---|
| 52 | + | let dPrev = $t09011015._2 |
---|
53 | 53 | | $Tuple2(nil, [toString(dNext), toString(value(dPrev))]) |
---|
54 | 54 | | } |
---|
55 | 55 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let nCoins = toBigInt(2) |
---|
5 | 5 | | |
---|
6 | 6 | | let aPrecision = toBigInt(100000000) |
---|
7 | 7 | | |
---|
8 | 8 | | let zeroBigInt = toBigInt(0) |
---|
9 | 9 | | |
---|
10 | 10 | | let targetPrecision = toBigInt(1) |
---|
11 | 11 | | |
---|
12 | 12 | | func abs (val) = if ((zeroBigInt > val)) |
---|
13 | 13 | | then -(val) |
---|
14 | 14 | | else val |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Callable(i) |
---|
18 | 18 | | func calcD (x1Str,x2Str,ampStr) = { |
---|
19 | 19 | | let x1 = parseBigIntValue(x1Str) |
---|
20 | 20 | | let x2 = parseBigIntValue(x2Str) |
---|
21 | 21 | | let amp = parseBigIntValue(ampStr) |
---|
22 | 22 | | let s = (x1 + x2) |
---|
23 | 23 | | if ((s == zeroBigInt)) |
---|
24 | 24 | | then $Tuple2(nil, toString(zeroBigInt)) |
---|
25 | 25 | | else { |
---|
26 | 26 | | let ann = (amp * nCoins) |
---|
27 | | - | let arr = [1, 2, 3, 4, 5] |
---|
| 27 | + | let arr = [1, 2, 3] |
---|
28 | 28 | | func calc (acc,cur) = { |
---|
29 | | - | let $t0673693 = acc |
---|
30 | | - | let d = $t0673693._1 |
---|
31 | | - | let dPrev = $t0673693._2 |
---|
| 29 | + | let $t0667687 = acc |
---|
| 30 | + | let d = $t0667687._1 |
---|
| 31 | + | let dPrev = $t0667687._2 |
---|
32 | 32 | | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) |
---|
33 | 33 | | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) |
---|
34 | 34 | | $Tuple2(dNext, d) |
---|
35 | 35 | | } |
---|
36 | 36 | | |
---|
37 | | - | let $t09071021 = { |
---|
| 37 | + | let $t09011015 = { |
---|
38 | 38 | | let $l = arr |
---|
39 | 39 | | let $s = size($l) |
---|
40 | 40 | | let $acc0 = $Tuple2(s, unit) |
---|
41 | 41 | | func $f0_1 ($a,$i) = if (($i >= $s)) |
---|
42 | 42 | | then $a |
---|
43 | 43 | | else calc($a, $l[$i]) |
---|
44 | 44 | | |
---|
45 | 45 | | func $f0_2 ($a,$i) = if (($i >= $s)) |
---|
46 | 46 | | then $a |
---|
47 | 47 | | else throw("List size exceeds 3") |
---|
48 | 48 | | |
---|
49 | 49 | | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) |
---|
50 | 50 | | } |
---|
51 | | - | let dNext = $t09071021._1 |
---|
52 | | - | let dPrev = $t09071021._2 |
---|
| 51 | + | let dNext = $t09011015._1 |
---|
| 52 | + | let dPrev = $t09011015._2 |
---|
53 | 53 | | $Tuple2(nil, [toString(dNext), toString(value(dPrev))]) |
---|
54 | 54 | | } |
---|
55 | 55 | | } |
---|
56 | 56 | | |
---|
57 | 57 | | |
---|