tx · B3mJzk2x1Wdf6zoAmt6XiBCbN3mAfjpJxX4skhd3vwvN 3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42: -0.00200000 Waves 2022.06.29 15:39 [2117739] smart account 3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42 > SELF 0.00000000 Waves
{ "type": 13, "id": "B3mJzk2x1Wdf6zoAmt6XiBCbN3mAfjpJxX4skhd3vwvN", "fee": 200000, "feeAssetId": null, "timestamp": 1656506416742, "version": 2, "chainId": 84, "sender": "3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42", "senderPublicKey": "Bm8NA6cDADuRW1tDcjPsFdpsoUGwdxSD16MjDxtar9JB", "proofs": [ "4GjDEi5T6SXBwNvUdzZp8uFZXFR6Uxw6eveBJLaQXD29rdjPenptCmwfafaQvTTLGbAAdkzuyTqBmNpzBBShghWQ" ], "script": "base64:AAIFAAAAAAAAABIIAhIDCgEIEgMKAQESBAoCAQEAAAAGAAAAAAlzZXBhcmF0b3ICAAAAAV8BAAAAFmdldEFkZHJUb0ludE1hcHBpbmdLZXkAAAACAAAAC21hcHBpbmdOYW1lAAAABGFkZHIJAAS5AAAAAgkABEwAAAACBQAAAAttYXBwaW5nTmFtZQkABEwAAAACBQAAAARhZGRyBQAAAANuaWwFAAAACXNlcGFyYXRvcgEAAAAYZ2V0QWRkclRvSW50TWFwcGluZ1ZhbHVlAAAAAgAAAAttYXBwaW5nTmFtZQAAAARhZGRyCQAEtQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAQAAABZnZXRBZGRyVG9JbnRNYXBwaW5nS2V5AAAAAgUAAAALbWFwcGluZ05hbWUFAAAABGFkZHICAAAAAV8BAAAAGGdldEFkZHJUb0ludE1hcHBpbmdJbmRleAAAAAIAAAALbWFwcGluZ05hbWUAAAAEYWRkcgkAAZAAAAABCQEAAAAYZ2V0QWRkclRvSW50TWFwcGluZ1ZhbHVlAAAAAgIAAAAJbWFwU3R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lAAAAAWkBAAAAE2dldEVsZW1lbnRGcm9tQXJyYXkAAAACAAAABWluZGV4AAAAB2luZGV4SW4DCQAAZwAAAAIJAQAAABpnZXRBZGRyVG9JbnRNYXBwaW5nSW5kZXhJbgAAAAEFAAAAB2luZGV4SW4JAABlAAAAAgUAAAAHaW5kZXhJbgAAAAAAAAAAAQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAEyCQABkQAAAAIJAAS1AAAAAgkAAZEAAAACCQEAAAAYZ2V0QWRkclRvSW50TWFwcGluZ1ZhbHVlAAAAAgIAAAAJbWFwU3RyaW5nCQAEJQAAAAEFAAAABHRoaXMFAAAABWluZGV4AgAAAAEvCQAAZQAAAAIFAAAAB2luZGV4SW4AAAAAAAAAAAEFAAAAA25pbAkAAAIAAAABAgAAAAxvdXQgb2YgcmFuZ2UAAAAAzj4UMg==", "height": 2117739, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: KggAQjm8Q22W8Az4a1EAmUMbuYFRfmf3jjGx7A265Su Next: EZQvEE3PMuahrCbsRp33ww9D3w5xMqjd5qxMsUwQRS6T 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 | func getAddrToIntMappingKey (mappingName,addr) = makeString([mappingName, addr], separator) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func getAddrToIntMappingValue (mappingName,addr) = split(getStringValue(this, getAddrToIntMappingKey(mappingName, addr)), "_") | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getAddrToIntMappingIndex (mappingName,addr) = size(getAddrToIntMappingValue("mapString", addr)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getAddrToIntMappingIndexIn (indexIn) = size(split(getAddrToIntMappingValue("mapString", toString(this))[indexIn], "/")) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func setAddrToIntMappingValue (mappingName,addr,val) = if ((300 >= size(val))) | |
19 | 19 | then StringEntry(getAddrToIntMappingKey("mapString", addr), val) | |
20 | 20 | else throw("overcrowded") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(i) | |
24 | 24 | func setStruct (valueInt) = [setAddrToIntMappingValue("mapString", toString(this), valueInt)] | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func getArrayFromStruct (index) = if ((getAddrToIntMappingIndex("mapString", toString(this)) >= (index - 1))) | |
30 | 30 | then [StringEntry("1", getAddrToIntMappingValue("mapString", toString(this))[(index - 1)])] | |
31 | 31 | else throw("out of range") | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(i) | |
36 | 36 | func getElementFromArray (index,indexIn) = if ((getAddrToIntMappingIndexIn(indexIn) >= (indexIn - 1))) | |
37 | 37 | then [StringEntry("2", split(getAddrToIntMappingValue("mapString", toString(this))[index], "/")[(indexIn - 1)])] | |
38 | 38 | else throw("out of range") | |
39 | 39 | ||
40 | 40 |
github/deemru/w8io/fabc49c 27.99 ms ◑