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:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let arr = ["str1", "str2", "str3"]
55
6+let arr2 = [1, 2, 3, 4, 5]
7+
8+func summ (accum,next) = (accum + next)
9+
10+
611 @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)))
1533 }
1634
1735
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let arr = ["str1", "str2", "str3"]
55
6+let arr2 = [1, 2, 3, 4, 5]
7+
8+func summ (accum,next) = (accum + next)
9+
10+
611 @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)))
1533 }
1634
1735
1836 @Verifier(tx)
1937 func verify () = match tx {
2038 case tx: DataTransaction =>
2139 true
2240 case tx: SetScriptTransaction =>
2341 true
2442 case _ =>
2543 false
2644 }
2745

github/deemru/w8io/026f985 
32.80 ms