tx · CPx3kEcRhu8T8usPLjXb4owfVeGrU183M7aoNSnNsbQL 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh: -0.01000000 Waves 2023.04.18 11:00 [2539728] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves
{ "type": 13, "id": "CPx3kEcRhu8T8usPLjXb4owfVeGrU183M7aoNSnNsbQL", "fee": 1000000, "feeAssetId": null, "timestamp": 1681804871997, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "4NhRqp9npKoRotDUn9FbGTkviw4bemhh9UU4YxhouxbHBJ9V3CWvehUT6JcGhXje7fytGq9bBs5z3yi4AYXkRE4U" ], "script": "base64:BgICCAIPAANTRVACAl9fABBjb250cmFjdEZpbGVuYW1lAgl0ZXN0LnJpZGUBEGtleVB1YmxpY0tleUxpc3QACQC5CQIJAMwIAgICJXMJAMwIAgIVbXVsdGlzaWdQdWJsaWNLZXlMaXN0BQNuaWwFA1NFUAEIdGhyb3dFcnIBAXMJAAIBCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBHGdldE11bHRpc2lnUHViS2V5c0xpc3RPclVuaXQABBJyYXdNdWx0aXNpZ1B1YktleXMJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBEGtleVB1YmxpY0tleUxpc3QAAgAJALUJAgUScmF3TXVsdGlzaWdQdWJLZXlzBQNTRVABD2NvbXBhcmVGdW5jdGlvbgIBYQFiAwkAAAIFAWEFAWIAAQAAAQ1jb21wYXJlSGVscGVyAgNsc3QBYQQJJHQwNTg1NjExBQNsc3QEBnJlc3VsdAgFCSR0MDU4NTYxMQJfMQQGZXhwZWN0CAUJJHQwNTg1NjExAl8yCQCUCgIJAM0IAgUGcmVzdWx0CQEPY29tcGFyZUZ1bmN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4VwkAzAgCAQMbQ78FA25pbAQFbGlzdDIJAMwIAgECeFcJAMwIAgECeFcJAMwIAgEDG0O/CQDMCAIBBAYtWU8JAMwIAgEDG0O/BQNuaWwEAWIJAQhsaXN0TGlzdAIFBWxpc3QxBQVsaXN0MgkAlAoCCQEHc3VtTGlzdAEFAWIFAWIAAFho5Xk=", "height": 2539728, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fy7eLGGrcuxDh6jUaRWWbRsJvw8XYnvsnfBYoqL1VDYt Next: GXNaQKdX1CYAD5uu4mpVTVcGGPHzXAK83PbJSP12rHxU Diff:
Old | New | Differences | |
---|---|---|---|
23 | 23 | ||
24 | 24 | ||
25 | 25 | func compareHelper (lst,a) = { | |
26 | - | let $ | |
27 | - | let result = $ | |
28 | - | let expect = $ | |
26 | + | let $t0585611 = lst | |
27 | + | let result = $t0585611._1 | |
28 | + | let expect = $t0585611._2 | |
29 | 29 | $Tuple2((result :+ compareFunction(expect, a)), expect) | |
30 | 30 | } | |
31 | 31 | ||
66 | 66 | ||
67 | 67 | ||
68 | 68 | func compareListHelper (a,b) = { | |
69 | - | let $ | |
70 | - | let result = $ | |
71 | - | let lst = $ | |
69 | + | let $t0957978 = a | |
70 | + | let result = $t0957978._1 | |
71 | + | let lst = $t0957978._2 | |
72 | 72 | let compareList = compare(lst, b)._1 | |
73 | 73 | let sum = sumList(compareList) | |
74 | 74 | $Tuple2((result :+ sum), lst) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | - | func test ( | |
117 | - | let list1 = [ | |
118 | - | let list2 = [ | |
116 | + | func test () = { | |
117 | + | let list1 = [base58'AAA', base58'AAAA'] | |
118 | + | let list2 = [base58'AAA', base58'AAA', base58'AAAA', base58'AAAAA', base58'AAAA'] | |
119 | 119 | let b = listList(list1, list2) | |
120 | 120 | $Tuple2(sumList(b), b) | |
121 | 121 | } |
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 | - | let $ | |
27 | - | let result = $ | |
28 | - | let expect = $ | |
26 | + | let $t0585611 = lst | |
27 | + | let result = $t0585611._1 | |
28 | + | let expect = $t0585611._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 | 68 | func compareListHelper (a,b) = { | |
69 | - | let $ | |
70 | - | let result = $ | |
71 | - | let lst = $ | |
69 | + | let $t0957978 = a | |
70 | + | let result = $t0957978._1 | |
71 | + | let lst = $t0957978._2 | |
72 | 72 | let compareList = compare(lst, b)._1 | |
73 | 73 | let sum = sumList(compareList) | |
74 | 74 | $Tuple2((result :+ sum), lst) | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func normilizeHelper (list,next) = (list :+ min([1, next])) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func normilize (list) = { | |
82 | 82 | let $l = list | |
83 | 83 | let $s = size($l) | |
84 | 84 | let $acc0 = nil | |
85 | 85 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
86 | 86 | then $a | |
87 | 87 | else normilizeHelper($a, $l[$i]) | |
88 | 88 | ||
89 | 89 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
90 | 90 | then $a | |
91 | 91 | else throw("List size exceeds 10") | |
92 | 92 | ||
93 | 93 | $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) | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func listList (list1,list2) = { | |
98 | 98 | let a = { | |
99 | 99 | let $l = list1 | |
100 | 100 | let $s = size($l) | |
101 | 101 | let $acc0 = $Tuple2(nil, list2) | |
102 | 102 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
103 | 103 | then $a | |
104 | 104 | else compareListHelper($a, $l[$i]) | |
105 | 105 | ||
106 | 106 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
107 | 107 | then $a | |
108 | 108 | else throw("List size exceeds 10") | |
109 | 109 | ||
110 | 110 | $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) | |
111 | 111 | } | |
112 | 112 | normilize(a._1) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | - | func test ( | |
117 | - | let list1 = [ | |
118 | - | let list2 = [ | |
116 | + | func test () = { | |
117 | + | let list1 = [base58'AAA', base58'AAAA'] | |
118 | + | let list2 = [base58'AAA', base58'AAA', base58'AAAA', base58'AAAAA', base58'AAAA'] | |
119 | 119 | let b = listList(list1, list2) | |
120 | 120 | $Tuple2(sumList(b), b) | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 |
github/deemru/w8io/026f985 42.74 ms ◑