Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Resolver Contract

A Resolver Contract is a smart contract that dynamically resolves a request, such as a name or identifier, into a specific resource, like a Token URI or an address.
Chainscore © 2026
definition
BLOCKCHAIN INFRASTRUCTURE

What is a Resolver Contract?

A resolver contract is a smart contract that maps human-readable names to machine-readable addresses or data on a blockchain, acting as the core lookup mechanism for decentralized naming systems.

A resolver contract is a specialized smart contract that functions as the dynamic, programmable directory for a blockchain naming system, such as the Ethereum Name Service (ENS). Its primary role is to resolve a human-readable domain name (e.g., alice.eth) into the associated on-chain resource, which is typically a cryptocurrency address (like 0x...), but can also be content hashes, text records, or other metadata. Unlike a traditional DNS server, a resolver's logic and data are stored entirely on the blockchain, making it decentralized, tamper-resistant, and verifiable by anyone.

The resolver's architecture separates the name registration from the data lookup. The core registry contract (e.g., the ENS Registry) stores only the owner of a name and a pointer to the resolver contract responsible for it. When a user or application wants to resolve alice.eth, it queries the registry to find the designated resolver address, then calls a specific function on that resolver contract—like addr() for an Ethereum address—to retrieve the actual data. This design allows for flexibility and upgradability, as the data linked to a name can be changed by its owner without affecting the name's registration.

Resolver contracts are not monolithic; they often implement standardized interfaces. For ENS, the most common is the EIP-137 Resolver interface, which defines functions such as addr(bytes32 node), setAddr(bytes32 node, address a), and text(bytes32 node, string key). This standardization ensures interoperability across wallets, dApps, and browsers. A single name can even point to multiple resolvers for different record types, or use a Public Resolver—a canonical, audited contract provided by the naming service for common use cases.

Beyond simple address resolution, advanced resolver logic enables powerful features. Multi-chain resolution allows a single .eth name to hold different addresses for various blockchains (e.g., Bitcoin, Litecoin). Programmable resolvers can execute custom logic, such as dynamically routing payments to a smart contract wallet or returning different data based on the caller's context. This transforms a static name into an interactive endpoint for decentralized applications.

The security of a resolver contract is paramount, as it controls the critical mapping for a valuable asset. Owners must manage the private keys that authorize updates. Using a well-audited public resolver mitigates risk, while custom resolvers require rigorous security audits. Ultimately, resolver contracts are the essential abstraction layer that makes blockchain addresses user-friendly, paving the way for mainstream adoption by replacing complex hexadecimal strings with memorable names.

how-it-works
BLOCKCHAIN INFRASTRUCTURE

How a Resolver Contract Works

A resolver contract is a core smart contract that maps human-readable names to machine-readable data, acting as the lookup directory for decentralized naming systems like the Ethereum Name Service (ENS).

A resolver contract is a specialized smart contract that provides the logic for retrieving and updating records associated with a name or identifier on a blockchain. It acts as the dynamic, programmable layer of a naming system, separating the permanent ownership of a name (stored in a registry) from its mutable data. When a user or application queries a name like alice.eth, the system first consults the ENS Registry to find the owner and the address of the assigned resolver contract, then queries that specific resolver for the requested record, such as an Ethereum address, an IPFS hash, or an avatar URL.

The core function of a resolver is defined by a standard interface, such as the EIP-137 resolver standard for ENS. This interface includes critical methods like addr() for cryptocurrency addresses, text() for arbitrary text records, and contenthash() for decentralized website content. By adhering to a standard, resolver contracts ensure interoperability across wallets, browsers, and dApps. Resolvers are upgradeable by their owner, allowing records to be changed—for example, updating a wallet address or adding new social profile links—without affecting the underlying name ownership.

Resolver contracts enable a rich ecosystem of decentralized data. Beyond simple address lookups, they can store and serve complex data types, including - multi-chain addresses (for Bitcoin, Litecoin, etc. via addr(bytes32 node, uint coinType)), - ABI specifications for smart contracts, - delegated subdomain management permissions, and - gasless record updates via signed off-chain data (EIP-3668). Public resolver contracts, often deployed and managed by the naming service itself, are commonly used, but advanced users can deploy custom resolvers with bespoke logic for specific applications.

The security and design of the resolver are paramount, as it is the final authority for a name's data. A compromised or poorly implemented resolver can lead to incorrect data being returned, potentially redirecting funds or traffic maliciously. Therefore, the resolver contract address is a critical piece of metadata for any blockchain name. This architecture—separating registry, resolver, and records—creates a flexible and powerful system where names can become verifiable, user-controlled hubs for all types of on-chain and off-chain information.

key-features
ARCHITECTURE

Key Features of Resolver Contracts

Resolver contracts are modular, on-chain directories that map human-readable names to machine-readable data, forming a critical layer in decentralized naming systems like ENS and Unstoppable Domains.

01

Decentralized Record Management

A resolver's core function is to store and serve resource records for a domain name. Unlike centralized DNS, these records are stored on-chain (e.g., Ethereum, Polygon) and are controlled by the domain owner's private key. Key record types include:

  • Crypto Addresses: ETH, BTC, SOL addresses.
  • Content Hashes: IPFS, Swarm, or Arweave pointers for decentralized websites.
  • Text Records: Metadata like email, website URL, or social handles.
02

Owner-Controlled Updatability

The domain owner has exclusive, permissionless control to update the records pointed to by their resolver. This is executed by calling functions like setAddr(), setText(), or setContenthash() directly on the resolver contract. This model ensures self-sovereign identity, where users, not corporations, manage their digital assets and profiles.

03

Standardized Interfaces (EIPs)

Interoperability is achieved through standardized Ethereum Improvement Proposals. The primary standard is EIP-137 (ERC-137) for the core resolver interface. Key related standards include:

  • EIP-2304: For multichain address resolution (e.g., setAddr(bytes32 node, uint coinType, bytes memory a)).
  • EIP-634: For storing text metadata.
  • EIP-1577: For content hash storage. These standards allow wallets, browsers, and dApps to reliably query any compliant resolver.
04

Public Permissionless Querying

Anyone can read resolver data by calling its public view functions (e.g., addr(), text()) without a transaction or fee. This enables trustless resolution where applications like MetaMask or a decentralized website frontend can fetch the necessary data directly from the blockchain, verifying its authenticity on-chain.

05

Resolver Upgradability & Migration

A domain's resolver address is a pointer that can be changed by the owner. This allows for:

  • Upgrading to New Features: Migrating to a resolver with support for newer standards.
  • Custom Logic: Pointing to a personal, bespoke resolver contract.
  • Fallback Handling: Setting a public resolver (like ENS's PublicResolver) as a default, reliable option. The separation of the registry (which maps name to resolver) and the resolver itself is a key architectural pattern.
06

Gas Optimization & Caching

To minimize transaction costs for record updates, resolvers employ optimization strategies:

  • Batched Updates: Functions like multicall() allow setting multiple records in one transaction.
  • Reverse Resolution: EIP-181 allows a wallet to declare its primary name via a dedicated resolver, reducing the need for exhaustive chain scans.
  • Layer 2 Deployment: Resolvers are commonly deployed on L2s (e.g., Polygon, Arbitrum) for the associated domain names, drastically reducing gas fees for management.
ecosystem-usage
RESOLVER CONTRACT

Ecosystem Usage & Protocols

A resolver contract is a smart contract that acts as a dynamic, on-chain directory, mapping human-readable names or identifiers to their underlying blockchain resources, such as wallet addresses, content hashes, or metadata. It is a core component of naming services and decentralized identity systems.

01

Core Function: Address Resolution

The primary function is to resolve a domain name (e.g., alice.eth) to its associated blockchain address (e.g., 0x...). This provides a user-friendly abstraction layer, allowing users to send funds to alice.eth instead of a long hexadecimal string. The contract stores and updates this mapping on-chain, making it a verifiable source of truth.

02

Architecture & Standards

Resolver contracts follow specific interface standards to ensure interoperability. The most common is EIP-137 (ENS Resolver) for the Ethereum Name Service, which defines functions like addr(bytes32 node) and setAddr(bytes32 node, address a). Other standards include EIP-2304 (Multicoin Address Resolution) for supporting multiple blockchains from a single name.

03

Beyond Addresses: Record Types

Modern resolvers store diverse record types, transforming them into decentralized directories. Common records include:

  • Content Hash (IPFS/Swarm): Points to decentralized website content.
  • Text Records: Stores metadata like email, website URL, or Discord handle.
  • ABI Records: Stores contract interface definitions for dApp interaction.
  • Multi-chain Addresses: Links to addresses on Bitcoin, Solana, or other chains.
04

Ownership & Updatability

Resolver contracts are updatable by the owner of the associated domain name (recorded in a separate registry contract). This allows users to change the underlying resource (e.g., update their wallet address) without changing their public-facing name. The resolver's logic can also be upgraded or replaced by the domain owner, enabling new functionality.

05

Decentralized Websites & dApps

Resolver contracts enable decentralized web hosting. By setting a contenthash record to an IPFS or Arweave hash, the resolver directs browsers to the immutable, hosted files. dApps like Uniswap and Aave use ENS resolvers to host their front-ends in a censorship-resistant manner, decoupling the application logic from its user interface hosting.

06

Cross-Chain & Layer 2 Integration

Resolvers are critical for cross-chain identity. An ENS name can resolve to different addresses on Ethereum Mainnet, Optimism, and Polygon via the same resolver. Layer 2 protocols often deploy their own resolver contracts or extend existing ones to provide fast, cheap resolution for their native ecosystems while maintaining a unified namespace.

technical-details
TECHNICAL DETAILS & STANDARDS

Resolver Contract

A resolver contract is a core component of decentralized naming systems, acting as the dynamic link between a human-readable name and its underlying blockchain data.

A resolver contract is a smart contract that maps a human-readable name, like alice.eth, to its associated on-chain resources, such as cryptocurrency addresses, content hashes, or metadata. It is the programmable, dynamic component of a naming system like the Ethereum Name Service (ENS), separate from the registry that simply records ownership. When an application needs to resolve a name, it queries the registry for the owner and the designated resolver address, then calls that resolver's resolve function to retrieve the specific record.

The contract's primary function is to implement a standard interface, such as ENS's EIP-137 resolver specification. This interface defines methods like addr() for Ethereum addresses, contenthash() for IPFS or Swarm content, and text() for arbitrary metadata like avatars or descriptions. By separating the registry and resolver logic, the system allows for upgradability; a name owner can point their name to a new resolver contract without changing the registry, enabling new record types and functionalities over time.

Resolver contracts manage record multicoin support, allowing a single name to be associated with addresses for multiple blockchains (e.g., Bitcoin, Litecoin) via the addr(bytes32 node, uint coinType) function. They also handle permissions, where only the name's owner or approved controllers can update the records stored within the resolver. This design is critical for decentralization, as the mapping logic is executed trustlessly on the blockchain, removing reliance on a central server for DNS-like resolution.

Developers interact with resolvers using libraries like ethers.js or web3.js, which provide abstraction methods for resolution. A common implementation is the Public Resolver, a canonical, audited contract offered by ENS that most users delegate to. However, advanced users or projects can deploy custom resolvers for complex logic, such as dynamically generating addresses based on time or implementing access-control rules, showcasing the contract's flexibility as a programmable database for Web3 identity.

examples
RESOLVER CONTRACT

Primary Use Cases & Examples

A resolver contract is a smart contract that provides a programmable interface for resolving off-chain data requests, enabling decentralized applications to fetch and verify external information. These are the most common patterns for their implementation.

06

NFT Metadata Resolution

Many NFT projects use resolver contracts to enable dynamic or updatable metadata. Instead of a static URI in the NFT contract, the tokenURI function calls a resolver that can:

  • Compute metadata based on on-chain state (e.g., game character stats).
  • Redirect to a new metadata server without changing the core NFT contract.
  • Reveal metadata after a certain event or date. This separates the immutable token from its mutable attributes.
ERC-721
Standard Interface
security-considerations
RESOLVER CONTRACT

Security Considerations

A resolver contract is a critical on-chain component that maps human-readable names to machine-readable data, such as wallet addresses. Its security is paramount as it acts as a single point of failure for routing assets and data.

04

Denial-of-Service (DoS) Vectors

Poorly designed resolvers can be exploited to cause denial-of-service. Examples include:

  • Gas exhaustion: Loops over unbounded arrays of records.
  • Block gas limit: Setting a record that makes future interactions prohibitively expensive.
  • Owner griefing: A malicious previous owner could set the resolver address to a contract that always reverts, locking the name.
05

Input Validation & Sanitization

Failing to validate inputs is a common vulnerability. Resolvers must:

  • Validate address formats to prevent setting the zero address.
  • Encode/escape text records properly to avoid breaking front-ends or causing injection issues.
  • Check authorization meticulously for every state-changing function, ensuring only the rightful name owner or approved delegate can make changes.
RESOLVER CONTRACT

Frequently Asked Questions (FAQ)

Common questions about the critical on-chain component that maps human-readable names to machine-readable addresses and data.

A Resolver Contract is a smart contract that provides the logic for translating a human-readable name, like an ENS domain, into the associated on-chain data, such as a wallet address, content hash, or other records. It acts as the dynamic, programmable directory for naming systems, allowing users to update their records without changing the underlying domain ownership. Unlike the core registry contract that simply maps a name to an owner, the resolver holds the actual resource information, making it a fundamental component of decentralized identity and resource discovery.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team