tx · 8UrteAdp2xiZp7hbViMw5NDNDGtmZbgVxCzXdSDpWKHg 3MshLEZwkjz17HtsouWjFBXrXkPBVBHD7gm: -0.00200000 Waves 2022.07.11 14:33 [2135022] smart account 3MshLEZwkjz17HtsouWjFBXrXkPBVBHD7gm > SELF 0.00000000 Waves
{ "type": 13, "id": "8UrteAdp2xiZp7hbViMw5NDNDGtmZbgVxCzXdSDpWKHg", "fee": 200000, "feeAssetId": null, "timestamp": 1657539185259, "version": 2, "chainId": 84, "sender": "3MshLEZwkjz17HtsouWjFBXrXkPBVBHD7gm", "senderPublicKey": "CAYySFNuYSLU5jGWNBottZuyHbvGh2JxucGYSXF3aEi8", "proofs": [ "3MkbijSLyRzZYmPLyps33TKy25eEoaUzM3vLLGrKnB73hDsqx4Fhku4GpiZDhexFkJFrPEeraQeyV3df67pFpDnC" ], "script": "base64:AAIFAAAAAAAAABIIAhIDCgEIEgMKAQESBAoCAQEAAAAHAAAAAAlzZXBhcmF0b3ICAAAAAV8AAAAAD3NlY29uZFNlcGFyYXRvcgIAAAABLwEAAAAWZ2V0QWRkclRvSW50TWFwcGluZ0tleQAAAAIAAAALbWFwcGluZ05hbWUAAAAEYWRkcgkABLkAAAACCQAETAAAAAIFAAAAC21hcHBpbmdOYW1lCQAETAAAAAIFAAAABGFkZHIFAAAAA25pbAUAAAAJc2VwYXJhdG9yAQAAAA9nZXRMaXN0T2ZBcnJheXMAAAACAAAAC21hcHBpbmdOYW1lAAAABGFkZHIJAAS1AAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkBAAAAFmdldEFkZHJUb0ludE1hcHBpbmdLZXkAAAACBQAAAAttYXBwaW5nTmFtZQUAAAAEYWRkcgUAAAAJc2VwYXJhdG9yAQAAABhnZXRBZGRyVG9JbnRNYXBwaW5nSW5kZXgAAAACAAAAC21hcHBpbmdOYW1lAAAABGFkZHIJAAGQAAAAAQkBAAAAD2dldExpc3RPZkFycmF5cwAAAAICAAA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AAAAIAAAAFaW5kZXgAAAAHaW5kZXhJbgMJAABnAAAAAgkBAAAAGmdldEFkZHJUb0ludE1hcHBpbmdJbmRleEluAAAAAQUAAAAHaW5kZXhJbgUAAAAHaW5kZXhJbgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAEyCQABkQAAAAIJAAS1AAAAAgkAAZEAAAACCQEAAAAPZ2V0TGlzdE9mQXJyYXlzAAAAAgIAAAAJbWFwU3RyaW5nCQAEJQAAAAEFAAAABHRoaXMFAAAABWluZGV4BQAAAA9zZWNvbmRTZXBhcmF0b3IFAAAAB2luZGV4SW4FAAAAA25pbAkAAAIAAAABAgAAAAxvdXQgb2YgcmFuZ2UAAAAAWU7fiw==", "height": 2135022, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4N3vqr8PYB7ikner8FTcMKatHY8sx5c55cP1f2N645DW Next: 3pnAF6yPcK9Ngs67yCsuGYQEsxtMjjytcvzNVPYMnDhA Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "_" | |
5 | 5 | ||
6 | 6 | let secondSeparator = "/" | |
7 | 7 | ||
8 | 8 | func getAddrToIntMappingKey (mappingName,addr) = makeString([mappingName, addr], separator) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func getListOfArrays (mappingName,addr) = split(getStringValue(this, getAddrToIntMappingKey(mappingName, addr)), separator) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func getAddrToIntMappingIndex (mappingName,addr) = size(getListOfArrays("mapString", addr)) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func getAddrToIntMappingIndexIn (indexIn) = size(split(getListOfArrays("mapString", toString(this))[indexIn], secondSeparator)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func setAddrToIntMappingValue (mappingName,addr,val) = if ((150 >= size(val))) | |
21 | 21 | then StringEntry(getAddrToIntMappingKey("mapString", addr), val) | |
22 | 22 | else throw("overcrowded") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(i) | |
26 | 26 | func setStruct (valueInt) = [setAddrToIntMappingValue("mapString", toString(this), valueInt)] | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func getArrayFromStruct (index) = if ((getAddrToIntMappingIndex("mapString", toString(this)) >= index)) | |
32 | 32 | then [StringEntry("1", getListOfArrays("mapString", toString(this))[index])] | |
33 | 33 | else throw("out of range") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(i) | |
38 | 38 | func getElementFromArray (index,indexIn) = if ((getAddrToIntMappingIndexIn(indexIn) >= indexIn)) | |
39 | 39 | then [StringEntry("2", split(getListOfArrays("mapString", toString(this))[index], secondSeparator)[indexIn])] | |
40 | 40 | else throw("out of range") | |
41 | 41 | ||
42 | 42 |
github/deemru/w8io/026f985 25.63 ms ◑