Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeSDK

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.

ReadBatchablestable
Since v1.0.0View source

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

  • coin is 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 null when the record is not set, unless strict is 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

OptionTypeDefaultDescription
name (required)stringENS name to read. Normalized automatically.
coinCoinType.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

ErrorCodesWhen
InvalidInputErrorINVALID_NAME, INVALID_COIN_TYPEinvalid input.
NotFoundErrorRECORD_NOT_FOUND, RESOLVER_NOT_FOUNDwith strict.
UnsupportedErrorRESOLVER_PROFILE_UNSUPPORTEDwith strict when the resolver supports none of the records.
GatewayErrorGATEWAY_REQUEST_FAILED, GATEWAY_RESPONSE_INVALID, OFFCHAIN_LOOKUP_INVALIDan off-chain gateway fails.
DnsErrora DNS name's DNSSEC proof does not verify.
NetworkErrorRPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITEDthe RPC request fails.

It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).

See How errors work.

Examples

Resolving an Ethereum address
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

Was this page helpful?