The Name Wrapper is a new contract for ENS that allows you to "wrap" any ENS name into a ERC-1155 NFT.
Without the Name Wrapper
Before the Name Wrapper, only .eth 2LDs (second-level domains, like ens.eth
) had ERC-721 NFTs associated with them, unless the owner created a separate custom contract.
With the Name Wrapper
Parent-Controlled Fuses:
Example: By burning CAN_EXTEND_EXPIRY, you allow the owner to extend/renew their own subname Owner-Controlled Fuses:
Example: By burning CANNOT_TRANSFER, the wrapped NFT can no longer be transferred or sold. Subname Fuses:
|
With this new contract, you can wrap:
Any .eth name or subname
โExamples:name.eth
,sub.name.eth
Any DNS name or subname
โExamples:name.com
,sub.name.com
Unwrapped .eth 2LDs have the concept of a separate Owner
(Registrant) and Manager
(Controller).
This changes after you wrap the name, because there is only a single account that serves as both the Owner
and Manager
for the wrapped name.
Wrapping and Unwrapping
When wrapping a .eth 2LD, you transfer the Owner (Registrant) of the ERC-721 NFT to the Name Wrapper contract.
The contract will then automatically take over the Manager (Controller) for the name as well.
You can do this by calling the wrapETH2LD
method. Or, you can directly transfer the ERC-721 NFT to the Name Wrapper contract. In return, the contract issues you an ERC-1155 NFT.
When wrapping any other ENS name, you transfer the Manager (Controller) of the name to the Name Wrapper contract. You can do this by calling the wrap
method. In return, the contract issues you an ERC-1155 NFT.
As the owner of the wrapped name, you can unwrap at any time by calling either unwrapETH2LD
or unwrap
. You can do this as long as the permission to unwrap has not been revoked.