tx · 9u9imMxY4wQaXT3vXPskY3PdEFJugWdNzetQGpwZ12ut
3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42: -0.00200000 Waves
2022.06.30 15:26 [2119161] smart account 3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42 > SELF 0.00000000 Waves
{
"type": 13,
"id": "9u9imMxY4wQaXT3vXPskY3PdEFJugWdNzetQGpwZ12ut",
"fee": 200000,
"feeAssetId": null,
"timestamp": 1656592011282,
"version": 2,
"chainId": 84,
"sender": "3MvCKDNrXFLCPCMjLTQXzfiHYejGf5QST42",
"senderPublicKey": "Bm8NA6cDADuRW1tDcjPsFdpsoUGwdxSD16MjDxtar9JB",
"proofs": [
"2SynQotBFro52YTgswjyY9pawt2BWmXVbf6VHMSHDVdEK42U5bzQyHzNFnQZS6qNNzDvU1e74wsiG1piMzRoRANa"
],
"script": "base64:AAIFAAAAAAAAABAIAhIHCgUBAQEBARIDCgEBAAAABAAAAAAJc2VwYXJhdG9yAgAAAAEvAQAAABZnZXRBZGRyVG9JbnRNYXBwaW5nS2V5AAAAAgAAAAttYXBwaW5nTmFtZQAAAARhZGRyCQAEuQAAAAIJAARMAAAAAgUAAAALbWFwcGluZ05hbWUJAARMAAAAAgUAAAAEYWRkcgUAAAADbmlsBQAAAAlzZXBhcmF0b3IBAAAADmdlbmVyYXRlU3RydWN0AAAABQAAAAFhAAAAAWIAAAABYwAAAAFkAAAAAWUEAAAAA2FycgkABEwAAAACCQABpAAAAAEFAAAAAWEJAARMAAAAAgkAAaQAAAABBQAAAAFiCQAETAAAAAIJAAGkAAAAAQUAAAABYwkABEwAAAACCQABpAAAAAEFAAAAAWQJAARMAAAAAgkAAaQAAAABBQAAAAFlBQAAAANuaWwJAAS5AAAAAgUAAAADYXJyBQAAAAlzZXBhcmF0b3IBAAAAC3NldFZhbHVlTWFwAAAAAwAAAAttYXBwaW5nTmFtZQAAAARhZGRyAAAAA3ZhbAMJAABnAAAAAgAAAAAAAAAAZAkAATEAAAABBQAAAAN2YWwJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAABZnZXRBZGRyVG9JbnRNYXBwaW5nS2V5AAAAAgIAAAAJbWFwU3RyaW5nBQAAAARhZGRyBQAAAAN2YWwJAAACAAAAAQIAAAALb3ZlcmNyb3dkZWQAAAACAAAAAWkBAAAACFNldFZhbHVlAAAABQAAAAFhAAAAAWIAAAABYwAAAAFkAAAAAWUEAAAACHNldFZhbHVlCQEAAAAOZ2VuZXJhdGVTdHJ1Y3QAAAAFBQAAAAFhBQAAAAFiBQAAAAFjBQAAAAFkBQAAAAFlCQAETAAAAAIJAQAAAAtzZXRWYWx1ZU1hcAAAAAMCAAAACW1hcFN0cmluZwkABCUAAAABBQAAAAR0aGlzBQAAAAhzZXRWYWx1ZQUAAAADbmlsAAAAAWkBAAAAE2dldEVsZW1lbnRGcm9tQXJyYXkAAAABAAAABWluZGV4BAAAAAh2YWx1ZUludAkAAZEAAAACCQAEtQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAQAAABZnZXRBZGRyVG9JbnRNYXBwaW5nS2V5AAAAAgIAAAAJbWFwU3RyaW5nCQAEJQAAAAEFAAAABHRoaXMFAAAACXNlcGFyYXRvcgUAAAAFaW5kZXgJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAABMQUAAAAIdmFsdWVJbnQFAAAAA25pbAAAAAB7odIk",
"height": 2119161,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 52VCymbpXrJEMLL6qJ9tLnMAKfLCnzSbdworJYwbngmq
Next: 3e7WWfjzoi9jo7ovhz6ekJHanCXuint2Vy4DBdAhPUeA
Diff:
Old | New | | Differences |
---|
12 | 12 | | } |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | | - | func setAddrToIntMappingValue (mappingName,addr,val) = if ((150 >= size(val))) |
---|
| 15 | + | func setValueMap (mappingName,addr,val) = if ((100 >= size(val))) |
---|
16 | 16 | | then StringEntry(getAddrToIntMappingKey("mapString", addr), val) |
---|
17 | 17 | | else throw("overcrowded") |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | | - | func getListOfArrays (mappingName,addr) = split(getStringValue(this, getAddrToIntMappingKey(mappingName, addr)), separator) |
---|
21 | | - | |
---|
22 | | - | |
---|
23 | | - | func getAddrToIntMappingIndex (mappingName,addr) = size(getListOfArrays("mapString", addr)) |
---|
24 | | - | |
---|
25 | | - | |
---|
26 | 20 | | @Callable(i) |
---|
27 | | - | func qwe (a,b,c,d,e) = { |
---|
| 21 | + | func SetValue (a,b,c,d,e) = { |
---|
28 | 22 | | let setValue = generateStruct(a, b, c, d, e) |
---|
29 | | - | [setAddrToIntMappingValue("mapString", toString(this), setValue)] |
---|
| 23 | + | [setValueMap("mapString", toString(this), setValue)] |
---|
30 | 24 | | } |
---|
31 | 25 | | |
---|
32 | 26 | | |
---|
33 | 27 | | |
---|
34 | 28 | | @Callable(i) |
---|
35 | | - | func adsd (index) = { |
---|
36 | | - | let fd = split(getStringValue(this, getAddrToIntMappingKey("mapString", toString(this))), separator)[index] |
---|
37 | | - | let fsad = setAddrToIntMappingValue("mapString", toString(this), fd) |
---|
38 | | - | [StringEntry("1", fd)] |
---|
| 29 | + | func getElementFromArray (index) = { |
---|
| 30 | + | let valueInt = split(getStringValue(this, getAddrToIntMappingKey("mapString", toString(this))), separator)[index] |
---|
| 31 | + | [StringEntry("1", valueInt)] |
---|
39 | 32 | | } |
---|
40 | 33 | | |
---|
41 | 34 | | |
---|
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 generateStruct (a,b,c,d,e) = { |
---|
10 | 10 | | let arr = [toString(a), toString(b), toString(c), toString(d), toString(e)] |
---|
11 | 11 | | makeString(arr, separator) |
---|
12 | 12 | | } |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | | - | func setAddrToIntMappingValue (mappingName,addr,val) = if ((150 >= size(val))) |
---|
| 15 | + | func setValueMap (mappingName,addr,val) = if ((100 >= size(val))) |
---|
16 | 16 | | then StringEntry(getAddrToIntMappingKey("mapString", addr), val) |
---|
17 | 17 | | else throw("overcrowded") |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | | - | func getListOfArrays (mappingName,addr) = split(getStringValue(this, getAddrToIntMappingKey(mappingName, addr)), separator) |
---|
21 | | - | |
---|
22 | | - | |
---|
23 | | - | func getAddrToIntMappingIndex (mappingName,addr) = size(getListOfArrays("mapString", addr)) |
---|
24 | | - | |
---|
25 | | - | |
---|
26 | 20 | | @Callable(i) |
---|
27 | | - | func qwe (a,b,c,d,e) = { |
---|
| 21 | + | func SetValue (a,b,c,d,e) = { |
---|
28 | 22 | | let setValue = generateStruct(a, b, c, d, e) |
---|
29 | | - | [setAddrToIntMappingValue("mapString", toString(this), setValue)] |
---|
| 23 | + | [setValueMap("mapString", toString(this), setValue)] |
---|
30 | 24 | | } |
---|
31 | 25 | | |
---|
32 | 26 | | |
---|
33 | 27 | | |
---|
34 | 28 | | @Callable(i) |
---|
35 | | - | func adsd (index) = { |
---|
36 | | - | let fd = split(getStringValue(this, getAddrToIntMappingKey("mapString", toString(this))), separator)[index] |
---|
37 | | - | let fsad = setAddrToIntMappingValue("mapString", toString(this), fd) |
---|
38 | | - | [StringEntry("1", fd)] |
---|
| 29 | + | func getElementFromArray (index) = { |
---|
| 30 | + | let valueInt = split(getStringValue(this, getAddrToIntMappingKey("mapString", toString(this))), separator)[index] |
---|
| 31 | + | [StringEntry("1", valueInt)] |
---|
39 | 32 | | } |
---|
40 | 33 | | |
---|
41 | 34 | | |
---|