This repository is a fork of the ENS Offchain Resolver repository, maintained by Scio Labs. It supports ENS address resolution on EVM (EIP 3668, ENSIP 10) via the Aleph Zero Substrate network. It specifically targets the AZERO.ID registry, though, it can be easily extended to support other Substrate-based networks and protocols.
Important
This project is still under active development.
Testnet¹ | Mainnet² | |
---|---|---|
Resolver Contract | 0x5cf63C14b82C6E1B95023d8D23e682d12761F56C |
0x723f6C968609F62583504DD67307A4Ae4c9Fd886 |
Gateway | https://gateway.tzero.id | https://gateway.azero.id |
ENS Domains | <name>.tzero.id ³, <name>.tzero-id.eth |
<name>.azero.id ³, <name>.azero-id.eth |
RegistrationProxy | TODO | TODO |
Wasm⁴ | TODO | TODO |
² Ethereum Mainnet & Aleph Zero Mainnet
³ Regular ENS Domains imported via DNSSEC
⁴ Deployed on substrate chain
The smart contract provides a resolver stub that implement CCIP Read (EIP 3668) and ENS wildcard resolution (ENSIP 10). When queried for a name, it directs the client to query the gateway server. When called back with the gateway server response, the resolver verifies the signature was produced by an authorised signer, and returns the response to the client.
The server serves as both a EVM Registration Proxy (Relayer) and as a CCIP Read Resolver (Gateway) for ENS resolution.
- Gateway: Implements CCIP Read (EIP 3668), and answers requests by looking up the names on the registry Aleph Zero. Once a record is retrieved, it is signed using a user-provided key to assert its validity, and both record and signature are returned to the caller so they can be provided to the contract that initiated the request. It's designed to be deployed as a Cloudflare worker.
- Relayer: Relays registration requests from EVM chain to the substrate chain.
InitiateRequest
event is emitted whenRegistrationProxy::register()
is invoked. ItsTxHash
and optionallyreqId
is submitted to the relayer that parses and executes it on the substrate chain and then relays back the result to the EVM chain. Multiple payment options (native token, ERC20, and theoretically traditional payment as well) are supported by the relayer.
A simple script that resolves a given domain through the ENS protocol (using the gateway server) and verifies the response with the result from the registry contracts directly on the Aleph Zero network.
- Run the gateway server (packages/server/README.md)
- Use the worker url as environment variable when deploying the contracts
- Deploy the contracts (packages/contracts/README.md)
- Assign the new resolver to your ENS name
- Use the provided demo client (packages/client/README.md)