tx · JP6PHWTN4K5eXXfDBHT31Dx8GxBdqAY1BoeBoLUd9CW 3NA73oUXjqp7SpudXWV1yMFuKm9awPbqsVz: -0.01200000 Waves 2022.10.27 16:37 [2290900] smart account 3NA73oUXjqp7SpudXWV1yMFuKm9awPbqsVz > SELF 0.00000000 Waves
{ "type": 13, "id": "JP6PHWTN4K5eXXfDBHT31Dx8GxBdqAY1BoeBoLUd9CW", "fee": 1200000, "feeAssetId": null, "timestamp": 1666877864745, "version": 2, "chainId": 84, "sender": "3NA73oUXjqp7SpudXWV1yMFuKm9awPbqsVz", "senderPublicKey": "2mHW72YTfnxJ1M8WsdUQjgpp3a2SUbt9mbAiePGiuJok", "proofs": [ "4z8v4ccbGveWojrU29yrpJb7i3fU5V35B3uEarvpWvLXceX7HiFrA91ZyBaTnA9DPH3FnPPdxbpyUhskQQ2k8sV3" ], "script": "base64:AAIFAAAAAAAAAEYIAhIDCgEBEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIDCgEIEgUKAwgIARIDCgEIAAAAKQEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAEWdldEludGVnZXJPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAA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gZG9uJ3QgaGF2ZSBhIG5hbWUgdG9rZW4JAQAAAAlfc2V0T3duZXIAAAACBQAAAARuYW1lBQAAAA9uZXdPd25lckFkZHJlc3MAAAAAuLMXdg==", "height": 2290900, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9J8FkfuhBofeQtbJWUiBo2DAVwpefzPzyv1Ajnp6Gnvm Next: 2YgyqVaqXcwpT21e5y4gP3gJyGUqm2MA8Xg6B8eN2niw Diff:
Old | New | Differences | |
---|---|---|---|
41 | 41 | func v (h) = getString(this, n(h)) | |
42 | 42 | ||
43 | 43 | ||
44 | - | func w (h) = | |
44 | + | func w (h,x) = [StringEntry(o(h), x)] | |
45 | 45 | ||
46 | 46 | ||
47 | - | func | |
47 | + | func y (h) = getString(this, o(h)) | |
48 | 48 | ||
49 | 49 | ||
50 | - | func | |
50 | + | func z (h) = getString(this, m(h)) | |
51 | 51 | ||
52 | 52 | ||
53 | - | func | |
53 | + | func A (h) = getInteger(this, q(h)) | |
54 | 54 | ||
55 | 55 | ||
56 | - | func | |
56 | + | func B (h) = getInteger(this, p(h)) | |
57 | 57 | ||
58 | 58 | ||
59 | - | let B = { | |
60 | - | let C = A() | |
61 | - | if ($isInstanceOf(C, "String")) | |
59 | + | func C () = getString(this, s) | |
60 | + | ||
61 | + | ||
62 | + | let D = { | |
63 | + | let E = C() | |
64 | + | if ($isInstanceOf(E, "String")) | |
62 | 65 | then { | |
63 | - | let | |
64 | - | split( | |
66 | + | let F = E | |
67 | + | split(F, ",") | |
65 | 68 | } | |
66 | 69 | else nil | |
67 | 70 | } | |
68 | 71 | ||
69 | - | let | |
72 | + | let G = d(this, r) | |
70 | 73 | ||
71 | - | func | |
74 | + | func H (h) = isDefined(getString(this, m(h))) | |
72 | 75 | ||
73 | 76 | ||
74 | - | func | |
77 | + | func I (h) = isDefined(A(h)) | |
75 | 78 | ||
76 | 79 | ||
77 | - | func | |
78 | - | let | |
79 | - | if ($isInstanceOf( | |
80 | + | func J (h) = { | |
81 | + | let E = B(h) | |
82 | + | if ($isInstanceOf(E, "Int")) | |
80 | 83 | then { | |
81 | - | let | |
82 | - | (lastBlock.timestamp > | |
84 | + | let K = E | |
85 | + | (lastBlock.timestamp > K) | |
83 | 86 | } | |
84 | 87 | else false | |
85 | 88 | } | |
86 | 89 | ||
87 | 90 | ||
88 | - | func | |
89 | - | then | |
91 | + | func L (h) = if (if (H(h)) | |
92 | + | then I(h) | |
90 | 93 | else false) | |
91 | - | then !( | |
94 | + | then !(J(h)) | |
92 | 95 | else false | |
93 | 96 | ||
94 | 97 | ||
95 | - | func | |
96 | - | let | |
97 | - | func | |
98 | - | then contains( | |
98 | + | func M (h) = { | |
99 | + | let N = "abcdefghijklmnopqrstuvwxyz1234567890-" | |
100 | + | func O (P,Q) = if (P) | |
101 | + | then contains(N, Q) | |
99 | 102 | else false | |
100 | 103 | ||
101 | 104 | if (if (if (if (if ((size(h) > 0)) | |
108 | 111 | then (lastIndexOf(h, "-") != (size(h) - 1)) | |
109 | 112 | else false) | |
110 | 113 | then { | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
114 | - | func | |
115 | - | then | |
116 | - | else | |
114 | + | let R = split(h, "") | |
115 | + | let S = size(R) | |
116 | + | let T = true | |
117 | + | func U (V,W) = if ((W >= S)) | |
118 | + | then V | |
119 | + | else O(V, R[W]) | |
117 | 120 | ||
118 | - | func | |
119 | - | then | |
121 | + | func X (V,W) = if ((W >= S)) | |
122 | + | then V | |
120 | 123 | else throw("List size exceeds 63") | |
121 | 124 | ||
122 | - | | |
125 | + | X(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(T, 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) | |
123 | 126 | } | |
124 | 127 | else false | |
125 | 128 | } | |
126 | 129 | ||
127 | 130 | ||
128 | - | func | |
129 | - | then if (!( | |
131 | + | func Y (h) = if (M(h)) | |
132 | + | then if (!(H(h))) | |
130 | 133 | then true | |
131 | - | else | |
134 | + | else J(h) | |
132 | 135 | else false | |
133 | 136 | ||
134 | 137 | ||
135 | - | func | |
138 | + | func Z (f) = isDefined(addressFromString(f)) | |
136 | 139 | ||
137 | 140 | ||
138 | - | func | |
141 | + | func aa (ab) = (ab.caller == this) | |
139 | 142 | ||
140 | 143 | ||
141 | - | func | |
144 | + | func ac (ab,h) = (toString(ab.originCaller) == valueOrElse(v(h), "")) | |
142 | 145 | ||
143 | 146 | ||
144 | - | func | |
147 | + | func ad (b) = containsElement(D, b) | |
145 | 148 | ||
146 | 149 | ||
147 | - | func | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | $Tuple2( | |
150 | + | func ae (h) = { | |
151 | + | let af = split(h, ".") | |
152 | + | let ag = (size(af) - 1) | |
153 | + | let ah = af[ag] | |
154 | + | let ai = makeString(removeByIndex(af, ag), ".") | |
155 | + | $Tuple2(ah, ai) | |
153 | 156 | } | |
154 | 157 | ||
155 | 158 | ||
156 | - | func | |
159 | + | func aj (h) = [Issue(if ((size(h) > 16)) | |
157 | 160 | then (take(h, 15) + "~") | |
158 | 161 | else take(h, 16), (h + ".waves"), 1, 0, false)] | |
159 | 162 | ||
160 | 163 | ||
161 | - | func | |
164 | + | func ak (h,l,al) = [StringEntry(m(h), l), StringEntry(k(l), h), IntegerEntry(q(h), al), IntegerEntry(p(h), (al + G))] | |
162 | 165 | ||
163 | 166 | ||
164 | - | func | |
167 | + | func am (h,l) = [StringEntry(m(h), l), StringEntry(k(l), h)] | |
165 | 168 | ||
166 | 169 | ||
167 | - | func | |
170 | + | func an (l,u) = [ScriptTransfer(e(u), 1, fromBase58String(l))] | |
168 | 171 | ||
169 | 172 | ||
170 | - | func | |
173 | + | func ao (ap) = unit | |
171 | 174 | ||
172 | 175 | ||
173 | - | func | |
176 | + | func aq (ab) = if (aa(ab)) | |
174 | 177 | then unit | |
175 | 178 | else throw("Permission denied") | |
176 | 179 | ||
177 | 180 | ||
178 | - | func | |
181 | + | func ar (ab) = if (if (aa(ab)) | |
179 | 182 | then true | |
180 | - | else | |
183 | + | else ad(toString(ab.caller))) | |
181 | 184 | then unit | |
182 | 185 | else throw("Permission denied") | |
183 | 186 | ||
184 | 187 | ||
185 | - | func | |
188 | + | func as (ab,h) = if (if (aa(ab)) | |
186 | 189 | then true | |
187 | - | else | |
190 | + | else ac(ab, h)) | |
188 | 191 | then unit | |
189 | 192 | else throw("Permission denied") | |
190 | 193 | ||
191 | 194 | ||
192 | - | @Callable( | |
193 | - | func init ( | |
195 | + | @Callable(ab) | |
196 | + | func init (G) = valueOrElse(ao([aq(ab), if ((G > 0)) | |
194 | 197 | then unit | |
195 | - | else throw("TTL cannot be negative")]), [IntegerEntry(r, | |
198 | + | else throw("TTL cannot be negative")]), [IntegerEntry(r, G)]) | |
196 | 199 | ||
197 | 200 | ||
198 | 201 | ||
199 | - | @Callable( | |
200 | - | func supportsInterface ( | |
202 | + | @Callable(ab) | |
203 | + | func supportsInterface (at) = $Tuple2(nil, containsElement(["owner", "resolver", "nameCreated", "nameExpires"], at)) | |
201 | 204 | ||
202 | 205 | ||
203 | 206 | ||
204 | - | @Callable( | |
205 | - | func addController (b) = valueOrElse( | |
207 | + | @Callable(ab) | |
208 | + | func addController (b) = valueOrElse(ao([aq(ab), if (Z(b)) | |
206 | 209 | then unit | |
207 | - | else throw("Controller must be a valid address"), if (!( | |
210 | + | else throw("Controller must be a valid address"), if (!(ad(b))) | |
208 | 211 | then unit | |
209 | - | else throw((("Controller `" + b) + "` is already registered"))]), [StringEntry(s, makeString(( | |
212 | + | else throw((("Controller `" + b) + "` is already registered"))]), [StringEntry(s, makeString((D :+ b), ","))]) | |
210 | 213 | ||
211 | 214 | ||
212 | 215 | ||
213 | - | @Callable( | |
214 | - | func removeController (b) = valueOrElse( | |
216 | + | @Callable(ab) | |
217 | + | func removeController (b) = valueOrElse(ao([aq(ab), if (ad(b)) | |
215 | 218 | then unit | |
216 | 219 | else throw((("Controller `" + b) + "` is not registered"))]), { | |
217 | - | let | |
218 | - | [StringEntry(s, makeString(removeByIndex( | |
220 | + | let au = value(indexOf(D, b)) | |
221 | + | [StringEntry(s, makeString(removeByIndex(D, au), ","))] | |
219 | 222 | }) | |
220 | 223 | ||
221 | 224 | ||
222 | 225 | ||
223 | - | @Callable( | |
224 | - | func | |
226 | + | @Callable(ab) | |
227 | + | func validate (h) = $Tuple2(nil, M(h)) | |
225 | 228 | ||
226 | 229 | ||
227 | 230 | ||
228 | - | @Callable( | |
229 | - | func | |
231 | + | @Callable(ab) | |
232 | + | func available (h) = $Tuple2(nil, Y(h)) | |
230 | 233 | ||
231 | 234 | ||
232 | 235 | ||
233 | - | @Callable( | |
234 | - | func | |
236 | + | @Callable(ab) | |
237 | + | func owner (h) = $Tuple2(nil, v(ae(h)._1)) | |
235 | 238 | ||
236 | 239 | ||
237 | 240 | ||
238 | - | @Callable( | |
239 | - | func | |
241 | + | @Callable(ab) | |
242 | + | func resolver (h) = $Tuple2(nil, y(ae(h)._1)) | |
240 | 243 | ||
241 | 244 | ||
242 | 245 | ||
243 | - | @Callable(Z) | |
244 | - | func getNameCreated (h) = $Tuple2(nil, y(ac(h)._1)) | |
246 | + | @Callable(ab) | |
247 | + | func setResolver (h,x) = valueOrElse(ao([if (L(h)) | |
248 | + | then unit | |
249 | + | else throw("Name expired or not registered"), as(ab, h), if (Z(x)) | |
250 | + | then unit | |
251 | + | else throw("Resolver must be a valid contract address")]), $Tuple2(nil, w(h, x))) | |
245 | 252 | ||
246 | 253 | ||
247 | 254 | ||
248 | - | @Callable( | |
249 | - | func | |
255 | + | @Callable(ab) | |
256 | + | func nameCreated (h) = $Tuple2(nil, A(ae(h)._1)) | |
250 | 257 | ||
251 | 258 | ||
252 | 259 | ||
253 | - | @Callable(Z) | |
254 | - | func register (h,u,aj) = valueOrElse(am([ap(Z), if (W(h)) | |
260 | + | @Callable(ab) | |
261 | + | func nameExpires (h) = $Tuple2(nil, B(ae(h)._1)) | |
262 | + | ||
263 | + | ||
264 | + | ||
265 | + | @Callable(ab) | |
266 | + | func register (h,u,al) = valueOrElse(ao([ar(ab), if (Y(h)) | |
255 | 267 | then unit | |
256 | - | else throw((("`" + h) + "` cannot be registered")), if ( | |
268 | + | else throw((("`" + h) + "` cannot be registered")), if (Z(u)) | |
257 | 269 | then unit | |
258 | - | else throw("Owner must be a valid address"), if (( | |
270 | + | else throw("Owner must be a valid address"), if ((al > 0)) | |
259 | 271 | then unit | |
260 | - | else throw("CreatedAt cannot be negative"), if ((lastBlock.timestamp >= | |
272 | + | else throw("CreatedAt cannot be negative"), if ((lastBlock.timestamp >= al)) | |
261 | 273 | then unit | |
262 | 274 | else throw("CreatedAt cannot be in the future")]), { | |
263 | - | let | |
264 | - | let l = calculateAssetId( | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | ((( | |
275 | + | let av = aj(h) | |
276 | + | let l = calculateAssetId(av[0]) | |
277 | + | let aw = toBase58String(l) | |
278 | + | let ax = ak(h, aw, al) | |
279 | + | let ay = an(aw, u) | |
280 | + | let az = t(h, u) | |
281 | + | (((av ++ ax) ++ ay) ++ az) | |
270 | 282 | }) | |
271 | 283 | ||
272 | 284 | ||
273 | 285 | ||
274 | - | @Callable( | |
275 | - | func reclaim (h) = valueOrElse( | |
286 | + | @Callable(ab) | |
287 | + | func reclaim (h) = valueOrElse(ao([if (L(h)) | |
276 | 288 | then unit | |
277 | 289 | else throw((("`" + h) + "` is not active"))]), { | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let l = fromBase58String( | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | if ($isInstanceOf( | |
290 | + | let aA = ab.originCaller | |
291 | + | let aB = toString(aA) | |
292 | + | let aw = valueOrErrorMessage(z(h), (("No token is issued for `" + h) + "`")) | |
293 | + | let l = fromBase58String(aw) | |
294 | + | let aC = (assetBalance(aA, l) == 1) | |
295 | + | let aD = ac(ab, h) | |
296 | + | let aE = { | |
297 | + | let E = assetInfo(l) | |
298 | + | if ($isInstanceOf(E, "Asset")) | |
287 | 299 | then { | |
288 | - | let | |
289 | - | ( | |
300 | + | let aF = E | |
301 | + | (aF.quantity == 1) | |
290 | 302 | } | |
291 | 303 | else false | |
292 | 304 | } | |
293 | - | if (if ( | |
294 | - | then !( | |
305 | + | if (if (aD) | |
306 | + | then !(aE) | |
295 | 307 | else false) | |
296 | 308 | then { | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | (( | |
309 | + | let aG = aj(h) | |
310 | + | let aH = calculateAssetId(aG[0]) | |
311 | + | let aI = toBase58String(aH) | |
312 | + | let aJ = am(h, aI) | |
313 | + | let aK = an(aI, aB) | |
314 | + | ((aG ++ aJ) ++ aK) | |
303 | 315 | } | |
304 | - | else if (if ( | |
305 | - | then | |
316 | + | else if (if (aD) | |
317 | + | then aC | |
306 | 318 | else false) | |
307 | 319 | then throw("You already own a name token") | |
308 | - | else if (!( | |
320 | + | else if (!(aC)) | |
309 | 321 | then throw("You don't have a name token") | |
310 | - | else t(h, | |
322 | + | else t(h, aB) | |
311 | 323 | }) | |
312 | 324 | ||
313 | 325 |
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("Token", l, "name") | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func m (h) = g("Name", h, "token") | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func n (h) = g("Name", h, "owner") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func o (h) = g("Name", h, "resolver") | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func p (h) = g("Name", h, "expiresAt") | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func q (h) = g("Name", h, "createdAt") | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | let r = "nameTTL" | |
35 | 35 | ||
36 | 36 | let s = "controllers" | |
37 | 37 | ||
38 | 38 | func t (h,u) = [StringEntry(n(h), u)] | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func v (h) = getString(this, n(h)) | |
42 | 42 | ||
43 | 43 | ||
44 | - | func w (h) = | |
44 | + | func w (h,x) = [StringEntry(o(h), x)] | |
45 | 45 | ||
46 | 46 | ||
47 | - | func | |
47 | + | func y (h) = getString(this, o(h)) | |
48 | 48 | ||
49 | 49 | ||
50 | - | func | |
50 | + | func z (h) = getString(this, m(h)) | |
51 | 51 | ||
52 | 52 | ||
53 | - | func | |
53 | + | func A (h) = getInteger(this, q(h)) | |
54 | 54 | ||
55 | 55 | ||
56 | - | func | |
56 | + | func B (h) = getInteger(this, p(h)) | |
57 | 57 | ||
58 | 58 | ||
59 | - | let B = { | |
60 | - | let C = A() | |
61 | - | if ($isInstanceOf(C, "String")) | |
59 | + | func C () = getString(this, s) | |
60 | + | ||
61 | + | ||
62 | + | let D = { | |
63 | + | let E = C() | |
64 | + | if ($isInstanceOf(E, "String")) | |
62 | 65 | then { | |
63 | - | let | |
64 | - | split( | |
66 | + | let F = E | |
67 | + | split(F, ",") | |
65 | 68 | } | |
66 | 69 | else nil | |
67 | 70 | } | |
68 | 71 | ||
69 | - | let | |
72 | + | let G = d(this, r) | |
70 | 73 | ||
71 | - | func | |
74 | + | func H (h) = isDefined(getString(this, m(h))) | |
72 | 75 | ||
73 | 76 | ||
74 | - | func | |
77 | + | func I (h) = isDefined(A(h)) | |
75 | 78 | ||
76 | 79 | ||
77 | - | func | |
78 | - | let | |
79 | - | if ($isInstanceOf( | |
80 | + | func J (h) = { | |
81 | + | let E = B(h) | |
82 | + | if ($isInstanceOf(E, "Int")) | |
80 | 83 | then { | |
81 | - | let | |
82 | - | (lastBlock.timestamp > | |
84 | + | let K = E | |
85 | + | (lastBlock.timestamp > K) | |
83 | 86 | } | |
84 | 87 | else false | |
85 | 88 | } | |
86 | 89 | ||
87 | 90 | ||
88 | - | func | |
89 | - | then | |
91 | + | func L (h) = if (if (H(h)) | |
92 | + | then I(h) | |
90 | 93 | else false) | |
91 | - | then !( | |
94 | + | then !(J(h)) | |
92 | 95 | else false | |
93 | 96 | ||
94 | 97 | ||
95 | - | func | |
96 | - | let | |
97 | - | func | |
98 | - | then contains( | |
98 | + | func M (h) = { | |
99 | + | let N = "abcdefghijklmnopqrstuvwxyz1234567890-" | |
100 | + | func O (P,Q) = if (P) | |
101 | + | then contains(N, Q) | |
99 | 102 | else false | |
100 | 103 | ||
101 | 104 | if (if (if (if (if ((size(h) > 0)) | |
102 | 105 | then (63 >= size(h)) | |
103 | 106 | else false) | |
104 | 107 | then (indexOf(h, "--") != 2) | |
105 | 108 | else false) | |
106 | 109 | then (indexOf(h, "-") != 0) | |
107 | 110 | else false) | |
108 | 111 | then (lastIndexOf(h, "-") != (size(h) - 1)) | |
109 | 112 | else false) | |
110 | 113 | then { | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
114 | - | func | |
115 | - | then | |
116 | - | else | |
114 | + | let R = split(h, "") | |
115 | + | let S = size(R) | |
116 | + | let T = true | |
117 | + | func U (V,W) = if ((W >= S)) | |
118 | + | then V | |
119 | + | else O(V, R[W]) | |
117 | 120 | ||
118 | - | func | |
119 | - | then | |
121 | + | func X (V,W) = if ((W >= S)) | |
122 | + | then V | |
120 | 123 | else throw("List size exceeds 63") | |
121 | 124 | ||
122 | - | | |
125 | + | X(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(T, 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) | |
123 | 126 | } | |
124 | 127 | else false | |
125 | 128 | } | |
126 | 129 | ||
127 | 130 | ||
128 | - | func | |
129 | - | then if (!( | |
131 | + | func Y (h) = if (M(h)) | |
132 | + | then if (!(H(h))) | |
130 | 133 | then true | |
131 | - | else | |
134 | + | else J(h) | |
132 | 135 | else false | |
133 | 136 | ||
134 | 137 | ||
135 | - | func | |
138 | + | func Z (f) = isDefined(addressFromString(f)) | |
136 | 139 | ||
137 | 140 | ||
138 | - | func | |
141 | + | func aa (ab) = (ab.caller == this) | |
139 | 142 | ||
140 | 143 | ||
141 | - | func | |
144 | + | func ac (ab,h) = (toString(ab.originCaller) == valueOrElse(v(h), "")) | |
142 | 145 | ||
143 | 146 | ||
144 | - | func | |
147 | + | func ad (b) = containsElement(D, b) | |
145 | 148 | ||
146 | 149 | ||
147 | - | func | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | $Tuple2( | |
150 | + | func ae (h) = { | |
151 | + | let af = split(h, ".") | |
152 | + | let ag = (size(af) - 1) | |
153 | + | let ah = af[ag] | |
154 | + | let ai = makeString(removeByIndex(af, ag), ".") | |
155 | + | $Tuple2(ah, ai) | |
153 | 156 | } | |
154 | 157 | ||
155 | 158 | ||
156 | - | func | |
159 | + | func aj (h) = [Issue(if ((size(h) > 16)) | |
157 | 160 | then (take(h, 15) + "~") | |
158 | 161 | else take(h, 16), (h + ".waves"), 1, 0, false)] | |
159 | 162 | ||
160 | 163 | ||
161 | - | func | |
164 | + | func ak (h,l,al) = [StringEntry(m(h), l), StringEntry(k(l), h), IntegerEntry(q(h), al), IntegerEntry(p(h), (al + G))] | |
162 | 165 | ||
163 | 166 | ||
164 | - | func | |
167 | + | func am (h,l) = [StringEntry(m(h), l), StringEntry(k(l), h)] | |
165 | 168 | ||
166 | 169 | ||
167 | - | func | |
170 | + | func an (l,u) = [ScriptTransfer(e(u), 1, fromBase58String(l))] | |
168 | 171 | ||
169 | 172 | ||
170 | - | func | |
173 | + | func ao (ap) = unit | |
171 | 174 | ||
172 | 175 | ||
173 | - | func | |
176 | + | func aq (ab) = if (aa(ab)) | |
174 | 177 | then unit | |
175 | 178 | else throw("Permission denied") | |
176 | 179 | ||
177 | 180 | ||
178 | - | func | |
181 | + | func ar (ab) = if (if (aa(ab)) | |
179 | 182 | then true | |
180 | - | else | |
183 | + | else ad(toString(ab.caller))) | |
181 | 184 | then unit | |
182 | 185 | else throw("Permission denied") | |
183 | 186 | ||
184 | 187 | ||
185 | - | func | |
188 | + | func as (ab,h) = if (if (aa(ab)) | |
186 | 189 | then true | |
187 | - | else | |
190 | + | else ac(ab, h)) | |
188 | 191 | then unit | |
189 | 192 | else throw("Permission denied") | |
190 | 193 | ||
191 | 194 | ||
192 | - | @Callable( | |
193 | - | func init ( | |
195 | + | @Callable(ab) | |
196 | + | func init (G) = valueOrElse(ao([aq(ab), if ((G > 0)) | |
194 | 197 | then unit | |
195 | - | else throw("TTL cannot be negative")]), [IntegerEntry(r, | |
198 | + | else throw("TTL cannot be negative")]), [IntegerEntry(r, G)]) | |
196 | 199 | ||
197 | 200 | ||
198 | 201 | ||
199 | - | @Callable( | |
200 | - | func supportsInterface ( | |
202 | + | @Callable(ab) | |
203 | + | func supportsInterface (at) = $Tuple2(nil, containsElement(["owner", "resolver", "nameCreated", "nameExpires"], at)) | |
201 | 204 | ||
202 | 205 | ||
203 | 206 | ||
204 | - | @Callable( | |
205 | - | func addController (b) = valueOrElse( | |
207 | + | @Callable(ab) | |
208 | + | func addController (b) = valueOrElse(ao([aq(ab), if (Z(b)) | |
206 | 209 | then unit | |
207 | - | else throw("Controller must be a valid address"), if (!( | |
210 | + | else throw("Controller must be a valid address"), if (!(ad(b))) | |
208 | 211 | then unit | |
209 | - | else throw((("Controller `" + b) + "` is already registered"))]), [StringEntry(s, makeString(( | |
212 | + | else throw((("Controller `" + b) + "` is already registered"))]), [StringEntry(s, makeString((D :+ b), ","))]) | |
210 | 213 | ||
211 | 214 | ||
212 | 215 | ||
213 | - | @Callable( | |
214 | - | func removeController (b) = valueOrElse( | |
216 | + | @Callable(ab) | |
217 | + | func removeController (b) = valueOrElse(ao([aq(ab), if (ad(b)) | |
215 | 218 | then unit | |
216 | 219 | else throw((("Controller `" + b) + "` is not registered"))]), { | |
217 | - | let | |
218 | - | [StringEntry(s, makeString(removeByIndex( | |
220 | + | let au = value(indexOf(D, b)) | |
221 | + | [StringEntry(s, makeString(removeByIndex(D, au), ","))] | |
219 | 222 | }) | |
220 | 223 | ||
221 | 224 | ||
222 | 225 | ||
223 | - | @Callable( | |
224 | - | func | |
226 | + | @Callable(ab) | |
227 | + | func validate (h) = $Tuple2(nil, M(h)) | |
225 | 228 | ||
226 | 229 | ||
227 | 230 | ||
228 | - | @Callable( | |
229 | - | func | |
231 | + | @Callable(ab) | |
232 | + | func available (h) = $Tuple2(nil, Y(h)) | |
230 | 233 | ||
231 | 234 | ||
232 | 235 | ||
233 | - | @Callable( | |
234 | - | func | |
236 | + | @Callable(ab) | |
237 | + | func owner (h) = $Tuple2(nil, v(ae(h)._1)) | |
235 | 238 | ||
236 | 239 | ||
237 | 240 | ||
238 | - | @Callable( | |
239 | - | func | |
241 | + | @Callable(ab) | |
242 | + | func resolver (h) = $Tuple2(nil, y(ae(h)._1)) | |
240 | 243 | ||
241 | 244 | ||
242 | 245 | ||
243 | - | @Callable(Z) | |
244 | - | func getNameCreated (h) = $Tuple2(nil, y(ac(h)._1)) | |
246 | + | @Callable(ab) | |
247 | + | func setResolver (h,x) = valueOrElse(ao([if (L(h)) | |
248 | + | then unit | |
249 | + | else throw("Name expired or not registered"), as(ab, h), if (Z(x)) | |
250 | + | then unit | |
251 | + | else throw("Resolver must be a valid contract address")]), $Tuple2(nil, w(h, x))) | |
245 | 252 | ||
246 | 253 | ||
247 | 254 | ||
248 | - | @Callable( | |
249 | - | func | |
255 | + | @Callable(ab) | |
256 | + | func nameCreated (h) = $Tuple2(nil, A(ae(h)._1)) | |
250 | 257 | ||
251 | 258 | ||
252 | 259 | ||
253 | - | @Callable(Z) | |
254 | - | func register (h,u,aj) = valueOrElse(am([ap(Z), if (W(h)) | |
260 | + | @Callable(ab) | |
261 | + | func nameExpires (h) = $Tuple2(nil, B(ae(h)._1)) | |
262 | + | ||
263 | + | ||
264 | + | ||
265 | + | @Callable(ab) | |
266 | + | func register (h,u,al) = valueOrElse(ao([ar(ab), if (Y(h)) | |
255 | 267 | then unit | |
256 | - | else throw((("`" + h) + "` cannot be registered")), if ( | |
268 | + | else throw((("`" + h) + "` cannot be registered")), if (Z(u)) | |
257 | 269 | then unit | |
258 | - | else throw("Owner must be a valid address"), if (( | |
270 | + | else throw("Owner must be a valid address"), if ((al > 0)) | |
259 | 271 | then unit | |
260 | - | else throw("CreatedAt cannot be negative"), if ((lastBlock.timestamp >= | |
272 | + | else throw("CreatedAt cannot be negative"), if ((lastBlock.timestamp >= al)) | |
261 | 273 | then unit | |
262 | 274 | else throw("CreatedAt cannot be in the future")]), { | |
263 | - | let | |
264 | - | let l = calculateAssetId( | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | ((( | |
275 | + | let av = aj(h) | |
276 | + | let l = calculateAssetId(av[0]) | |
277 | + | let aw = toBase58String(l) | |
278 | + | let ax = ak(h, aw, al) | |
279 | + | let ay = an(aw, u) | |
280 | + | let az = t(h, u) | |
281 | + | (((av ++ ax) ++ ay) ++ az) | |
270 | 282 | }) | |
271 | 283 | ||
272 | 284 | ||
273 | 285 | ||
274 | - | @Callable( | |
275 | - | func reclaim (h) = valueOrElse( | |
286 | + | @Callable(ab) | |
287 | + | func reclaim (h) = valueOrElse(ao([if (L(h)) | |
276 | 288 | then unit | |
277 | 289 | else throw((("`" + h) + "` is not active"))]), { | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let l = fromBase58String( | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | if ($isInstanceOf( | |
290 | + | let aA = ab.originCaller | |
291 | + | let aB = toString(aA) | |
292 | + | let aw = valueOrErrorMessage(z(h), (("No token is issued for `" + h) + "`")) | |
293 | + | let l = fromBase58String(aw) | |
294 | + | let aC = (assetBalance(aA, l) == 1) | |
295 | + | let aD = ac(ab, h) | |
296 | + | let aE = { | |
297 | + | let E = assetInfo(l) | |
298 | + | if ($isInstanceOf(E, "Asset")) | |
287 | 299 | then { | |
288 | - | let | |
289 | - | ( | |
300 | + | let aF = E | |
301 | + | (aF.quantity == 1) | |
290 | 302 | } | |
291 | 303 | else false | |
292 | 304 | } | |
293 | - | if (if ( | |
294 | - | then !( | |
305 | + | if (if (aD) | |
306 | + | then !(aE) | |
295 | 307 | else false) | |
296 | 308 | then { | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | (( | |
309 | + | let aG = aj(h) | |
310 | + | let aH = calculateAssetId(aG[0]) | |
311 | + | let aI = toBase58String(aH) | |
312 | + | let aJ = am(h, aI) | |
313 | + | let aK = an(aI, aB) | |
314 | + | ((aG ++ aJ) ++ aK) | |
303 | 315 | } | |
304 | - | else if (if ( | |
305 | - | then | |
316 | + | else if (if (aD) | |
317 | + | then aC | |
306 | 318 | else false) | |
307 | 319 | then throw("You already own a name token") | |
308 | - | else if (!( | |
320 | + | else if (!(aC)) | |
309 | 321 | then throw("You don't have a name token") | |
310 | - | else t(h, | |
322 | + | else t(h, aB) | |
311 | 323 | }) | |
312 | 324 | ||
313 | 325 |
github/deemru/w8io/026f985 111.28 ms ◑