📖
Pulse Domains
  • 👋Introduction
  • đŸŸĸRegistration FAQ
  • 📒Terminology
  • Guides
    • đŸĒ„Domain Registration
    • đŸ§â€â™€ī¸Updating Your Profile
    • đŸĨˇPreserving Your Privacy
    • đŸ‘ĨCreating Subdomains
    • đŸ›Šī¸Domain Transfer
    • 🤝DNS Domain Setup
    • 🍭Brand Guidelines
    • 💸Referrals
    • 📜Whitelist & Claims
    • 🌟Registration Widget
    • đŸĒ…CCIP & PNS
    • đŸĒ…Name Renewal
  • Deep Dives
    • đŸŦName Wrapper
      • đŸ”ĨFuses
      • âŗExpiry
      • ✅Approved Operators
    • 👨‍🔧Managing a Name
    • 🔤Homoglyphs
  • pls.fyi Profile
    • ✨Your Web3 Profile
  • PLS.TO dWeb
    • đŸĒInterPlanetary FileSystem (IPFS)
    • 🌐Your Decentralized Website
    • đŸ’ģIPFS & PLS.TO Guide
  • Partner Sites
    • 📈PulseCoinList.com
    • 💱PulseSwap.io: The Aggregator of Aggregators
      • 📈 Integration for Developers and Projects
  • Dapp Developer Guide
    • đŸ› ī¸Getting Started
      • PNS Enabling your DApp
      • PNS Libraries
      • Working with PNS
      • Resolving Names
      • Managing Names
      • Registering & Renewing Names
      • PNS Front-End Design Guidelines
      • PNS as NFT
      • PNS Data guide
    • 🐛Bug Bounty Program & Audit
  • âš™ī¸Contract Api Reference
    • 📜Deployed Contracts
    • Name Processing
    • Registry
    • ReverseRegistrar
    • TestRegistrar
    • PublicResolver
    • .pls Permanent Registrar
      • Registrar
      • Controller
    • DNS Registrar
    • Name Wrapper
      • Expiry
      • Fuses
      • Wrapped States
    • Subgraph
      • Entities
      • Queries
  • 📙Contract Developer Guide
    • Resolving Names On-chain
    • Writing a Resolver
    • Writing a Registrar
  • đŸĻ¸â€â™‚ī¸Community
    • Community Dev Resources
  • Links
    • đŸ•šī¸PNS App
    • đŸĻTwitter
    • âœˆī¸Telegram
    • 💡PNS Name Ideas (Community Site)
Powered by GitBook
On this page
  • Deployed ReverseRegistrar addresses
  • Claim Address
  • Claim Address with Resolver
  • Set Name
  • Get Reverse Record Node
  • Get Default Resolver

Was this helpful?

  1. Contract Api Reference

ReverseRegistrar

PreviousRegistryNextTestRegistrar

Last updated 1 year ago

Was this helpful?

Reverse resolution in PNS - the process of mapping from an PulseChain address (eg, 0x1234...) to an PNS name - is handled using a special namespace, .addr.reverse. A special-purpose registrar controls this namespace and allocates subdomains to any caller based on their address.

For example, the account 0x314159265dd8dbb310642f98f50c066173c1259b can claim 314159265dd8dbb310642f98f50c066173c1259b.addr.reverse. After doing so, it can configure a resolver and expose metadata, such as a canonical PNS name for this address.

The reverse registrar provides functions to claim a reverse record, as well as a convenience function to configure the record as it's most commonly used, as a way of specifying a canonical name for an address.

The reverse registrar is specified in .

Deployed ReverseRegistrar addresses

  • Mainnet: 0x9E0406b8a7831B6056A52938B103e48D7E5A9F69.

  • Testnet (v4):0xa27651bf209555A77F9F0Ab1d70415cC1EAdCc4D.

Claim Address

function claim(address owner) public returns (bytes32);

Claims the caller's address in the reverse registrar, assigning ownership of the reverse record to owner. Equivalent to calling claimWithResolver(owner, 0).

Claim Address with Resolver

function claimWithResolver(address owner, address resolver) public returns (bytes32)

Claims the caller's address in the reverse registrar, assigning ownership of the reverse record to owner. If resolver is nonzero, also updates the record's resolver.

After calling this function:

  • The reverse record for the caller (1234....addr.reverse) is owned by owner.

  • If resolver is nonzero, the reverse record for the caller has its resolver set to resolver; otherwise it is left unchanged.

Set Name

function setName(string memory name) public returns (bytes32)

Configures the caller's reverse PNS record to point to the provided name.

This convenience function streamlines the process of setting up a reverse record for the common case where a user only wants to configure a reverse name and nothing else. It performs the following steps:

  1. Sets the reverse record for the caller to be owned by the ReverseRegistrar.

  2. Sets the reverse record for the caller to have defaultResolver as its resolver.

  3. Sets the name() field in the defaultResolver for the caller's reverse record to name.

In short, after calling this, a user has a fully configured reverse record claiming the provided name as that account's canonical name.

Users wanting more flexibility will need to use claim or claimWithResolver and configure records manually on their chosen resolver contract.

Get Reverse Record Node

function node(address addr) public pure returns (bytes32)

Accepts an address, and returns the node (namehash output) for the address's reverse record. This function is provided as a convenience for contracts wishing to look up metadata for an address, and avoids the need for those contracts to handle the hex encoding and hashing necessary to derive the required value.

Get Default Resolver

Resolver public defaultResolver;

Returns the address of the resolver contract that the ReverseRegistrar uses for setName.

âš™ī¸
Source
EIP 181