tx · 6qGd9rsiFMbfvdEnVgnWFtcfAcMerR5RzxsL6keQ2wJ8 3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw: -0.00300000 Waves 2022.10.09 19:10 [2265012] smart account 3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw > SELF 0.00000000 Waves
{ "type": 13, "id": "6qGd9rsiFMbfvdEnVgnWFtcfAcMerR5RzxsL6keQ2wJ8", "fee": 300000, "feeAssetId": null, "timestamp": 1665331885186, "version": 2, "chainId": 84, "sender": "3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw", "senderPublicKey": "6NSakbUsm1WyESQ8yj3qpc1kQUfHWNd5C6CHVpbs4X7c", "proofs": [ "5y6boZyVvtrzumx9nqiCgugsNvBwKWqZN54DEniUaQvh18j9svRSUB3deLS6Ux6WxqeMFj1BsEMVqJi9bhAsUhkm" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEIEgMKAQgSAwoBCBIDCgEIAAAACAEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAAAABAAAADG1heWJlQWRkcmVzcwkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEJgAAAAEFAAAADG1heWJlQWRkcmVzcwkAASwAAAACCQABLAAAAAICAAAAGkNhbid0IHBhcnNlIGFkZHJlc3MgZnJvbSAnBQAAAAxtYXliZUFkZHJlc3MCAAAAAScAAAAADGtleV9yZWdpc3RyeQIAAAAIcmVnaXN0cnkAAAAACHJlZ2lzdHJ5CQEAAAATcG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AAAAHJG1hdGNoMAkAA/wAAAAEBQAAAAhyZWdpc3RyeQIAAAALbmFtZUNyZWF0ZWQJAARMAAAAAgUAAAAJbGFzdExhYmVsBQAAAANuaWwFAAAAA25pbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAljcmVhdGVkQXQFAAAAByRtYXRjaDAFAAAACWNyZWF0ZWRBdAUAAAAEdW5pdAQAAAALbmFtZUV4cGlyZXMEAAAAByRtYXRjaDAJAAP8AAAABAUAAAAIcmVnaXN0cnkCAAAAC25hbWVFeHBpcmVzCQAETAAAAAIFAAAACWxhc3RMYWJlbAUAAAADbmlsBQAAAANuaWwDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAAJZXhwaXJlc0F0BQAAAAckbWF0Y2gwBQAAAAlleHBpcmVzQXQFAAAABHVuaXQEAAAACm5hbWVTdGF0dXMEAAAAByRtYXRjaDAJAAP8AAAABAUAAAAIcmVnaXN0cnkCAAAACm5hbWVTdGF0dXMJAARMAAAAAgUAAAAJbGFzdExhYmVsBQAAAANuaWwFAAAAA25pbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAZzdGF0dXMFAAAAByRtYXRjaDAFAAAABnN0YXR1cwUAAAAEdW5pdAMJAQAAAAEhAAAAAQUAAAAMaXNSZWdpc3RlcmVkCQAFFAAAAAIFAAAAA25pbAUAAAAEdW5pdAkABRQAAAACBQAAAANuaWwJAAUXAAAABQUAAAAKcmVnaXN0cmFudAUAAAAIcmVzb2x2ZXIFAAAAC25hbWVDcmVhdGVkBQAAAAtuYW1lRXhwaXJlcwUAAAAKbmFtZVN0YXR1cwAAAADngFff", "height": 2265012, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B2VJNE7Vs1kbvCwCLkVhZoQHHauJKiUkCu13EKduzfkH Next: 6G3ruV19NuViAcMBQfyzK7tw3jbbYMX1J8tGkHZnf6Jn Diff:
Old | New | Differences | |
---|---|---|---|
61 | 61 | let s = split(r, ".") | |
62 | 62 | let t = s[(size(s) - 1)] | |
63 | 63 | let u = { | |
64 | + | let o = invoke(g, "available", [t], nil) | |
65 | + | if ($isInstanceOf(o, "Boolean")) | |
66 | + | then { | |
67 | + | let v = o | |
68 | + | !(v) | |
69 | + | } | |
70 | + | else false | |
71 | + | } | |
72 | + | let w = { | |
64 | 73 | let o = invoke(g, "owner", [t], nil) | |
65 | 74 | if ($isInstanceOf(o, "String")) | |
66 | 75 | then { | |
69 | 78 | } | |
70 | 79 | else unit | |
71 | 80 | } | |
72 | - | let | |
73 | - | let | |
81 | + | let x = unit | |
82 | + | let y = { | |
74 | 83 | let o = invoke(g, "nameCreated", [t], nil) | |
75 | - | if ($isInstanceOf(o, "Int")) | |
76 | - | then { | |
77 | - | let x = o | |
78 | - | x | |
79 | - | } | |
80 | - | else unit | |
81 | - | } | |
82 | - | let y = { | |
83 | - | let o = invoke(g, "nameExpires", [t], nil) | |
84 | 84 | if ($isInstanceOf(o, "Int")) | |
85 | 85 | then { | |
86 | 86 | let z = o | |
89 | 89 | else unit | |
90 | 90 | } | |
91 | 91 | let A = { | |
92 | - | let o = invoke(g, " | |
93 | - | if ($isInstanceOf(o, " | |
92 | + | let o = invoke(g, "nameExpires", [t], nil) | |
93 | + | if ($isInstanceOf(o, "Int")) | |
94 | 94 | then { | |
95 | 95 | let B = o | |
96 | 96 | B | |
97 | 97 | } | |
98 | 98 | else unit | |
99 | 99 | } | |
100 | - | if (!(isDefined(u))) | |
100 | + | let C = { | |
101 | + | let o = invoke(g, "nameStatus", [t], nil) | |
102 | + | if ($isInstanceOf(o, "String")) | |
103 | + | then { | |
104 | + | let D = o | |
105 | + | D | |
106 | + | } | |
107 | + | else unit | |
108 | + | } | |
109 | + | if (!(u)) | |
101 | 110 | then $Tuple2(nil, unit) | |
102 | - | else $Tuple2(nil, $Tuple5( | |
111 | + | else $Tuple2(nil, $Tuple5(w, x, y, A, C)) | |
103 | 112 | }) | |
104 | 113 | ||
105 | 114 |
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 | let f = "registry" | |
11 | 11 | ||
12 | 12 | let g = d(a(this, f)) | |
13 | 13 | ||
14 | 14 | func h (i) = (i.caller == this) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func j (k) = unit | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func l (i) = if (h(i)) | |
21 | 21 | then unit | |
22 | 22 | else throw("Permission denied") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func m (n) = { | |
26 | 26 | let o = invoke(g, "owner", [n], nil) | |
27 | 27 | if ($isInstanceOf(o, "String")) | |
28 | 28 | then { | |
29 | 29 | let p = o | |
30 | 30 | p | |
31 | 31 | } | |
32 | 32 | else unit | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Callable(i) | |
37 | 37 | func init (q) = valueOrElse(j([l(i)]), [StringEntry(f, q)]) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(i) | |
42 | 42 | func addr (n) = $Tuple2(nil, m(n)) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(i) | |
47 | 47 | func resolve (r) = { | |
48 | 48 | let s = if ((size(r) == 0)) | |
49 | 49 | then throw("Name cannot be empty") | |
50 | 50 | else split(r, ".") | |
51 | 51 | let t = s[(size(s) - 1)] | |
52 | 52 | $Tuple2(nil, m(t)) | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | ||
57 | 57 | @Callable(i) | |
58 | 58 | func whoIs (r) = valueOrElse(j([if ((size(r) > 0)) | |
59 | 59 | then unit | |
60 | 60 | else throw("Name cannot be empty")]), { | |
61 | 61 | let s = split(r, ".") | |
62 | 62 | let t = s[(size(s) - 1)] | |
63 | 63 | let u = { | |
64 | + | let o = invoke(g, "available", [t], nil) | |
65 | + | if ($isInstanceOf(o, "Boolean")) | |
66 | + | then { | |
67 | + | let v = o | |
68 | + | !(v) | |
69 | + | } | |
70 | + | else false | |
71 | + | } | |
72 | + | let w = { | |
64 | 73 | let o = invoke(g, "owner", [t], nil) | |
65 | 74 | if ($isInstanceOf(o, "String")) | |
66 | 75 | then { | |
67 | 76 | let p = o | |
68 | 77 | p | |
69 | 78 | } | |
70 | 79 | else unit | |
71 | 80 | } | |
72 | - | let | |
73 | - | let | |
81 | + | let x = unit | |
82 | + | let y = { | |
74 | 83 | let o = invoke(g, "nameCreated", [t], nil) | |
75 | - | if ($isInstanceOf(o, "Int")) | |
76 | - | then { | |
77 | - | let x = o | |
78 | - | x | |
79 | - | } | |
80 | - | else unit | |
81 | - | } | |
82 | - | let y = { | |
83 | - | let o = invoke(g, "nameExpires", [t], nil) | |
84 | 84 | if ($isInstanceOf(o, "Int")) | |
85 | 85 | then { | |
86 | 86 | let z = o | |
87 | 87 | z | |
88 | 88 | } | |
89 | 89 | else unit | |
90 | 90 | } | |
91 | 91 | let A = { | |
92 | - | let o = invoke(g, " | |
93 | - | if ($isInstanceOf(o, " | |
92 | + | let o = invoke(g, "nameExpires", [t], nil) | |
93 | + | if ($isInstanceOf(o, "Int")) | |
94 | 94 | then { | |
95 | 95 | let B = o | |
96 | 96 | B | |
97 | 97 | } | |
98 | 98 | else unit | |
99 | 99 | } | |
100 | - | if (!(isDefined(u))) | |
100 | + | let C = { | |
101 | + | let o = invoke(g, "nameStatus", [t], nil) | |
102 | + | if ($isInstanceOf(o, "String")) | |
103 | + | then { | |
104 | + | let D = o | |
105 | + | D | |
106 | + | } | |
107 | + | else unit | |
108 | + | } | |
109 | + | if (!(u)) | |
101 | 110 | then $Tuple2(nil, unit) | |
102 | - | else $Tuple2(nil, $Tuple5( | |
111 | + | else $Tuple2(nil, $Tuple5(w, x, y, A, C)) | |
103 | 112 | }) | |
104 | 113 | ||
105 | 114 |
github/deemru/w8io/169f3d6 33.73 ms ◑