tx · CbobkH99ae7vcVdNwXg2Rmp12nsUv8akiZH9w8zDcd9b 3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN: -0.01000000 Waves 2022.10.20 08:21 [2280286] smart account 3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN > SELF 0.00000000 Waves
{ "type": 13, "id": "CbobkH99ae7vcVdNwXg2Rmp12nsUv8akiZH9w8zDcd9b", "fee": 1000000, "feeAssetId": null, "timestamp": 1666243264165, "version": 2, "chainId": 84, "sender": "3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN", "senderPublicKey": "GDjexdefwEhShjRTvHgazn3gTrDo74eHpJCAz14cAEeh", "proofs": [ "4n8mgZy7eu9P4S7gBrJFwCCMGN3FnzHTmfmMt8CAYtaz2Zc7MKH6k1tayvjWJVJgbxvFyMSw1iR2VzSTcvLmAUNv" ], "script": "base64:AAIFAAAAAAAAAC4IAhIDCgEIEgQKAggIEgMKAQgSAwoBCBIECgIICBIDCgEIEgUKAwgICBIDCgEIAAAAFgEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAEWdldEludGVnZXJPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAAQUAAAAHYWRkcmVzcwEAAAATcGFyc2VBZGRyZXNzT3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EAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAC25hbWVFeHBpcmVzBQAAAAckbWF0Y2gwAwkAAGYAAAACBQAAAAtuYW1lRXhwaXJlcwAAAAAAAAAAAAUAAAALbmFtZUV4cGlyZXMFAAAABHVuaXQFAAAABHVuaXQEAAAACmlzUm9vdE5hbWUDCQAAZgAAAAIJAAExAAAAAQUAAAAFbGFiZWwAAAAAAAAAAAAJAAAAAAAAAgkAATEAAAABBQAAAApyZXN0TGFiZWxzAAAAAAAAAAAABwMDBQAAAAppc1Jvb3ROYW1lBgkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAAWcGFyZW50UmVnaXN0cmFyQWRkcmVzcwkABRQAAAACBQAAAANuaWwJAAUXAAAABQUAAAAWcGFyZW50UmVnaXN0cmFyQWRkcmVzcwUAAAAScGFyZW50T3duZXJBZGRyZXNzBQAAAA5wYXJlbnRSZXNvbHZlcgUAAAANcGFyZW50Q3JlYXRlZAUAAAAEdW5pdAkABRQAAAACBQAAAANuaWwJAAUXAAAABQQAAAAHJG1hdGNoMAUAAAAFb3duZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAAFb3duZXIFAAAAByRtYXRjaDAFAAAABW93bmVyBQAAABJwYXJlbnRPd25lckFkZHJlc3MFAAAACXJlZ2lzdHJhcgUAAAAIcmVzb2x2ZXIFAAAAC25hbWVDcmVhdGVkBQAAAAtuYW1lRXhwaXJlcwAAAABvqRIL", "height": 2280286, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5g4Y256RrdeFguyvE9Xbsky6tDk74ynjrJZCBWEwx36h Next: 2QG8r1ieF2eKvUXT467wyJyZHis3y9AZC5VE9VXJjQva Diff:
Old | New | Differences | |
---|---|---|---|
28 | 28 | func p (l,q) = [StringEntry(k(l), q)] | |
29 | 29 | ||
30 | 30 | ||
31 | - | func r (l) = getString(this, | |
31 | + | func r (l) = getString(this, k(l)) | |
32 | 32 | ||
33 | 33 | ||
34 | - | func s (l | |
34 | + | func s (l) = getString(this, m(l)) | |
35 | 35 | ||
36 | 36 | ||
37 | - | func | |
37 | + | func t (l,u) = [StringEntry(m(l), u)] | |
38 | 38 | ||
39 | 39 | ||
40 | - | func v (l | |
40 | + | func v (l) = getInteger(this, n(l)) | |
41 | 41 | ||
42 | 42 | ||
43 | - | func | |
43 | + | func w (l,x) = [IntegerEntry(n(l), x)] | |
44 | 44 | ||
45 | 45 | ||
46 | - | func | |
46 | + | func y (z) = (z.caller == this) | |
47 | 47 | ||
48 | 48 | ||
49 | - | func A ( | |
49 | + | func A (z,l) = (toString(z.caller) == valueOrElse(o(l), "")) | |
50 | 50 | ||
51 | 51 | ||
52 | - | func B (h) = { | |
53 | - | let C = split(h, ".") | |
54 | - | let D = (size(C) - 1) | |
55 | - | let E = C[D] | |
56 | - | let F = makeString(removeByIndex(C, D), ".") | |
57 | - | $Tuple2(E, F) | |
52 | + | func B (f) = isDefined(addressFromString(f)) | |
53 | + | ||
54 | + | ||
55 | + | func C (h) = { | |
56 | + | let D = split(h, ".") | |
57 | + | let E = (size(D) - 1) | |
58 | + | let F = D[E] | |
59 | + | let G = makeString(removeByIndex(D, E), ".") | |
60 | + | $Tuple2(F, G) | |
58 | 61 | } | |
59 | 62 | ||
60 | 63 | ||
61 | - | func | |
62 | - | let | |
63 | - | if ($isInstanceOf( | |
64 | + | func H (I,J,G) = { | |
65 | + | let K = invoke(I, "supportsInterface", [J], nil) | |
66 | + | if ($isInstanceOf(K, "Boolean")) | |
64 | 67 | then { | |
65 | - | let | |
66 | - | if (!( | |
68 | + | let L = K | |
69 | + | if (!(L)) | |
67 | 70 | then unit | |
68 | 71 | else { | |
69 | - | let | |
70 | - | if ($isInstanceOf( | |
72 | + | let M = invoke(value(I), J, [G], nil) | |
73 | + | if ($isInstanceOf(M, "String")) | |
71 | 74 | then { | |
72 | - | let | |
73 | - | | |
75 | + | let N = M | |
76 | + | N | |
74 | 77 | } | |
75 | - | else unit | |
76 | - | } | |
77 | - | } | |
78 | - | else unit | |
79 | - | } | |
80 | - | ||
81 | - | ||
82 | - | func N (H,I,F) = { | |
83 | - | let J = invoke(H, "supportsInterface", [I], nil) | |
84 | - | if ($isInstanceOf(J, "Boolean")) | |
85 | - | then { | |
86 | - | let K = J | |
87 | - | if (!(K)) | |
88 | - | then unit | |
89 | - | else { | |
90 | - | let L = invoke(value(H), I, [F], nil) | |
91 | - | if ($isInstanceOf(L, "Int")) | |
92 | - | then { | |
93 | - | let O = L | |
94 | - | O | |
95 | - | } | |
96 | - | else unit | |
78 | + | else if ($isInstanceOf(M, "Int")) | |
79 | + | then { | |
80 | + | let O = M | |
81 | + | O | |
82 | + | } | |
83 | + | else unit | |
97 | 84 | } | |
98 | 85 | } | |
99 | 86 | else unit | |
103 | 90 | func P (Q) = unit | |
104 | 91 | ||
105 | 92 | ||
106 | - | func R ( | |
93 | + | func R (z) = if (y(z)) | |
107 | 94 | then unit | |
108 | 95 | else throw("Permission denied") | |
109 | 96 | ||
110 | 97 | ||
111 | - | func S ( | |
98 | + | func S (z,l) = if (if (y(z)) | |
112 | 99 | then true | |
113 | - | else z | |
100 | + | else A(z, l)) | |
114 | 101 | then unit | |
115 | 102 | else throw("Permission denied") | |
116 | 103 | ||
117 | 104 | ||
118 | - | @Callable(y) | |
119 | - | func setOwner (l,q) = valueOrElse(P([S(y, l), if (A(q)) | |
105 | + | @Callable(z) | |
106 | + | func owner (l) = $Tuple2(nil, o(l)) | |
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | @Callable(z) | |
111 | + | func setOwner (l,q) = valueOrElse(P([S(z, l), if (B(q)) | |
120 | 112 | then unit | |
121 | 113 | else throw("Owner must be a valid address")]), p(l, q)) | |
122 | 114 | ||
123 | 115 | ||
124 | 116 | ||
125 | - | @Callable( | |
126 | - | func | |
117 | + | @Callable(z) | |
118 | + | func registrar (l) = $Tuple2(nil, r(l)) | |
127 | 119 | ||
128 | 120 | ||
129 | 121 | ||
130 | - | @Callable( | |
131 | - | func resolver (l) = $Tuple2(nil, | |
122 | + | @Callable(z) | |
123 | + | func resolver (l) = $Tuple2(nil, s(l)) | |
132 | 124 | ||
133 | 125 | ||
134 | 126 | ||
135 | - | @Callable( | |
136 | - | func setResolver (l, | |
127 | + | @Callable(z) | |
128 | + | func setResolver (l,u) = valueOrElse(P([S(z, l), if (B(u)) | |
137 | 129 | then unit | |
138 | - | else throw("Resolver must be a valid contract address")]), | |
130 | + | else throw("Resolver must be a valid contract address")]), t(l, u)) | |
139 | 131 | ||
140 | 132 | ||
141 | 133 | ||
142 | - | @Callable( | |
143 | - | func nameCreated (l) = $Tuple2(nil, | |
134 | + | @Callable(z) | |
135 | + | func nameCreated (l) = $Tuple2(nil, v(l)) | |
144 | 136 | ||
145 | 137 | ||
146 | 138 | ||
147 | - | @Callable( | |
148 | - | func setRecord (l,q, | |
139 | + | @Callable(z) | |
140 | + | func setRecord (l,q,u) = valueOrElse(P([R(z)]), ((p(l, q) ++ t(l, u)) ++ w(l, lastBlock.timestamp))) | |
149 | 141 | ||
150 | 142 | ||
151 | 143 | ||
152 | - | @Callable( | |
144 | + | @Callable(z) | |
153 | 145 | func whoIs (h) = valueOrElse(P([if ((size(h) > 0)) | |
154 | 146 | then unit | |
155 | 147 | else throw("Name cannot be empty")]), { | |
156 | - | let T = B(h) | |
157 | - | let E = T._1 | |
158 | - | let F = T._2 | |
159 | - | let U = o(E) | |
160 | - | let H = { | |
161 | - | let J = U | |
162 | - | if ($isInstanceOf(J, "String")) | |
148 | + | let T = C(h) | |
149 | + | let U = T._1 | |
150 | + | let G = T._2 | |
151 | + | let V = { | |
152 | + | let K = o(U) | |
153 | + | if ($isInstanceOf(K, "String")) | |
163 | 154 | then { | |
164 | - | let q = J | |
165 | - | addressFromString(q) | |
155 | + | let q = K | |
156 | + | if (B(q)) | |
157 | + | then q | |
158 | + | else unit | |
166 | 159 | } | |
167 | 160 | else unit | |
168 | 161 | } | |
169 | - | let V = r(E) | |
170 | - | let W = u(E) | |
171 | - | let q = G(value(H), "owner", F) | |
172 | - | let t = G(value(H), "resolver", F) | |
173 | - | let X = N(value(H), "nameCreated", F) | |
174 | - | let Y = N(value(H), "nameExpires", F) | |
175 | - | let Z = if ((size(E) > 0)) | |
176 | - | then (size(F) == 0) | |
162 | + | let W = { | |
163 | + | let K = r(U) | |
164 | + | if ($isInstanceOf(K, "String")) | |
165 | + | then { | |
166 | + | let X = K | |
167 | + | if (B(X)) | |
168 | + | then X | |
169 | + | else unit | |
170 | + | } | |
171 | + | else unit | |
172 | + | } | |
173 | + | let Y = value(addressFromString(value(W))) | |
174 | + | let Z = s(U) | |
175 | + | let aa = v(U) | |
176 | + | let q = { | |
177 | + | let K = H(Y, "owner", G) | |
178 | + | if ($isInstanceOf(K, "String")) | |
179 | + | then { | |
180 | + | let q = K | |
181 | + | if (B(q)) | |
182 | + | then q | |
183 | + | else unit | |
184 | + | } | |
185 | + | else unit | |
186 | + | } | |
187 | + | let X = { | |
188 | + | let K = H(Y, "registrar", G) | |
189 | + | if ($isInstanceOf(K, "String")) | |
190 | + | then { | |
191 | + | let X = K | |
192 | + | if (B(X)) | |
193 | + | then X | |
194 | + | else unit | |
195 | + | } | |
196 | + | else unit | |
197 | + | } | |
198 | + | let u = { | |
199 | + | let K = H(Y, "resolver", G) | |
200 | + | if ($isInstanceOf(K, "String")) | |
201 | + | then { | |
202 | + | let u = K | |
203 | + | if (B(u)) | |
204 | + | then u | |
205 | + | else unit | |
206 | + | } | |
207 | + | else unit | |
208 | + | } | |
209 | + | let ab = { | |
210 | + | let K = H(Y, "nameCreated", G) | |
211 | + | if ($isInstanceOf(K, "Int")) | |
212 | + | then { | |
213 | + | let ab = K | |
214 | + | if (if ((ab > 0)) | |
215 | + | then (lastBlock.timestamp > ab) | |
216 | + | else false) | |
217 | + | then ab | |
218 | + | else unit | |
219 | + | } | |
220 | + | else unit | |
221 | + | } | |
222 | + | let ac = { | |
223 | + | let K = H(Y, "nameExpires", G) | |
224 | + | if ($isInstanceOf(K, "Int")) | |
225 | + | then { | |
226 | + | let ac = K | |
227 | + | if ((ac > 0)) | |
228 | + | then ac | |
229 | + | else unit | |
230 | + | } | |
231 | + | else unit | |
232 | + | } | |
233 | + | let ad = if ((size(U) > 0)) | |
234 | + | then (size(G) == 0) | |
177 | 235 | else false | |
178 | - | if (if ( | |
236 | + | if (if (ad) | |
179 | 237 | then true | |
180 | - | else !(isDefined( | |
181 | - | then $Tuple2(nil, $ | |
182 | - | else $Tuple2(nil, $ | |
183 | - | let | |
184 | - | if ($isInstanceOf( | |
238 | + | else !(isDefined(W))) | |
239 | + | then $Tuple2(nil, $Tuple5(W, V, Z, aa, unit)) | |
240 | + | else $Tuple2(nil, $Tuple5({ | |
241 | + | let K = q | |
242 | + | if ($isInstanceOf(K, "String")) | |
185 | 243 | then { | |
186 | - | let q = | |
244 | + | let q = K | |
187 | 245 | q | |
188 | 246 | } | |
189 | - | else U | |
190 | - | }, { | |
191 | - | let J = t | |
192 | - | if ($isInstanceOf(J, "String")) | |
193 | - | then { | |
194 | - | let t = J | |
195 | - | t | |
196 | - | } | |
197 | 247 | else V | |
198 | - | }, { | |
199 | - | let J = X | |
200 | - | if ($isInstanceOf(J, "Int")) | |
201 | - | then { | |
202 | - | let X = J | |
203 | - | X | |
204 | - | } | |
205 | - | else W | |
206 | - | }, Y)) | |
248 | + | }, X, u, ab, ac)) | |
207 | 249 | }) | |
208 | 250 | ||
209 | 251 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c) = valueOrErrorMessage(getString(b, c), ((("Can't read '" + c) + "' at address ") + toString(b))) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func d (b,c) = valueOrErrorMessage(getInteger(b, c), ((("Can't read '" + c) + "' at address ") + toString(b))) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func e (f) = valueOrErrorMessage(addressFromString(f), (("Can't parse address from '" + f) + "'")) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func g (h,i,j) = ((((h + "_") + i) + "_") + j) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func k (l) = g("Name", l, "owner") | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func m (l) = g("Name", l, "resolver") | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func n (l) = g("Name", l, "createdAt") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func o (l) = getString(this, k(l)) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func p (l,q) = [StringEntry(k(l), q)] | |
29 | 29 | ||
30 | 30 | ||
31 | - | func r (l) = getString(this, | |
31 | + | func r (l) = getString(this, k(l)) | |
32 | 32 | ||
33 | 33 | ||
34 | - | func s (l | |
34 | + | func s (l) = getString(this, m(l)) | |
35 | 35 | ||
36 | 36 | ||
37 | - | func | |
37 | + | func t (l,u) = [StringEntry(m(l), u)] | |
38 | 38 | ||
39 | 39 | ||
40 | - | func v (l | |
40 | + | func v (l) = getInteger(this, n(l)) | |
41 | 41 | ||
42 | 42 | ||
43 | - | func | |
43 | + | func w (l,x) = [IntegerEntry(n(l), x)] | |
44 | 44 | ||
45 | 45 | ||
46 | - | func | |
46 | + | func y (z) = (z.caller == this) | |
47 | 47 | ||
48 | 48 | ||
49 | - | func A ( | |
49 | + | func A (z,l) = (toString(z.caller) == valueOrElse(o(l), "")) | |
50 | 50 | ||
51 | 51 | ||
52 | - | func B (h) = { | |
53 | - | let C = split(h, ".") | |
54 | - | let D = (size(C) - 1) | |
55 | - | let E = C[D] | |
56 | - | let F = makeString(removeByIndex(C, D), ".") | |
57 | - | $Tuple2(E, F) | |
52 | + | func B (f) = isDefined(addressFromString(f)) | |
53 | + | ||
54 | + | ||
55 | + | func C (h) = { | |
56 | + | let D = split(h, ".") | |
57 | + | let E = (size(D) - 1) | |
58 | + | let F = D[E] | |
59 | + | let G = makeString(removeByIndex(D, E), ".") | |
60 | + | $Tuple2(F, G) | |
58 | 61 | } | |
59 | 62 | ||
60 | 63 | ||
61 | - | func | |
62 | - | let | |
63 | - | if ($isInstanceOf( | |
64 | + | func H (I,J,G) = { | |
65 | + | let K = invoke(I, "supportsInterface", [J], nil) | |
66 | + | if ($isInstanceOf(K, "Boolean")) | |
64 | 67 | then { | |
65 | - | let | |
66 | - | if (!( | |
68 | + | let L = K | |
69 | + | if (!(L)) | |
67 | 70 | then unit | |
68 | 71 | else { | |
69 | - | let | |
70 | - | if ($isInstanceOf( | |
72 | + | let M = invoke(value(I), J, [G], nil) | |
73 | + | if ($isInstanceOf(M, "String")) | |
71 | 74 | then { | |
72 | - | let | |
73 | - | | |
75 | + | let N = M | |
76 | + | N | |
74 | 77 | } | |
75 | - | else unit | |
76 | - | } | |
77 | - | } | |
78 | - | else unit | |
79 | - | } | |
80 | - | ||
81 | - | ||
82 | - | func N (H,I,F) = { | |
83 | - | let J = invoke(H, "supportsInterface", [I], nil) | |
84 | - | if ($isInstanceOf(J, "Boolean")) | |
85 | - | then { | |
86 | - | let K = J | |
87 | - | if (!(K)) | |
88 | - | then unit | |
89 | - | else { | |
90 | - | let L = invoke(value(H), I, [F], nil) | |
91 | - | if ($isInstanceOf(L, "Int")) | |
92 | - | then { | |
93 | - | let O = L | |
94 | - | O | |
95 | - | } | |
96 | - | else unit | |
78 | + | else if ($isInstanceOf(M, "Int")) | |
79 | + | then { | |
80 | + | let O = M | |
81 | + | O | |
82 | + | } | |
83 | + | else unit | |
97 | 84 | } | |
98 | 85 | } | |
99 | 86 | else unit | |
100 | 87 | } | |
101 | 88 | ||
102 | 89 | ||
103 | 90 | func P (Q) = unit | |
104 | 91 | ||
105 | 92 | ||
106 | - | func R ( | |
93 | + | func R (z) = if (y(z)) | |
107 | 94 | then unit | |
108 | 95 | else throw("Permission denied") | |
109 | 96 | ||
110 | 97 | ||
111 | - | func S ( | |
98 | + | func S (z,l) = if (if (y(z)) | |
112 | 99 | then true | |
113 | - | else z | |
100 | + | else A(z, l)) | |
114 | 101 | then unit | |
115 | 102 | else throw("Permission denied") | |
116 | 103 | ||
117 | 104 | ||
118 | - | @Callable(y) | |
119 | - | func setOwner (l,q) = valueOrElse(P([S(y, l), if (A(q)) | |
105 | + | @Callable(z) | |
106 | + | func owner (l) = $Tuple2(nil, o(l)) | |
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | @Callable(z) | |
111 | + | func setOwner (l,q) = valueOrElse(P([S(z, l), if (B(q)) | |
120 | 112 | then unit | |
121 | 113 | else throw("Owner must be a valid address")]), p(l, q)) | |
122 | 114 | ||
123 | 115 | ||
124 | 116 | ||
125 | - | @Callable( | |
126 | - | func | |
117 | + | @Callable(z) | |
118 | + | func registrar (l) = $Tuple2(nil, r(l)) | |
127 | 119 | ||
128 | 120 | ||
129 | 121 | ||
130 | - | @Callable( | |
131 | - | func resolver (l) = $Tuple2(nil, | |
122 | + | @Callable(z) | |
123 | + | func resolver (l) = $Tuple2(nil, s(l)) | |
132 | 124 | ||
133 | 125 | ||
134 | 126 | ||
135 | - | @Callable( | |
136 | - | func setResolver (l, | |
127 | + | @Callable(z) | |
128 | + | func setResolver (l,u) = valueOrElse(P([S(z, l), if (B(u)) | |
137 | 129 | then unit | |
138 | - | else throw("Resolver must be a valid contract address")]), | |
130 | + | else throw("Resolver must be a valid contract address")]), t(l, u)) | |
139 | 131 | ||
140 | 132 | ||
141 | 133 | ||
142 | - | @Callable( | |
143 | - | func nameCreated (l) = $Tuple2(nil, | |
134 | + | @Callable(z) | |
135 | + | func nameCreated (l) = $Tuple2(nil, v(l)) | |
144 | 136 | ||
145 | 137 | ||
146 | 138 | ||
147 | - | @Callable( | |
148 | - | func setRecord (l,q, | |
139 | + | @Callable(z) | |
140 | + | func setRecord (l,q,u) = valueOrElse(P([R(z)]), ((p(l, q) ++ t(l, u)) ++ w(l, lastBlock.timestamp))) | |
149 | 141 | ||
150 | 142 | ||
151 | 143 | ||
152 | - | @Callable( | |
144 | + | @Callable(z) | |
153 | 145 | func whoIs (h) = valueOrElse(P([if ((size(h) > 0)) | |
154 | 146 | then unit | |
155 | 147 | else throw("Name cannot be empty")]), { | |
156 | - | let T = B(h) | |
157 | - | let E = T._1 | |
158 | - | let F = T._2 | |
159 | - | let U = o(E) | |
160 | - | let H = { | |
161 | - | let J = U | |
162 | - | if ($isInstanceOf(J, "String")) | |
148 | + | let T = C(h) | |
149 | + | let U = T._1 | |
150 | + | let G = T._2 | |
151 | + | let V = { | |
152 | + | let K = o(U) | |
153 | + | if ($isInstanceOf(K, "String")) | |
163 | 154 | then { | |
164 | - | let q = J | |
165 | - | addressFromString(q) | |
155 | + | let q = K | |
156 | + | if (B(q)) | |
157 | + | then q | |
158 | + | else unit | |
166 | 159 | } | |
167 | 160 | else unit | |
168 | 161 | } | |
169 | - | let V = r(E) | |
170 | - | let W = u(E) | |
171 | - | let q = G(value(H), "owner", F) | |
172 | - | let t = G(value(H), "resolver", F) | |
173 | - | let X = N(value(H), "nameCreated", F) | |
174 | - | let Y = N(value(H), "nameExpires", F) | |
175 | - | let Z = if ((size(E) > 0)) | |
176 | - | then (size(F) == 0) | |
162 | + | let W = { | |
163 | + | let K = r(U) | |
164 | + | if ($isInstanceOf(K, "String")) | |
165 | + | then { | |
166 | + | let X = K | |
167 | + | if (B(X)) | |
168 | + | then X | |
169 | + | else unit | |
170 | + | } | |
171 | + | else unit | |
172 | + | } | |
173 | + | let Y = value(addressFromString(value(W))) | |
174 | + | let Z = s(U) | |
175 | + | let aa = v(U) | |
176 | + | let q = { | |
177 | + | let K = H(Y, "owner", G) | |
178 | + | if ($isInstanceOf(K, "String")) | |
179 | + | then { | |
180 | + | let q = K | |
181 | + | if (B(q)) | |
182 | + | then q | |
183 | + | else unit | |
184 | + | } | |
185 | + | else unit | |
186 | + | } | |
187 | + | let X = { | |
188 | + | let K = H(Y, "registrar", G) | |
189 | + | if ($isInstanceOf(K, "String")) | |
190 | + | then { | |
191 | + | let X = K | |
192 | + | if (B(X)) | |
193 | + | then X | |
194 | + | else unit | |
195 | + | } | |
196 | + | else unit | |
197 | + | } | |
198 | + | let u = { | |
199 | + | let K = H(Y, "resolver", G) | |
200 | + | if ($isInstanceOf(K, "String")) | |
201 | + | then { | |
202 | + | let u = K | |
203 | + | if (B(u)) | |
204 | + | then u | |
205 | + | else unit | |
206 | + | } | |
207 | + | else unit | |
208 | + | } | |
209 | + | let ab = { | |
210 | + | let K = H(Y, "nameCreated", G) | |
211 | + | if ($isInstanceOf(K, "Int")) | |
212 | + | then { | |
213 | + | let ab = K | |
214 | + | if (if ((ab > 0)) | |
215 | + | then (lastBlock.timestamp > ab) | |
216 | + | else false) | |
217 | + | then ab | |
218 | + | else unit | |
219 | + | } | |
220 | + | else unit | |
221 | + | } | |
222 | + | let ac = { | |
223 | + | let K = H(Y, "nameExpires", G) | |
224 | + | if ($isInstanceOf(K, "Int")) | |
225 | + | then { | |
226 | + | let ac = K | |
227 | + | if ((ac > 0)) | |
228 | + | then ac | |
229 | + | else unit | |
230 | + | } | |
231 | + | else unit | |
232 | + | } | |
233 | + | let ad = if ((size(U) > 0)) | |
234 | + | then (size(G) == 0) | |
177 | 235 | else false | |
178 | - | if (if ( | |
236 | + | if (if (ad) | |
179 | 237 | then true | |
180 | - | else !(isDefined( | |
181 | - | then $Tuple2(nil, $ | |
182 | - | else $Tuple2(nil, $ | |
183 | - | let | |
184 | - | if ($isInstanceOf( | |
238 | + | else !(isDefined(W))) | |
239 | + | then $Tuple2(nil, $Tuple5(W, V, Z, aa, unit)) | |
240 | + | else $Tuple2(nil, $Tuple5({ | |
241 | + | let K = q | |
242 | + | if ($isInstanceOf(K, "String")) | |
185 | 243 | then { | |
186 | - | let q = | |
244 | + | let q = K | |
187 | 245 | q | |
188 | 246 | } | |
189 | - | else U | |
190 | - | }, { | |
191 | - | let J = t | |
192 | - | if ($isInstanceOf(J, "String")) | |
193 | - | then { | |
194 | - | let t = J | |
195 | - | t | |
196 | - | } | |
197 | 247 | else V | |
198 | - | }, { | |
199 | - | let J = X | |
200 | - | if ($isInstanceOf(J, "Int")) | |
201 | - | then { | |
202 | - | let X = J | |
203 | - | X | |
204 | - | } | |
205 | - | else W | |
206 | - | }, Y)) | |
248 | + | }, X, u, ab, ac)) | |
207 | 249 | }) | |
208 | 250 | ||
209 | 251 |
github/deemru/w8io/026f985 60.42 ms ◑