tx · 8CWW4T4QU5LTC2tvb67AganywSNR4tzUrMFGUCdVS7Ly 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh: -0.01000000 Waves 2023.04.18 10:20 [2539686] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves
{ "type": 13, "id": "8CWW4T4QU5LTC2tvb67AganywSNR4tzUrMFGUCdVS7Ly", "fee": 1000000, "feeAssetId": null, "timestamp": 1681802453489, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "5c48CRDgD8NCJX1rHgBb4D52FAvLVbC1yekLS4YhyHyKXL15MwNesELVPCCbfaR3isju9ySbHM2noVoAiTCo9FY8" ], "script": "base64:BgICCAINAANTRVACAl9fABBjb250cmFjdEZpbGVuYW1lAgl0ZXN0LnJpZGUBEGtleVB1YmxpY0tleUxpc3QACQC5CQIJAMwIAgICJXMJAMwIAgIVbXVsdGlzaWdQdWJsaWNLZXlMaXN0BQNuaWwFA1NFUAEIdGhyb3dFcnIBAXMJAAIBCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBHGdldE11bHRpc2lnUHViS2V5c0xpc3RPclVuaXQABBJyYXdNdWx0aXNpZ1B1YktleXMJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBEGtleVB1YmxpY0tleUxpc3QAAgAJALUJAgUScmF3TXVsdGlzaWdQdWJLZXlzBQNTRVABD2NvbXBhcmVGdW5jdGlvbgIBYQFiAwkAAAIFAWEFAWIAAQAAAQ1jb21wYXJlSGVscGVyAgNsc3QBYQQJJHQwNTY5NTk1BQNsc3QEBnJlc3VsdAgFCSR0MDU2OTU5NQJfMQQGZXhwZWN0CAUJJHQwNTY5NTk1Al8yCQCUCgIJAM0IAgUGcmVzdWx0CQEPY29tcGFyZUZ1b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b21wYXJlTGlzdAkAlAoCCQDNCAIFBnJlc3VsdAUDc3VtBQNsc3QBCGxpc3RMaXN0AgVsaXN0MQVsaXN0MgoAAiRsBQVsaXN0MQoAAiRzCQCQAwEFAiRsCgAFJGFjYzAJAJQKAgUDbmlsBQVsaXN0MgoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQERY29tcGFyZUxpc3RIZWxwZXICBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECFExpc3Qgc2l6ZSBleGNlZWRzIDEwCQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAAcACAAJAAoBBHRlc3QBAWEEBWxpc3QxCQDMCAICAWEJAMwIAgIBYwkAzAgCAgFlBQNuaWwEBWxpc3QyCQDMCAICAWEJAMwIAgIBYgkAzAgCAgFjCQDMCAICAWQJAMwIAgIBZQkAzAgCAgFjCQDMCAICAWMJAMwIAgIBZQUDbmlsCQEIbGlzdExpc3QCBQVsaXN0MQUFbGlzdDIAALATTJ0=", "height": 2539686, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5YA97ZDaCErpUN5tRHN1c47KbUzqNcDg6iYg55tBpPB9 Next: G1Jxc9jMKUgV9B57hFH4hYftH3YEXoqYq197V4cVyihc Diff:
Old | New | Differences | |
---|---|---|---|
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | + | func compareListHelper (a,b) = { | |
69 | + | let $t0925946 = a | |
70 | + | let result = $t0925946._1 | |
71 | + | let lst = $t0925946._2 | |
72 | + | let compareList = compare(lst, b)._1 | |
73 | + | let sum = sumList(compareList) | |
74 | + | $Tuple2((result :+ sum), lst) | |
75 | + | } | |
76 | + | ||
77 | + | ||
78 | + | func listList (list1,list2) = { | |
79 | + | let $l = list1 | |
80 | + | let $s = size($l) | |
81 | + | let $acc0 = $Tuple2(nil, list2) | |
82 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
83 | + | then $a | |
84 | + | else compareListHelper($a, $l[$i]) | |
85 | + | ||
86 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
87 | + | then $a | |
88 | + | else throw("List size exceeds 10") | |
89 | + | ||
90 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
91 | + | } | |
92 | + | ||
93 | + | ||
68 | 94 | func test (a) = { | |
69 | 95 | let list1 = ["a", "c", "e"] | |
70 | 96 | let list2 = ["a", "b", "c", "d", "e", "c", "c", "e"] | |
71 | - | let compareList = compare(list2, a)._1 | |
72 | - | $Tuple2(sumList(compareList), compareList) | |
97 | + | listList(list1, list2) | |
73 | 98 | } | |
74 | 99 | ||
75 | 100 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let contractFilename = "test.ride" | |
7 | 7 | ||
8 | 8 | func keyPublicKeyList () = makeString(["%s", "multisigPublicKeyList"], SEP) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func throwErr (s) = throw(((contractFilename + ": ") + s)) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func getMultisigPubKeysListOrUnit () = { | |
15 | 15 | let rawMultisigPubKeys = valueOrElse(getString(this, keyPublicKeyList()), "") | |
16 | 16 | split(rawMultisigPubKeys, SEP) | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func compareFunction (a,b) = if ((a == b)) | |
21 | 21 | then 1 | |
22 | 22 | else 0 | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func compareHelper (lst,a) = { | |
26 | 26 | let $t0569595 = lst | |
27 | 27 | let result = $t0569595._1 | |
28 | 28 | let expect = $t0569595._2 | |
29 | 29 | $Tuple2((result :+ compareFunction(expect, a)), expect) | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func compare (list,a) = { | |
34 | 34 | let $l = list | |
35 | 35 | let $s = size($l) | |
36 | 36 | let $acc0 = $Tuple2(nil, a) | |
37 | 37 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
38 | 38 | then $a | |
39 | 39 | else compareHelper($a, $l[$i]) | |
40 | 40 | ||
41 | 41 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
42 | 42 | then $a | |
43 | 43 | else throw("List size exceeds 10") | |
44 | 44 | ||
45 | 45 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func accum (sum,val) = (sum + val) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func sumList (list) = { | |
53 | 53 | let $l = list | |
54 | 54 | let $s = size($l) | |
55 | 55 | let $acc0 = 0 | |
56 | 56 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
57 | 57 | then $a | |
58 | 58 | else accum($a, $l[$i]) | |
59 | 59 | ||
60 | 60 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
61 | 61 | then $a | |
62 | 62 | else throw("List size exceeds 10") | |
63 | 63 | ||
64 | 64 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | + | func compareListHelper (a,b) = { | |
69 | + | let $t0925946 = a | |
70 | + | let result = $t0925946._1 | |
71 | + | let lst = $t0925946._2 | |
72 | + | let compareList = compare(lst, b)._1 | |
73 | + | let sum = sumList(compareList) | |
74 | + | $Tuple2((result :+ sum), lst) | |
75 | + | } | |
76 | + | ||
77 | + | ||
78 | + | func listList (list1,list2) = { | |
79 | + | let $l = list1 | |
80 | + | let $s = size($l) | |
81 | + | let $acc0 = $Tuple2(nil, list2) | |
82 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
83 | + | then $a | |
84 | + | else compareListHelper($a, $l[$i]) | |
85 | + | ||
86 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
87 | + | then $a | |
88 | + | else throw("List size exceeds 10") | |
89 | + | ||
90 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
91 | + | } | |
92 | + | ||
93 | + | ||
68 | 94 | func test (a) = { | |
69 | 95 | let list1 = ["a", "c", "e"] | |
70 | 96 | let list2 = ["a", "b", "c", "d", "e", "c", "c", "e"] | |
71 | - | let compareList = compare(list2, a)._1 | |
72 | - | $Tuple2(sumList(compareList), compareList) | |
97 | + | listList(list1, list2) | |
73 | 98 | } | |
74 | 99 | ||
75 | 100 | ||
76 | 101 |
github/deemru/w8io/026f985 22.43 ms ◑