tx · HJs69bGWLZoxDjkYVFWb8CtmkRXR3TQnB3348YFQSrXm 3MvCgypmBZFTRqL5HuRwCgS7maC7Fkv7pZY: -0.01000000 Waves 2022.10.25 12:39 [2287750] smart account 3MvCgypmBZFTRqL5HuRwCgS7maC7Fkv7pZY > SELF 0.00000000 Waves
{ "type": 13, "id": "HJs69bGWLZoxDjkYVFWb8CtmkRXR3TQnB3348YFQSrXm", "fee": 1000000, "feeAssetId": null, "timestamp": 1666690815608, "version": 2, "chainId": 84, "sender": "3MvCgypmBZFTRqL5HuRwCgS7maC7Fkv7pZY", "senderPublicKey": "BqGSAiYghM27RZ2Axx3bmTudq9koHT4575AeK31Wx2Pp", "proofs": [ "564tJsxG5iAYDEoKevyAjpBmipKPXTyQMcazqzmmTLyziaruZ2pqZsyEZk15z1ZhwjWiguNo3R97qgm1ddN9Ambb" ], "script": "base64:AAIFAAAAAAAAACkIAhIDCgEIEgQKAggIEgMKAQgSBAoCCAgSAwoBCBIFCgMICAgSAwoBCAAAABUBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABFnZXRJbnRlZ2VyT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAA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0aW1lc3RhbXAFAAAAC25hbWVDcmVhdGVkBwUAAAALbmFtZUNyZWF0ZWQFAAAABHVuaXQFAAAABHVuaXQEAAAAC25hbWVFeHBpcmVzBAAAAAckbWF0Y2gwCQEAAAAXX2NhbGxTdXBwb3J0ZWRJbnRlcmZhY2UAAAADBQAAAApyZWdpc3RyYW50AgAAAA5nZXROYW1lRXhwaXJlcwUAAAAKcmVzdExhYmVscwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAtuYW1lRXhwaXJlcwUAAAAHJG1hdGNoMAMJAABmAAAAAgUAAAALbmFtZUV4cGlyZXMAAAAAAAAAAAAFAAAAC25hbWVFeHBpcmVzBQAAAAR1bml0BQAAAAR1bml0BAAAAAppc1Jvb3ROYW1lAwkAAGYAAAACCQABMQAAAAEFAAAACWxhc3RMYWJlbAAAAAAAAAAAAAkAAAAAAAACCQABMQAAAAEFAAAACnJlc3RMYWJlbHMAAAAAAAAAAAAHAwMFAAAACmlzUm9vdE5hbWUGCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABBQAAAA9tYXliZVJlZ2lzdHJhbnQJAAUUAAAAAgUAAAADbmlsCQAFFgAAAAQFAAAAEXJlZ2lzdHJhbnRBZGRyZXNzBQAAAA5wYXJlbnRSZXNvbHZlcgUAAAANcGFyZW50Q3JlYXRlZAUAAAAEdW5pdAkABRQAAAACBQAAAANuaWwJAAUWAAAABAUAAAAFb3duZXIFAAAACHJlc29sdmVyBQAAAAtuYW1lQ3JlYXRlZAUAAAALbmFtZUV4cGlyZXMAAAAAck3qBw==", "height": 2287750, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HQKJNcgRN3YhsZ2sAG5HFQ6LGi9FbojNaB2yCrm51qis Next: 9KvWEzhLVMZZ5EzZdcz6cpoG6P1KyXzJh34posmuipBP Diff:
Old | New | Differences | |
---|---|---|---|
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(y) | |
103 | + | func getOwner (l) = $Tuple2(nil, o(l)) | |
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | @Callable(y) | |
103 | 108 | func setOwner (l,q) = valueOrElse(O([R(y, l), if (A(q)) | |
104 | 109 | then unit | |
105 | 110 | else throw("Owner must be a valid address")]), p(l, q)) | |
107 | 112 | ||
108 | 113 | ||
109 | 114 | @Callable(y) | |
110 | - | func owner (l) = $Tuple2(nil, o(l)) | |
111 | - | ||
112 | - | ||
113 | - | ||
114 | - | @Callable(y) | |
115 | - | func resolver (l) = $Tuple2(nil, r(l)) | |
115 | + | func getResolver (l) = $Tuple2(nil, r(l)) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | @Callable(y) | |
127 | - | func | |
127 | + | func getNameCreated (l) = $Tuple2(nil, u(l)) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | ||
154 | 154 | let V = r(E) | |
155 | 155 | let W = u(E) | |
156 | 156 | let q = { | |
157 | - | let J = G(H, " | |
157 | + | let J = G(H, "getOwner", F) | |
158 | 158 | if ($isInstanceOf(J, "String")) | |
159 | 159 | then { | |
160 | 160 | let q = J | |
165 | 165 | else unit | |
166 | 166 | } | |
167 | 167 | let t = { | |
168 | - | let J = G(H, " | |
168 | + | let J = G(H, "getResolver", F) | |
169 | 169 | if ($isInstanceOf(J, "String")) | |
170 | 170 | then { | |
171 | 171 | let t = J | |
176 | 176 | else unit | |
177 | 177 | } | |
178 | 178 | let X = { | |
179 | - | let J = G(H, " | |
179 | + | let J = G(H, "getNameCreated", F) | |
180 | 180 | if ($isInstanceOf(J, "Int")) | |
181 | 181 | then { | |
182 | 182 | let X = J | |
189 | 189 | else unit | |
190 | 190 | } | |
191 | 191 | let Y = { | |
192 | - | let J = G(H, " | |
192 | + | let J = G(H, "getNameExpires", F) | |
193 | 193 | if ($isInstanceOf(J, "Int")) | |
194 | 194 | then { | |
195 | 195 | let Y = J |
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 | 31 | func r (l) = getString(this, m(l)) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func s (l,t) = [StringEntry(m(l), t)] | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func u (l) = getInteger(this, n(l)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func v (l,w) = [IntegerEntry(n(l), w)] | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func x (y) = (y.caller == this) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func z (y,l) = (toString(y.caller) == valueOrElse(o(l), "")) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func A (f) = isDefined(addressFromString(f)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func B (h) = { | |
53 | 53 | let C = split(h, ".") | |
54 | 54 | let D = (size(C) - 1) | |
55 | 55 | let E = C[D] | |
56 | 56 | let F = makeString(removeByIndex(C, D), ".") | |
57 | 57 | $Tuple2(E, F) | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func G (H,I,F) = { | |
62 | 62 | let J = invoke(H, "supportsInterface", [I], nil) | |
63 | 63 | if ($isInstanceOf(J, "Boolean")) | |
64 | 64 | then { | |
65 | 65 | let K = J | |
66 | 66 | if (!(K)) | |
67 | 67 | then unit | |
68 | 68 | else { | |
69 | 69 | let L = invoke(value(H), I, [F], nil) | |
70 | 70 | if ($isInstanceOf(L, "String")) | |
71 | 71 | then { | |
72 | 72 | let M = L | |
73 | 73 | M | |
74 | 74 | } | |
75 | 75 | else if ($isInstanceOf(L, "Int")) | |
76 | 76 | then { | |
77 | 77 | let N = L | |
78 | 78 | N | |
79 | 79 | } | |
80 | 80 | else unit | |
81 | 81 | } | |
82 | 82 | } | |
83 | 83 | else unit | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func O (P) = unit | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func Q (y) = if (x(y)) | |
91 | 91 | then unit | |
92 | 92 | else throw("Permission denied") | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func R (y,l) = if (if (x(y)) | |
96 | 96 | then true | |
97 | 97 | else z(y, l)) | |
98 | 98 | then unit | |
99 | 99 | else throw("Permission denied") | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(y) | |
103 | + | func getOwner (l) = $Tuple2(nil, o(l)) | |
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | @Callable(y) | |
103 | 108 | func setOwner (l,q) = valueOrElse(O([R(y, l), if (A(q)) | |
104 | 109 | then unit | |
105 | 110 | else throw("Owner must be a valid address")]), p(l, q)) | |
106 | 111 | ||
107 | 112 | ||
108 | 113 | ||
109 | 114 | @Callable(y) | |
110 | - | func owner (l) = $Tuple2(nil, o(l)) | |
111 | - | ||
112 | - | ||
113 | - | ||
114 | - | @Callable(y) | |
115 | - | func resolver (l) = $Tuple2(nil, r(l)) | |
115 | + | func getResolver (l) = $Tuple2(nil, r(l)) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | ||
119 | 119 | @Callable(y) | |
120 | 120 | func setResolver (l,t) = valueOrElse(O([R(y, l), if (A(t)) | |
121 | 121 | then unit | |
122 | 122 | else throw("Resolver must be a valid contract address")]), s(l, t)) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | @Callable(y) | |
127 | - | func | |
127 | + | func getNameCreated (l) = $Tuple2(nil, u(l)) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | ||
131 | 131 | @Callable(y) | |
132 | 132 | func setRecord (l,q,t) = valueOrElse(O([Q(y)]), ((p(l, q) ++ s(l, t)) ++ v(l, lastBlock.timestamp))) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Callable(y) | |
137 | 137 | func whoIs (h) = valueOrElse(O([if ((size(h) > 0)) | |
138 | 138 | then unit | |
139 | 139 | else throw("Name cannot be empty")]), { | |
140 | 140 | let S = B(h) | |
141 | 141 | let E = S._1 | |
142 | 142 | let F = S._2 | |
143 | 143 | let T = o(E) | |
144 | 144 | let U = { | |
145 | 145 | let J = T | |
146 | 146 | if ($isInstanceOf(J, "String")) | |
147 | 147 | then { | |
148 | 148 | let q = J | |
149 | 149 | addressFromString(q) | |
150 | 150 | } | |
151 | 151 | else unit | |
152 | 152 | } | |
153 | 153 | let H = value(U) | |
154 | 154 | let V = r(E) | |
155 | 155 | let W = u(E) | |
156 | 156 | let q = { | |
157 | - | let J = G(H, " | |
157 | + | let J = G(H, "getOwner", F) | |
158 | 158 | if ($isInstanceOf(J, "String")) | |
159 | 159 | then { | |
160 | 160 | let q = J | |
161 | 161 | if (A(q)) | |
162 | 162 | then q | |
163 | 163 | else unit | |
164 | 164 | } | |
165 | 165 | else unit | |
166 | 166 | } | |
167 | 167 | let t = { | |
168 | - | let J = G(H, " | |
168 | + | let J = G(H, "getResolver", F) | |
169 | 169 | if ($isInstanceOf(J, "String")) | |
170 | 170 | then { | |
171 | 171 | let t = J | |
172 | 172 | if (A(t)) | |
173 | 173 | then t | |
174 | 174 | else unit | |
175 | 175 | } | |
176 | 176 | else unit | |
177 | 177 | } | |
178 | 178 | let X = { | |
179 | - | let J = G(H, " | |
179 | + | let J = G(H, "getNameCreated", F) | |
180 | 180 | if ($isInstanceOf(J, "Int")) | |
181 | 181 | then { | |
182 | 182 | let X = J | |
183 | 183 | if (if ((X > 0)) | |
184 | 184 | then (lastBlock.timestamp > X) | |
185 | 185 | else false) | |
186 | 186 | then X | |
187 | 187 | else unit | |
188 | 188 | } | |
189 | 189 | else unit | |
190 | 190 | } | |
191 | 191 | let Y = { | |
192 | - | let J = G(H, " | |
192 | + | let J = G(H, "getNameExpires", F) | |
193 | 193 | if ($isInstanceOf(J, "Int")) | |
194 | 194 | then { | |
195 | 195 | let Y = J | |
196 | 196 | if ((Y > 0)) | |
197 | 197 | then Y | |
198 | 198 | else unit | |
199 | 199 | } | |
200 | 200 | else unit | |
201 | 201 | } | |
202 | 202 | let Z = if ((size(E) > 0)) | |
203 | 203 | then (size(F) == 0) | |
204 | 204 | else false | |
205 | 205 | if (if (Z) | |
206 | 206 | then true | |
207 | 207 | else !(isDefined(U))) | |
208 | 208 | then $Tuple2(nil, $Tuple4(T, V, W, unit)) | |
209 | 209 | else $Tuple2(nil, $Tuple4(q, t, X, Y)) | |
210 | 210 | }) | |
211 | 211 | ||
212 | 212 |
github/deemru/w8io/169f3d6 53.13 ms ◑