tx · 5xLu7GNtupcgoiKdovcPZ4eXmvpS5MBkPdr3bWFb3oLM

3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw:  -0.00300000 Waves

2022.10.09 19:22 [2265026] smart account 3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw > SELF 0.00000000 Waves

{ "type": 13, "id": "5xLu7GNtupcgoiKdovcPZ4eXmvpS5MBkPdr3bWFb3oLM", "fee": 300000, "feeAssetId": null, "timestamp": 1665332652437, "version": 2, "chainId": 84, "sender": "3MrF6QFGLaSKfoNPMd8L3u7KYNm7cE43Ydw", "senderPublicKey": "6NSakbUsm1WyESQ8yj3qpc1kQUfHWNd5C6CHVpbs4X7c", "proofs": [ "533ray4g1kGUtungev5AhwRibLQsstq9znpF16Zv86FYkFMK1izaPfhrEEtA73kwjKzEn7EczYuhCKTvd7qBBWfc" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEIEgMKAQgSAwoBCBIDCgEIAAAACAEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAE3BhcnNlQWRkcmVzc09yVGhyb3cAAAABAAAADG1heWJlQWRkcmVzcwkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEJgAAAAEFAAAADG1heWJlQWRkcmVzcwkAASwAAAACCQABLAAAAAICAAAAGkNhbid0IHBhcnNlIGFkZHJlc3MgZnJvbSAnBQAAAAxtYXliZUFkZHJlc3MCAAAAAScAAAAADGtleV9yZWdpc3RyeQIAAAAIcmVnaXN0cnkAAAAACHJlZ2lzdHJ5CQEAAAATcGFyc2VBZ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dGNoMAkAA/wAAAAEBQAAAAhyZWdpc3RyeQIAAAALbmFtZUV4cGlyZXMJAARMAAAAAgUAAAAJbGFzdExhYmVsBQAAAANuaWwFAAAAA25pbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAlleHBpcmVzQXQFAAAAByRtYXRjaDAFAAAACWV4cGlyZXNBdAUAAAAEdW5pdAQAAAAKbmFtZVN0YXR1cwQAAAAHJG1hdGNoMAkAA/wAAAAEBQAAAAhyZWdpc3RyeQIAAAAKbmFtZVN0YXR1cwkABEwAAAACBQAAAAlsYXN0TGFiZWwFAAAAA25pbAUAAAADbmlsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAABnN0YXR1cwUAAAAHJG1hdGNoMAUAAAAGc3RhdHVzBQAAAAR1bml0CQAFFAAAAAIFAAAAA25pbAkABRcAAAAFBQAAAApyZWdpc3RyYW50BQAAAAhyZXNvbHZlcgUAAAALbmFtZUNyZWF0ZWQFAAAAC25hbWVFeHBpcmVzBQAAAApuYW1lU3RhdHVzAAAAAAVHQX8=", "height": 2265026, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6G3ruV19NuViAcMBQfyzK7tw3jbbYMX1J8tGkHZnf6Jn Next: BYtyTALN5L4TbLreTVuw4wpwNRCh9Jz8eCLTT7tToNJa 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)]
6060 let registrant = match invoke(registry, "owner", [lastLabel], nil) {
6161 case owner: String =>
6262 owner
6363 case _ =>
6464 unit
6565 }
6666 let resolver = unit
6767 let nameCreated = match invoke(registry, "nameCreated", [lastLabel], nil) {
6868 case createdAt: Int =>
6969 createdAt
7070 case _ =>
7171 unit
7272 }
7373 let nameExpires = match invoke(registry, "nameExpires", [lastLabel], nil) {
7474 case expiresAt: Int =>
7575 expiresAt
7676 case _ =>
7777 unit
7878 }
7979 let nameStatus = match invoke(registry, "nameStatus", [lastLabel], nil) {
8080 case status: String =>
8181 status
8282 case _ =>
8383 unit
8484 }
8585 $Tuple2(nil, $Tuple5(registrant, resolver, nameCreated, nameExpires, nameStatus))
8686 })
8787
8888

github/deemru/w8io/169f3d6 
40.37 ms