Skip to content

Commit cbfdba1

Browse files
authored
Miscellaneous Fixes: 15, 21, 22, 23 (ensdomains#46)
1 parent 976e781 commit cbfdba1

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

ensips/15.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ensip:
88
ignoredRules: ["heading:description-of-", "heading:derivation", "heading:appendix:-reference-specifications", "heading:appendix:-additional-resources", "heading:appendix:-validation-tests", "heading:annex:-beautification"]
99
---
1010

11-
# ENSIP-15: ENS Name Normalization Standard
11+
# ENSIP-15: Name Normalization
1212

1313
## Abstract
1414

ensips/21.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Batch Gateway Protocol
2+
description: Batch Gateway Offchain Lookup Protocol.
33
contributors:
44
- raffy.eth
55
- nick.eth

ensips/22.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ensip:
77
status: draft
88
---
99

10-
# ENSIP-X: ENS Contract Features
10+
# ENSIP-22: Contract Features
1111

1212
## Abstract
1313

@@ -32,7 +32,7 @@ Any resolver that supports features must adhere to the following criteria:
3232

3333
Therefore, when resolution calldata is not a `multicall`, the resolver may be invoked directly without [batch gateway](./21) infrastructure.
3434

35-
### <a name="eth.ens.resolver.extended.multicall">eth.ens.resolver.extended.multicall &mdash; `0x96b62db8`</a>
35+
### eth.ens.resolver.extended.multicall &mdash; `0x96b62db8`
3636

3737
If a resolver is an [`IExtendedResolver`](./10) and supports this feature, `resolve(name, data)` must handle `multicall(bytes[])` as expected.
3838

ensips/23.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: An universal entrypoint for resolving ENS names.
2+
description: Universal entrypoint for resolving ENS names.
33
contributors:
44
- taytems.eth
55
- raffy.eth
@@ -8,17 +8,17 @@ ensip:
88
status: draft
99
---
1010

11-
# ENSIP-X: Universal Resolver
11+
# ENSIP-23: Universal Resolver
1212

1313
## Abstract
1414

15-
This ENSIP standardizes [IUniversalResolver](#specification) (UR), an universal entrypoint for resolving ENS names. UR incorporates onchain algorithms for [ENSIP-10](./10#pseudocode), [ENSIP-19](./19#algorithm), [ENSIP-21](./21), and [ENSIP-22](./22) to reduce ENS integration complexities.
15+
This ENSIP standardizes [IUniversalResolver](#specification) (UR), an universal entrypoint for resolving ENS names. UR incorporates onchain algorithms for [ENSIP-1: ENS](./1), [ENSIP-10: Wildcard Resolution](./10), [ENSIP-19: Multichain Primary Names](./19), [ENSIP-21: Batch Gateway](./21), and [ENSIP-22: Contract Features](./22) to reduce integration complexities.
1616

1717
## Motivation
1818

1919
The process of resolving ENS names requires multiple onchain calls and in-depth knowledge of the [latest standards](/).
2020

21-
Resolution has become more complex over time, especially with the introduction of [wildcard resolution](./10) and [multichain primary names](./19). ENSv2 will also introduce a new registry design and many other improvements.
21+
Resolution has become more complex over time, especially with the introduction of wildcard resolution and multichain primary names. [ENSv2](https://ens.domains/ensv2) will also introduce a new registry design and many other improvements.
2222

2323
Maintaining these changes across multiple client frameworks demands significant development effort. The growth and evolution of the ENS protocol should not be constrained by the pace of client deployments or hindered by outdated libraries.
2424

@@ -104,11 +104,11 @@ interface IUniversalResolver {
104104

105105
### findResolver
106106

107-
This function performs onchain [ENSIP-1 § Registry](./#registry-specification) traversal of a DNS-encoded `name`. It returns the first non-null `resolver` address, the namehash of `name` as `node`, and the `resolverOffset` into `name` that corresponds to the resolver. If no resolver is found, `resolver` is null.
107+
This function performs onchain [registry traversal](./#registry-specification) of a DNS-encoded `name`. It returns the first non-null `resolver` address, the namehash of `name` as `node`, and the `resolverOffset` into `name` that corresponds to the resolver. If no resolver is found, `resolver` is null.
108108

109109
`findResolver()` does not perform any validity checks on the resolver and simply returns the value in the registry. The resolver may not be a contract or a resolver.
110110

111-
#### <a name="resolve-example">Pseudocode Example</a>
111+
#### Pseudocode Example
112112

113113
```js
114114
name = dnsEncode("sub.nick.eth") = "\x03sub\x04nick\x03eth\x00"
@@ -126,18 +126,18 @@ findResolver(name)
126126

127127
### resolve
128128

129-
This function performs ENS forward resolution using the `resolver` found by [`findResolver()`](#findresolver). It provides a standard interface for interacting [ENSIP-1](./1) and [ENSIP-10](./10) resolvers for onchain and offchain resolution. Provided a DNS-encoded `name` and ABI-encoded `data`, it returns the ABI-encoded resolver `result` and the valid `resolver` address.
129+
This function performs forward resolution using the `resolver` found by [`findResolver()`](#findresolver). It provides a standard interface for interacting [ENSIP-1](./1) and [ENSIP-10](./10) resolvers for onchain and offchain resolution. Provided a DNS-encoded `name` and ABI-encoded `data`, it returns the ABI-encoded resolver `result` and the valid `resolver` address.
130130

131-
UR automatically handles wrapping calldata and unwrapping responses when interacting with an [`IExtendedResolver`](./10#pseudocode) and safely interacts with contracts deployed before [EIP-140](https://eips.ethereum.org/EIPS/eip-140).
131+
UR automatically handles wrapping calldata and unwrapping responses when interacting with an [`IExtendedResolver`](./10#pseudocode) and safely interacts with contracts deployed before [EIP-140: REVERT Instruction](https://eips.ethereum.org/EIPS/eip-140).
132132

133-
##### <a name="resolve-resolution-errors">Resolution Errors</a>
133+
##### Resolution Errors
134134

135135
* If no resolver was found, reverts `ResolverNotFound`.
136136
* If the resolver was not a contract, reverts `ResolverNotContract`.
137137
* If [EIP-3668](https://eips.ethereum.org/EIPS/eip-3668) (CCIP-Read) was required and it was not handled by the client, reverts `OffchainLookup`.
138138
* If CCIP-Read was handled but the `OffchainLookup` failed, reverts `HTTPError`.
139139

140-
##### <a name="resolve-resolver-errors">Resolver Errors</a>
140+
##### Resolver Errors
141141

142142
* If the called function was not implemented, reverts `UnsupportedResolverProfile`.
143143
* If the called function reverted, reverts `ResolverError`.
@@ -146,7 +146,7 @@ UR automatically handles wrapping calldata and unwrapping responses when interac
146146

147147
Traditionally, resolvers have been written to answer direct profile requests, eg. `addr()` returns one address. To perform multiple requests, the caller must perform multiple independent requests (in sequence, parallel, or via batched RPC) or utilize an [external multicall contract](https://www.multicall3.com/) which does not support CCIP-Read.
148148

149-
UR supports multicall with CCIP-Read and [`eth.ens.resolver.extended.multicall`](./22) feature. To perform multiple calls:
149+
UR supports multicall with CCIP-Read and [`eth.ens.resolver.extended.multicall`](./22#ethensresolverextendedmulticall--0x96b62db8) feature. To perform multiple calls:
150150
```solidity
151151
bytes[] memory calls = new bytes[](3);
152152
calls[0] = abi.encodeCall(IAddrResolver.addr, (node));
@@ -177,7 +177,7 @@ const data = encodeFunctionData({ functionName: "multicall", args: [calls] });
177177
const [result, resolver] = await UR.read.resolve(name, data);
178178
const results = decodeFunctionResult({ functionName: "multicall", data: result });
179179
```
180-
The same [resolution errors](#resolve-resolution-errors) apply but [resolver errors](#resolve-resolver-errors) are handled differently. The call **always succeeds** and decodes into an array of results. The number of calls is always equal to the number of results. If `results[i]` is not multiple of 32 bytes, it is an ABI-encoded error for the corresponding `calls[i]`.
180+
The same [resolution errors](#resolution-errors) apply but [resolver errors](#resolver-errors) are handled differently. The call **always succeeds** and decodes into an array of results. The number of calls is always equal to the number of results. If `results[i]` is not multiple of 32 bytes, it is an ABI-encoded error for the corresponding `calls[i]`.
181181

182182
```solidity
183183
address ethAddress = abi.decode(results[0], (address));
@@ -192,18 +192,18 @@ const error = decodeErrorResult({ data: result[2] }); // { errorName: "Unsupport
192192

193193
### reverse
194194

195-
This function performs ENS primary name resolution according to [ENSIP-19](./19). Provided a [byte-encoded](./9) `lookupAddress` and desired `coinType`, it returns the verified primary `name` and the addresses of forward `resolver` and `reverseResolver`. UR supports CCIP-Read during the forward and reverse phases.
195+
This function performs multichain primary name resolution according to [ENSIP-19](./19). Provided a [byte-encoded](./9) `lookupAddress` and desired `coinType`, it returns the verified primary `name` and the addresses of forward `resolver` and `reverseResolver`. UR supports CCIP-Read during the forward and reverse phases.
196196

197197
If the primary `name` is [unnormalized](./15), eg. `normalize("Nick.eth") != "nick.eth"`, then `name` and `resolver` are invalid.
198198

199-
* If [reverse resolution](./19#reverse-resolution) of the reverse name was not successful, reverts a [`resolve()` error](resolve-resolution-errors).
199+
* If [reverse resolution](./19#reverse-resolution) of the reverse name was not successful, reverts a [`resolve()` error](#resolution-errors).
200200
* If the resolved primary name was null, returns `("", address(0), <reverseResolver>)`.
201-
* If [forward resolution](./19#forward-resolution) of the primary name was not successful, also reverts a [`resolve()` error](resolve-resolution-errors).
201+
* If [forward resolution](./19#forward-resolution) of the primary name was not successful, also reverts a [`resolve()` error](#resolution-errors).
202202
* If the resolved address of `coinType` doesn't equal the `lookupAddress`, reverts `ReverseAddressMismatch`.
203203

204204
`reverse()` is effectively (2) sequential `resolve()` calls.
205205

206-
#### <a name="reverse-example">Pseudocode Example</a>
206+
#### Pseudocode Example
207207

208208
```js
209209
// valid primary name: vitalik.eth on mainnet
@@ -231,9 +231,9 @@ It is a **complete replacement** for existing ENS resolution procedures. Client
231231

232232
## Security Considerations
233233

234-
UR uses a batch gateway to perform CCIP-Read requests. If the client does not support [ENSIP-21](./21), a trustless external batch gateway service is used which adds latency and leaks information.
234+
UR uses a batch gateway to perform CCIP-Read requests. If the client does not support ENSIP-21, a trustless external batch gateway service is used which adds latency and leaks information.
235235

236-
UR is deployed as an immutable contract and as an ENS DAO-managed upgradeable proxy. The main purpose of the proxy is to facilitate a seamless transition to [ENS v2](https://ens.domains/ensv2) and track the latest standards. Client frameworks should default to the proxy so their libraries are future-proof, with the option to specify an alternative implementation.
236+
UR is deployed as an immutable contract and as an ENS DAO-managed upgradeable proxy. The main purpose of the proxy is to facilitate a seamless transition to ENSv2 and track the latest standards. Client frameworks should default to the proxy so their libraries are future-proof, with the option to specify an alternative implementation.
237237

238238
## Copyright
239239

0 commit comments

Comments
 (0)