resolveName. For example, to look up an account's balance, you can do:
EnsResolverobject. For example, t o instantiate a contract interface, you can do:
resolver()on the ENS registry, passing in the output of step 1. This returns the address of the resolver responsible for the name.
addr(). To resolve a non-Ethereum address, supply both the namehash and the SLIP44 chain ID of the cryptocurrency whose address you want to resolve. For example, to resolve a Bitcoin address, you would call
addr(hash, 0). Note that the returned address will be in binary representation, and so will need decoding to a text-format address; for details, see EIP 2304.
BTC), others do not have the built-in support, and you have to call via each coin id (e.g.:
Eventor query via ENS subgraph.
name(). addr.reverse is owned by a special purpose registrar contract that allocates subdomains to the owner of the matching address - for instance, the address 0x314159265dd8dbb310642f98f50c066173c1259b may claim the name 314159265dd8dbb310642f98f50c066173c1259b.addr.reverse, and configure a resolver and records on it. The resolver in turn supports the
name()function, which returns the name associated with that address.
1234....addr.reverse(where 1234... is the address you want to reverse-resolve), and call the
name()function on that resolver. Then, perform a forward resolution to verify the record is accurate.
ReverseRecordswhich allows you to lookup multiple names in one function call.