tx · CdzFFy7Pjmgb7jj5GCzknGoAqecURz7aT797X5uWZCFy

3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN:  -0.01000000 Waves

2022.10.14 12:54 [2271864] smart account 3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN > SELF 0.00000000 Waves

{ "type": 13, "id": "CdzFFy7Pjmgb7jj5GCzknGoAqecURz7aT797X5uWZCFy", "fee": 1000000, "feeAssetId": null, "timestamp": 1665741328320, "version": 2, "chainId": 84, "sender": "3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN", "senderPublicKey": "GDjexdefwEhShjRTvHgazn3gTrDo74eHpJCAz14cAEeh", "proofs": [ "4gQB9MMyRZxS6mcAGhexLu5MJTDq9Gm3kn362XBhwezkVzbAMeyxpfAHFXDkJJq5fuXXQap54a4RFbWWot4LH1FB" ], "script": "base64:AAIFAAAAAAAAACkIAhIECgIICBIDCgEIEgQKAggIEgMKAQgSAwoBCBIFCgMICAgSAwoBCAAAABUBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABFnZXRJbnRlZ2VyT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAAAABAAAADG1heWJl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AAADG5hbWVDcmVhdGVkXwgFAAAAByRtYXRjaDAAAAACXzMEAAAADG5hbWVFeHBpcmVzXwgFAAAAByRtYXRjaDAAAAACXzQJAAUUAAAAAgUAAAADbmlsCQAFFgAAAAQFAAAAC3JlZ2lzdHJhbnRfBQAAAAlyZXNvbHZlcl8FAAAADG5hbWVDcmVhdGVkXwUAAAAMbmFtZUV4cGlyZXNfCQAFFAAAAAIFAAAAA25pbAUAAAAKcGFyZW50SW5mbwAAAAADRSLl", "height": 2271864, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2DKr2Yn8WA1WGyyLRdQiHUfaEbSP3uBy5s6tXkPrBKMZ Next: 9V5FEWthAjCphmbTpDv41DZXbbycHi4XUooSBUtBDLVJ Diff:
OldNewDifferences
4343 func x (y) = (y.caller == this)
4444
4545
46-func z (y,l) = (toString(y.caller) == valueOrErrorMessage(o(l), (("Owner for the `" + l) + "` was not found")))
46+func z (y,l) = (toString(y.caller) == valueOrElse(o(l), ""))
4747
4848
49-func A (B) = unit
49+func A (h) = {
50+ let B = split(h, ".")
51+ let C = (size(B) - 1)
52+ let D = B[C]
53+ let E = makeString(removeByIndex(B, C), ".")
54+ $Tuple2(D, E)
55+ }
5056
5157
52-func C (y) = if (x(y))
58+func F (h) = {
59+ let G = A(h)
60+ let D = G._1
61+ let E = G._2
62+ let H = invoke(this, "resolver", [D], nil)
63+ if ($isInstanceOf(H, "String"))
64+ then {
65+ let I = H
66+ $Tuple2(addressFromString(I), E)
67+ }
68+ else $Tuple2(unit, h)
69+ }
70+
71+
72+func J (K) = unit
73+
74+
75+func L (y) = if (x(y))
5376 then unit
5477 else throw("Permission denied")
5578
5679
57-func D (y,l) = if (if (x(y))
80+func M (y,l) = if (if (x(y))
5881 then true
5982 else z(y, l))
6083 then unit
6184 else throw("Permission denied")
6285
6386
87+func N (b) = if (isDefined(addressFromString(b)))
88+ then unit
89+ else throw("The address must be valid")
90+
91+
6492 @Callable(y)
65-func setOwner (l,q) = valueOrElse(A([D(y, l)]), p(l, q))
93+func setOwner (l,q) = valueOrElse(J([M(y, l), N(q)]), p(l, q))
6694
6795
6896
72100
73101
74102 @Callable(y)
75-func setResolver (l,t) = valueOrElse(A([D(y, l)]), s(l, t))
103+func setResolver (l,t) = valueOrElse(J([M(y, l), N(t)]), s(l, t))
76104
77105
78106
87115
88116
89117 @Callable(y)
90-func setRecord (l,q,t) = valueOrElse(A([C(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
118+func setRecord (l,q,t) = valueOrElse(J([L(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
119+
120+
121+
122+@Callable(y)
123+func whoIs (h) = valueOrElse(J([if ((size(h) > 0))
124+ then unit
125+ else throw("Name cannot be empty")]), {
126+ let O = A(h)
127+ let D = O._1
128+ let E = O._2
129+ let P = o(D)
130+ let Q = {
131+ let H = P
132+ if ($isInstanceOf(H, "String"))
133+ then {
134+ let q = H
135+ addressFromString(q)
136+ }
137+ else unit
138+ }
139+ let t = r(D)
140+ let R = u(D)
141+ let S = $Tuple4(P, t, R, unit)
142+ let T = if ((size(D) > 0))
143+ then (size(E) == 0)
144+ else false
145+ let U = {
146+ let H = invoke(value(Q), "supportsInterface", ["whoIs"], nil)
147+ if ($isInstanceOf(H, "Boolean"))
148+ then {
149+ let U = H
150+ U
151+ }
152+ else false
153+ }
154+ if (if (if (T)
155+ then true
156+ else !(isDefined(Q)))
157+ then true
158+ else !(U))
159+ then $Tuple2(nil, S)
160+ else {
161+ let H = invoke(value(Q), "whoIs", [value(E)], nil)
162+ if (if (if (if ($isInstanceOf(H._1, "String"))
163+ then true
164+ else $isInstanceOf(H._1, "Unit"))
165+ then if (if ($isInstanceOf(H._2, "String"))
166+ then true
167+ else $isInstanceOf(H._2, "Unit"))
168+ then if (if ($isInstanceOf(H._3, "Int"))
169+ then true
170+ else $isInstanceOf(H._3, "Unit"))
171+ then if ($isInstanceOf(H._4, "Int"))
172+ then true
173+ else $isInstanceOf(H._4, "Unit")
174+ else false
175+ else false
176+ else false)
177+ then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ($isInstanceOf(H, "(Unit, Unit, Unit, Unit)"))
178+ then true
179+ else $isInstanceOf(H, "(Unit, Unit, Unit, Int)"))
180+ then true
181+ else $isInstanceOf(H, "(Unit, Unit, Int, Unit)"))
182+ then true
183+ else $isInstanceOf(H, "(Unit, Unit, Int, Int)"))
184+ then true
185+ else $isInstanceOf(H, "(Unit, String, Unit, Unit)"))
186+ then true
187+ else $isInstanceOf(H, "(Unit, String, Unit, Int)"))
188+ then true
189+ else $isInstanceOf(H, "(Unit, String, Int, Unit)"))
190+ then true
191+ else $isInstanceOf(H, "(Unit, String, Int, Int)"))
192+ then true
193+ else $isInstanceOf(H, "(String, Unit, Unit, Unit)"))
194+ then true
195+ else $isInstanceOf(H, "(String, Unit, Unit, Int)"))
196+ then true
197+ else $isInstanceOf(H, "(String, Unit, Int, Unit)"))
198+ then true
199+ else $isInstanceOf(H, "(String, Unit, Int, Int)"))
200+ then true
201+ else $isInstanceOf(H, "(String, String, Unit, Unit)"))
202+ then true
203+ else $isInstanceOf(H, "(String, String, Unit, Int)"))
204+ then true
205+ else $isInstanceOf(H, "(String, String, Int, Unit)"))
206+ then true
207+ else $isInstanceOf(H, "(String, String, Int, Int)")
208+ else false)
209+ then {
210+ let V = H._1
211+ let W = H._2
212+ let X = H._3
213+ let Y = H._4
214+ $Tuple2(nil, $Tuple4(V, W, X, Y))
215+ }
216+ else $Tuple2(nil, S)
217+ }
218+ })
91219
92220
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
77 func d (b,c) = valueOrErrorMessage(getInteger(b, c), ((("Can't read '" + c) + "' at address ") + toString(b)))
88
99
1010 func e (f) = valueOrErrorMessage(addressFromString(f), (("Can't parse address from '" + f) + "'"))
1111
1212
1313 func g (h,i,j) = ((((h + "_") + i) + "_") + j)
1414
1515
1616 func k (l) = g("Name", l, "owner")
1717
1818
1919 func m (l) = g("Name", l, "resolver")
2020
2121
2222 func n (l) = g("Name", l, "createdAt")
2323
2424
2525 func o (l) = getString(this, k(l))
2626
2727
2828 func p (l,q) = [StringEntry(k(l), q)]
2929
3030
3131 func r (l) = getString(this, m(l))
3232
3333
3434 func s (l,t) = [StringEntry(m(l), t)]
3535
3636
3737 func u (l) = getInteger(this, n(l))
3838
3939
4040 func v (l,w) = [IntegerEntry(n(l), w)]
4141
4242
4343 func x (y) = (y.caller == this)
4444
4545
46-func z (y,l) = (toString(y.caller) == valueOrErrorMessage(o(l), (("Owner for the `" + l) + "` was not found")))
46+func z (y,l) = (toString(y.caller) == valueOrElse(o(l), ""))
4747
4848
49-func A (B) = unit
49+func A (h) = {
50+ let B = split(h, ".")
51+ let C = (size(B) - 1)
52+ let D = B[C]
53+ let E = makeString(removeByIndex(B, C), ".")
54+ $Tuple2(D, E)
55+ }
5056
5157
52-func C (y) = if (x(y))
58+func F (h) = {
59+ let G = A(h)
60+ let D = G._1
61+ let E = G._2
62+ let H = invoke(this, "resolver", [D], nil)
63+ if ($isInstanceOf(H, "String"))
64+ then {
65+ let I = H
66+ $Tuple2(addressFromString(I), E)
67+ }
68+ else $Tuple2(unit, h)
69+ }
70+
71+
72+func J (K) = unit
73+
74+
75+func L (y) = if (x(y))
5376 then unit
5477 else throw("Permission denied")
5578
5679
57-func D (y,l) = if (if (x(y))
80+func M (y,l) = if (if (x(y))
5881 then true
5982 else z(y, l))
6083 then unit
6184 else throw("Permission denied")
6285
6386
87+func N (b) = if (isDefined(addressFromString(b)))
88+ then unit
89+ else throw("The address must be valid")
90+
91+
6492 @Callable(y)
65-func setOwner (l,q) = valueOrElse(A([D(y, l)]), p(l, q))
93+func setOwner (l,q) = valueOrElse(J([M(y, l), N(q)]), p(l, q))
6694
6795
6896
6997 @Callable(y)
7098 func owner (l) = $Tuple2(nil, o(l))
7199
72100
73101
74102 @Callable(y)
75-func setResolver (l,t) = valueOrElse(A([D(y, l)]), s(l, t))
103+func setResolver (l,t) = valueOrElse(J([M(y, l), N(t)]), s(l, t))
76104
77105
78106
79107 @Callable(y)
80108 func resolver (l) = $Tuple2(nil, r(l))
81109
82110
83111
84112 @Callable(y)
85113 func nameCreated (l) = $Tuple2(nil, u(l))
86114
87115
88116
89117 @Callable(y)
90-func setRecord (l,q,t) = valueOrElse(A([C(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
118+func setRecord (l,q,t) = valueOrElse(J([L(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
119+
120+
121+
122+@Callable(y)
123+func whoIs (h) = valueOrElse(J([if ((size(h) > 0))
124+ then unit
125+ else throw("Name cannot be empty")]), {
126+ let O = A(h)
127+ let D = O._1
128+ let E = O._2
129+ let P = o(D)
130+ let Q = {
131+ let H = P
132+ if ($isInstanceOf(H, "String"))
133+ then {
134+ let q = H
135+ addressFromString(q)
136+ }
137+ else unit
138+ }
139+ let t = r(D)
140+ let R = u(D)
141+ let S = $Tuple4(P, t, R, unit)
142+ let T = if ((size(D) > 0))
143+ then (size(E) == 0)
144+ else false
145+ let U = {
146+ let H = invoke(value(Q), "supportsInterface", ["whoIs"], nil)
147+ if ($isInstanceOf(H, "Boolean"))
148+ then {
149+ let U = H
150+ U
151+ }
152+ else false
153+ }
154+ if (if (if (T)
155+ then true
156+ else !(isDefined(Q)))
157+ then true
158+ else !(U))
159+ then $Tuple2(nil, S)
160+ else {
161+ let H = invoke(value(Q), "whoIs", [value(E)], nil)
162+ if (if (if (if ($isInstanceOf(H._1, "String"))
163+ then true
164+ else $isInstanceOf(H._1, "Unit"))
165+ then if (if ($isInstanceOf(H._2, "String"))
166+ then true
167+ else $isInstanceOf(H._2, "Unit"))
168+ then if (if ($isInstanceOf(H._3, "Int"))
169+ then true
170+ else $isInstanceOf(H._3, "Unit"))
171+ then if ($isInstanceOf(H._4, "Int"))
172+ then true
173+ else $isInstanceOf(H._4, "Unit")
174+ else false
175+ else false
176+ else false)
177+ then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ($isInstanceOf(H, "(Unit, Unit, Unit, Unit)"))
178+ then true
179+ else $isInstanceOf(H, "(Unit, Unit, Unit, Int)"))
180+ then true
181+ else $isInstanceOf(H, "(Unit, Unit, Int, Unit)"))
182+ then true
183+ else $isInstanceOf(H, "(Unit, Unit, Int, Int)"))
184+ then true
185+ else $isInstanceOf(H, "(Unit, String, Unit, Unit)"))
186+ then true
187+ else $isInstanceOf(H, "(Unit, String, Unit, Int)"))
188+ then true
189+ else $isInstanceOf(H, "(Unit, String, Int, Unit)"))
190+ then true
191+ else $isInstanceOf(H, "(Unit, String, Int, Int)"))
192+ then true
193+ else $isInstanceOf(H, "(String, Unit, Unit, Unit)"))
194+ then true
195+ else $isInstanceOf(H, "(String, Unit, Unit, Int)"))
196+ then true
197+ else $isInstanceOf(H, "(String, Unit, Int, Unit)"))
198+ then true
199+ else $isInstanceOf(H, "(String, Unit, Int, Int)"))
200+ then true
201+ else $isInstanceOf(H, "(String, String, Unit, Unit)"))
202+ then true
203+ else $isInstanceOf(H, "(String, String, Unit, Int)"))
204+ then true
205+ else $isInstanceOf(H, "(String, String, Int, Unit)"))
206+ then true
207+ else $isInstanceOf(H, "(String, String, Int, Int)")
208+ else false)
209+ then {
210+ let V = H._1
211+ let W = H._2
212+ let X = H._3
213+ let Y = H._4
214+ $Tuple2(nil, $Tuple4(V, W, X, Y))
215+ }
216+ else $Tuple2(nil, S)
217+ }
218+ })
91219
92220

github/deemru/w8io/026f985 
38.05 ms