tx · 3BwbhS9qoQoCxDggSjkH4LMvPNHfxS1475NkvCjwv1Vd 3N44cXXhd7Xk7hr7JkLa3mTStLQnFpUfKgC: -0.00200000 Waves 2024.04.28 22:51 [3083151] smart account 3N44cXXhd7Xk7hr7JkLa3mTStLQnFpUfKgC > SELF 0.00000000 Waves
{ "type": 13, "id": "3BwbhS9qoQoCxDggSjkH4LMvPNHfxS1475NkvCjwv1Vd", "fee": 200000, "feeAssetId": null, "timestamp": 1714333961006, "version": 1, "sender": "3N44cXXhd7Xk7hr7JkLa3mTStLQnFpUfKgC", "senderPublicKey": "EMFFTUQwpCrBAT6yi2xNweK94ew8LJEghFxaD7GBTCrN", "proofs": [ "2GJYwrhPFRGR3WjoFDWLWFzo7mKMDtCBMsiAUkn7feTjc5rysMCEWkBogj2wKVLfkCuYUqVqwkukPut9ag48wqhu" ], "script": "base64:BgIGCAISABIABQAGdXNkbklkASAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAAJdXNkbklkU3RyAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAAIcHV6emxlSWQBIFQg/ZqGxjcfmqC9eEjI30n8t7nczOflywY5wXQfieTbAAtwdXp6bGVJZFN0cgIsNmZRUmFMM0wyNW5HcWV2WFQ4a3h3akJTMjhma0JFcnJKNjlKWWNqN3FLZ1cBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAACAWkBE3N3YXBBbmRUb3B1cFN0YWtpbmcABAdiYWxhbmNlCQDwBwIFBHRoaXMFBnVzZG5JZAQDaW52CQD8BwQJAQdBZGRyZXNzAQEaAVSv8yQUHiM2iXLvdiGKWE9nvJtEVfIzHpcCEmV4Y2hhbmdlVGhlbkludm9rZQkAzAgCBQtwdXp6bGVJZFN0cgkAzAgCAiMzTXU3VkhBV216RnVDOENDMWpMNjZlZ3dXZHpNbVUzR01kTgkAzAgCAgt0b3BVcFJld2FyZAkAzAgCBQNuaWwJAMwIAgAABQNuaWwJAMwIAgkBD0F0dGFjaGVkUGF5bWVudAIFBnVzZG5JZAUHYmFsYW5jZQUDbmlsAwkAAAIFA2ludgUDaW52CQDMCAIJAQxJbnRlZ2VyRW50cnkCAg5zdGF0c19sYXN0U3dhcAUGaGVpZ2h0CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgICE3N0YXRzX3RvdGFsU3dhcHBlZF8FCXVzZG5JZFN0cgkAZAIJAQ10cnlHZXRJbnRlZ2VyAQkArAICAhNzdGF0c190b3RhbFN3YXBwZWRfBQl1c2RuSWRTdHIFB2JhbGFuY2UFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQx0b3B1cFN0YWtpbmcABANpbnYJAPwHBAkBB0FkZHJlc3MBARoBVDkA0yfX6Pybzd6Nx/bYRYn8qLmg8Z7zZQILdG9wVXBSZXdhcmQFA25pbAkAzAgCCQEPQXR0YWNoZWRQYXltZW50AgUIcHV6emxlSWQJAPAHAgUEdGhpcwUIcHV6emxlSWQFA25pbAMJAAACBQNpbnYFA2ludgkAzAgCCQEMSW50ZWdlckVudHJ5AgIOc3RhdHNfbGFzdFN3YXAFBmhlaWdodAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tlebpcOI8=", "chainId": 84, "height": 3083151, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D6UX9eVFsCGx9iSHFkKUScxc5UfuwhMtNjHpbeTS7dmp Next: none Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let usdnIdStr = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" | |
7 | 7 | ||
8 | - | let puzzleId = base58' | |
8 | + | let puzzleId = base58'6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW' | |
9 | 9 | ||
10 | - | let puzzleIdStr = " | |
10 | + | let puzzleIdStr = "6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW" | |
11 | 11 | ||
12 | 12 | func tryGetInteger (key) = match getInteger(this, key) { | |
13 | 13 | case b: Int => |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let usdnId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
5 | 5 | ||
6 | 6 | let usdnIdStr = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" | |
7 | 7 | ||
8 | - | let puzzleId = base58' | |
8 | + | let puzzleId = base58'6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW' | |
9 | 9 | ||
10 | - | let puzzleIdStr = " | |
10 | + | let puzzleIdStr = "6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW" | |
11 | 11 | ||
12 | 12 | func tryGetInteger (key) = match getInteger(this, key) { | |
13 | 13 | case b: Int => | |
14 | 14 | b | |
15 | 15 | case _ => | |
16 | 16 | 0 | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | @Callable(i) | |
21 | 21 | func swapAndTopupStaking () = { | |
22 | 22 | let balance = assetBalance(this, usdnId) | |
23 | 23 | let inv = invoke(Address(base58'3N5xRJDevNVcgHnJ2pgKKS2DnxVmPrgzW1C'), "exchangeThenInvoke", [puzzleIdStr, "3Mu7VHAWmzFuC8CC1jL66egwWdzMmU3GMdN", "topUpReward", nil, 0], [AttachedPayment(usdnId, balance)]) | |
24 | 24 | if ((inv == inv)) | |
25 | 25 | then [IntegerEntry("stats_lastSwap", height), IntegerEntry(("stats_totalSwapped_" + usdnIdStr), (tryGetInteger(("stats_totalSwapped_" + usdnIdStr)) + balance))] | |
26 | 26 | else throw("Strict value is not equal to itself.") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(i) | |
32 | 32 | func topupStaking () = { | |
33 | 33 | let inv = invoke(Address(base58'3Mu7VHAWmzFuC8CC1jL66egwWdzMmU3GMdN'), "topUpReward", nil, [AttachedPayment(puzzleId, assetBalance(this, puzzleId))]) | |
34 | 34 | if ((inv == inv)) | |
35 | 35 | then [IntegerEntry("stats_lastSwap", height)] | |
36 | 36 | else throw("Strict value is not equal to itself.") | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Verifier(tx) | |
41 | 41 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | 42 |
github/deemru/w8io/026f985 22.89 ms ◑