You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/web/subdomains.mdx
+21-31
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ contributors: [
11
11
12
12
# Subdomains
13
13
14
-
Names come in handy in many situations. We believe that any place an address is used, a name should be able to be used instead.
14
+
We believe that any place an address is used, a name should be able to be used instead.
15
15
The smart contracts you interact with have names, the deposit address for your favorite exchange has a name, your favorite DAO has a name, or maybe you use subnames to keep your wallets organized.
@@ -33,48 +33,38 @@ Luckily, the ENS Protocol has so much to offer for you to play with. There are a
33
33
34
34
If you are interested in naming smart-contracts specifically, check out the [Naming Smart Contracts](/web/naming-contracts) page.
35
35
36
-
## Pre-built Tooling
36
+
## Different Types of Subnames
37
37
38
-
### Durin (new!)
38
+
ENS subnames come in a variety of forms: L1, L2, and offchain. From a technical perspective, L2 and offchain subnames are quite similar, but there are some tradeoffs to consider when choosing which one to use.
39
39
40
-
[Durin](https://durin.dev/) is an opinionated approach to issuing ENS subnames on L2. It takes care of the L1 Resolver and offchain gateway parts of the [CCIP Read stack](/resolvers/ccip-read) for you, so you can focus on the business logic of your L2 smart contracts.
40
+
### L1 Subnames
41
41
42
-
### NameWrapper
42
+
If you own a .eth name like nick.eth and go to create a subname in [the manager app](https://app.ens.domains/nick.eth?tab=subnames), you will be creating a subname on Ethereum Mainnet (L1) by default. This is the simplest way to create a subname with the least amount of moving pieces, but ultimately you are limited by the gas fees of Ethereum Mainnet.
43
43
44
-
The [NameWrapper](/wrapper/overview) is a smart contract that allows you to issue trustless on-chain subdomains.
45
-
NameWrapper subdomains come in the form of [ERC1155](https://eips.ethereum.org/EIPS/eip-1155) NFTs, which can be transferred, sold, or traded. Read our guide to [creating an onchain subname registrar](/wrapper/creating-subname-registrar) to learn more.
44
+
If you'd like to issue L1 subnames to your users, read our guide on [creating an onchain subname registrar](/wrapper/creating-subname-registrar).
46
45
47
46
<EmbedLink
48
-
title="NameWrapper Overview"
49
-
href="/wrapper/overview"
50
-
description=""
47
+
title="Creating an Onchain Subname Registrar"
48
+
href="/wrapper/creating-subname-registrar"
49
+
description="Issue NFTs that represent subdomains on Ethereum Mainnet."
51
50
/>
52
51
53
-
### Legacy Subdomains
54
-
55
-
In the previous version of the ETHRegistrar, you could register subdomains for a name. These subdomains are always owner-controlled, and can be transferred. They are also stored on-chain, but are not in the form of a standard NFT.
56
-
57
-
You can register a legacy subdomain by calling the `setSubnodeRecord` function on the [ENS Registry](/registry/ens) contract.
58
-
59
-
## Writing your own Resolver
60
-
61
-
You can always opt to [write your own resolver](/resolvers/writing) in solidity, doing so will give you absolute programmatic control over how resolution for your name and its subnames will behave.
62
-
Requires deploying a smart contract.
52
+
### L2 Subnames
63
53
64
-
### Offchain & Layer 2
54
+
Developers can connect an ENS name on L1 with their own smart contracts on any L2 network, and [depending on the implementation](/learn/ccip-read), this could be fully trustless while significantly reducing the cost of issuing subnames.
65
55
66
-
To load data from an off-chain location, such as layer 2, database, or file.
67
-
A resolver can leverage [CCIP Read](/resolvers/ccip-read) to load data from an off-chain location.
68
-
69
-
Tooling has been built to allow you to easily deploy a template resolver, or leverage a library to load data from offchain.
56
+
[Durin](https://durin.dev/) is an opinionated approach to issuing ENS subnames on L2. It takes care of the L1 Resolver and offchain gateway parts of the [CCIP Read stack](/resolvers/ccip-read) for you, so you can focus on the business logic of your L2 smart contracts.
70
57
71
-
#### Unruggable Gateway
58
+
<EmbedLink
59
+
title="Durin"
60
+
href="https://durin.dev/"
61
+
description="An opinionated approach to issuing ENS subnames on L2."
62
+
/>
72
63
73
-
The [Unruggable Gateway](https://gateway-docs.unruggable.com/) is a set of solidity tooling that allows you to write a resolver that can trustlessly load storage slots from an EVM-compatible chain.
64
+
### Offchain Subnames
74
65
75
-
#### CCIP Tools
66
+
Offchain subnames are exactly what they sound like - subnames that live in a centralized database on private servers, also powered by [CCIP Read](/resolvers/ccip-read). If your goal is to name a large amount of EVM addresses quickly and cheaply, with a low barrier to entry, offchain subnames might be for you. Often times, managing offchain names is as simple as interacting with a REST API.
76
67
77
-
If you are looking to skip writing & deploying a contract to mainnet you can use [ccip.tools](https://ccip.tools)'s proxy factory.
78
-
This allows you to easily, and at low deployment cost deploy a resolver that can load data from a CCIP endpoint.
68
+
From a user perspective, offchain subnames are hardly different than onchain subnames. They will not appear in wallet applications as NFTs like the previous two approaches, but they can resolve all the same data (addresses, text records, etc).
79
69
80
-
This allows you to easily deploy a resolver that can load from your [Gateway API](/resolvers/ccip-read) without having to write any solidity code.
70
+
There are multiple API providers that offer programmatic access to offchain subnames such as [NameStone](https://namestone.com/) and [Namespace](https://namespace.ninja/), along with open-source examples like [gskril/ens-offchain-registrar](https://github.com/gskril/ens-offchain-registrar).
0 commit comments