βœ…Approved Operators

What are Approved Operators in PNS?

In PNS, approved operators are like trusted friends you give special permissions to help manage your .pls domain names.

Two Types of Operator Approvals

  1. Full-Control Operator Batch Approvals:

    • Think of this like giving a friend a master key to all your domains.

    • When you use a special method (setApprovalForAll), you're telling the PNS system, "Hey, this friend can take care of all my .pls domains."

    • This is usually used by big NFT marketplaces to help manage lots of domains at once.

  2. Name-Specific Subname Renewal Manager Approvals:

    • This is like giving a friend a key to just one specific room in your house.

    • You use a different method (ERC-721 approve) to choose a "Subname Renewal Manager" for just one of your domains.

    • This manager can't do everything - they can only help extend the expiry date of subdomains under that one domain.

    • If you decide you always want this friend to manage renewals, you can "lock" this choice. Once locked, you can't change this manager.

What Happens When You Change Things?

  • If you decide to unwrap (remove the NFT wrapping) your domain, or if it expires and someone re-registers it, the approval for the renewal manager resets.

  • If you transfer your domain to someone else, the renewal manager stays the same only if you've locked the choice. Otherwise, it resets too.

Example: Setting Up a Subname Registrar Contract

  • Imagine you want to let people register their own subdomains under your domain. You can set up a special contract (like a program) to do this for you.

  • First, you give this program full control over your domain so it can create subdomains.

  • Then, you can also set it up to manage renewals by making it a renewal manager and locking this choice.

  • You can always take back the full control if you need to, but the renewal part will stay with the program forever.

What This Means for You

  • You don't have to give your domain to someone else to manage these things. You just give them special permissions.

  • This helps you manage your domains more easily and make sure they keep working the way you want.

Last updated