tx · Uweb62BE8nyR5CdxBREUg6iAFNC7dWLpCDeb7WTubFd

3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx:  -0.01000000 Waves

2023.05.17 17:14 [2582065] smart account 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx > SELF 0.00000000 Waves

{ "type": 13, "id": "Uweb62BE8nyR5CdxBREUg6iAFNC7dWLpCDeb7WTubFd", "fee": 1000000, "feeAssetId": null, "timestamp": 1684332971327, "version": 2, "chainId": 84, "sender": "3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx", "senderPublicKey": "2NK7BrUZMvnHzAoHnJfz3FuDBP5zYUNoxshB49AH2kbc", "proofs": [ "4JodycndqTNcnvzTvKZvaurZh2DBC6T73Hb2e5cvwWh9KJYpqCz88Ex1A97W7zV5TGE9k343Vt9qnC3VcoKUBik7" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAQZGVmaW5lZExpcXVpZGl0eQAAAAAEAAAACXRva2VuTmFtZQIAAAAPTGlxdWlkaXR5IFRva2VuBAAAAAt0b2tlblN5bWJvbAIAAAADTFFUBAAAAAhkZWNpbWFscwAAAAAAAAAACAQAAAANaW5pdGlhbFN1cHBseQAAAAAAO5rKAAQAAAAJJHQwMzM2NDM4CQAFFAAAAAIJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAHYXNzZXRJZAkBAAAABXZhbHVlAAAAAQgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BAAAAAZhc3NldDAIBQAAAAkkdDAzMzY0MzgAAAACXzEEAAAAB2Ftb3VudDAIBQAAAAkkdDAzMzY0MzgAAAACXzIEAAAACSR0MDQzOTU2OAkABRQAAAACCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEICQABkQAAAAIIBQAAAAFpAAAACH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AAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXngV2VX", "height": 2582065, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6nGreWjVzHWQjw1UPdk8GhnNwKVZgfrVbZ4ccypUGAkf Next: F2QYekQkKhncyXz8SKqjfGa6SvG7NhV4S3QHGDh3e4aG Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func f () = nil
7+func definedLiquidity () = {
8+ let tokenName = "Liquidity Token"
9+ let tokenSymbol = "LQT"
10+ let decimals = 8
11+ let initialSupply = 1000000000
12+ let $t0336438 = $Tuple2(toBase58String(value(i.payments[0].assetId)), value(i.payments[0].amount))
13+ let asset0 = $t0336438._1
14+ let amount0 = $t0336438._2
15+ let $t0439568 = $Tuple2(toBase58String(value(i.payments[1].assetId)), value(i.payments[1].amount))
16+ let asset1 = $t0439568._1
17+ let amount1 = $t0439568._2
18+ let asset0Balance = assetBalance(this, value(i.payments[0].assetId))
19+ let asset1Balance = assetBalance(this, value(i.payments[1].assetId))
20+ let totalLiquidity = if (if ((amount0 != 0))
21+ then true
22+ else (amount1 != 0))
23+ then (asset0Balance * asset1Balance)
24+ else throw("liquidity undifined")
25+ let liquidityAmount = if (if ((amount0 == 0))
26+ then true
27+ else (amount1 == 0))
28+ then 0
29+ else ((amount0 * amount1) / totalLiquidity)
30+ let liquidityToken = [Issue(tokenName, tokenSymbol, liquidityAmount, decimals, true)]
31+ nil
32+ }
833
934
1035 @Verifier(tx)
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func f () = nil
7+func definedLiquidity () = {
8+ let tokenName = "Liquidity Token"
9+ let tokenSymbol = "LQT"
10+ let decimals = 8
11+ let initialSupply = 1000000000
12+ let $t0336438 = $Tuple2(toBase58String(value(i.payments[0].assetId)), value(i.payments[0].amount))
13+ let asset0 = $t0336438._1
14+ let amount0 = $t0336438._2
15+ let $t0439568 = $Tuple2(toBase58String(value(i.payments[1].assetId)), value(i.payments[1].amount))
16+ let asset1 = $t0439568._1
17+ let amount1 = $t0439568._2
18+ let asset0Balance = assetBalance(this, value(i.payments[0].assetId))
19+ let asset1Balance = assetBalance(this, value(i.payments[1].assetId))
20+ let totalLiquidity = if (if ((amount0 != 0))
21+ then true
22+ else (amount1 != 0))
23+ then (asset0Balance * asset1Balance)
24+ else throw("liquidity undifined")
25+ let liquidityAmount = if (if ((amount0 == 0))
26+ then true
27+ else (amount1 == 0))
28+ then 0
29+ else ((amount0 * amount1) / totalLiquidity)
30+ let liquidityToken = [Issue(tokenName, tokenSymbol, liquidityAmount, decimals, true)]
31+ nil
32+ }
833
934
1035 @Verifier(tx)
1136 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
1237

github/deemru/w8io/026f985 
41.69 ms