-
Notifications
You must be signed in to change notification settings - Fork 0
Managed ENS Registrar and Resolver #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
v0.0.19
…rks on ethers.js now
| Builds on top of a basic ManagedRegistrar, but adds reverse name lookup registration. Some DApps use this to convert addresses to ENS names for display purposes. | ||
|
|
||
| Setting a name mapping is an additional call, with additional gas costs. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot one more thing here: The target address for reverse lookup needs to register a resolver with the global ENS contract: https://docs.ens.domains/contract-api-reference/reverseregistrar
If the target address is a contact (e.g. the skyteller proxy), then the contract would need to call that. This would require adding a helper function to the skyteller proxy (or doing it on init).
Todo
Deploy on Goerli to test it live(Not doable right now? DoS)0x9061b923), seems ethers.js requires it now?forge resolve-name), doesn't work with wildcardname() returns (string)?Could deploy an entire ENS instance for integration tests, but probably not worth it (testing the wrong thing IMO).Added end-to-end fork test for mainnet instance.Gas
Approach 1: Managed registrar
Update: Previous numbers were off, we need to add a subnode (for some SDKs) on the global ENS instance if we want resolver to work onchain.
💵 $17.2 per set at $2000 ETHUSD and 100 gwei gas.
💵 $4.84 per set at $2000 ETHUSD and 100 gwei gas.
Reverse name lookup registry is an additional ~25k gas, plus call to register the resolver in the global instance against the target address. (See note below)
Approach 2: Permit registrar
💵 $10.42 per set at $2000 ETHUSD and 100 gwei gas.
Notes
(Removed outdated notes, they were mostly integrated into above.)
If the target address is a contact (e.g. the skyteller proxy), then the contract would need to call that. This would require adding a helper function to the skyteller proxy (or doing it on init).