Skip to content

Commit a5cb433

Browse files
committed
docs: improve docs for non-technical readers
1 parent 5950b08 commit a5cb433

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ Minimal L2 Resolver system for ENS. It resolves ENS names to their corresponding
3131

3232
- returns true for `IERC165` and `IExtendedResolver`
3333

34+
## Examples
35+
36+
### Set the record for the domain `optimism.l2.eth`:
37+
38+
- node (ENS node, can be calculated using [this tool](https://docs.ens.domains/resolution/names/)): `0xcd14771f519e64452fe1d5a43016d25c86ef573ec499773443e29751c0dfcebc`
39+
- key (as a string): `chain.id.eip7930`
40+
- value (as bytes, can be calculated in [this way](https://github.com/ethereum/L2-interop/blob/main/specs/addresses/L2Resolver.md#eip-7930-chain-identifier-format)): `00010000010A00`
41+
42+
Then `setRecord()` must be called with the parameters mentioned above.
43+
44+
### Set the reverse lookup for `optimism.l2.eth`:
45+
46+
- node (constant, can be retrieved from the contract variable `REVERSE_LOOKUP_NODE`): `0xa1e7ae8efca73939b8018c7c06321689d70c6362862a1c900eb76c9e581e4ae8`
47+
- key (as a string, calculated in [this way](https://github.com/ethereum/L2-interop/blob/main/specs/addresses/L2Resolver.md#contract-specification-l2resolver)): `chain.id.eip79300x0a5a087e45046a1443319a227fbdfd0bfc6dfffc23c885a334649dc09b3d88e2`
48+
- value (abi encoded domain, in this case `abi.encode('optimism.l2.eth')`): `0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000f6f7074696d69736d2e6c322e6574680000000000000000000000000000000000`
49+
50+
Then `setRecord()` must be called with the parameters mentioned above.
51+
3452
## Specification
3553

3654
The complete technical specification can be found [here](https://github.com/ethereum/L2-interop/blob/main/specs/addresses/L2Resolver.md).

0 commit comments

Comments
 (0)