record.getAddress
Reads one address record of an ENS name, for Ethereum by default or any coin (ENSIP-9, ENSIP-11). Options, result, errors and examples for record.getAddress.
Reads one address record of an ENS name, for Ethereum by default or any coin (ENSIP-9, ENSIP-11).
When to use
Use to find where to send funds for a name. Use record.get to read several coins at once.
Details
coinis a symbol ("btc"), an EVM chain ({ chainId: 8453 }) or a coin type (0n).- EVM coins return a checksummed
Address; other coins their native format. - EVM chains other than mainnet fall back to the default EVM address (ENSIP-19).
- Returns
nullwhen the record is not set, unlessstrictis set.
Signature
function getAddress<const coin extends CoinType.Input | undefined = undefined>(
client: Like,
options: getAddress.Options<coin>,
): Promise<getAddress.ReturnType<coin>>Call it as ens.record.getAddress(options) on a client, or Actions.record.getAddress(client, options).
record.getAddress.request(options) builds a deferred read for Actions.batch. See Look up many at once.
In React, use useAddress.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | ENS name to read. Normalized automatically. | |
coin | CoinType.Input | "eth" | Coin to read: a symbol, { chainId } or a coin type. |
Also takes the read options.
Returns
Resolves to getAddress.ReturnType. An Address for EVM coins, the coin's native format otherwise; null when not set.
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME, INVALID_COIN_TYPE | invalid input. |
NotFoundError | RECORD_NOT_FOUND, RESOLVER_NOT_FOUND | with strict. |
UnsupportedError | RESOLVER_PROFILE_UNSUPPORTED | with strict when the resolver supports none of the records. |
GatewayError | GATEWAY_REQUEST_FAILED, GATEWAY_RESPONSE_INVALID, OFFCHAIN_LOOKUP_INVALID | an off-chain gateway fails. |
DnsError | a DNS name's DNSSEC proof does not verify. | |
NetworkError | RPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITED | the RPC request fails. |
It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).
See How errors work.
Examples
const address = await ens.record.getAddress({ name: "nick.eth" })Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.record.getAddress({ name: "nick.eth" })"0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5"See also
record.getto read several records
Was this page helpful?