tx · HXh78scs5Z7vm1hFkVfNiesNnJfAg9kh9uJx2w4sG7YB
3N5wCUMezBMxb56aGoMTCgophZjteLosUPt: -0.01000000 Waves
2022.03.17 13:19 [1967807] smart account 3N5wCUMezBMxb56aGoMTCgophZjteLosUPt > SELF 0.00000000 Waves
{
"type": 13,
"id": "HXh78scs5Z7vm1hFkVfNiesNnJfAg9kh9uJx2w4sG7YB",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1647512404534,
"version": 2,
"chainId": 84,
"sender": "3N5wCUMezBMxb56aGoMTCgophZjteLosUPt",
"senderPublicKey": "8YSxa9bFeRikTbas9caX5jbfoSsDHABgjLbx2Ztgy65D",
"proofs": [
"4hmE6S9uBktAsGwnNDSTSWQT1cw5AnTSUdAcEovCD2m9geX29YvrdHeZc8E1EtpoM6VSKEr3XMVgAjxvzaquHQFX"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIDCgEBEgAAAAADAAAAAANhcnIJAARMAAAAAgIAAAAEc3RyMQkABEwAAAACAgAAAARzdHIyCQAETAAAAAICAAAABHN0cjMFAAAAA25pbAAAAAAEYXJyMgkABEwAAAACAAAAAAAAAAABCQAETAAAAAIAAAAAAAAAAAIJAARMAAAAAgAAAAAAAAAAAwkABEwAAAACAAAAAAAAAAAECQAETAAAAAIAAAAAAAAAAAUFAAAAA25pbAEAAAAEc3VtbQAAAAIAAAAFYWNjdW0AAAAEbmV4dAkAAGQAAAACBQAAAAVhY2N1bQUAAAAEbmV4dAAAAAIAAAACdHgBAAAACGNhbGxGdW5jAAAAAQAAAANpbmQJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAHSW5kZXg6IAkAAaQAAAABBQAAAANpbmQCAAAACSwgdmFsdWU6IAkAAZEAAAACBQAAAANhcnIFAAAAA2luZAAAAAJ0eAEAAAAEc3VtNQAAAAAEAAAAA3JlcwoAAAAAAiRsBQAAAARhcnIyCgAAAAACJHMJAAGQAAAAAQUAAAACJGwKAAAAAAUkYWNjMAAAAAAAAAAAAAoBAAAABSRmMF8xAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkBAAAABHN1bW0AAAACBQAAAAIkYQkAAZEAAAACBQAAAAIkbAUAAAACJGkKAQAAAAUkZjBfMgAAAAIAAAACJGEAAAACJGkDCQAAZwAAAAIFAAAAAiRpBQAAAAIkcwUAAAACJGEJAAACAAAAAQIAAAATTGlzdCBzaXplIGV4Y2VlZHMgNQkBAAAABSRmMF8yAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgUAAAAFJGFjYzAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAIAAAAAAAAAAAMAAAAAAAAAAAQAAAAAAAAAAAUJAAACAAAAAQkAASwAAAACAgAAAAhSZXN1bHQ6IAkAAaQAAAABBQAAAANyZXMAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAYH4B5yGw==",
"height": 1967807,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 3qtbNF1F3QgXWjZGwAkaDS5iraURypufnMJj2vBMgXfL
Next: none
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let arr = ["str1", "str2", "str3"] |
---|
5 | 5 | | |
---|
| 6 | + | let arr2 = [1, 2, 3, 4, 5] |
---|
| 7 | + | |
---|
| 8 | + | func summ (accum,next) = (accum + next) |
---|
| 9 | + | |
---|
| 10 | + | |
---|
6 | 11 | | @Callable(tx) |
---|
7 | | - | func callFunc (ind) = { |
---|
8 | | - | let index = match ind { |
---|
9 | | - | case tt: Int => |
---|
10 | | - | tt |
---|
11 | | - | case _ => |
---|
12 | | - | 0 |
---|
13 | | - | } |
---|
14 | | - | throw(((("Index: " + toString(ind)) + ", value: ") + arr[index])) |
---|
| 12 | + | func callFunc (ind) = throw(((("Index: " + toString(ind)) + ", value: ") + arr[ind])) |
---|
| 13 | + | |
---|
| 14 | + | |
---|
| 15 | + | |
---|
| 16 | + | @Callable(tx) |
---|
| 17 | + | func sum5 () = { |
---|
| 18 | + | let res = { |
---|
| 19 | + | let $l = arr2 |
---|
| 20 | + | let $s = size($l) |
---|
| 21 | + | let $acc0 = 0 |
---|
| 22 | + | func $f0_1 ($a,$i) = if (($i >= $s)) |
---|
| 23 | + | then $a |
---|
| 24 | + | else summ($a, $l[$i]) |
---|
| 25 | + | |
---|
| 26 | + | func $f0_2 ($a,$i) = if (($i >= $s)) |
---|
| 27 | + | then $a |
---|
| 28 | + | else throw("List size exceeds 5") |
---|
| 29 | + | |
---|
| 30 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) |
---|
| 31 | + | } |
---|
| 32 | + | throw(("Result: " + toString(res))) |
---|
15 | 33 | | } |
---|
16 | 34 | | |
---|
17 | 35 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let arr = ["str1", "str2", "str3"] |
---|
5 | 5 | | |
---|
| 6 | + | let arr2 = [1, 2, 3, 4, 5] |
---|
| 7 | + | |
---|
| 8 | + | func summ (accum,next) = (accum + next) |
---|
| 9 | + | |
---|
| 10 | + | |
---|
6 | 11 | | @Callable(tx) |
---|
7 | | - | func callFunc (ind) = { |
---|
8 | | - | let index = match ind { |
---|
9 | | - | case tt: Int => |
---|
10 | | - | tt |
---|
11 | | - | case _ => |
---|
12 | | - | 0 |
---|
13 | | - | } |
---|
14 | | - | throw(((("Index: " + toString(ind)) + ", value: ") + arr[index])) |
---|
| 12 | + | func callFunc (ind) = throw(((("Index: " + toString(ind)) + ", value: ") + arr[ind])) |
---|
| 13 | + | |
---|
| 14 | + | |
---|
| 15 | + | |
---|
| 16 | + | @Callable(tx) |
---|
| 17 | + | func sum5 () = { |
---|
| 18 | + | let res = { |
---|
| 19 | + | let $l = arr2 |
---|
| 20 | + | let $s = size($l) |
---|
| 21 | + | let $acc0 = 0 |
---|
| 22 | + | func $f0_1 ($a,$i) = if (($i >= $s)) |
---|
| 23 | + | then $a |
---|
| 24 | + | else summ($a, $l[$i]) |
---|
| 25 | + | |
---|
| 26 | + | func $f0_2 ($a,$i) = if (($i >= $s)) |
---|
| 27 | + | then $a |
---|
| 28 | + | else throw("List size exceeds 5") |
---|
| 29 | + | |
---|
| 30 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) |
---|
| 31 | + | } |
---|
| 32 | + | throw(("Result: " + toString(res))) |
---|
15 | 33 | | } |
---|
16 | 34 | | |
---|
17 | 35 | | |
---|
18 | 36 | | @Verifier(tx) |
---|
19 | 37 | | func verify () = match tx { |
---|
20 | 38 | | case tx: DataTransaction => |
---|
21 | 39 | | true |
---|
22 | 40 | | case tx: SetScriptTransaction => |
---|
23 | 41 | | true |
---|
24 | 42 | | case _ => |
---|
25 | 43 | | false |
---|
26 | 44 | | } |
---|
27 | 45 | | |
---|