tx · EKSF1CPRMXgvASwhygcKrR3guqfAtmEULJL9M6Wh8cYN 3MumW7BtRwX8w1dn9tWwB7TpHAUkqoSEXve: -0.01000000 Waves 2022.10.17 10:47 [2276086] smart account 3MumW7BtRwX8w1dn9tWwB7TpHAUkqoSEXve > SELF 0.00000000 Waves
{ "type": 13, "id": "EKSF1CPRMXgvASwhygcKrR3guqfAtmEULJL9M6Wh8cYN", "fee": 1000000, "feeAssetId": null, "timestamp": 1665992904046, "version": 2, "chainId": 84, "sender": "3MumW7BtRwX8w1dn9tWwB7TpHAUkqoSEXve", "senderPublicKey": "3H3TbYHdAJUPh9yFbybSbc1SGAgghXJ3kVJxDE8duuPJ", "proofs": [ "3LrvnwKeMVL6nGE4SAmG4Kyh6U79ijzWPVBeWYYstYZ4WU5RiN5Km5D1wqqCumMTuBaCBpLeWvSzpakr1d6m1RKy" ], "script": "base64:AAIFAAAAAAAAABEIAhIDCgEIEgMKAQgSAwoBCAAAAAkBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABNwYXJzZUFkZHJlc3NPclRocm93AAAAAQAAAAxtYXliZUFkZHJlc3MJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABCYAAAABBQAAAAxtYXliZUFkZHJlc3MJAAEsAAAAAgkAASwAAAACAgAAABpDYW4ndCBwYXJzZSBhZGRyZXNzIGZyb20gJwUAAAAMbWF5YmVBZGRyZXNzAgAAAAEnAAAAAAxrZXlfcmVnaXN0cnkCAAAACHJlZ2lzdHJ5AAAAAAhyZWdpc3RyeQkBAAAAE3BhcnNlQWRkcmVzc09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AADbmlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAADGtleV9yZWdpc3RyeQUAAAAPcmVnaXN0cnlBZGRyZXNzBQAAAANuaWwAAAADaW52AQAAABFzdXBwb3J0c0ludGVyZmFjZQAAAAEAAAALaW50ZXJmYWNlSWQJAAUUAAAAAgUAAAADbmlsCQAAAAAAAAIFAAAAC2ludGVyZmFjZUlkAgAAAARhZGRyAAAAA2ludgEAAAAEYWRkcgAAAAEAAAAFbGFiZWwJAAUUAAAAAgUAAAADbmlsCQEAAAAFX2FkZHIAAAABBQAAAAVsYWJlbAAAAABp+orG", "height": 2276086, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9WES6x6Cjiv7ud3ZbYEiHUdYX77SRs5YdJLy1UvCcSkY Next: FAHbfQ8K2HaAEMKjn9RJMJCdZEJyW6S1sGo8GMYQbbuV Diff:
Old | New | Differences | |
---|---|---|---|
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Callable(i) | |
51 | - | func | |
51 | + | func supportsInterface (x) = $Tuple2(nil, (x == "addr")) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | ||
55 | 55 | @Callable(i) | |
56 | - | func resolve (r) = valueOrElse(j([if ((size(r) > 0)) | |
57 | - | then unit | |
58 | - | else throw("Name cannot be empty")]), { | |
59 | - | let u = q(r)._1 | |
60 | - | $Tuple2(nil, m(u)) | |
61 | - | }) | |
62 | - | ||
63 | - | ||
64 | - | ||
65 | - | @Callable(i) | |
66 | - | func whoIs (r) = valueOrElse(j([if ((size(r) > 0)) | |
67 | - | then unit | |
68 | - | else throw("Name cannot be empty")]), { | |
69 | - | let u = q(r)._1 | |
70 | - | let x = { | |
71 | - | let o = invoke(g, "owner", [u], nil) | |
72 | - | if ($isInstanceOf(o, "String")) | |
73 | - | then { | |
74 | - | let p = o | |
75 | - | p | |
76 | - | } | |
77 | - | else unit | |
78 | - | } | |
79 | - | let y = unit | |
80 | - | let z = { | |
81 | - | let o = invoke(g, "nameCreated", [u], nil) | |
82 | - | if ($isInstanceOf(o, "Int")) | |
83 | - | then { | |
84 | - | let A = o | |
85 | - | A | |
86 | - | } | |
87 | - | else unit | |
88 | - | } | |
89 | - | let B = { | |
90 | - | let o = invoke(g, "nameExpires", [u], nil) | |
91 | - | if ($isInstanceOf(o, "Int")) | |
92 | - | then { | |
93 | - | let C = o | |
94 | - | C | |
95 | - | } | |
96 | - | else unit | |
97 | - | } | |
98 | - | let D = { | |
99 | - | let o = invoke(g, "nameStatus", [u], nil) | |
100 | - | if ($isInstanceOf(o, "String")) | |
101 | - | then { | |
102 | - | let E = o | |
103 | - | E | |
104 | - | } | |
105 | - | else unit | |
106 | - | } | |
107 | - | $Tuple2(nil, $Tuple5(x, y, z, B, D)) | |
108 | - | }) | |
56 | + | func addr (n) = $Tuple2(nil, m(n)) | |
109 | 57 | ||
110 | 58 |
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 | func q (r) = { | |
37 | 37 | let s = split(r, ".") | |
38 | 38 | let t = (size(s) - 1) | |
39 | 39 | let u = s[t] | |
40 | 40 | let v = makeString(removeByIndex(s, t), ".") | |
41 | 41 | $Tuple2(u, v) | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | @Callable(i) | |
46 | 46 | func init (w) = valueOrElse(j([l(i)]), [StringEntry(f, w)]) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Callable(i) | |
51 | - | func | |
51 | + | func supportsInterface (x) = $Tuple2(nil, (x == "addr")) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | ||
55 | 55 | @Callable(i) | |
56 | - | func resolve (r) = valueOrElse(j([if ((size(r) > 0)) | |
57 | - | then unit | |
58 | - | else throw("Name cannot be empty")]), { | |
59 | - | let u = q(r)._1 | |
60 | - | $Tuple2(nil, m(u)) | |
61 | - | }) | |
62 | - | ||
63 | - | ||
64 | - | ||
65 | - | @Callable(i) | |
66 | - | func whoIs (r) = valueOrElse(j([if ((size(r) > 0)) | |
67 | - | then unit | |
68 | - | else throw("Name cannot be empty")]), { | |
69 | - | let u = q(r)._1 | |
70 | - | let x = { | |
71 | - | let o = invoke(g, "owner", [u], nil) | |
72 | - | if ($isInstanceOf(o, "String")) | |
73 | - | then { | |
74 | - | let p = o | |
75 | - | p | |
76 | - | } | |
77 | - | else unit | |
78 | - | } | |
79 | - | let y = unit | |
80 | - | let z = { | |
81 | - | let o = invoke(g, "nameCreated", [u], nil) | |
82 | - | if ($isInstanceOf(o, "Int")) | |
83 | - | then { | |
84 | - | let A = o | |
85 | - | A | |
86 | - | } | |
87 | - | else unit | |
88 | - | } | |
89 | - | let B = { | |
90 | - | let o = invoke(g, "nameExpires", [u], nil) | |
91 | - | if ($isInstanceOf(o, "Int")) | |
92 | - | then { | |
93 | - | let C = o | |
94 | - | C | |
95 | - | } | |
96 | - | else unit | |
97 | - | } | |
98 | - | let D = { | |
99 | - | let o = invoke(g, "nameStatus", [u], nil) | |
100 | - | if ($isInstanceOf(o, "String")) | |
101 | - | then { | |
102 | - | let E = o | |
103 | - | E | |
104 | - | } | |
105 | - | else unit | |
106 | - | } | |
107 | - | $Tuple2(nil, $Tuple5(x, y, z, B, D)) | |
108 | - | }) | |
56 | + | func addr (n) = $Tuple2(nil, m(n)) | |
109 | 57 | ||
110 | 58 |
github/deemru/w8io/169f3d6 209.11 ms ◑