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