tx · HzAbUAGVucHENJxUDCnDAn6kcDbGqZtrEtiRwgCXqH47 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2: -0.00500000 Waves 2023.04.26 00:41 [2550623] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves
{ "type": 13, "id": "HzAbUAGVucHENJxUDCnDAn6kcDbGqZtrEtiRwgCXqH47", "fee": 500000, "feeAssetId": null, "timestamp": 1682458899635, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "24CBVwbTZMFRYT6mTRpsokKjbvpdckb38Uh4F98TSM25338ujuXSqfwF4wzW4vRukQy6JwhZ2YoxQc7NeH1Cnfkx" ], "script": "base64:BgIHCAISAwoBCBcACktfYW1fYXNfaWQCDyVzX19hbW91bnRBc3NldAAKS19wcl9hc19pZAIOJXNfX3ByaWNlQXNzZXQABUtfYW1wAgclc19fYW1wAAdLX3NoYXJlAkQlcyVzX19zaGFyZUFzc2V0QmFsYW5jZV9fWWlOYm9mRnpDMTdqRUhIQ013clJjcHk5TXJyamFiTU1MWnhnOGc1eG1mNwAIS19zdGFrZWQCGSVzJXNfX3N0YWtlZEJhbGFuY2VfV0FWRVMACUtfYV9hc19pZAIKQV9hc3NldF9pZAAJS19iX2FzX2lkAgpCX2Fzc2V0X2lkAApLX2FfYXNfYmFsAg9BX2Fzc2V0X2JhbGFuY2UACktfYl9hc19iYWwCD0JfYXNzZXRfYmFsYW5jZQAFS19mZWUCCmNvbW1pc3Npb24BDHRyeUdldFN0cmluZwIDa2V5B2FkZHJlc3MEByRtYXRjaDAJAJ0IAgUHYWRkcmVzcwUDa2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBYgUHJG1hdGNoMAUBYgIAAQ10cnlHZXRJbnRlZ2VyAgNrZXkHYWRkcmVzcwQHJG1hdGN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gkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQAFQAWABcAGAAZABoAGwAcAB0AHgAfACAAIQAiACMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQBeAF8AYABhAGIAYwBkBAZyZXN1bHQJALsJAgUGcmVzQXJyAgF8CQACAQUGcmVzdWx0AQFpAQR0ZXN0AQFzCQACAQUBcwBqZMj6", "height": 2550623, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9zRFFWnZ51s11ZtRWVmPWN18Udh9rugAGKuXxQv3uLs7 Next: igGojiRFsRzkLpnC8w2bBNf785Y8pu1pgMVNEL5jbvo Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | ||
12 | 12 | let e = "%s%s__stakedBalance_WAVES" | |
13 | 13 | ||
14 | - | func f (g,h) = { | |
15 | - | let i = getString(h, g) | |
16 | - | if ($isInstanceOf(i, "String")) | |
14 | + | let f = "A_asset_id" | |
15 | + | ||
16 | + | let g = "B_asset_id" | |
17 | + | ||
18 | + | let h = "A_asset_balance" | |
19 | + | ||
20 | + | let i = "B_asset_balance" | |
21 | + | ||
22 | + | let j = "commission" | |
23 | + | ||
24 | + | func k (l,m) = { | |
25 | + | let n = getString(m, l) | |
26 | + | if ($isInstanceOf(n, "String")) | |
17 | 27 | then { | |
18 | - | let | |
19 | - | | |
28 | + | let o = n | |
29 | + | o | |
20 | 30 | } | |
21 | 31 | else "" | |
22 | 32 | } | |
23 | 33 | ||
24 | 34 | ||
25 | - | func | |
26 | - | let | |
27 | - | if ($isInstanceOf( | |
35 | + | func p (l,m) = { | |
36 | + | let n = getInteger(m, l) | |
37 | + | if ($isInstanceOf(n, "Int")) | |
28 | 38 | then { | |
29 | - | let | |
30 | - | | |
39 | + | let o = n | |
40 | + | o | |
31 | 41 | } | |
32 | 42 | else 0 | |
33 | 43 | } | |
34 | 44 | ||
35 | 45 | ||
36 | - | func | |
37 | - | let | |
38 | - | | |
46 | + | func q (m,r) = { | |
47 | + | let s = assetBalance(m, r) | |
48 | + | s | |
39 | 49 | } | |
40 | 50 | ||
41 | 51 | ||
42 | - | func | |
43 | - | let | |
44 | - | | |
52 | + | func t (m) = { | |
53 | + | let u = wavesBalance(m).available | |
54 | + | u | |
45 | 55 | } | |
46 | 56 | ||
47 | 57 | ||
48 | - | func | |
49 | - | let | |
50 | - | let | |
51 | - | let | |
52 | - | then | |
58 | + | func v (w,r) = { | |
59 | + | let m = take(w, 35) | |
60 | + | let x = Address(fromBase58String(m)) | |
61 | + | let y = if ((r == "WAVES")) | |
62 | + | then t(x) | |
53 | 63 | else { | |
54 | - | let | |
55 | - | | |
64 | + | let z = fromBase58String(r) | |
65 | + | q(x, z) | |
56 | 66 | } | |
57 | - | let | |
58 | - | ((((( | |
67 | + | let A = size(w) | |
68 | + | (((((m + drop(w, 35)) + r) + ":") + toString(y)) + ",") | |
59 | 69 | } | |
60 | 70 | ||
61 | 71 | ||
62 | - | func | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | $Tuple2((( | |
72 | + | func B (m) = { | |
73 | + | let x = Address(fromBase58String(m)) | |
74 | + | let C = k(a, x) | |
75 | + | let D = k(b, x) | |
76 | + | let E = p(c, x) | |
77 | + | let F = p(d, x) | |
78 | + | let G = p(e, x) | |
79 | + | $Tuple2(((C + ",") + D), ((((toString(E) + ",") + toString(F)) + ",") + toString(G))) | |
70 | 80 | } | |
71 | 81 | ||
72 | 82 | ||
73 | - | func C (r,D) = D :: r | |
74 | - | ||
75 | - | ||
76 | - | func E (F,h) = { | |
77 | - | let G = split_4C(F, ",") | |
78 | - | let H = { | |
79 | - | let I = G | |
80 | - | let J = size(I) | |
81 | - | let K = h | |
82 | - | func L (M,N) = if ((N >= J)) | |
83 | - | then M | |
84 | - | else q(M, I[N]) | |
85 | - | ||
86 | - | func O (M,N) = if ((N >= J)) | |
87 | - | then M | |
88 | - | else throw("List size exceeds 2") | |
89 | - | ||
90 | - | O(L(L(K, 0), 1), 2) | |
91 | - | } | |
92 | - | let P = drop(H, 35) | |
93 | - | let Q = dropRight(P, 1) | |
94 | - | Q | |
83 | + | func H (m) = { | |
84 | + | let x = Address(fromBase58String(m)) | |
85 | + | let I = k(f, x) | |
86 | + | let J = k(g, x) | |
87 | + | let K = p(h, x) | |
88 | + | let L = p(i, x) | |
89 | + | ((((((I + ":") + toString(K)) + ",") + J) + ":") + toString(L)) | |
95 | 90 | } | |
96 | 91 | ||
97 | 92 | ||
98 | - | func R (r,h) = { | |
99 | - | let S = w(h) | |
100 | - | let F = S._1 | |
101 | - | let T = S._2 | |
102 | - | let U = E(F, h) | |
103 | - | let V = ((((h + "/") + U) + "/") + T) | |
104 | - | V :: r | |
93 | + | func M (w,N) = N :: w | |
94 | + | ||
95 | + | ||
96 | + | func O (P,m) = { | |
97 | + | let Q = split_4C(P, ",") | |
98 | + | let R = { | |
99 | + | let S = Q | |
100 | + | let T = size(S) | |
101 | + | let U = m | |
102 | + | func V (W,X) = if ((X >= T)) | |
103 | + | then W | |
104 | + | else v(W, S[X]) | |
105 | + | ||
106 | + | func Y (W,X) = if ((X >= T)) | |
107 | + | then W | |
108 | + | else throw("List size exceeds 2") | |
109 | + | ||
110 | + | Y(V(V(U, 0), 1), 2) | |
111 | + | } | |
112 | + | let Z = drop(R, 35) | |
113 | + | let aa = dropRight(Z, 1) | |
114 | + | aa | |
105 | 115 | } | |
106 | 116 | ||
107 | 117 | ||
108 | - | @Callable(W) | |
109 | - | func getWXNew (X) = { | |
110 | - | let Y = split_4C(X, ",") | |
111 | - | let Z = { | |
112 | - | let I = Y | |
113 | - | let J = size(I) | |
114 | - | let K = nil | |
115 | - | func L (M,N) = if ((N >= J)) | |
116 | - | then M | |
117 | - | else R(M, I[N]) | |
118 | - | ||
119 | - | func O (M,N) = if ((N >= J)) | |
120 | - | then M | |
121 | - | else throw("List size exceeds 80") | |
122 | - | ||
123 | - | O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80) | |
124 | - | } | |
125 | - | let r = makeString_11C(Z, "|") | |
126 | - | throw(r) | |
118 | + | func ab (w,m) = { | |
119 | + | let ac = B(m) | |
120 | + | let P = ac._1 | |
121 | + | let ad = ac._2 | |
122 | + | let ae = O(P, m) | |
123 | + | let af = ((((m + "/") + ae) + "/") + ad) | |
124 | + | af :: w | |
127 | 125 | } | |
128 | 126 | ||
129 | 127 | ||
128 | + | func ag (w,m) = { | |
129 | + | let ae = H(m) | |
130 | + | let af = ((m + "/") + ae) | |
131 | + | af :: w | |
132 | + | } | |
130 | 133 | ||
131 | - | @Callable(W) | |
132 | - | func test (aa) = throw(aa) | |
134 | + | ||
135 | + | func ah (ai) = { | |
136 | + | let aj = split_4C(ai, ",") | |
137 | + | let ak = { | |
138 | + | let S = aj | |
139 | + | let T = size(S) | |
140 | + | let U = nil | |
141 | + | func V (W,X) = if ((X >= T)) | |
142 | + | then W | |
143 | + | else ab(W, S[X]) | |
144 | + | ||
145 | + | func Y (W,X) = if ((X >= T)) | |
146 | + | then W | |
147 | + | else throw("List size exceeds 100") | |
148 | + | ||
149 | + | Y(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(U, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
150 | + | } | |
151 | + | let w = makeString_11C(ak, "|") | |
152 | + | throw(w) | |
153 | + | } | |
154 | + | ||
155 | + | ||
156 | + | func al (ai) = { | |
157 | + | let aj = split_4C(ai, ",") | |
158 | + | let ak = { | |
159 | + | let S = aj | |
160 | + | let T = size(S) | |
161 | + | let U = nil | |
162 | + | func V (W,X) = if ((X >= T)) | |
163 | + | then W | |
164 | + | else ag(W, S[X]) | |
165 | + | ||
166 | + | func Y (W,X) = if ((X >= T)) | |
167 | + | then W | |
168 | + | else throw("List size exceeds 100") | |
169 | + | ||
170 | + | Y(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(U, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
171 | + | } | |
172 | + | let w = makeString_11C(ak, "|") | |
173 | + | throw(w) | |
174 | + | } | |
175 | + | ||
176 | + | ||
177 | + | @Callable(am) | |
178 | + | func test (an) = throw(an) | |
133 | 179 | ||
134 | 180 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "%s__amountAsset" | |
5 | 5 | ||
6 | 6 | let b = "%s__priceAsset" | |
7 | 7 | ||
8 | 8 | let c = "%s__amp" | |
9 | 9 | ||
10 | 10 | let d = "%s%s__shareAssetBalance__YiNbofFzC17jEHHCMwrRcpy9MrrjabMMLZxg8g5xmf7" | |
11 | 11 | ||
12 | 12 | let e = "%s%s__stakedBalance_WAVES" | |
13 | 13 | ||
14 | - | func f (g,h) = { | |
15 | - | let i = getString(h, g) | |
16 | - | if ($isInstanceOf(i, "String")) | |
14 | + | let f = "A_asset_id" | |
15 | + | ||
16 | + | let g = "B_asset_id" | |
17 | + | ||
18 | + | let h = "A_asset_balance" | |
19 | + | ||
20 | + | let i = "B_asset_balance" | |
21 | + | ||
22 | + | let j = "commission" | |
23 | + | ||
24 | + | func k (l,m) = { | |
25 | + | let n = getString(m, l) | |
26 | + | if ($isInstanceOf(n, "String")) | |
17 | 27 | then { | |
18 | - | let | |
19 | - | | |
28 | + | let o = n | |
29 | + | o | |
20 | 30 | } | |
21 | 31 | else "" | |
22 | 32 | } | |
23 | 33 | ||
24 | 34 | ||
25 | - | func | |
26 | - | let | |
27 | - | if ($isInstanceOf( | |
35 | + | func p (l,m) = { | |
36 | + | let n = getInteger(m, l) | |
37 | + | if ($isInstanceOf(n, "Int")) | |
28 | 38 | then { | |
29 | - | let | |
30 | - | | |
39 | + | let o = n | |
40 | + | o | |
31 | 41 | } | |
32 | 42 | else 0 | |
33 | 43 | } | |
34 | 44 | ||
35 | 45 | ||
36 | - | func | |
37 | - | let | |
38 | - | | |
46 | + | func q (m,r) = { | |
47 | + | let s = assetBalance(m, r) | |
48 | + | s | |
39 | 49 | } | |
40 | 50 | ||
41 | 51 | ||
42 | - | func | |
43 | - | let | |
44 | - | | |
52 | + | func t (m) = { | |
53 | + | let u = wavesBalance(m).available | |
54 | + | u | |
45 | 55 | } | |
46 | 56 | ||
47 | 57 | ||
48 | - | func | |
49 | - | let | |
50 | - | let | |
51 | - | let | |
52 | - | then | |
58 | + | func v (w,r) = { | |
59 | + | let m = take(w, 35) | |
60 | + | let x = Address(fromBase58String(m)) | |
61 | + | let y = if ((r == "WAVES")) | |
62 | + | then t(x) | |
53 | 63 | else { | |
54 | - | let | |
55 | - | | |
64 | + | let z = fromBase58String(r) | |
65 | + | q(x, z) | |
56 | 66 | } | |
57 | - | let | |
58 | - | ((((( | |
67 | + | let A = size(w) | |
68 | + | (((((m + drop(w, 35)) + r) + ":") + toString(y)) + ",") | |
59 | 69 | } | |
60 | 70 | ||
61 | 71 | ||
62 | - | func | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | $Tuple2((( | |
72 | + | func B (m) = { | |
73 | + | let x = Address(fromBase58String(m)) | |
74 | + | let C = k(a, x) | |
75 | + | let D = k(b, x) | |
76 | + | let E = p(c, x) | |
77 | + | let F = p(d, x) | |
78 | + | let G = p(e, x) | |
79 | + | $Tuple2(((C + ",") + D), ((((toString(E) + ",") + toString(F)) + ",") + toString(G))) | |
70 | 80 | } | |
71 | 81 | ||
72 | 82 | ||
73 | - | func C (r,D) = D :: r | |
74 | - | ||
75 | - | ||
76 | - | func E (F,h) = { | |
77 | - | let G = split_4C(F, ",") | |
78 | - | let H = { | |
79 | - | let I = G | |
80 | - | let J = size(I) | |
81 | - | let K = h | |
82 | - | func L (M,N) = if ((N >= J)) | |
83 | - | then M | |
84 | - | else q(M, I[N]) | |
85 | - | ||
86 | - | func O (M,N) = if ((N >= J)) | |
87 | - | then M | |
88 | - | else throw("List size exceeds 2") | |
89 | - | ||
90 | - | O(L(L(K, 0), 1), 2) | |
91 | - | } | |
92 | - | let P = drop(H, 35) | |
93 | - | let Q = dropRight(P, 1) | |
94 | - | Q | |
83 | + | func H (m) = { | |
84 | + | let x = Address(fromBase58String(m)) | |
85 | + | let I = k(f, x) | |
86 | + | let J = k(g, x) | |
87 | + | let K = p(h, x) | |
88 | + | let L = p(i, x) | |
89 | + | ((((((I + ":") + toString(K)) + ",") + J) + ":") + toString(L)) | |
95 | 90 | } | |
96 | 91 | ||
97 | 92 | ||
98 | - | func R (r,h) = { | |
99 | - | let S = w(h) | |
100 | - | let F = S._1 | |
101 | - | let T = S._2 | |
102 | - | let U = E(F, h) | |
103 | - | let V = ((((h + "/") + U) + "/") + T) | |
104 | - | V :: r | |
93 | + | func M (w,N) = N :: w | |
94 | + | ||
95 | + | ||
96 | + | func O (P,m) = { | |
97 | + | let Q = split_4C(P, ",") | |
98 | + | let R = { | |
99 | + | let S = Q | |
100 | + | let T = size(S) | |
101 | + | let U = m | |
102 | + | func V (W,X) = if ((X >= T)) | |
103 | + | then W | |
104 | + | else v(W, S[X]) | |
105 | + | ||
106 | + | func Y (W,X) = if ((X >= T)) | |
107 | + | then W | |
108 | + | else throw("List size exceeds 2") | |
109 | + | ||
110 | + | Y(V(V(U, 0), 1), 2) | |
111 | + | } | |
112 | + | let Z = drop(R, 35) | |
113 | + | let aa = dropRight(Z, 1) | |
114 | + | aa | |
105 | 115 | } | |
106 | 116 | ||
107 | 117 | ||
108 | - | @Callable(W) | |
109 | - | func getWXNew (X) = { | |
110 | - | let Y = split_4C(X, ",") | |
111 | - | let Z = { | |
112 | - | let I = Y | |
113 | - | let J = size(I) | |
114 | - | let K = nil | |
115 | - | func L (M,N) = if ((N >= J)) | |
116 | - | then M | |
117 | - | else R(M, I[N]) | |
118 | - | ||
119 | - | func O (M,N) = if ((N >= J)) | |
120 | - | then M | |
121 | - | else throw("List size exceeds 80") | |
122 | - | ||
123 | - | O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80) | |
124 | - | } | |
125 | - | let r = makeString_11C(Z, "|") | |
126 | - | throw(r) | |
118 | + | func ab (w,m) = { | |
119 | + | let ac = B(m) | |
120 | + | let P = ac._1 | |
121 | + | let ad = ac._2 | |
122 | + | let ae = O(P, m) | |
123 | + | let af = ((((m + "/") + ae) + "/") + ad) | |
124 | + | af :: w | |
127 | 125 | } | |
128 | 126 | ||
129 | 127 | ||
128 | + | func ag (w,m) = { | |
129 | + | let ae = H(m) | |
130 | + | let af = ((m + "/") + ae) | |
131 | + | af :: w | |
132 | + | } | |
130 | 133 | ||
131 | - | @Callable(W) | |
132 | - | func test (aa) = throw(aa) | |
134 | + | ||
135 | + | func ah (ai) = { | |
136 | + | let aj = split_4C(ai, ",") | |
137 | + | let ak = { | |
138 | + | let S = aj | |
139 | + | let T = size(S) | |
140 | + | let U = nil | |
141 | + | func V (W,X) = if ((X >= T)) | |
142 | + | then W | |
143 | + | else ab(W, S[X]) | |
144 | + | ||
145 | + | func Y (W,X) = if ((X >= T)) | |
146 | + | then W | |
147 | + | else throw("List size exceeds 100") | |
148 | + | ||
149 | + | Y(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(U, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
150 | + | } | |
151 | + | let w = makeString_11C(ak, "|") | |
152 | + | throw(w) | |
153 | + | } | |
154 | + | ||
155 | + | ||
156 | + | func al (ai) = { | |
157 | + | let aj = split_4C(ai, ",") | |
158 | + | let ak = { | |
159 | + | let S = aj | |
160 | + | let T = size(S) | |
161 | + | let U = nil | |
162 | + | func V (W,X) = if ((X >= T)) | |
163 | + | then W | |
164 | + | else ag(W, S[X]) | |
165 | + | ||
166 | + | func Y (W,X) = if ((X >= T)) | |
167 | + | then W | |
168 | + | else throw("List size exceeds 100") | |
169 | + | ||
170 | + | Y(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(U, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
171 | + | } | |
172 | + | let w = makeString_11C(ak, "|") | |
173 | + | throw(w) | |
174 | + | } | |
175 | + | ||
176 | + | ||
177 | + | @Callable(am) | |
178 | + | func test (an) = throw(an) | |
133 | 179 | ||
134 | 180 |
github/deemru/w8io/026f985 49.42 ms ◑