commitments
stores a mapping from each submitted to commitment to the timestamp at which it was made. Callers wishing to validate that a commitment is valid before submitting a registration transaction should check this map first.rentPrice
returns the cost, in wei, to register or renew the provided name for the provided duration, in seconds. Callers should note that this price may vary over time, particularly if the pricing oracle is relying on a fiat price conversion.valid
returns true iff name is valid for registration with this controller (eg, it meets length requirements).available
returns true iff the name is both valid and available for registration by this controller. Under the hood, this call uses the valid
function (above) and the available
function on the registrar contract, which checks for availability in both the legacy ENS registrar and current ENS registrar.available
function on the registrar contract, which does not check name length.makeCommitment
generates and returns a commitment hash from a name label (eg, 'myname', not 'myname.eth') owner, and secret value.register
registers a name. A valid registration request must meet the following criteria:available(name) == true
.duration >= MIN_REGISTRATION_DURATION
.secret
identifies a valid commitment (eg, commitments[makeCommitment(name, secret)]
exists and is between 1 minute and 24 hours old.msg.value >= rentPrice(name, duration)
.rentPrice
- a premium of 5-10% will likely be sufficient. Any excess funds are returned to the caller.renew
renews a name, extending the name's expiration by duration
seconds. This function can be called by anyone, as long as sufficient funds are provided. Because the rent price may vary over time, callers are recommended to send slightly more than the value returned by rentPrice
- a premium of 5-10% will likely be sufficient. Any excess funds are returned to the caller.