tx · 2NnNwbcwXre7uFjkyiNDunHA8sqYJgA3zKohwdY3Y5UP

3MvP7BWqZinx23VpQeJBrhL4nED8MWdtcRh:  -0.01000000 Waves

2022.10.14 13:00 [2271868] smart account 3MvP7BWqZinx23VpQeJBrhL4nED8MWdtcRh > SELF 0.00000000 Waves

{ "type": 13, "id": "2NnNwbcwXre7uFjkyiNDunHA8sqYJgA3zKohwdY3Y5UP", "fee": 1000000, "feeAssetId": null, "timestamp": 1665741629306, "version": 2, "chainId": 84, "sender": "3MvP7BWqZinx23VpQeJBrhL4nED8MWdtcRh", "senderPublicKey": "7BvYKnVkbABXoQwqVQAsEXRQN9bt7H7QxxhXqMhW44oa", "proofs": [ "M7mrHLYzWNRediVDDkL4BiiK8xDRBU51eNpy8v5YaZ9s4HZ7QRhCefewxtWhkBrZWTJ4jn8qqxa2pbuQUrRJdsX" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAAJAQAAABBnZXRTdHJpbmdPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAAQUAAAAHYWRkcmVzcwEAAAATcGFyc2VBZGRyZXNzT3JUaHJvdwAAAAEAAAAMbWF5YmVBZGRyZXNzCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQmAAAAAQUAAAAMbWF5YmVBZGRyZXNzCQABLAAAAAIJAAEsAAAAAgIAAAAaQ2FuJ3QgcGFyc2UgYWRkcmVzcyBmcm9tICcFAAAADG1heWJlQWRkcmVzcwIAAAABJwAAAAAMa2V5X3JlZ2lzdHJ5AgAAAAhyZWdpc3RyeQAAAAAIcmVnaXN0cnkJAQAAABNwYXJzZUFkZH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mlsBQAAAANuaWwDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAAMY2FsbGJhY2tEYXRhBQAAAAckbWF0Y2gwBQAAAAxjYWxsYmFja0RhdGEFAAAABHVuaXQAAAAAVeKsag==", "height": 2271868, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GKcG5LudSaEQCA5xQkM4HsnpoZZj2oZTckc3EmWLy9PM Next: 6jXcgg3HXtG15ym7BDkcJLqNVrVBmGodPegPfp8BNL17 Diff:
OldNewDifferences
6969 })
7070
7171
72-
73-@Callable(inv)
74-func whoIs (name) = valueOrElse(modifiers([if ((size(name) > 0))
75- then unit
76- else throw("Name cannot be empty")]), {
77- let $t024252473 = _findResolver(name)
78- let resolver = $t024252473._1
79- let restLabels = $t024252473._2
80- let lastLabel = _splitLastLabel(name)._1
81- let levelZeroRegistrant = match invoke(registry, "owner", [lastLabel], nil) {
82- case owner: String =>
83- owner
84- case _ =>
85- unit
86- }
87- let levelZeroResolver = match resolver {
88- case address: Address =>
89- toString(address)
90- case _ =>
91- unit
92- }
93- let levelZeroCreatedAt = match invoke(registry, "nameCreated", [lastLabel], nil) {
94- case nameCreated: Int =>
95- nameCreated
96- case _ =>
97- unit
98- }
99- let levelZeroStatus = if (isDefined(levelZeroRegistrant))
100- then "ACTIVE"
101- else "NOT_REGISTERED"
102- $Tuple2(nil, if (if (!(isDefined(resolver)))
103- then true
104- else (size(restLabels) == 0))
105- then $Tuple5(levelZeroRegistrant, levelZeroResolver, levelZeroCreatedAt, unit, levelZeroStatus)
106- else match invoke(value(resolver), "whoIs", [value(restLabels)], nil) {
107- case _ =>
108- if (if (if (if ($isInstanceOf($match0._1, "String"))
109- then true
110- else $isInstanceOf($match0._1, "Unit"))
111- then if (if ($isInstanceOf($match0._2, "String"))
112- then true
113- else $isInstanceOf($match0._2, "Unit"))
114- then if (if ($isInstanceOf($match0._3, "Int"))
115- then true
116- else $isInstanceOf($match0._3, "Unit"))
117- then if (if ($isInstanceOf($match0._4, "Int"))
118- then true
119- else $isInstanceOf($match0._4, "Unit"))
120- then if ($isInstanceOf($match0._5, "String"))
121- then true
122- else $isInstanceOf($match0._5, "Unit")
123- else false
124- else false
125- else false
126- else false)
127- then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ($isInstanceOf($match0, "(Unit, Unit, Unit, Unit, Unit)"))
128- then true
129- else $isInstanceOf($match0, "(Unit, Unit, Unit, Unit, String)"))
130- then true
131- else $isInstanceOf($match0, "(Unit, Unit, Unit, Int, Unit)"))
132- then true
133- else $isInstanceOf($match0, "(Unit, Unit, Unit, Int, String)"))
134- then true
135- else $isInstanceOf($match0, "(Unit, Unit, Int, Unit, Unit)"))
136- then true
137- else $isInstanceOf($match0, "(Unit, Unit, Int, Unit, String)"))
138- then true
139- else $isInstanceOf($match0, "(Unit, Unit, Int, Int, Unit)"))
140- then true
141- else $isInstanceOf($match0, "(Unit, Unit, Int, Int, String)"))
142- then true
143- else $isInstanceOf($match0, "(Unit, String, Unit, Unit, Unit)"))
144- then true
145- else $isInstanceOf($match0, "(Unit, String, Unit, Unit, String)"))
146- then true
147- else $isInstanceOf($match0, "(Unit, String, Unit, Int, Unit)"))
148- then true
149- else $isInstanceOf($match0, "(Unit, String, Unit, Int, String)"))
150- then true
151- else $isInstanceOf($match0, "(Unit, String, Int, Unit, Unit)"))
152- then true
153- else $isInstanceOf($match0, "(Unit, String, Int, Unit, String)"))
154- then true
155- else $isInstanceOf($match0, "(Unit, String, Int, Int, Unit)"))
156- then true
157- else $isInstanceOf($match0, "(Unit, String, Int, Int, String)"))
158- then true
159- else $isInstanceOf($match0, "(String, Unit, Unit, Unit, Unit)"))
160- then true
161- else $isInstanceOf($match0, "(String, Unit, Unit, Unit, String)"))
162- then true
163- else $isInstanceOf($match0, "(String, Unit, Unit, Int, Unit)"))
164- then true
165- else $isInstanceOf($match0, "(String, Unit, Unit, Int, String)"))
166- then true
167- else $isInstanceOf($match0, "(String, Unit, Int, Unit, Unit)"))
168- then true
169- else $isInstanceOf($match0, "(String, Unit, Int, Unit, String)"))
170- then true
171- else $isInstanceOf($match0, "(String, Unit, Int, Int, Unit)"))
172- then true
173- else $isInstanceOf($match0, "(String, Unit, Int, Int, String)"))
174- then true
175- else $isInstanceOf($match0, "(String, String, Unit, Unit, Unit)"))
176- then true
177- else $isInstanceOf($match0, "(String, String, Unit, Unit, String)"))
178- then true
179- else $isInstanceOf($match0, "(String, String, Unit, Int, Unit)"))
180- then true
181- else $isInstanceOf($match0, "(String, String, Unit, Int, String)"))
182- then true
183- else $isInstanceOf($match0, "(String, String, Int, Unit, Unit)"))
184- then true
185- else $isInstanceOf($match0, "(String, String, Int, Unit, String)"))
186- then true
187- else $isInstanceOf($match0, "(String, String, Int, Int, Unit)"))
188- then true
189- else $isInstanceOf($match0, "(String, String, Int, Int, String)")
190- else false)
191- then {
192- let registrant = $match0._1
193- let resolver_ = $match0._2
194- let nameCreated = $match0._3
195- let nameExpires = $match0._4
196- let status = $match0._5
197- $Tuple5(registrant, resolver_, nameCreated, nameExpires, status)
198- }
199- else unit
200- })
201- })
202-
203-
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringOrThrow (address,key) = valueOrErrorMessage(getString(address, key), ((("Can't read '" + key) + "' at address ") + toString(address)))
55
66
77 func parseAddressOrThrow (maybeAddress) = valueOrErrorMessage(addressFromString(maybeAddress), (("Can't parse address from '" + maybeAddress) + "'"))
88
99
1010 let key_registry = "registry"
1111
1212 let registry = parseAddressOrThrow(getStringOrThrow(this, key_registry))
1313
1414 func isAdmin (inv) = (inv.caller == this)
1515
1616
1717 func modifiers (validations) = unit
1818
1919
2020 func onlyAdmin (inv) = if (isAdmin(inv))
2121 then unit
2222 else throw("Permission denied")
2323
2424
2525 func _splitLastLabel (name) = {
2626 let labels = split(name, ".")
2727 let lastIndex = (size(labels) - 1)
2828 let lastLabel = labels[lastIndex]
2929 let restLabels = makeString(removeByIndex(labels, lastIndex), ".")
3030 $Tuple2(lastLabel, restLabels)
3131 }
3232
3333
3434 func _findResolver (name) = {
3535 let $t012401291 = _splitLastLabel(name)
3636 let lastLabel = $t012401291._1
3737 let restLabels = $t012401291._2
3838 match invoke(registry, "resolver", [lastLabel], nil) {
3939 case resolverAddress: String =>
4040 $Tuple2(addressFromString(resolverAddress), restLabels)
4141 case _ =>
4242 $Tuple2(unit, name)
4343 }
4444 }
4545
4646
4747 @Callable(inv)
4848 func init (registryAddress) = valueOrElse(modifiers([onlyAdmin(inv)]), [StringEntry(key_registry, registryAddress)])
4949
5050
5151
5252 @Callable(inv)
5353 func resolve (name) = valueOrElse(modifiers([if ((size(name) > 0))
5454 then unit
5555 else throw("Name cannot be empty")]), {
5656 let $t018561904 = _findResolver(name)
5757 let resolver = $t018561904._1
5858 let restLabels = $t018561904._2
5959 if (if (!(isDefined(resolver)))
6060 then true
6161 else (size(restLabels) == 0))
6262 then $Tuple2(nil, unit)
6363 else $Tuple2(nil, match invoke(value(resolver), "resolve", [value(restLabels)], nil) {
6464 case callbackData: String =>
6565 callbackData
6666 case _ =>
6767 unit
6868 })
6969 })
7070
7171
72-
73-@Callable(inv)
74-func whoIs (name) = valueOrElse(modifiers([if ((size(name) > 0))
75- then unit
76- else throw("Name cannot be empty")]), {
77- let $t024252473 = _findResolver(name)
78- let resolver = $t024252473._1
79- let restLabels = $t024252473._2
80- let lastLabel = _splitLastLabel(name)._1
81- let levelZeroRegistrant = match invoke(registry, "owner", [lastLabel], nil) {
82- case owner: String =>
83- owner
84- case _ =>
85- unit
86- }
87- let levelZeroResolver = match resolver {
88- case address: Address =>
89- toString(address)
90- case _ =>
91- unit
92- }
93- let levelZeroCreatedAt = match invoke(registry, "nameCreated", [lastLabel], nil) {
94- case nameCreated: Int =>
95- nameCreated
96- case _ =>
97- unit
98- }
99- let levelZeroStatus = if (isDefined(levelZeroRegistrant))
100- then "ACTIVE"
101- else "NOT_REGISTERED"
102- $Tuple2(nil, if (if (!(isDefined(resolver)))
103- then true
104- else (size(restLabels) == 0))
105- then $Tuple5(levelZeroRegistrant, levelZeroResolver, levelZeroCreatedAt, unit, levelZeroStatus)
106- else match invoke(value(resolver), "whoIs", [value(restLabels)], nil) {
107- case _ =>
108- if (if (if (if ($isInstanceOf($match0._1, "String"))
109- then true
110- else $isInstanceOf($match0._1, "Unit"))
111- then if (if ($isInstanceOf($match0._2, "String"))
112- then true
113- else $isInstanceOf($match0._2, "Unit"))
114- then if (if ($isInstanceOf($match0._3, "Int"))
115- then true
116- else $isInstanceOf($match0._3, "Unit"))
117- then if (if ($isInstanceOf($match0._4, "Int"))
118- then true
119- else $isInstanceOf($match0._4, "Unit"))
120- then if ($isInstanceOf($match0._5, "String"))
121- then true
122- else $isInstanceOf($match0._5, "Unit")
123- else false
124- else false
125- else false
126- else false)
127- then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ($isInstanceOf($match0, "(Unit, Unit, Unit, Unit, Unit)"))
128- then true
129- else $isInstanceOf($match0, "(Unit, Unit, Unit, Unit, String)"))
130- then true
131- else $isInstanceOf($match0, "(Unit, Unit, Unit, Int, Unit)"))
132- then true
133- else $isInstanceOf($match0, "(Unit, Unit, Unit, Int, String)"))
134- then true
135- else $isInstanceOf($match0, "(Unit, Unit, Int, Unit, Unit)"))
136- then true
137- else $isInstanceOf($match0, "(Unit, Unit, Int, Unit, String)"))
138- then true
139- else $isInstanceOf($match0, "(Unit, Unit, Int, Int, Unit)"))
140- then true
141- else $isInstanceOf($match0, "(Unit, Unit, Int, Int, String)"))
142- then true
143- else $isInstanceOf($match0, "(Unit, String, Unit, Unit, Unit)"))
144- then true
145- else $isInstanceOf($match0, "(Unit, String, Unit, Unit, String)"))
146- then true
147- else $isInstanceOf($match0, "(Unit, String, Unit, Int, Unit)"))
148- then true
149- else $isInstanceOf($match0, "(Unit, String, Unit, Int, String)"))
150- then true
151- else $isInstanceOf($match0, "(Unit, String, Int, Unit, Unit)"))
152- then true
153- else $isInstanceOf($match0, "(Unit, String, Int, Unit, String)"))
154- then true
155- else $isInstanceOf($match0, "(Unit, String, Int, Int, Unit)"))
156- then true
157- else $isInstanceOf($match0, "(Unit, String, Int, Int, String)"))
158- then true
159- else $isInstanceOf($match0, "(String, Unit, Unit, Unit, Unit)"))
160- then true
161- else $isInstanceOf($match0, "(String, Unit, Unit, Unit, String)"))
162- then true
163- else $isInstanceOf($match0, "(String, Unit, Unit, Int, Unit)"))
164- then true
165- else $isInstanceOf($match0, "(String, Unit, Unit, Int, String)"))
166- then true
167- else $isInstanceOf($match0, "(String, Unit, Int, Unit, Unit)"))
168- then true
169- else $isInstanceOf($match0, "(String, Unit, Int, Unit, String)"))
170- then true
171- else $isInstanceOf($match0, "(String, Unit, Int, Int, Unit)"))
172- then true
173- else $isInstanceOf($match0, "(String, Unit, Int, Int, String)"))
174- then true
175- else $isInstanceOf($match0, "(String, String, Unit, Unit, Unit)"))
176- then true
177- else $isInstanceOf($match0, "(String, String, Unit, Unit, String)"))
178- then true
179- else $isInstanceOf($match0, "(String, String, Unit, Int, Unit)"))
180- then true
181- else $isInstanceOf($match0, "(String, String, Unit, Int, String)"))
182- then true
183- else $isInstanceOf($match0, "(String, String, Int, Unit, Unit)"))
184- then true
185- else $isInstanceOf($match0, "(String, String, Int, Unit, String)"))
186- then true
187- else $isInstanceOf($match0, "(String, String, Int, Int, Unit)"))
188- then true
189- else $isInstanceOf($match0, "(String, String, Int, Int, String)")
190- else false)
191- then {
192- let registrant = $match0._1
193- let resolver_ = $match0._2
194- let nameCreated = $match0._3
195- let nameExpires = $match0._4
196- let status = $match0._5
197- $Tuple5(registrant, resolver_, nameCreated, nameExpires, status)
198- }
199- else unit
200- })
201- })
202-
203-

github/deemru/w8io/169f3d6 
48.98 ms