tx · 5g4Y256RrdeFguyvE9Xbsky6tDk74ynjrJZCBWEwx36h

3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN:  -0.01000000 Waves

2022.10.17 13:17 [2276239] smart account 3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN > SELF 0.00000000 Waves

{ "type": 13, "id": "5g4Y256RrdeFguyvE9Xbsky6tDk74ynjrJZCBWEwx36h", "fee": 1000000, "feeAssetId": null, "timestamp": 1666001820306, "version": 2, "chainId": 84, "sender": "3MxquWQhzpqXgbqunnFqHFJXTjasEznd1tN", "senderPublicKey": "GDjexdefwEhShjRTvHgazn3gTrDo74eHpJCAz14cAEeh", "proofs": [ "ThYvaZrTn8fGk4HHiDN53jV2XGrHbCBWgZ3RuMtddu7zj55BdkQwhYVf5VYktbkE61Y9u51bmErvKXcKpbFMP7P" ], "script": "base64:AAIFAAAAAAAAACkIAhIECgIICBIDCgEIEgMKAQgSBAoCCAgSAwoBCBIFCgMICAgSAwoBCAAAABYBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABFnZXRJbnRlZ2VyT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAAAABAAAADG1heW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ZXJmYWNlQXNJbnQAAAADCQEAAAAFdmFsdWUAAAABBQAAAApyZWdpc3RyYW50AgAAAAtuYW1lRXhwaXJlcwUAAAAKcmVzdExhYmVscwQAAAAKaXNSb290TmFtZQMJAABmAAAAAgkAATEAAAABBQAAAAlsYXN0TGFiZWwAAAAAAAAAAAAJAAAAAAAAAgkAATEAAAABBQAAAApyZXN0TGFiZWxzAAAAAAAAAAAABwMDBQAAAAppc1Jvb3ROYW1lBgkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAAKcmVnaXN0cmFudAkABRQAAAACBQAAAANuaWwJAAUWAAAABAUAAAARcmVnaXN0cmFudEFkZHJlc3MFAAAADnBhcmVudFJlc29sdmVyBQAAAA1wYXJlbnRDcmVhdGVkBQAAAAR1bml0CQAFFAAAAAIFAAAAA25pbAkABRYAAAAEBAAAAAckbWF0Y2gwBQAAAAVvd25lcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAVvd25lcgUAAAAHJG1hdGNoMAUAAAAFb3duZXIFAAAAEXJlZ2lzdHJhbnRBZGRyZXNzBAAAAAckbWF0Y2gwBQAAAAhyZXNvbHZlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAhyZXNvbHZlcgUAAAAHJG1hdGNoMAUAAAAIcmVzb2x2ZXIFAAAADnBhcmVudFJlc29sdmVyBAAAAAckbWF0Y2gwBQAAAAtuYW1lQ3JlYXRlZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAtuYW1lQ3JlYXRlZAUAAAAHJG1hdGNoMAUAAAALbmFtZUNyZWF0ZWQFAAAADXBhcmVudENyZWF0ZWQFAAAAC25hbWVFeHBpcmVzAAAAAGA2LbM=", "height": 2276239, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EitHAjXo7pUWJ4gjmKaXtdtffV1XYpBSvLxfciywJvcD Next: CbobkH99ae7vcVdNwXg2Rmp12nsUv8akiZH9w8zDcd9b Diff:
OldNewDifferences
4646 func z (y,l) = (toString(y.caller) == valueOrElse(o(l), ""))
4747
4848
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)
49+func A (f) = isDefined(addressFromString(f))
50+
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)
5558 }
5659
5760
58-func F (G,H,E) = {
59- let I = invoke(G, "supportsInterface", [H], nil)
60- if ($isInstanceOf(I, "Boolean"))
61+func G (H,I,F) = {
62+ let J = invoke(H, "supportsInterface", [I], nil)
63+ if ($isInstanceOf(J, "Boolean"))
6164 then {
62- let J = I
63- if (!(J))
65+ let K = J
66+ if (!(K))
6467 then unit
6568 else {
66- let K = invoke(value(G), H, [E], nil)
67- if ($isInstanceOf(K, "String"))
69+ let L = invoke(value(H), I, [F], nil)
70+ if ($isInstanceOf(L, "String"))
6871 then {
69- let L = K
70- L
72+ let M = L
73+ M
7174 }
7275 else unit
7376 }
7679 }
7780
7881
79-func M (G,H,E) = {
80- let I = invoke(G, "supportsInterface", [H], nil)
81- if ($isInstanceOf(I, "Boolean"))
82+func N (H,I,F) = {
83+ let J = invoke(H, "supportsInterface", [I], nil)
84+ if ($isInstanceOf(J, "Boolean"))
8285 then {
83- let J = I
84- if (!(J))
86+ let K = J
87+ if (!(K))
8588 then unit
8689 else {
87- let K = invoke(value(G), H, [E], nil)
88- if ($isInstanceOf(K, "Int"))
90+ let L = invoke(value(H), I, [F], nil)
91+ if ($isInstanceOf(L, "Int"))
8992 then {
90- let N = K
91- N
93+ let O = L
94+ O
9295 }
9396 else unit
9497 }
97100 }
98101
99102
100-func O (P) = unit
103+func P (Q) = unit
101104
102105
103-func Q (y) = if (x(y))
106+func R (y) = if (x(y))
104107 then unit
105108 else throw("Permission denied")
106109
107110
108-func R (y,l) = if (if (x(y))
111+func S (y,l) = if (if (x(y))
109112 then true
110113 else z(y, l))
111114 then unit
112115 else throw("Permission denied")
113116
114117
115-func S (b) = if (isDefined(addressFromString(b)))
118+@Callable(y)
119+func setOwner (l,q) = valueOrElse(P([S(y, l), if (A(q))
116120 then unit
117- else throw("The address must be valid")
118-
119-
120-@Callable(y)
121-func setOwner (l,q) = valueOrElse(O([R(y, l), S(q)]), p(l, q))
121+ else throw("Owner must be a valid address")]), p(l, q))
122122
123123
124124
128128
129129
130130 @Callable(y)
131-func setResolver (l,t) = valueOrElse(O([R(y, l), S(t)]), s(l, t))
131+func resolver (l) = $Tuple2(nil, r(l))
132132
133133
134134
135135 @Callable(y)
136-func resolver (l) = $Tuple2(nil, r(l))
136+func setResolver (l,t) = valueOrElse(P([S(y, l), if (A(t))
137+ then unit
138+ else throw("Resolver must be a valid contract address")]), s(l, t))
137139
138140
139141
143145
144146
145147 @Callable(y)
146-func setRecord (l,q,t) = valueOrElse(O([Q(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
148+func setRecord (l,q,t) = valueOrElse(P([R(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
147149
148150
149151
150152 @Callable(y)
151-func whoIs (h) = valueOrElse(O([if ((size(h) > 0))
153+func whoIs (h) = valueOrElse(P([if ((size(h) > 0))
152154 then unit
153155 else throw("Name cannot be empty")]), {
154- let T = A(h)
155- let D = T._1
156- let E = T._2
157- let U = o(D)
158- let G = {
159- let I = U
160- if ($isInstanceOf(I, "String"))
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"))
161163 then {
162- let q = I
164+ let q = J
163165 addressFromString(q)
164166 }
165167 else unit
166168 }
167- let V = r(D)
168- let W = u(D)
169- let q = F(value(G), "owner", E)
170- let t = F(value(G), "resolver", E)
171- let X = M(value(G), "nameCreated", E)
172- let Y = M(value(G), "nameExpires", E)
173- let Z = if ((size(D) > 0))
174- then (size(E) == 0)
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)
175177 else false
176178 if (if (Z)
177179 then true
178- else !(isDefined(G)))
180+ else !(isDefined(H)))
179181 then $Tuple2(nil, $Tuple4(U, V, W, unit))
180182 else $Tuple2(nil, $Tuple4({
181- let I = q
182- if ($isInstanceOf(I, "String"))
183+ let J = q
184+ if ($isInstanceOf(J, "String"))
183185 then {
184- let q = I
186+ let q = J
185187 q
186188 }
187189 else U
188190 }, {
189- let I = t
190- if ($isInstanceOf(I, "String"))
191+ let J = t
192+ if ($isInstanceOf(J, "String"))
191193 then {
192- let t = I
194+ let t = J
193195 t
194196 }
195197 else V
196198 }, {
197- let I = X
198- if ($isInstanceOf(I, "Int"))
199+ let J = X
200+ if ($isInstanceOf(J, "Int"))
199201 then {
200- let X = I
202+ let X = J
201203 X
202204 }
203205 else W
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
4646 func z (y,l) = (toString(y.caller) == valueOrElse(o(l), ""))
4747
4848
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)
49+func A (f) = isDefined(addressFromString(f))
50+
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)
5558 }
5659
5760
58-func F (G,H,E) = {
59- let I = invoke(G, "supportsInterface", [H], nil)
60- if ($isInstanceOf(I, "Boolean"))
61+func G (H,I,F) = {
62+ let J = invoke(H, "supportsInterface", [I], nil)
63+ if ($isInstanceOf(J, "Boolean"))
6164 then {
62- let J = I
63- if (!(J))
65+ let K = J
66+ if (!(K))
6467 then unit
6568 else {
66- let K = invoke(value(G), H, [E], nil)
67- if ($isInstanceOf(K, "String"))
69+ let L = invoke(value(H), I, [F], nil)
70+ if ($isInstanceOf(L, "String"))
6871 then {
69- let L = K
70- L
72+ let M = L
73+ M
7174 }
7275 else unit
7376 }
7477 }
7578 else unit
7679 }
7780
7881
79-func M (G,H,E) = {
80- let I = invoke(G, "supportsInterface", [H], nil)
81- if ($isInstanceOf(I, "Boolean"))
82+func N (H,I,F) = {
83+ let J = invoke(H, "supportsInterface", [I], nil)
84+ if ($isInstanceOf(J, "Boolean"))
8285 then {
83- let J = I
84- if (!(J))
86+ let K = J
87+ if (!(K))
8588 then unit
8689 else {
87- let K = invoke(value(G), H, [E], nil)
88- if ($isInstanceOf(K, "Int"))
90+ let L = invoke(value(H), I, [F], nil)
91+ if ($isInstanceOf(L, "Int"))
8992 then {
90- let N = K
91- N
93+ let O = L
94+ O
9295 }
9396 else unit
9497 }
9598 }
9699 else unit
97100 }
98101
99102
100-func O (P) = unit
103+func P (Q) = unit
101104
102105
103-func Q (y) = if (x(y))
106+func R (y) = if (x(y))
104107 then unit
105108 else throw("Permission denied")
106109
107110
108-func R (y,l) = if (if (x(y))
111+func S (y,l) = if (if (x(y))
109112 then true
110113 else z(y, l))
111114 then unit
112115 else throw("Permission denied")
113116
114117
115-func S (b) = if (isDefined(addressFromString(b)))
118+@Callable(y)
119+func setOwner (l,q) = valueOrElse(P([S(y, l), if (A(q))
116120 then unit
117- else throw("The address must be valid")
118-
119-
120-@Callable(y)
121-func setOwner (l,q) = valueOrElse(O([R(y, l), S(q)]), p(l, q))
121+ else throw("Owner must be a valid address")]), p(l, q))
122122
123123
124124
125125 @Callable(y)
126126 func owner (l) = $Tuple2(nil, o(l))
127127
128128
129129
130130 @Callable(y)
131-func setResolver (l,t) = valueOrElse(O([R(y, l), S(t)]), s(l, t))
131+func resolver (l) = $Tuple2(nil, r(l))
132132
133133
134134
135135 @Callable(y)
136-func resolver (l) = $Tuple2(nil, r(l))
136+func setResolver (l,t) = valueOrElse(P([S(y, l), if (A(t))
137+ then unit
138+ else throw("Resolver must be a valid contract address")]), s(l, t))
137139
138140
139141
140142 @Callable(y)
141143 func nameCreated (l) = $Tuple2(nil, u(l))
142144
143145
144146
145147 @Callable(y)
146-func setRecord (l,q,t) = valueOrElse(O([Q(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
148+func setRecord (l,q,t) = valueOrElse(P([R(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp)))
147149
148150
149151
150152 @Callable(y)
151-func whoIs (h) = valueOrElse(O([if ((size(h) > 0))
153+func whoIs (h) = valueOrElse(P([if ((size(h) > 0))
152154 then unit
153155 else throw("Name cannot be empty")]), {
154- let T = A(h)
155- let D = T._1
156- let E = T._2
157- let U = o(D)
158- let G = {
159- let I = U
160- if ($isInstanceOf(I, "String"))
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"))
161163 then {
162- let q = I
164+ let q = J
163165 addressFromString(q)
164166 }
165167 else unit
166168 }
167- let V = r(D)
168- let W = u(D)
169- let q = F(value(G), "owner", E)
170- let t = F(value(G), "resolver", E)
171- let X = M(value(G), "nameCreated", E)
172- let Y = M(value(G), "nameExpires", E)
173- let Z = if ((size(D) > 0))
174- then (size(E) == 0)
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)
175177 else false
176178 if (if (Z)
177179 then true
178- else !(isDefined(G)))
180+ else !(isDefined(H)))
179181 then $Tuple2(nil, $Tuple4(U, V, W, unit))
180182 else $Tuple2(nil, $Tuple4({
181- let I = q
182- if ($isInstanceOf(I, "String"))
183+ let J = q
184+ if ($isInstanceOf(J, "String"))
183185 then {
184- let q = I
186+ let q = J
185187 q
186188 }
187189 else U
188190 }, {
189- let I = t
190- if ($isInstanceOf(I, "String"))
191+ let J = t
192+ if ($isInstanceOf(J, "String"))
191193 then {
192- let t = I
194+ let t = J
193195 t
194196 }
195197 else V
196198 }, {
197- let I = X
198- if ($isInstanceOf(I, "Int"))
199+ let J = X
200+ if ($isInstanceOf(J, "Int"))
199201 then {
200- let X = I
202+ let X = J
201203 X
202204 }
203205 else W
204206 }, Y))
205207 })
206208
207209

github/deemru/w8io/026f985 
70.49 ms