tx · 6G3ruV19NuViAcMBQfyzK7tw3jbbYMX1J8tGkHZnf6Jn

3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw:  -0.00300000 Waves

2022.10.09 19:18 [2265021] smart account 3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw > SELF 0.00000000 Waves

{ "type": 13, "id": "6G3ruV19NuViAcMBQfyzK7tw3jbbYMX1J8tGkHZnf6Jn", "fee": 300000, "feeAssetId": null, "timestamp": 1665332331471, "version": 2, "chainId": 84, "sender": "3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw", "senderPublicKey": "6NSakbUsm1WyESQ8yj3qpc1kQUfHWNd5C6CHVpbs4X7c", "proofs": [ "4hcuzQJN9gxh5ZPyKyrbDuS8YmfwwefjRQjBpJuffNodpPrecUxN4LVyUaEcVupnNdv47CmJF9QsEhQmuBFny2jF" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEIEgMKAQgSAwoBCBIDCgEIAAAACAEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAAAABAAAADG1heWJlQWRkcmVzcwkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEJgAAAAEFAAAADG1heWJlQWRkcmVzcwkAASwAAAACCQABLAAAAAICAAAAGkNhbid0IHBhcnNlIGFkZHJlc3MgZnJvbSAnBQAAAAxtYXliZUFkZHJlc3MCAAAAAScAAAAADGtleV9yZWdpc3RyeQIAAAAIcmVnaXN0cnkAAAAACHJlZ2lzdHJ5CQEAAAATcG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AAHJG1hdGNoMAkAA/wAAAAEBQAAAAhyZWdpc3RyeQIAAAALbmFtZUV4cGlyZXMJAARMAAAAAgUAAAAJbGFzdExhYmVsBQAAAANuaWwFAAAAA25pbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAlleHBpcmVzQXQFAAAAByRtYXRjaDAFAAAACWV4cGlyZXNBdAUAAAAEdW5pdAQAAAAKbmFtZVN0YXR1cwQAAAAHJG1hdGNoMAkAA/wAAAAEBQAAAAhyZWdpc3RyeQIAAAAKbmFtZVN0YXR1cwkABEwAAAACBQAAAAlsYXN0TGFiZWwFAAAAA25pbAUAAAADbmlsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAABnN0YXR1cwUAAAAHJG1hdGNoMAUAAAAGc3RhdHVzBQAAAAR1bml0CQAFFAAAAAIFAAAAA25pbAkABRcAAAAFBQAAAApyZWdpc3RyYW50BQAAAAhyZXNvbHZlcgUAAAALbmFtZUNyZWF0ZWQFAAAAC25hbWVFeHBpcmVzBQAAAApuYW1lU3RhdHVzAAAAAAVHQX8=", "height": 2265021, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6qGd9rsiFMbfvdEnVgnWFtcfAcMerR5RzxsL6keQ2wJ8 Next: 5xLu7GNtupcgoiKdovcPZ4eXmvpS5MBkPdr3bWFb3oLM Diff:
OldNewDifferences
5757 else throw("Name cannot be empty")]), {
5858 let labels = split(name, ".")
5959 let lastLabel = labels[(size(labels) - 1)]
60- let isRegistered = match invoke(registry, "available", [lastLabel], nil) {
61- case available: Boolean =>
62- !(available)
63- case _ =>
64- false
65- }
6660 let registrant = match invoke(registry, "owner", [lastLabel], nil) {
6761 case owner: String =>
6862 owner
8882 case _ =>
8983 unit
9084 }
91- if (!(isRegistered))
92- then $Tuple2(nil, unit)
93- else $Tuple2(nil, $Tuple5(registrant, resolver, nameCreated, nameExpires, nameStatus))
85+ $Tuple2(nil, $Tuple5(registrant, resolver, nameCreated, nameExpires, nameStatus))
9486 })
9587
9688
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 _addr (label) = match invoke(registry, "owner", [label], nil) {
2626 case owner: String =>
2727 owner
2828 case _ =>
2929 unit
3030 }
3131
3232
3333 @Callable(inv)
3434 func init (registryAddress) = valueOrElse(modifiers([onlyAdmin(inv)]), [StringEntry(key_registry, registryAddress)])
3535
3636
3737
3838 @Callable(inv)
3939 func addr (label) = $Tuple2(nil, _addr(label))
4040
4141
4242
4343 @Callable(inv)
4444 func resolve (name) = {
4545 let labels = if ((size(name) == 0))
4646 then throw("Name cannot be empty")
4747 else split(name, ".")
4848 let lastLabel = labels[(size(labels) - 1)]
4949 $Tuple2(nil, _addr(lastLabel))
5050 }
5151
5252
5353
5454 @Callable(inv)
5555 func whoIs (name) = valueOrElse(modifiers([if ((size(name) > 0))
5656 then unit
5757 else throw("Name cannot be empty")]), {
5858 let labels = split(name, ".")
5959 let lastLabel = labels[(size(labels) - 1)]
60- let isRegistered = match invoke(registry, "available", [lastLabel], nil) {
61- case available: Boolean =>
62- !(available)
63- case _ =>
64- false
65- }
6660 let registrant = match invoke(registry, "owner", [lastLabel], nil) {
6761 case owner: String =>
6862 owner
6963 case _ =>
7064 unit
7165 }
7266 let resolver = unit
7367 let nameCreated = match invoke(registry, "nameCreated", [lastLabel], nil) {
7468 case createdAt: Int =>
7569 createdAt
7670 case _ =>
7771 unit
7872 }
7973 let nameExpires = match invoke(registry, "nameExpires", [lastLabel], nil) {
8074 case expiresAt: Int =>
8175 expiresAt
8276 case _ =>
8377 unit
8478 }
8579 let nameStatus = match invoke(registry, "nameStatus", [lastLabel], nil) {
8680 case status: String =>
8781 status
8882 case _ =>
8983 unit
9084 }
91- if (!(isRegistered))
92- then $Tuple2(nil, unit)
93- else $Tuple2(nil, $Tuple5(registrant, resolver, nameCreated, nameExpires, nameStatus))
85+ $Tuple2(nil, $Tuple5(registrant, resolver, nameCreated, nameExpires, nameStatus))
9486 })
9587
9688

github/deemru/w8io/026f985 
44.72 ms