tx · WuUEuiqNd1TFUBJtDZTkM3aNw2YZKEdJPSb23EJ4gsP

3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d:  -0.01000000 Waves

2022.06.09 16:39 [2088909] smart account 3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d > SELF 0.00000000 Waves

{ "type": 13, "id": "WuUEuiqNd1TFUBJtDZTkM3aNw2YZKEdJPSb23EJ4gsP", "fee": 1000000, "feeAssetId": null, "timestamp": 1654782001749, "version": 2, "chainId": 84, "sender": "3N5HkfGrou8T5NyAuZVncnAdVuGmSHuMQ5d", "senderPublicKey": "AZLzseQJi9XUNNp7cN6jwqDdSmQvDPNNqu7aQ6ujbsnJ", "proofs": [ "2hK6Y5LFe7CNkKVaPcpkd7HdyJDnRAznungLrMzkBjB3rCytvNVsftekaUK6NA3JgnSdkpP6nyssPUrVAPZVKt94" ], "script": "base64:AAIFAAAAAAAAAAsIAhIHCgUBAQEBAQAAAAAAAAABAAAAAWkBAAAABGNhbGMAAAAFAAAACGFtb3VudEluAAAADmFzc2V0SW5CYWxhbmNlAAAAD2Fzc2V0T3V0QmFsYW5jZQAAAA13ZWlnaHRBc3NldEluAAAADndlaWdodEFzc2V0T3V0BAAAAAZTY2FsZTgAAAAAAAX14QAEAAAAB3Bvd0Jhc2UJAAE9AAAABAkAATYAAAABBQAAAA5hc3NldEluQmFsYW5jZQkAATYAAAABCQAAaAAAAAIFAAAABlNjYWxlOAUAAAAGU2NhbGU4CQABNgAAAAEJAABkAAAAAgUAAAAOYXNzZXRJbkJhbGFuY2UFAAAACGFtb3VudEluBQAAAAZIQUxGVVAEAAAAC3Bvd0V4cG9uZW50CQABNgAAAAEJAABrAAAAAwUAAAANd2VpZ2h0QXNzZXRJbgAAAAAAAAAnEAUAAAAOd2VpZ2h0QXNzZXRPdXQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQIAAAAEa2V5NQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAHcG93QmFzZQkAAaAAAAABBQAAAAdwb3dCYXNlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAtwb3dFeHBvbmVudAkAAaAAAAABBQAAAAtwb3dFeHBvbmVudAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAaXrnCl", "height": 2088909, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4PU9xiKpZxtAJtqH1QGDAy6tPjyJBvZBXzQ8LKnQfCS6 Next: DwsH2kvrHfrFnsXCzC5W1PPCmBWUdQmMYFpHijBnCKdH Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func calc () = {
8- let ssss = 12345678
9- let sss2 = $Tuple4("Hello Waves", 42, true, ssss)
10-[DeleteEntry("bin"), DeleteEntry("bool"), DeleteEntry("int"), DeleteEntry("str"), DeleteEntry("key3")]
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+[DeleteEntry("key5"), IntegerEntry("powBase", toInt(powBase)), IntegerEntry("powExponent", toInt(powExponent))]
1112 }
1213
1314
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func calc () = {
8- let ssss = 12345678
9- let sss2 = $Tuple4("Hello Waves", 42, true, ssss)
10-[DeleteEntry("bin"), DeleteEntry("bool"), DeleteEntry("int"), DeleteEntry("str"), DeleteEntry("key3")]
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+[DeleteEntry("key5"), IntegerEntry("powBase", toInt(powBase)), IntegerEntry("powExponent", toInt(powExponent))]
1112 }
1213
1314
1415 @Verifier(tx)
1516 func verify () = true
1617

github/deemru/w8io/169f3d6 
42.58 ms