tx · EDzDn558J72E33j4SsXowLKBqT31kfcbCN1dc5P9L26f

3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw:  -0.01000000 Waves

2022.10.14 13:29 [2271898] smart account 3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw > SELF 0.00000000 Waves

{ "type": 13, "id": "EDzDn558J72E33j4SsXowLKBqT31kfcbCN1dc5P9L26f", "fee": 1000000, "feeAssetId": null, "timestamp": 1665743410522, "version": 2, "chainId": 84, "sender": "3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw", "senderPublicKey": "6NSakbUsm1WyESQ8yj3qpc1kQUfHWNd5C6CHVpbs4X7c", "proofs": [ "4sLG5QcJ1E1MQZod6aNXgoQafm8XizRtvPm3fzFQzdC9ECmfTtQVDR4QviXrmcFmdCtYBjQniCpMY6FTLnC7KRFr" ], "script": "base64:AAIFAAAAAAAAABEIAhIDCgEIEgMKAQgSAwoBCAAAAAoBAAAAEGdldFN0cmluZ09yVGhyb3cAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAxDYW4ndCByZWFkICcFAAAAA2tleQIAAAANJyBhdCBhZGRyZXNzIAkABCUAAAABBQAAAAdhZGRyZXNzAQAAABNwYXJzZUFkZHJlc3NPclRocm93AAAAAQAAAAxtYXliZUFkZHJlc3MJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABCYAAAABBQAAAAxtYXliZUFkZHJlc3MJAAEsAAAAAgkAASwAAAACAgAAABpDYW4ndCBwYXJzZSBhZGRyZXNzIGZyb20gJwUAAAAMbWF5YmVBZGRyZXNzAgAAAAEnAAAAAAxrZXlfcmVnaXN0cnkCAAAACHJlZ2lzdHJ5AAAAAAhyZWdpc3RyeQkBAAAAE3BhcnNlQWRkcmVzc09yVG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3ZhbHVlT3JFbHNlAAAAAgkBAAAACW1vZGlmaWVycwAAAAEJAARMAAAAAgkBAAAACW9ubHlBZG1pbgAAAAEFAAAAA2ludgUAAAADbmlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAADGtleV9yZWdpc3RyeQUAAAAPcmVnaXN0cnlBZGRyZXNzBQAAAANuaWwAAAADaW52AQAAABFzdXBwb3J0c0ludGVyZmFjZQAAAAEAAAALaW50ZXJmYWNlSWQJAAUUAAAAAgUAAAADbmlsCQEAAAASX3N1cHBvcnRzSW50ZXJmYWNlAAAAAQUAAAALaW50ZXJmYWNlSWQAAAADaW52AQAAAARhZGRyAAAAAQAAAAVsYWJlbAkABRQAAAACBQAAAANuaWwJAQAAAAVfYWRkcgAAAAEFAAAABWxhYmVsAAAAAL8fQKI=", "height": 2271898, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GXkeD5savvTZaUmHbq9Fvzg34UobRMsdNmEHLGgHgdqJ Next: 8QXX43E2LtMFmdGgcHnELprcLy97JateiAeNuTJ7hrVq Diff:
OldNewDifferences
2020 func onlyAdmin (inv) = if (isAdmin(inv))
2121 then unit
2222 else throw("Permission denied")
23+
24+
25+func _supportsInterface (interfaceId) = (interfaceId == "addr")
2326
2427
2528 func _addr (label) = match invoke(registry, "owner", [label], nil) {
4548
4649
4750 @Callable(inv)
48-func addr (label) = $Tuple2(nil, _addr(label))
51+func supportsInterface (interfaceId) = $Tuple2(nil, _supportsInterface(interfaceId))
4952
5053
5154
5255 @Callable(inv)
53-func resolve (name) = valueOrElse(modifiers([if ((size(name) > 0))
54- then unit
55- else throw("Name cannot be empty")]), {
56- let lastLabel = _splitLastLabel(name)._1
57- $Tuple2(nil, _addr(lastLabel))
58- })
56+func addr (label) = $Tuple2(nil, _addr(label))
5957
6058
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")
23+
24+
25+func _supportsInterface (interfaceId) = (interfaceId == "addr")
2326
2427
2528 func _addr (label) = match invoke(registry, "owner", [label], nil) {
2629 case owner: String =>
2730 owner
2831 case _ =>
2932 unit
3033 }
3134
3235
3336 func _splitLastLabel (name) = {
3437 let labels = split(name, ".")
3538 let lastIndex = (size(labels) - 1)
3639 let lastLabel = labels[lastIndex]
3740 let restLabels = makeString(removeByIndex(labels, lastIndex), ".")
3841 $Tuple2(lastLabel, restLabels)
3942 }
4043
4144
4245 @Callable(inv)
4346 func init (registryAddress) = valueOrElse(modifiers([onlyAdmin(inv)]), [StringEntry(key_registry, registryAddress)])
4447
4548
4649
4750 @Callable(inv)
48-func addr (label) = $Tuple2(nil, _addr(label))
51+func supportsInterface (interfaceId) = $Tuple2(nil, _supportsInterface(interfaceId))
4952
5053
5154
5255 @Callable(inv)
53-func resolve (name) = valueOrElse(modifiers([if ((size(name) > 0))
54- then unit
55- else throw("Name cannot be empty")]), {
56- let lastLabel = _splitLastLabel(name)._1
57- $Tuple2(nil, _addr(lastLabel))
58- })
56+func addr (label) = $Tuple2(nil, _addr(label))
5957
6058

github/deemru/w8io/169f3d6 
25.83 ms