tx · 4jBKF6N8YpnumZs3u89hdtyKKCT7qxYymwv8whjbVgNW 3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn: -0.01500000 Waves 2022.07.27 16:06 [2158257] smart account 3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn > SELF 0.00000000 Waves
{ "type": 13, "id": "4jBKF6N8YpnumZs3u89hdtyKKCT7qxYymwv8whjbVgNW", "fee": 1500000, "feeAssetId": null, "timestamp": 1658927189373, "version": 2, "chainId": 84, "sender": "3N62UHvyvvdresjwfsmW4UX2ffDjcDPAkbn", "senderPublicKey": "5XyQhNxDw1J4WdCZJr14webbFVzP2oXx9Z2BxoYpATJa", "proofs": [ "XuySybKdd3PeKuEoDwokJoPzJkEpXut1kshCbtW9sT5TbLYT6NqxwJ6B1JczpK9QiaeYniRB4dnWXFnq14fXhgf" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAACAAAAAAlscFRva2VuSWQBAAAAIMIdBqkZfzV/i4CuJnqr29nJI0J9DWiPzidG/cjZWuLnAAAAAA1yZXdhcmRUb2tlbklkAQAAACCqT/PwWY2xlHOeKCUkm14lKMYYhy6I96TnTvbJ9ReluAAAAAIAAAABaQEAAAAGcmV3YXJkAAAAAAQAAAABcAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAIhPQAAAAIIBQAAAAFwAAAAB2Fzc2V0SWQFAAAACWxwVG9rZW5JZAkAAAIAAAABAgAAABFJbmNvcnJlY3QgcGF5bWVudAQAAAAFbHBRdHkICQEAAAAFdmFsdWUAAAABCQAD7AAAAAEFAAAACWxwVG9rZW5JZAAAAAhxdWFudGl0eQQAAAAJcmV3YXJkUXR5CAkBAAAABXZhbHVlAAAAAQkAA+wAAAABBQAAAA1yZXdhcmRUb2tlbklkAAAACHF1YW50aXR5BAAAAAVzaGFyZQkAAGsAAAADCAUAAAABcAAAAAZhbW91bnQFAAAACXJld2FyZFF0eQUAAAAFbHBRdHkEAAAAAXIJAAP8AAAABAUAAAAEdGhpcwIAAAAEYnVybgkABEwAAAACCAUAAAABcAAAAAZhbW91bnQFAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAAFyBQAAAAFyCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAFc2hhcmUFAAAADXJld2FyZFRva2VuSWQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAEYnVybgAAAAEAAAAGYW1vdW50CQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAJbHBUb2tlbklkBQAAAAZhbW91bnQFAAAAA25pbAAAAAAmaMeN", "height": 2158257, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4WeAzy9U2RjZdiYDXMbaPoViHsBBaNdyQmNNYAzaS3sm Next: none Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let lpTokenId = base58' | |
4 | + | let lpTokenId = base58'E4jmKWZ4pBuhNYMwUryuWrHpEngo2mR27ANgAZBVdi5U' | |
5 | 5 | ||
6 | 6 | let rewardTokenId = base58'CTq287qYTyvgyDzaaVYuwWeceZUuTsHSKLEfg9YZQFKu' | |
7 | 7 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let lpTokenId = base58' | |
4 | + | let lpTokenId = base58'E4jmKWZ4pBuhNYMwUryuWrHpEngo2mR27ANgAZBVdi5U' | |
5 | 5 | ||
6 | 6 | let rewardTokenId = base58'CTq287qYTyvgyDzaaVYuwWeceZUuTsHSKLEfg9YZQFKu' | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func reward () = { | |
10 | 10 | let p = value(i.payments[0]) | |
11 | 11 | if ((p.assetId != lpTokenId)) | |
12 | 12 | then throw("Incorrect payment") | |
13 | 13 | else { | |
14 | 14 | let lpQty = value(assetInfo(lpTokenId)).quantity | |
15 | 15 | let rewardQty = value(assetInfo(rewardTokenId)).quantity | |
16 | 16 | let share = fraction(p.amount, rewardQty, lpQty) | |
17 | 17 | let r = invoke(this, "burn", [p.amount], nil) | |
18 | 18 | if ((r == r)) | |
19 | 19 | then [ScriptTransfer(i.caller, share, rewardTokenId)] | |
20 | 20 | else throw("Strict value is not equal to itself.") | |
21 | 21 | } | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(i) | |
27 | 27 | func burn (amount) = [Burn(lpTokenId, amount)] | |
28 | 28 | ||
29 | 29 |
github/deemru/w8io/169f3d6 36.54 ms ◑