⚠ Don't use the Name Wrapper if you can upgrade to ENSv2 instead.
The Name Wrapper is ENSv1 technology. ENSv2 roles are improved architecture with equal outcomes and more flexible features, so upgrading is the recommended path for every name. A name with Fuses burned may face limits when you upgrade it later, and burning cannot be undone. See Why can't I migrate my wrapped name or subname?
These steps are for the case where upgrading is not open to you and you need this particular name to issue subnames. Subnames under a wrapped name can be given away, sold, rented, or handed out as tickets. What separates those cases is which Fuses you burn on the subname and when. Find the use case closest to yours, then follow the steps.
Note: The Name wrapper contract is for advanced users. Burning fuses cannot be reversed. It's recomended to test in Sepolia before burning any fuses on mainnet.
Use cases
Give a subname away for good
Say you want a friend to have alice.yourname.eth, and to know that you can never take it back. Give up parent control and let them extend their own expiry, and the subname is theirs outright: you cannot revoke it, delete it, or edit its records. That is what makes it an "unruggable" name.
Burn: PARENT_CANNOT_CONTROL | CAN_EXTEND_EXPIRY
Sell or rent subnames
Say you own verypopularname.eth and plenty of people would like my.verypopularname.eth. You could create each one by hand and sell it as an NFT, but that does not scale. A subname registrar contract does: it handles registration and renewal, and buyers register for themselves. This is exactly how .eth names work, with the eth TLD delegating registration to the ETHRegistrarController contract.
Sell subnames outright by letting owners extend their own expiry. Rent them by withholding that and charging a fee through a renew method on your contract, so the lease ends unless they pay again.
Burn to sell: PARENT_CANNOT_CONTROL | CAN_EXTEND_EXPIRY
Burn to rent: PARENT_CANNOT_CONTROL
Two variations worth knowing. To stop buyers branching your namespace with names like buy.my.verypopularname.eth, add CANNOT_UNWRAP | CANNOT_CREATE_SUBDOMAIN. To stop a rental being resold or moved, add CANNOT_UNWRAP | CANNOT_TRANSFER.
Give subnames out to NFT or DAO holders
Say you own mycoolnft.eth, the name behind an NFT project you created, and you want every holder to have a subname like 6529.mycoolnft.eth. The simplest opening move is to bulk-create them and drop the wrapped subnames straight into holders' wallets, so nobody has to touch a contract or spend gas: you have done it for them.
Then decide how much control to let go of. If the current holder of your NFT should always be able to claim the matching subname, keep parent control, so the subname can be reassigned each time the NFT changes hands. Emancipate it instead and a holder could sell the NFT and keep the subname until its expiry.
Burn to keep it claimable: nothing
Burn to make it theirs: PARENT_CANNOT_CONTROL | CAN_EXTEND_EXPIRY
Keeping parent control leaves the perks open to you. There are 13 unreserved parent-controlled Fuses and 9 unreserved owner-controlled ones, and they mean whatever you decide: a tier, a role, access to something. Each carries its own expiry, so a perk can be time-boxed to a week if that suits you.
Issue subnames as tickets
Maybe you have mycoolevent.eth and want to issue tickets like 1.ticket.mycoolevent.eth. Keep parent control and burn custom Fuses to mark what tier a ticket is, or what it opens: the express lane, a VIP room, perhaps read by a smart door on the night. Upgrading someone's ticket burns another Fuse. Set the expiry to the day after the event and the tickets lapse by themselves.
Or let attendees keep theirs as a souvenir and a proof of attendance. Extend the expiry, emancipate the subname, and it stays with them. Make it soulbound if the ticket should never leave the wallet that turned up.
Burn for a ticket that lapses: custom parent-controlled Fuses only
Burn for a keepsake: PARENT_CANNOT_CONTROL | CAN_EXTEND_EXPIRY
Burn for a soulbound keepsake: add CANNOT_UNWRAP | CANNOT_TRANSFER
The process
Before you start
You need a wrapped parent name, ETH on Ethereum Mainnet for gas, and a rehearsal on a testnet such as Sepolia. Subnames carry no registration fee and no limit on how many you create.
Wrapping a .eth name burns PARENT_CANNOT_CONTROL on it for you, so a .eth name arrives ready to be locked. From the subname level down, nothing is automatic, and each burn is yours to make.
Prepare the parent name
Every use case starts here, once:
Wrap the parent name, if it is not wrapped already. Names registered in the ENS App are wrapped at registration.
Lock the parent name by burning
CANNOT_UNWRAPon it. Nothing can be burned on a subname until the parent is Locked.
The parent stays Locked from then on, however many subnames you issue. What follows depends on whether you are issuing subnames one at a time or having a contract issue them for you.
Issue a subname by hand
Suits a giveaway, or a handful of names you create yourself:
Create the subname. Anything created under a wrapped parent is wrapped too.
Set the subname's expiry, up to the parent name's own expiry date. Any burn needs an expiry.
Burn your use case's whole set of Fuses in one transaction.
PARENT_CANNOT_CONTROLends your ability to burn anything else on that subname, soCAN_EXTEND_EXPIRYand any custom parent-controlled Fuses go in the same call or never.Send the subname to its recipient. Do this last: until you do, the subname is still yours.
Repeat for each further subname.
Issue subnames by contract
Suits a drop to holders, a registrar that sells or rents, or a run of tickets:
Approve your contract as an operator on the Name Wrapper with
setApprovalForAll, so it can create subnames on your behalf.Have the contract call setSubnodeOwner or setSubnodeRecord, passing the owner, your use case's Fuses, and the expiry. Creating, burning and assigning happen in that one call, so there is no separate send.
Optional: to keep renewals possible whatever you do later, approve the contract as the subname renewal manager, then burn
CANNOT_APPROVEon your name to fix that approval in place. Burning first locks the approval out instead. See Name Wrapper: approved operators.
What the contract does around that call is yours to design. A registrar exposes register, and renew for rentals, and can carry its own fees and rules: an allowlist, a minimum length, characters restricted to [a-z0-9], or a price that varies by name. A claim contract instead reads the current owner of an NFT, compares that with the subname's owner, and reassigns the subname if the two differ. Build the same logic into an NFT contract you write, and the subname moves with the NFT on every transfer.
Common questions
Why must the parent name be Locked first?
The parent has to be Locked so that its owner cannot escape the arrangement. An unlocked parent could be unwrapped, and its owner could then replace or delete subnames directly against the ENS Registry, undoing whatever the Name Wrapper was protecting.
Locking always takes the same pair, in order: parent control is given up first, then the name is locked. A .eth name gets the first half free at wrapping, which is why the chain stops there. Every level below it you do yourself, so a subname that will issue its own subnames with Fuses has to be emancipated and locked in its turn.
What happens when a subname expires?
Every burned Fuse resets at the expiry, and the parent regains full control, so the subname can be deleted or reassigned. For a subname there is no grace period, so the expiry date is the moment it happens. Where owners should keep their names for good, burn CAN_EXTEND_EXPIRY so they can extend for themselves.
Can a burned Fuse be undone?
A burned Fuse cannot be undone while the name is live; it resets only at the expiry. That is why it is worth rehearsing a lock on a testnet such as Sepolia before doing it on Ethereum Mainnet.
Can someone keep a subname after selling the NFT it came with?
Yes, if you burned PARENT_CANNOT_CONTROL on it: the seller keeps the subname until its expiry, whatever happens to the NFT. To tie the subname to the NFT instead, leave that Fuse unburned so a claim contract can reassign it whenever the NFT changes hands.
