resolveL2Name

Resolves the L2 name for a specified address.

Example

import { resolveL2Name } from "thirdweb/extensions/ens";
const name = await resolveL2Name({
client,
address: "0x1234...",
resolverAddress: "0x...",
resolverChain: base,
});

Resolve a Basename.

import {
resolveL2Name,
BASENAME_RESOLVER_ADDRESS,
} from "thirdweb/extensions/ens";
import { base } from "thirdweb/chains";
const name = await resolveL2Name({
client,
address: "0x1234...",
resolverAddress: BASENAME_RESOLVER_ADDRESS,
resolverChain: base,
});
function resolveL2Name(
): Promise<null | string>;

Parameters

The options for resolving an L2 ENS address.

Type

let options: {
address: Address;
client: ThirdwebClient;
resolverAddress: string;
resolverChain: Chain;
};

Returns

let returnType: Promise<null | string>;

A promise that resolves to the Ethereum address.