tx · 74c8uucDboTmsS9E2MosCooGPqdmebGhX3ybLvcM5AQG 3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42: -0.00100000 Waves 2022.06.29 17:27 [2117851] smart account 3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42 > SELF 0.00000000 Waves
{ "type": 13, "id": "74c8uucDboTmsS9E2MosCooGPqdmebGhX3ybLvcM5AQG", "fee": 100000, "feeAssetId": null, "timestamp": 1656512887620, "version": 2, "chainId": 84, "sender": "3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42", "senderPublicKey": "Bm8NA6cDADuRW1tDcjPsFdpsoUGwdxSD16MjDxtar9JB", "proofs": [ "5xsnwLL3BJSjZVDYHxHv7Z6K7UZM7UrBhdcwR7hhyibKBbJCmZKPqdf68Vv16f3LJYfXxdrG8jHGjrg7ZSJZs82e" ], "script": "base64:AAIFAAAAAAAAAAsIAhIFCgMBAQgSAAAAAAAAAAACAAAAAWkBAAAADmNvbnZlcnRUb0J5dGVzAAAAAwAAAAVmaXJzdAAAAAZzZWNvbmQAAAADc3RyBAAAAApmaXJzdEJ5dGVzCQABmgAAAAEFAAAABWZpcnN0BAAAAAtzZWNvbmRCeXRlcwkAAZoAAAABBQAAAAZzZWNvbmQEAAAACHN0ckJ5dGVzCQABmwAAAAEFAAAAA3N0cgQAAAADcmVzCQAAywAAAAIJAADLAAAAAgUAAAAKZmlyc3RCeXRlcwUAAAALc2Vjb25kQnl0ZXMFAAAACHN0ckJ5dGVzCQAETAAAAAIJAQAAAAtCaW5hcnlFbnRyeQAAAAICAAAAA3JlcwUAAAADcmVzBQAAAANuaWwAAAABaQEAAAAKdHJ5VG9QYXJzZQAAAAAEAAAABWJ5dGVzCQEAAAARQGV4dHJOYXRpdmUoMTA1MikAAAACBQAAAAR0aGlzAgAAAANyZXMEAAAADGZpcnN0SW50ZWdlcgkAAMkAAAACBQAAAAVieXRlcwAAAAAAAAAACAQAAAANc2Vjb25kSW50ZWdlcgkAAMkAAAACCQAAygAAAAIFAAAABWJ5dGVzAAAAAAAAAAAIAAAAAAAAAAAIBAAAAApzdHJpbmdUYWlsCQAAygAAAAIFAAAABWJ5dGVzAAAAAAAAAAAQCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAxmaXJzdEludGVnZXIJAASxAAAAAQUAAAAMZmlyc3RJbnRlZ2VyCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAA1zZWNvbmRJbnRlZ2VyCQAEsQAAAAEFAAAADXNlY29uZEludGVnZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAKc3RyaW5nVGFpbAkABLAAAAABBQAAAApzdHJpbmdUYWlsBQAAAANuaWwAAAAAe3LAzA==", "height": 2117851, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AEZAwBxLTax1azLk1zgTcXfcmxTXCSR6GxLLhrua4KLz Next: 734ZcnUizajtqXcsdKUwVwDeSB7kY56qh9dNmJMW6yZD Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let separator = "_" | |
5 | - | ||
6 | - | func getAddrToIntMappingKey (mappingName,addr) = makeString([mappingName, addr], separator) | |
7 | - | ||
8 | - | ||
9 | - | func getAddrToIntMappingValue (mappingName,addr) = split(getStringValue(this, getAddrToIntMappingKey(mappingName, addr)), "_") | |
10 | - | ||
11 | - | ||
12 | - | func getAddrToIntMappingIndex (mappingName,addr) = size(getAddrToIntMappingValue("mapString", addr)) | |
13 | - | ||
14 | - | ||
15 | - | func getAddrToIntMappingIndexIn (indexIn) = size(split(getAddrToIntMappingValue("mapString", toString(this))[indexIn], "/")) | |
16 | - | ||
17 | - | ||
18 | - | func setAddrToIntMappingValue (mappingName,addr,val) = if ((150 >= size(val))) | |
19 | - | then StringEntry(getAddrToIntMappingKey("mapString", addr), val) | |
20 | - | else throw("overcrowded") | |
21 | 4 | ||
22 | 5 | ||
23 | 6 | @Callable(i) | |
24 | - | func setStruct (valueInt) = [setAddrToIntMappingValue("mapString", toString(this), valueInt)] | |
7 | + | func convertToBytes (first,second,str) = { | |
8 | + | let firstBytes = toBytes(first) | |
9 | + | let secondBytes = toBytes(second) | |
10 | + | let strBytes = toBytes(str) | |
11 | + | let res = ((firstBytes + secondBytes) + strBytes) | |
12 | + | [BinaryEntry("res", res)] | |
13 | + | } | |
25 | 14 | ||
26 | 15 | ||
27 | 16 | ||
28 | 17 | @Callable(i) | |
29 | - | func getArrayFromStruct (index) = if ((getAddrToIntMappingIndex("mapString", toString(this)) >= index)) | |
30 | - | then [StringEntry("1", getAddrToIntMappingValue("mapString", toString(this))[index])] | |
31 | - | else throw("out of range") | |
32 | - | ||
33 | - | ||
34 | - | ||
35 | - | @Callable(i) | |
36 | - | func getElementFromArray (index,indexIn) = if ((getAddrToIntMappingIndexIn(indexIn) >= indexIn)) | |
37 | - | then [StringEntry("2", split(getAddrToIntMappingValue("mapString", toString(this))[index], "/")[indexIn])] | |
38 | - | else throw("out of range") | |
18 | + | func tryToParse () = { | |
19 | + | let bytes = getBinaryValue(this, "res") | |
20 | + | let firstInteger = take(bytes, 8) | |
21 | + | let secondInteger = take(drop(bytes, 8), 8) | |
22 | + | let stringTail = drop(bytes, 16) | |
23 | + | [IntegerEntry("firstInteger", toInt(firstInteger)), IntegerEntry("secondInteger", toInt(secondInteger)), StringEntry("stringTail", toUtf8String(stringTail))] | |
24 | + | } | |
39 | 25 | ||
40 | 26 |
github/deemru/w8io/169f3d6 26.78 ms ◑