tx · FbTnAaqyuvcmQQSbMVdTictW7CuEm86aGQSy7SC6esem 3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d: -0.01000000 Waves 2022.06.09 17:17 [2088953] smart account 3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d > SELF 0.00000000 Waves
{ "type": 13, "id": "FbTnAaqyuvcmQQSbMVdTictW7CuEm86aGQSy7SC6esem", "fee": 1000000, "feeAssetId": null, "timestamp": 1654784296380, "version": 2, "chainId": 84, "sender": "3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d", "senderPublicKey": "AZLzseQJi9XUNNp7cN6jwqDdSmQvDPNNqu7aQ6ujbsnJ", "proofs": [ "5p8qhVk3rxfNw5mFPuFV1BHTiRHQ86VyM1y1Zobf1PYsFhcgDjMBDQ9rZ2kkmBAKohERRirKtLA137CL8LQYZFP1" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAEY2FsYwAAAAAJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQIAAAAEa2V5NQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAaywvQR", "height": 2088953, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J9SA157Kib2khDvHEgpXJnkKbPX5C2AaCUpCBkbmxhDU Next: AT3vhXRAorVaxbu58hY72D6hWEbTRk9j139or4QUQstE Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func calc (amountIn,assetInBalance,assetOutBalance,weightAssetIn,weightAssetOut) = { | |
8 | - | let Scale8 = 100000000 | |
9 | - | let powBase = fraction(toBigInt(assetInBalance), toBigInt((Scale8 * Scale8)), toBigInt((assetInBalance + amountIn)), HALFUP) | |
10 | - | let powExponent = toBigInt(fraction(weightAssetIn, 10000, weightAssetOut)) | |
11 | - | let powRes = toInt(pow(powBase, 16, powExponent, 4, 16, CEILING)) | |
12 | - | let res = fraction(assetOutBalance, ((Scale8 * Scale8) - powRes), (Scale8 * Scale8), DOWN) | |
13 | - | [DeleteEntry("key5"), IntegerEntry("powBase", toInt(powBase)), IntegerEntry("powExponent", toInt(powExponent)), IntegerEntry("powRes", powRes), IntegerEntry("res", res)] | |
14 | - | } | |
7 | + | func calc () = [DeleteEntry("key5")] | |
15 | 8 | ||
16 | 9 | ||
17 | 10 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func calc (amountIn,assetInBalance,assetOutBalance,weightAssetIn,weightAssetOut) = { | |
8 | - | let Scale8 = 100000000 | |
9 | - | let powBase = fraction(toBigInt(assetInBalance), toBigInt((Scale8 * Scale8)), toBigInt((assetInBalance + amountIn)), HALFUP) | |
10 | - | let powExponent = toBigInt(fraction(weightAssetIn, 10000, weightAssetOut)) | |
11 | - | let powRes = toInt(pow(powBase, 16, powExponent, 4, 16, CEILING)) | |
12 | - | let res = fraction(assetOutBalance, ((Scale8 * Scale8) - powRes), (Scale8 * Scale8), DOWN) | |
13 | - | [DeleteEntry("key5"), IntegerEntry("powBase", toInt(powBase)), IntegerEntry("powExponent", toInt(powExponent)), IntegerEntry("powRes", powRes), IntegerEntry("res", res)] | |
14 | - | } | |
7 | + | func calc () = [DeleteEntry("key5")] | |
15 | 8 | ||
16 | 9 | ||
17 | 10 | @Verifier(tx) | |
18 | 11 | func verify () = true | |
19 | 12 |
github/deemru/w8io/169f3d6 29.68 ms ◑![]()