tx · 92vLrZm9hbHkihLyFJwtQxZ48axk58qxdK9VRsGUsZ2g 3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42: -0.00200000 Waves 2022.07.01 11:34 [2120355] smart account 3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42 > SELF 0.00000000 Waves
{ "type": 13, "id": "92vLrZm9hbHkihLyFJwtQxZ48axk58qxdK9VRsGUsZ2g", "fee": 200000, "feeAssetId": null, "timestamp": 1656664511873, "version": 2, "chainId": 84, "sender": "3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42", "senderPublicKey": "Bm8NA6cDADuRW1tDcjPsFdpsoUGwdxSD16MjDxtar9JB", "proofs": [ "4axjkq28MjDNGvRVaxJtSXDitTrn95Mk7ysVvCA7m96r4eGQHwX2KU8rvyHhGFooFmfMBmXvBWvnEKroyE85bBGG" ], "script": "base64:AAIFAAAAAAAAABQIAhIDCgEIEgMKAQgSABIECgIBAQAAAAYAAAAACXNlcGFyYXRvcgIAAAABXwAAAAAPc2Vjb25kU2VwYXJhdG9yAgAAAAEvAQAAABZnZXRBZGRyVG9JbnRNYXBwaW5nS2V5AAAAAwAAAAttYXBwaW5nTmFtZQAAAARhZGRyAAAACXNlcGFyYXRvcgkABLkAAAACCQAETAAAAAIFAAAAC21hcHBpbmdOYW1lCQAETAAAAAIFAAAABGFkZHIFAAAAA25pbAUAAAAJc2VwYXJhdG9yAQAAAAtnZXRFbGVtZW50cwAAAAMAAAALbWFwcGluZ05hbWUAAAAEYWRkcgAAAAlzZXBhcmF0b3IJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAQAAABZnZXRBZGRyVG9JbnRNYXBwaW5nS2V5AAAAAwUAAAALbWFwcGluZ05hbWUFAAAABGFkZHIFAAAACXNlcGFyYXRvcgEAAAAYc2V0QWRkclRvSW50TWFwcGluZ1ZhbHVlAAAAAgAAAAttYXBwaW5nTmFtZQAAAARhZGRyBAAAAAlzZWNvbmRLZXkJA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AAATZ2V0RWxlbWVudEZyb21BcnJheQAAAAIAAAAFaW5kZXgAAAAHaW5kZXhJbgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAEyCQEAAAALZ2V0RWxlbWVudHMAAAADAgAAAAltYXBTdHJpbmcJAAQlAAAAAQUAAAAEdGhpcwUAAAAPc2Vjb25kU2VwYXJhdG9yBQAAAANuaWwAAAAA6HPAEA==", "height": 2120355, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3e7WWfjzoi9jo7ovhz6ekJHanCXuint2Vy4DBdAhPUeA Next: 5mhxXwD9z4Tst4H8oXwvNiwngg9yVmKM6NX5ytPctFRH Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let separator = " | |
4 | + | let separator = "_" | |
5 | 5 | ||
6 | - | func getAddrToIntMappingKey (mappingName,addr) = makeString([mappingName, addr], separator) | |
6 | + | let secondSeparator = "/" | |
7 | + | ||
8 | + | func getAddrToIntMappingKey (mappingName,addr,separator) = makeString([mappingName, addr], separator) | |
7 | 9 | ||
8 | 10 | ||
9 | - | func generateStruct (a,b,c,d,e) = { | |
10 | - | let arr = [toString(a), toString(b), toString(c), toString(d), toString(e)] | |
11 | - | makeString(arr, separator) | |
11 | + | func getElements (mappingName,addr,separator) = getStringValue(this, getAddrToIntMappingKey(mappingName, addr, separator)) | |
12 | + | ||
13 | + | ||
14 | + | func setAddrToIntMappingValue (mappingName,addr) = { | |
15 | + | let secondKey = getAddrToIntMappingKey(mappingName, addr, secondSeparator) | |
16 | + | StringEntry(getAddrToIntMappingKey("mapString", addr, separator), secondKey) | |
12 | 17 | } | |
13 | 18 | ||
14 | 19 | ||
15 | - | func | |
16 | - | then StringEntry(getAddrToIntMappingKey("mapString", addr), val) | |
20 | + | func setAddrToIntMappingValueSecond (mappingName,addr,val) = if ((150 >= size(val))) | |
21 | + | then StringEntry(getAddrToIntMappingKey("mapString", addr, secondSeparator), val) | |
17 | 22 | else throw("overcrowded") | |
18 | 23 | ||
19 | 24 | ||
20 | 25 | @Callable(i) | |
21 | - | func SetValue (a,b,c,d,e) = { | |
22 | - | let setValue = generateStruct(a, b, c, d, e) | |
23 | - | [setValueMap("mapString", toString(this), setValue)] | |
24 | - | } | |
26 | + | func setMap (valueInt) = [setAddrToIntMappingValue("mapString", toString(this))] | |
25 | 27 | ||
26 | 28 | ||
27 | 29 | ||
28 | 30 | @Callable(i) | |
29 | - | func getElementFromArray (index) = { | |
30 | - | let valueInt = split(getStringValue(this, getAddrToIntMappingKey("mapString", toString(this))), separator)[index] | |
31 | - | [StringEntry("1", valueInt)] | |
32 | - | } | |
31 | + | func setMapInMap (valueInt) = [setAddrToIntMappingValueSecond("mapString", toString(this), valueInt)] | |
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | @Callable(i) | |
36 | + | func getArrayFromStruct () = [StringEntry("1", getElements("mapString", toString(this), separator))] | |
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | @Callable(i) | |
41 | + | func getElementFromArray (index,indexIn) = [StringEntry("2", getElements("mapString", toString(this), secondSeparator))] | |
33 | 42 | ||
34 | 43 |
github/deemru/w8io/169f3d6 40.85 ms ◑