tx · FqLWGMt8tdDw1xzW4MzwEmtaqyt1VJMpmDsHNy8yUr8C 3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw: -0.01000000 Waves 2022.10.17 13:49 [2276271] smart account 3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw > SELF 0.00000000 Waves
{ "type": 13, "id": "FqLWGMt8tdDw1xzW4MzwEmtaqyt1VJMpmDsHNy8yUr8C", "fee": 1000000, "feeAssetId": null, "timestamp": 1666003800545, "version": 2, "chainId": 84, "sender": "3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw", "senderPublicKey": "6NSakbUsm1WyESQ8yj3qpc1kQUfHWNd5C6CHVpbs4X7c", "proofs": [ "47t4BMUGo7Qw7FDEe45zhPhFxNJKNY8skRoXSAUvhuTRCHFoRytRAhmGF57tzUiPV7tmXZrRvMe6DTwrpvTQtnuB" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgMKAQgSAwoBCBIECgIICAAAABEBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABNwYXJzZUFkZHJlc3NPclRocm93AAAAAQAAAAxtYXliZUFkZHJlc3MJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABCYAAAABBQAAAAxtYXliZUFkZHJlc3MJAAEsAAAAAgkAASwAAAACAgAAABpDYW4ndCBwYXJzZSBhZGRyZXNzIGZyb20gJwUAAAAMbWF5YmVBZGRyZXNzAgAAAAEnAQAAAA1rZXlfTmFtZV9hZGRyAAAAAQAAAARuYW1lCQABLAAAAAIJAAEsAAAAAgIAAAAFTm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AAAAABQAAAAR1bml0CQAAAgAAAAECAAAAFE5hbWUgY2Fubm90IGJlIGVtcHR5BQAAAANuaWwJAAUUAAAAAgUAAAADbmlsCQEAAAAIX3Jlc29sdmUAAAACBQAAAARuYW1lAgAAAARhZGRyAAAAA2ludgEAAAAHc2V0QWRkcgAAAAIAAAAEbmFtZQAAAAdhZGRyZXNzCQEAAAALdmFsdWVPckVsc2UAAAACCQEAAAAJbW9kaWZpZXJzAAAAAQkABEwAAAACAwkAAGYAAAACCQABMQAAAAEFAAAABG5hbWUAAAAAAAAAAAAFAAAABHVuaXQJAAACAAAAAQIAAAAUTmFtZSBjYW5ub3QgYmUgZW1wdHkJAARMAAAAAgkBAAAACW9ubHlPd25lcgAAAAIFAAAAA2ludgUAAAAEbmFtZQkABEwAAAACAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQmAAAAAQUAAAAHYWRkcmVzcwUAAAAEdW5pdAkAAAIAAAABAgAAABVBZGRyZXNzIG11c3QgYmUgdmFsaWQFAAAAA25pbAkBAAAACF9zZXRBZGRyAAAAAgUAAAAEbmFtZQUAAAAHYWRkcmVzcwAAAADsCN+Y", "height": 2276271, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CyYLz38JrK3Q6PzpxbkjXqST3fqc6tyYkzVp52qe5tun Next: Gdsc7XwZzoKPRENzieaFGcczf27XDvtadgU4W9XM9vm Diff:
Old | New | Differences | |
---|---|---|---|
89 | 89 | let I = { | |
90 | 90 | let p = F | |
91 | 91 | if (("addr" == p)) | |
92 | - | then $ | |
93 | - | else $ | |
92 | + | then $Tuple2("addr", [value(n)]) | |
93 | + | else $Tuple2(unit, unit) | |
94 | 94 | } | |
95 | 95 | let J = I._1 | |
96 | 96 | let K = I._2 | |
97 | - | let L = I._3 | |
98 | - | let M = { | |
97 | + | let L = { | |
99 | 98 | let p = invoke(value(H), "supportsInterface", [F], nil) | |
100 | 99 | if ($isInstanceOf(p, "Boolean")) | |
101 | 100 | then { | |
102 | - | let | |
103 | - | | |
101 | + | let L = p | |
102 | + | L | |
104 | 103 | } | |
105 | 104 | else false | |
106 | 105 | } | |
107 | 106 | if (if (!(isDefined(H))) | |
108 | 107 | then true | |
109 | 108 | else (size(n) == 0)) | |
110 | - | then | |
111 | - | else if (!( | |
109 | + | then unit | |
110 | + | else if (!(L)) | |
112 | 111 | then unit | |
113 | 112 | else { | |
114 | 113 | let p = invoke(value(H), value(J), value(K), nil) | |
115 | 114 | if ($isInstanceOf(p, "String")) | |
116 | 115 | then { | |
117 | - | let | |
118 | - | if (w( | |
119 | - | then | |
116 | + | let M = p | |
117 | + | if (w(M)) | |
118 | + | then M | |
120 | 119 | else unit | |
121 | 120 | } | |
122 | 121 | else unit | |
125 | 124 | ||
126 | 125 | ||
127 | 126 | @Callable(u) | |
128 | - | func init ( | |
127 | + | func init (N) = valueOrElse(x([z(u)]), [StringEntry(h, N)]) | |
129 | 128 | ||
130 | 129 | ||
131 | 130 | ||
132 | 131 | @Callable(u) | |
133 | - | func supportsInterface ( | |
132 | + | func supportsInterface (O) = $Tuple2(nil, (O == "addr")) | |
134 | 133 | ||
135 | 134 | ||
136 | 135 |
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 (e) = valueOrErrorMessage(addressFromString(e), (("Can't parse address from '" + e) + "'")) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func f (g) = (("Name_" + g) + "_addr") | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | let h = "registry" | |
14 | 14 | ||
15 | 15 | let i = d(a(this, h)) | |
16 | 16 | ||
17 | 17 | func j (g) = { | |
18 | 18 | let k = split(g, ".") | |
19 | 19 | let l = (size(k) - 1) | |
20 | 20 | let m = k[l] | |
21 | 21 | let n = makeString(removeByIndex(k, l), ".") | |
22 | 22 | $Tuple2(m, n) | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func o (g) = { | |
27 | 27 | let p = invoke(i, "owner", [g], nil) | |
28 | 28 | if ($isInstanceOf(p, "String")) | |
29 | 29 | then { | |
30 | 30 | let q = p | |
31 | 31 | q | |
32 | 32 | } | |
33 | 33 | else unit | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func r (g) = valueOrElse(getString(this, f(g)), o(j(g)._1)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func s (g,b) = [StringEntry(f(g), b)] | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func t (u) = (u.caller == this) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func v (u,g) = (toString(u.caller) == valueOrElse(o(g), "")) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func w (e) = isDefined(addressFromString(e)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func x (y) = unit | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func z (u) = if (t(u)) | |
56 | 56 | then unit | |
57 | 57 | else throw("Permission denied") | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func A (u,g) = if (if (t(u)) | |
61 | 61 | then true | |
62 | 62 | else v(u, g)) | |
63 | 63 | then unit | |
64 | 64 | else throw("Permission denied") | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func B (g) = { | |
68 | 68 | let C = j(g) | |
69 | 69 | let m = C._1 | |
70 | 70 | let n = C._2 | |
71 | 71 | if ((size(n) == 0)) | |
72 | 72 | then $Tuple2(unit, g) | |
73 | 73 | else { | |
74 | 74 | let p = invoke(i, "resolver", [m], nil) | |
75 | 75 | if ($isInstanceOf(p, "String")) | |
76 | 76 | then { | |
77 | 77 | let D = p | |
78 | 78 | $Tuple2(addressFromString(D), n) | |
79 | 79 | } | |
80 | 80 | else $Tuple2(unit, g) | |
81 | 81 | } | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func E (g,F) = { | |
86 | 86 | let G = B(g) | |
87 | 87 | let H = G._1 | |
88 | 88 | let n = G._2 | |
89 | 89 | let I = { | |
90 | 90 | let p = F | |
91 | 91 | if (("addr" == p)) | |
92 | - | then $ | |
93 | - | else $ | |
92 | + | then $Tuple2("addr", [value(n)]) | |
93 | + | else $Tuple2(unit, unit) | |
94 | 94 | } | |
95 | 95 | let J = I._1 | |
96 | 96 | let K = I._2 | |
97 | - | let L = I._3 | |
98 | - | let M = { | |
97 | + | let L = { | |
99 | 98 | let p = invoke(value(H), "supportsInterface", [F], nil) | |
100 | 99 | if ($isInstanceOf(p, "Boolean")) | |
101 | 100 | then { | |
102 | - | let | |
103 | - | | |
101 | + | let L = p | |
102 | + | L | |
104 | 103 | } | |
105 | 104 | else false | |
106 | 105 | } | |
107 | 106 | if (if (!(isDefined(H))) | |
108 | 107 | then true | |
109 | 108 | else (size(n) == 0)) | |
110 | - | then | |
111 | - | else if (!( | |
109 | + | then unit | |
110 | + | else if (!(L)) | |
112 | 111 | then unit | |
113 | 112 | else { | |
114 | 113 | let p = invoke(value(H), value(J), value(K), nil) | |
115 | 114 | if ($isInstanceOf(p, "String")) | |
116 | 115 | then { | |
117 | - | let | |
118 | - | if (w( | |
119 | - | then | |
116 | + | let M = p | |
117 | + | if (w(M)) | |
118 | + | then M | |
120 | 119 | else unit | |
121 | 120 | } | |
122 | 121 | else unit | |
123 | 122 | } | |
124 | 123 | } | |
125 | 124 | ||
126 | 125 | ||
127 | 126 | @Callable(u) | |
128 | - | func init ( | |
127 | + | func init (N) = valueOrElse(x([z(u)]), [StringEntry(h, N)]) | |
129 | 128 | ||
130 | 129 | ||
131 | 130 | ||
132 | 131 | @Callable(u) | |
133 | - | func supportsInterface ( | |
132 | + | func supportsInterface (O) = $Tuple2(nil, (O == "addr")) | |
134 | 133 | ||
135 | 134 | ||
136 | 135 | ||
137 | 136 | @Callable(u) | |
138 | 137 | func addr (g) = valueOrElse(x([if ((size(g) > 0)) | |
139 | 138 | then unit | |
140 | 139 | else throw("Name cannot be empty")]), $Tuple2(nil, E(g, "addr"))) | |
141 | 140 | ||
142 | 141 | ||
143 | 142 | ||
144 | 143 | @Callable(u) | |
145 | 144 | func setAddr (g,b) = valueOrElse(x([if ((size(g) > 0)) | |
146 | 145 | then unit | |
147 | 146 | else throw("Name cannot be empty"), A(u, g), if (isDefined(addressFromString(b))) | |
148 | 147 | then unit | |
149 | 148 | else throw("Address must be valid")]), s(g, b)) | |
150 | 149 | ||
151 | 150 |
github/deemru/w8io/169f3d6 38.02 ms ◑