ENS Permanent Registrar Support
See original GitHub issueThe new ENS Permanent Registrar is coming out soon, and it would be nice to have a set of convenient utility classes that allow for easy interaction with the updated contracts.
Web3swift already has Util classes for the registry and resolver, but is missing the registrar. Once this is completed, we could add web3swift to the list of supported ENS libraries.
Overview
Summary from the ENS docs:
The Permanent Registrar is the code that will govern allocation and renewal of names in the .eth TLD. Presently this is governed by the legacy auction registrar, which uses a Vickery Auction process to allocate names to registrants. The new registrar aims to simplify this process, while providing a stable platform for future improvements that will minimise API changes.
In addition, the registrar is an ERC721 compliant nonfungable token contract, meaning that .eth registrations can be transferred in the same fashion as other NFTs.
The target deployment date for the permanent registrar is the 4th of May, 2019.
Functional Spec
Ideally, the utility classes would support the basic functions defined in the BaseRegistrar and ETHRegistrarController. This includes the following functionality:
BaseRegistrar
:
Read functions
- Get Name Expiry
- Returns the unix timestamp at which a registration currently expires.
- Get Name Owner
- ownerOf returns the address that owns the registration identified by the label hash, or reverts if the registration does not exist. This function is part of ERC721.
Write functions
- Transfer a Name
- Used to transfer the registration. Behaves as specified in ERC721.
- Reclaim ENS Record
- Sets the owner record of the name in the ENS registry to match the owner of the registration in this registry. May only be called by the owner of the registration.
ETHRegistrarController
:
Read functions
- Check Name Availability
- Returns true iff the name is both valid and available for registration by this controller.
- Get Rent Price
- Returns the cost, in wei, to register or renew the provided name for the provided duration.
- Calculate Commitment Hash
- Generates and returns a commitment hash from a name label (eg, ‘myname’, not ‘myname.eth’) owner, and secret value.
Write functions
- Submit Commitment
- Submits a precommitment generated by calling makeCommitment.
- Register Name
- Registers a name based on this criteria
- Extend Name Registration
- Renews a name. This function can be called by anyone, as long as sufficient funds are provided.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top GitHub Comments
@barrasso hi. Think its done. I’ve completely changed ENS classes, you can look at them here and tests for them here. Also I’ve added usage. Unfortunately I can’t find the BaseRegistrar and RegistrarController contracts for tests, but think there won’t occur any problems with them
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This Bounty has been completed.
Additional Tips for this Bounty: