tx · AxwQP8ehEs91CYS9sQMh8GFS3y5i9J7VBM2cQ2MgZh3J

3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d:  -0.01000000 Waves

2023.03.21 17:41 [2499907] smart account 3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d > SELF 0.00000000 Waves

{ "type": 13, "id": "AxwQP8ehEs91CYS9sQMh8GFS3y5i9J7VBM2cQ2MgZh3J", "fee": 1000000, "feeAssetId": null, "timestamp": 1679409720720, "version": 2, "chainId": 84, "sender": "3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d", "senderPublicKey": "AZLzseQJi9XUNNp7cN6jwqDdSmQvDPNNqu7aQ6ujbsnJ", "proofs": [ "3C3t3HUxybWgQmW1oHpzNUYQthrNVPSHpEhCkJo3PMbcAQ58GH3CK324pA3E2gxQqzByBfyxJGG66WNghCoZxZgM" ], "script": "base64:BgIICAISBAoCAQEMAAZzY2FsZTgAgMLXLwAMc2NhbGU4QmlnSW50CQC2AgEAgMLXLwAHc2NhbGUxOAkAtgIBAICAkLu61q3wDQAKemVyb0JpZ0ludAkAtgIBAAAABGJpZzAJALYCAQAAAARiaWcxCQC2AgEAAQAEYmlnMgkAtgIBAAIABGJpZzMJALYCAQADAARiaWc0CQC2AgEABAAFQW11bHQCAzEwMAABQQIEMTAwMAEEZ2V0RAECeHAEA3hwMAkAkQMCBQJ4cAAABAN4cDEJAJEDAgUCeHAAAQQBcwkAtwICBQN4cDAFA3hwMQMJAAACBQFzBQRiaWcwBQRiaWcwBAFhCQENcGFyc2VJbnRWYWx1ZQEFAUEEA2FubgkAaAIFAWEAAgQBcAkAvAIDBQN4cDAFA3hwMQUEYmlnMQQLeHAwX3hwMV9uX24JALwCAwUBcAUEYmlnNAUEYmlnMQQFYW5uX3MJALwCAwkAtgIBBQNhbm4FAXMFBGJpZzEEBWFubl8xCQC2AgEJAGUCBQNhbm4AAQoBCWNhbGNETmV4dAEBZAQCZGQJALwCAwUBZAUBZAUEYml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ZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIEAWQIBQskdDAxNDgwMTUyOAJfMQQFZm91bmQIBQskdDAxNDgwMTUyOAJfMgMFBWZvdW5kBQFkCQACAQkArAICAhlEIGNhbGN1bGF0aW9uIGVycm9yLCBEID0gCQCmAwEFAWQBAWkBBGNhbGMCA3hwMAN4cDEEAUQJAQRnZXREAQkAzAgCCQC2AgEFA3hwMAkAzAgCCQC2AgEFA3hwMQUDbmlsBAZTY2FsZTgAgMLXLwQDcmVzANcICQDMCAIJAQxJbnRlZ2VyRW50cnkCAgFECQCgAwEFAUQJAMwIAgkBC0RlbGV0ZUVudHJ5AQIFYW5uXzEJAMwIAgkBC0RlbGV0ZUVudHJ5AQIFYW5uX3MFA25pbAECdHgBBnZlcmlmeQAGDOkHew==", "height": 2499907, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G9q3kNbDJhi46ThmyMyEAyGEX1kgJWsuH3zUbb46efDH Next: 6eTduhG46VF9pJaCvc9n1VDpDMpSJej9Wa31NWxFJHXp Diff:
OldNewDifferences
8686 let D = getD([toBigInt(xp0), toBigInt(xp1)])
8787 let Scale8 = 100000000
8888 let res = 1111
89-[IntegerEntry("D", toInt(D))]
89+[IntegerEntry("D", toInt(D)), DeleteEntry("ann_1"), DeleteEntry("ann_s")]
9090 }
9191
9292
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let Amult = "100"
2323
2424 let A = "1000"
2525
2626 func getD (xp) = {
2727 let xp0 = xp[0]
2828 let xp1 = xp[1]
2929 let s = (xp0 + xp1)
3030 if ((s == big0))
3131 then big0
3232 else {
3333 let a = parseIntValue(A)
3434 let ann = (a * 2)
3535 let p = fraction(xp0, xp1, big1)
3636 let xp0_xp1_n_n = fraction(p, big4, big1)
3737 let ann_s = fraction(toBigInt(ann), s, big1)
3838 let ann_1 = toBigInt((ann - 1))
3939 func calcDNext (d) = {
4040 let dd = fraction(d, d, big1)
4141 let ddd = fraction(dd, d, big1)
4242 let dp = fraction(ddd, big1, xp0_xp1_n_n)
4343 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
4444 }
4545
4646 func calc (acc,i) = if (acc._2)
4747 then acc
4848 else {
4949 let d = acc._1
5050 let dNext = calcDNext(d)
5151 let dDiffRaw = (dNext - value(d))
5252 let dDiff = if ((big0 > dDiffRaw))
5353 then -(dDiffRaw)
5454 else dDiffRaw
5555 if ((big1 >= dDiff))
5656 then $Tuple2(dNext, true)
5757 else $Tuple2(dNext, false)
5858 }
5959
6060 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
6161 let $t014801528 = {
6262 let $l = arr
6363 let $s = size($l)
6464 let $acc0 = $Tuple2(s, false)
6565 func $f0_1 ($a,$i) = if (($i >= $s))
6666 then $a
6767 else calc($a, $l[$i])
6868
6969 func $f0_2 ($a,$i) = if (($i >= $s))
7070 then $a
7171 else throw("List size exceeds 18")
7272
7373 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
7474 }
7575 let d = $t014801528._1
7676 let found = $t014801528._2
7777 if (found)
7878 then d
7979 else throw(("D calculation error, D = " + toString(d)))
8080 }
8181 }
8282
8383
8484 @Callable(i)
8585 func calc (xp0,xp1) = {
8686 let D = getD([toBigInt(xp0), toBigInt(xp1)])
8787 let Scale8 = 100000000
8888 let res = 1111
89-[IntegerEntry("D", toInt(D))]
89+[IntegerEntry("D", toInt(D)), DeleteEntry("ann_1"), DeleteEntry("ann_s")]
9090 }
9191
9292
9393 @Verifier(tx)
9494 func verify () = true
9595

github/deemru/w8io/169f3d6 
25.00 ms