tx · GimJVshKznLByzmpTeYDp2tUz6hxBzVNwuKrAA4HBHGU

3MvrXJVzDMDcshazxn88FybxHV2JvWQBxTc:  -0.01200000 Waves

2022.10.17 13:24 [2276246] smart account 3MvrXJVzDMDcshazxn88FybxHV2JvWQBxTc > SELF 0.00000000 Waves

{ "type": 13, "id": "GimJVshKznLByzmpTeYDp2tUz6hxBzVNwuKrAA4HBHGU", "fee": 1200000, "feeAssetId": null, "timestamp": 1666002288606, "version": 2, "chainId": 84, "sender": "3MvrXJVzDMDcshazxn88FybxHV2JvWQBxTc", "senderPublicKey": "Fq8P5ctrS7PNTX37bWWxvnwoB7C2FaNySZWnRmgPUaDH", "proofs": [ "5oUMn4Xh7m1eyUQMP4foVMGWhhJFGjctUKVXkvqndnTSKrxuLZwa5q7fCbFv2Gee8394sYMVZXhMiWUsvmZgm51o" ], "script": "base64:AAIFAAAAAAAAAEEIAhIDCgEBEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBIFCgMICAESAwoBCAAAACgBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABFnZXRJbnRlZ2VyT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAA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JG1hdGNoMAIAAAAFQXNzZXQEAAAABXRva2VuBQAAAAckbWF0Y2gwCQAAAAAAAAIIBQAAAAV0b2tlbgAAAAhxdWFudGl0eQAAAAAAAAAAAQcDAwUAAAAMaXNUb2tlbk93bmVyCQEAAAABIQAAAAEFAAAADWlzVG9rZW5FeGlzdHMHBAAAAA1pc3N1ZU5ld1Rva2VuCQEAAAAPX2lzc3VlTmFtZVRva2VuAAAAAQUAAAAEbmFtZQQAAAAKbmV3VG9rZW5JZAkABDgAAAABCQABkQAAAAIFAAAADWlzc3VlTmV3VG9rZW4AAAAAAAAAAAAEAAAAC25ld1Rva2VuU3RyCQACWAAAAAEFAAAACm5ld1Rva2VuSWQEAAAAF3Jlc3RvcmVOYW1lV2l0aE5ld1Rva2VuCQEAAAAVX3Jlc3RvcmVOYW1lV2l0aFRva2VuAAAAAgUAAAAEbmFtZQUAAAALbmV3VG9rZW5TdHIEAAAAF3RyYW5zZmVyTmV3VG9rZW5Ub093bmVyCQEAAAAVX3RyYW5zZmVyVG9rZW5Ub093bmVyAAAAAgUAAAALbmV3VG9rZW5TdHIFAAAAD25ld093bmVyQWRkcmVzcwkABE4AAAACCQAETgAAAAIFAAAADWlzc3VlTmV3VG9rZW4FAAAAF3Jlc3RvcmVOYW1lV2l0aE5ld1Rva2VuBQAAABd0cmFuc2Zlck5ld1Rva2VuVG9Pd25lcgMDBQAAAAxpc1Rva2VuT3duZXIFAAAACGhhc1Rva2VuBwkAAAIAAAABAgAAABxZb3UgYWxyZWFkeSBvd24gYSBuYW1lIHRva2VuAwkBAAAAASEAAAABBQAAAAhoYXNUb2tlbgkAAAIAAAABAgAAABtZb3UgZG9uJ3QgaGF2ZSBhIG5hbWUgdG9rZW4JAQAAAAlfc2V0T3duZXIAAAACBQAAAARuYW1lBQAAAA9uZXdPd25lckFkZHJlc3MAAAAA11C2UQ==", "height": 2276246, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DNEEQaMgQvw3dX5smj8DtK99VRarHThC7d3rbEWNhx2M Next: J6ptAN81AhnCvVFrodShtQLbVx9xeaR7KW4hdB8pBYHY Diff:
OldNewDifferences
44 func a (b,c) = valueOrErrorMessage(getString(b, c), ((("Can't read '" + c) + "' at address ") + toString(b)))
55
66
7-func d (e) = valueOrErrorMessage(addressFromString(e), (("Can't parse address from '" + e) + "'"))
7+func d (b,c) = valueOrErrorMessage(getInteger(b, c), ((("Can't read '" + c) + "' at address ") + toString(b)))
88
99
10-func f (g) = (("Name_" + g) + "_addr")
10+func e (f) = valueOrErrorMessage(addressFromString(f), (("Can't parse address from '" + f) + "'"))
1111
1212
13-let h = "registry"
14-
15-let i = d(a(this, h))
16-
17-func j (k) = (k.caller == this)
13+func g (h,i,j) = ((((h + "_") + i) + "_") + j)
1814
1915
20-func l (e) = isDefined(addressFromString(e))
16+func k (l) = g("Token", l, "name")
2117
2218
23-func m (n) = unit
19+func m (h) = g("Name", h, "token")
2420
2521
26-func o (k) = if (j(k))
22+func n (h) = g("Name", h, "owner")
23+
24+
25+func o (h) = g("Name", h, "resolver")
26+
27+
28+func p (h) = g("Name", h, "expiresAt")
29+
30+
31+func q (h) = g("Name", h, "createdAt")
32+
33+
34+let r = "nameTTL"
35+
36+let s = "controllers"
37+
38+func t (h,u) = [StringEntry(n(h), u)]
39+
40+
41+func v (h) = getString(this, n(h))
42+
43+
44+func w (h,x) = [StringEntry(o(h), x)]
45+
46+
47+func y (h) = getString(this, o(h))
48+
49+
50+func z (h) = getString(this, m(h))
51+
52+
53+func A (h) = getInteger(this, q(h))
54+
55+
56+func B (h) = getInteger(this, p(h))
57+
58+
59+func C () = getString(this, s)
60+
61+
62+let D = {
63+ let E = C()
64+ if ($isInstanceOf(E, "String"))
65+ then {
66+ let F = E
67+ split(F, ",")
68+ }
69+ else nil
70+ }
71+
72+let G = d(this, r)
73+
74+func H (h) = isDefined(getString(this, m(h)))
75+
76+
77+func I (h) = isDefined(A(h))
78+
79+
80+func J (h) = {
81+ let E = B(h)
82+ if ($isInstanceOf(E, "Int"))
83+ then {
84+ let K = E
85+ (lastBlock.timestamp > K)
86+ }
87+ else false
88+ }
89+
90+
91+func L (h) = if (if (H(h))
92+ then I(h)
93+ else false)
94+ then !(J(h))
95+ else false
96+
97+
98+func M (h) = {
99+ let N = "abcdefghijklmnopqrstuvwxyz1234567890-"
100+ func O (P,Q) = if (P)
101+ then contains(N, Q)
102+ else false
103+
104+ let R = if (if (if (if (if ((size(h) > 0))
105+ then (63 >= size(h))
106+ else false)
107+ then (indexOf(h, "--") != 2)
108+ else false)
109+ then (indexOf(h, "-") != 0)
110+ else false)
111+ then (lastIndexOf(h, "-") != (size(h) - 1))
112+ else false)
113+ then {
114+ let S = split(h, "")
115+ let T = size(S)
116+ let U = true
117+ func V (W,X) = if ((X >= T))
118+ then W
119+ else O(W, S[X])
120+
121+ func Y (W,X) = if ((X >= T))
122+ then W
123+ else throw("List size exceeds 63")
124+
125+ 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(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)
126+ }
127+ else false
128+ let Z = if (H(h))
129+ then !(J(h))
130+ else false
131+ if (!(Z))
132+ then R
133+ else false
134+ }
135+
136+
137+func aa (f) = isDefined(addressFromString(f))
138+
139+
140+func ab (ac) = (ac.caller == this)
141+
142+
143+func ad (ac,h) = (toString(ac.caller) == valueOrElse(v(h), ""))
144+
145+
146+func ae (b) = containsElement(D, b)
147+
148+
149+func af (h) = {
150+ let ag = split(h, ".")
151+ let ah = (size(ag) - 1)
152+ let ai = ag[ah]
153+ let aj = makeString(removeByIndex(ag, ah), ".")
154+ $Tuple2(ai, aj)
155+ }
156+
157+
158+func ak (h) = [Issue(if ((size(h) > 16))
159+ then (take(h, 15) + "~")
160+ else take(h, 16), (h + ".waves"), 1, 0, false)]
161+
162+
163+func al (h,l,am) = [StringEntry(m(h), l), StringEntry(k(l), h), IntegerEntry(q(h), am), IntegerEntry(p(h), (am + G))]
164+
165+
166+func an (h,l) = [StringEntry(m(h), l), StringEntry(k(l), h)]
167+
168+
169+func ao (l,u) = [ScriptTransfer(e(u), 1, fromBase58String(l))]
170+
171+
172+func ap (aq) = unit
173+
174+
175+func ar (ac) = if (ab(ac))
27176 then unit
28177 else throw("Permission denied")
29178
30179
31-func p (g) = {
32- let q = invoke(i, "owner", [g], nil)
33- if ($isInstanceOf(q, "String"))
34- then {
35- let r = q
36- r
37- }
38- else unit
39- }
180+func as (ac) = if (if (ab(ac))
181+ then true
182+ else ae(toString(ac.caller)))
183+ then unit
184+ else throw("Permission denied")
40185
41186
42-func s (g) = valueOrElse(getString(this, f(g)), p(g))
187+func at (ac,h) = if (if (ab(ac))
188+ then true
189+ else ad(ac, h))
190+ then unit
191+ else throw("Permission denied")
43192
44193
45-func t (g,b) = [StringEntry(f(g), b)]
194+@Callable(ac)
195+func init (G) = valueOrElse(ap([ar(ac), if ((G > 0))
196+ then unit
197+ else throw("TTL cannot be negative")]), [IntegerEntry(r, G)])
46198
47199
48-func u (g) = {
49- let v = split(g, ".")
50- let w = (size(v) - 1)
51- let x = v[w]
52- let y = makeString(removeByIndex(v, w), ".")
53- $Tuple2(x, y)
54- }
200+
201+@Callable(ac)
202+func supportsInterface (au) = $Tuple2(nil, containsElement(["owner", "resolver", "nameCreated", "nameExpires"], au))
55203
56204
57-func z (g) = {
58- let A = u(g)
59- let x = A._1
60- let y = A._2
61- if ((size(y) == 0))
62- then $Tuple2(unit, g)
63- else {
64- let q = invoke(i, "resolver", [x], nil)
65- if ($isInstanceOf(q, "String"))
66- then {
67- let B = q
68- $Tuple2(addressFromString(B), y)
69- }
70- else $Tuple2(unit, g)
71- }
72- }
205+
206+@Callable(ac)
207+func addController (b) = valueOrElse(ap([ar(ac), if (aa(b))
208+ then unit
209+ else throw("Controller must be a valid address"), if (!(ae(b)))
210+ then unit
211+ else throw((("Controller `" + b) + "` is already registered"))]), [StringEntry(s, makeString((D :+ b), ","))])
73212
74213
75-func C (g,D) = {
76- let E = z(g)
77- let F = E._1
78- let y = E._2
79- let G = {
80- let q = D
81- if (("addr" == q))
82- then $Tuple3("addr", [value(y)], s(g))
83- else $Tuple3(unit, unit, unit)
84- }
85- let H = G._1
86- let I = G._2
87- let J = G._3
88- let K = {
89- let q = invoke(value(F), "supportsInterface", [D], nil)
90- if ($isInstanceOf(q, "Boolean"))
214+
215+@Callable(ac)
216+func removeController (b) = valueOrElse(ap([ar(ac), if (ae(b))
217+ then unit
218+ else throw((("Controller `" + b) + "` is not registered"))]), {
219+ let av = value(indexOf(D, b))
220+[StringEntry(s, makeString(removeByIndex(D, av), ","))]
221+ })
222+
223+
224+
225+@Callable(ac)
226+func available (h) = $Tuple2(nil, M(h))
227+
228+
229+
230+@Callable(ac)
231+func owner (h) = $Tuple2(nil, v(af(h)._1))
232+
233+
234+
235+@Callable(ac)
236+func resolver (h) = $Tuple2(nil, y(af(h)._1))
237+
238+
239+
240+@Callable(ac)
241+func setResolver (h,x) = valueOrElse(ap([if (L(h))
242+ then unit
243+ else throw("Name expired or not registered"), at(ac, h), if (aa(x))
244+ then unit
245+ else throw("Resolver must be a valid contract address")]), $Tuple2(nil, w(h, x)))
246+
247+
248+
249+@Callable(ac)
250+func nameCreated (h) = $Tuple2(nil, A(af(h)._1))
251+
252+
253+
254+@Callable(ac)
255+func nameExpires (h) = $Tuple2(nil, B(af(h)._1))
256+
257+
258+
259+@Callable(ac)
260+func register (h,u,am) = valueOrElse(ap([as(ac), if (M(h))
261+ then unit
262+ else throw((("`" + h) + "` cannot be registered")), if (aa(u))
263+ then unit
264+ else throw("Owner must be a valid address"), if ((am > 0))
265+ then unit
266+ else throw("CreatedAt cannot be negative"), if ((lastBlock.timestamp >= am))
267+ then unit
268+ else throw("CreatedAt cannot be in the future")]), {
269+ let aw = ak(h)
270+ let l = calculateAssetId(aw[0])
271+ let ax = toBase58String(l)
272+ let ay = al(h, ax, am)
273+ let az = ao(ax, u)
274+ let aA = t(h, u)
275+ (((aw ++ ay) ++ az) ++ aA)
276+ })
277+
278+
279+
280+@Callable(ac)
281+func reclaim (h) = valueOrElse(ap([if (L(h))
282+ then unit
283+ else throw((("`" + h) + "` is not active"))]), {
284+ let aB = ac.caller
285+ let aC = toString(aB)
286+ let ax = valueOrErrorMessage(z(h), (("No token is issued for `" + h) + "`"))
287+ let l = fromBase58String(ax)
288+ let aD = (assetBalance(aB, l) == 1)
289+ let aE = ad(ac, h)
290+ let aF = {
291+ let E = assetInfo(l)
292+ if ($isInstanceOf(E, "Asset"))
91293 then {
92- let K = q
93- K
294+ let aG = E
295+ (aG.quantity == 1)
94296 }
95297 else false
96298 }
97- if (!(isDefined(F)))
98- then J
99- else if (!(K))
100- then unit
101- else {
102- let q = invoke(value(F), value(H), value(I), nil)
103- if ($isInstanceOf(q, "String"))
104- then {
105- let L = q
106- if (l(L))
107- then L
108- else unit
109- }
110- else unit
111- }
112- }
113-
114-
115-@Callable(k)
116-func init (M) = valueOrElse(m([o(k)]), [StringEntry(h, M)])
117-
118-
119-
120-@Callable(k)
121-func supportsInterface (N) = $Tuple2(nil, (N == "addr"))
122-
123-
124-
125-@Callable(k)
126-func addr (g) = valueOrElse(m([if ((size(g) > 0))
127- then unit
128- else throw("Name cannot be empty")]), $Tuple2(nil, C(g, "addr")))
299+ if (if (aE)
300+ then !(aF)
301+ else false)
302+ then {
303+ let aH = ak(h)
304+ let aI = calculateAssetId(aH[0])
305+ let aJ = toBase58String(aI)
306+ let aK = an(h, aJ)
307+ let aL = ao(aJ, aC)
308+ ((aH ++ aK) ++ aL)
309+ }
310+ else if (if (aE)
311+ then aD
312+ else false)
313+ then throw("You already own a name token")
314+ else if (!(aD))
315+ then throw("You don't have a name token")
316+ else t(h, aC)
317+ })
129318
130319
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b,c) = valueOrErrorMessage(getString(b, c), ((("Can't read '" + c) + "' at address ") + toString(b)))
55
66
7-func d (e) = valueOrErrorMessage(addressFromString(e), (("Can't parse address from '" + e) + "'"))
7+func d (b,c) = valueOrErrorMessage(getInteger(b, c), ((("Can't read '" + c) + "' at address ") + toString(b)))
88
99
10-func f (g) = (("Name_" + g) + "_addr")
10+func e (f) = valueOrErrorMessage(addressFromString(f), (("Can't parse address from '" + f) + "'"))
1111
1212
13-let h = "registry"
14-
15-let i = d(a(this, h))
16-
17-func j (k) = (k.caller == this)
13+func g (h,i,j) = ((((h + "_") + i) + "_") + j)
1814
1915
20-func l (e) = isDefined(addressFromString(e))
16+func k (l) = g("Token", l, "name")
2117
2218
23-func m (n) = unit
19+func m (h) = g("Name", h, "token")
2420
2521
26-func o (k) = if (j(k))
22+func n (h) = g("Name", h, "owner")
23+
24+
25+func o (h) = g("Name", h, "resolver")
26+
27+
28+func p (h) = g("Name", h, "expiresAt")
29+
30+
31+func q (h) = g("Name", h, "createdAt")
32+
33+
34+let r = "nameTTL"
35+
36+let s = "controllers"
37+
38+func t (h,u) = [StringEntry(n(h), u)]
39+
40+
41+func v (h) = getString(this, n(h))
42+
43+
44+func w (h,x) = [StringEntry(o(h), x)]
45+
46+
47+func y (h) = getString(this, o(h))
48+
49+
50+func z (h) = getString(this, m(h))
51+
52+
53+func A (h) = getInteger(this, q(h))
54+
55+
56+func B (h) = getInteger(this, p(h))
57+
58+
59+func C () = getString(this, s)
60+
61+
62+let D = {
63+ let E = C()
64+ if ($isInstanceOf(E, "String"))
65+ then {
66+ let F = E
67+ split(F, ",")
68+ }
69+ else nil
70+ }
71+
72+let G = d(this, r)
73+
74+func H (h) = isDefined(getString(this, m(h)))
75+
76+
77+func I (h) = isDefined(A(h))
78+
79+
80+func J (h) = {
81+ let E = B(h)
82+ if ($isInstanceOf(E, "Int"))
83+ then {
84+ let K = E
85+ (lastBlock.timestamp > K)
86+ }
87+ else false
88+ }
89+
90+
91+func L (h) = if (if (H(h))
92+ then I(h)
93+ else false)
94+ then !(J(h))
95+ else false
96+
97+
98+func M (h) = {
99+ let N = "abcdefghijklmnopqrstuvwxyz1234567890-"
100+ func O (P,Q) = if (P)
101+ then contains(N, Q)
102+ else false
103+
104+ let R = if (if (if (if (if ((size(h) > 0))
105+ then (63 >= size(h))
106+ else false)
107+ then (indexOf(h, "--") != 2)
108+ else false)
109+ then (indexOf(h, "-") != 0)
110+ else false)
111+ then (lastIndexOf(h, "-") != (size(h) - 1))
112+ else false)
113+ then {
114+ let S = split(h, "")
115+ let T = size(S)
116+ let U = true
117+ func V (W,X) = if ((X >= T))
118+ then W
119+ else O(W, S[X])
120+
121+ func Y (W,X) = if ((X >= T))
122+ then W
123+ else throw("List size exceeds 63")
124+
125+ 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(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)
126+ }
127+ else false
128+ let Z = if (H(h))
129+ then !(J(h))
130+ else false
131+ if (!(Z))
132+ then R
133+ else false
134+ }
135+
136+
137+func aa (f) = isDefined(addressFromString(f))
138+
139+
140+func ab (ac) = (ac.caller == this)
141+
142+
143+func ad (ac,h) = (toString(ac.caller) == valueOrElse(v(h), ""))
144+
145+
146+func ae (b) = containsElement(D, b)
147+
148+
149+func af (h) = {
150+ let ag = split(h, ".")
151+ let ah = (size(ag) - 1)
152+ let ai = ag[ah]
153+ let aj = makeString(removeByIndex(ag, ah), ".")
154+ $Tuple2(ai, aj)
155+ }
156+
157+
158+func ak (h) = [Issue(if ((size(h) > 16))
159+ then (take(h, 15) + "~")
160+ else take(h, 16), (h + ".waves"), 1, 0, false)]
161+
162+
163+func al (h,l,am) = [StringEntry(m(h), l), StringEntry(k(l), h), IntegerEntry(q(h), am), IntegerEntry(p(h), (am + G))]
164+
165+
166+func an (h,l) = [StringEntry(m(h), l), StringEntry(k(l), h)]
167+
168+
169+func ao (l,u) = [ScriptTransfer(e(u), 1, fromBase58String(l))]
170+
171+
172+func ap (aq) = unit
173+
174+
175+func ar (ac) = if (ab(ac))
27176 then unit
28177 else throw("Permission denied")
29178
30179
31-func p (g) = {
32- let q = invoke(i, "owner", [g], nil)
33- if ($isInstanceOf(q, "String"))
34- then {
35- let r = q
36- r
37- }
38- else unit
39- }
180+func as (ac) = if (if (ab(ac))
181+ then true
182+ else ae(toString(ac.caller)))
183+ then unit
184+ else throw("Permission denied")
40185
41186
42-func s (g) = valueOrElse(getString(this, f(g)), p(g))
187+func at (ac,h) = if (if (ab(ac))
188+ then true
189+ else ad(ac, h))
190+ then unit
191+ else throw("Permission denied")
43192
44193
45-func t (g,b) = [StringEntry(f(g), b)]
194+@Callable(ac)
195+func init (G) = valueOrElse(ap([ar(ac), if ((G > 0))
196+ then unit
197+ else throw("TTL cannot be negative")]), [IntegerEntry(r, G)])
46198
47199
48-func u (g) = {
49- let v = split(g, ".")
50- let w = (size(v) - 1)
51- let x = v[w]
52- let y = makeString(removeByIndex(v, w), ".")
53- $Tuple2(x, y)
54- }
200+
201+@Callable(ac)
202+func supportsInterface (au) = $Tuple2(nil, containsElement(["owner", "resolver", "nameCreated", "nameExpires"], au))
55203
56204
57-func z (g) = {
58- let A = u(g)
59- let x = A._1
60- let y = A._2
61- if ((size(y) == 0))
62- then $Tuple2(unit, g)
63- else {
64- let q = invoke(i, "resolver", [x], nil)
65- if ($isInstanceOf(q, "String"))
66- then {
67- let B = q
68- $Tuple2(addressFromString(B), y)
69- }
70- else $Tuple2(unit, g)
71- }
72- }
205+
206+@Callable(ac)
207+func addController (b) = valueOrElse(ap([ar(ac), if (aa(b))
208+ then unit
209+ else throw("Controller must be a valid address"), if (!(ae(b)))
210+ then unit
211+ else throw((("Controller `" + b) + "` is already registered"))]), [StringEntry(s, makeString((D :+ b), ","))])
73212
74213
75-func C (g,D) = {
76- let E = z(g)
77- let F = E._1
78- let y = E._2
79- let G = {
80- let q = D
81- if (("addr" == q))
82- then $Tuple3("addr", [value(y)], s(g))
83- else $Tuple3(unit, unit, unit)
84- }
85- let H = G._1
86- let I = G._2
87- let J = G._3
88- let K = {
89- let q = invoke(value(F), "supportsInterface", [D], nil)
90- if ($isInstanceOf(q, "Boolean"))
214+
215+@Callable(ac)
216+func removeController (b) = valueOrElse(ap([ar(ac), if (ae(b))
217+ then unit
218+ else throw((("Controller `" + b) + "` is not registered"))]), {
219+ let av = value(indexOf(D, b))
220+[StringEntry(s, makeString(removeByIndex(D, av), ","))]
221+ })
222+
223+
224+
225+@Callable(ac)
226+func available (h) = $Tuple2(nil, M(h))
227+
228+
229+
230+@Callable(ac)
231+func owner (h) = $Tuple2(nil, v(af(h)._1))
232+
233+
234+
235+@Callable(ac)
236+func resolver (h) = $Tuple2(nil, y(af(h)._1))
237+
238+
239+
240+@Callable(ac)
241+func setResolver (h,x) = valueOrElse(ap([if (L(h))
242+ then unit
243+ else throw("Name expired or not registered"), at(ac, h), if (aa(x))
244+ then unit
245+ else throw("Resolver must be a valid contract address")]), $Tuple2(nil, w(h, x)))
246+
247+
248+
249+@Callable(ac)
250+func nameCreated (h) = $Tuple2(nil, A(af(h)._1))
251+
252+
253+
254+@Callable(ac)
255+func nameExpires (h) = $Tuple2(nil, B(af(h)._1))
256+
257+
258+
259+@Callable(ac)
260+func register (h,u,am) = valueOrElse(ap([as(ac), if (M(h))
261+ then unit
262+ else throw((("`" + h) + "` cannot be registered")), if (aa(u))
263+ then unit
264+ else throw("Owner must be a valid address"), if ((am > 0))
265+ then unit
266+ else throw("CreatedAt cannot be negative"), if ((lastBlock.timestamp >= am))
267+ then unit
268+ else throw("CreatedAt cannot be in the future")]), {
269+ let aw = ak(h)
270+ let l = calculateAssetId(aw[0])
271+ let ax = toBase58String(l)
272+ let ay = al(h, ax, am)
273+ let az = ao(ax, u)
274+ let aA = t(h, u)
275+ (((aw ++ ay) ++ az) ++ aA)
276+ })
277+
278+
279+
280+@Callable(ac)
281+func reclaim (h) = valueOrElse(ap([if (L(h))
282+ then unit
283+ else throw((("`" + h) + "` is not active"))]), {
284+ let aB = ac.caller
285+ let aC = toString(aB)
286+ let ax = valueOrErrorMessage(z(h), (("No token is issued for `" + h) + "`"))
287+ let l = fromBase58String(ax)
288+ let aD = (assetBalance(aB, l) == 1)
289+ let aE = ad(ac, h)
290+ let aF = {
291+ let E = assetInfo(l)
292+ if ($isInstanceOf(E, "Asset"))
91293 then {
92- let K = q
93- K
294+ let aG = E
295+ (aG.quantity == 1)
94296 }
95297 else false
96298 }
97- if (!(isDefined(F)))
98- then J
99- else if (!(K))
100- then unit
101- else {
102- let q = invoke(value(F), value(H), value(I), nil)
103- if ($isInstanceOf(q, "String"))
104- then {
105- let L = q
106- if (l(L))
107- then L
108- else unit
109- }
110- else unit
111- }
112- }
113-
114-
115-@Callable(k)
116-func init (M) = valueOrElse(m([o(k)]), [StringEntry(h, M)])
117-
118-
119-
120-@Callable(k)
121-func supportsInterface (N) = $Tuple2(nil, (N == "addr"))
122-
123-
124-
125-@Callable(k)
126-func addr (g) = valueOrElse(m([if ((size(g) > 0))
127- then unit
128- else throw("Name cannot be empty")]), $Tuple2(nil, C(g, "addr")))
299+ if (if (aE)
300+ then !(aF)
301+ else false)
302+ then {
303+ let aH = ak(h)
304+ let aI = calculateAssetId(aH[0])
305+ let aJ = toBase58String(aI)
306+ let aK = an(h, aJ)
307+ let aL = ao(aJ, aC)
308+ ((aH ++ aK) ++ aL)
309+ }
310+ else if (if (aE)
311+ then aD
312+ else false)
313+ then throw("You already own a name token")
314+ else if (!(aD))
315+ then throw("You don't have a name token")
316+ else t(h, aC)
317+ })
129318
130319

github/deemru/w8io/026f985 
50.42 ms