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