Skip to content

ens:register

Register a .eth name via the controller's commit/reveal flow (commits, waits and reveals in one go by default).

ens:register <name> <owner> <duration>
NameTypeDescription
namestring.eth name or label (e.g. mydao.eth or mydao)
owneraddressOwner of the name
durationnumberRegistration duration, in time units (e.g. 1y)
NameTypeDescription
--secretbytes32Commitment secret; must be identical across the commit and reveal steps
--resolveraddressResolver to set at registration (defaults to the chain's Public Resolver)
--reverse-recordboolAlso set the owner's primary ENS name
--stepstringWhich part of the flow to run: commit-wait-reveal (default), only-commit, only-reveal, only-commit-and-wait, only-wait-and-reveal
load ens
# Commit, wait ~60s and reveal in one script (default)
ens:register mydao @me 1y --secret @hash("my registration secret") --resolver 0xF29100983E058B709F3D539b0c765937B804AC15 --reverse-record true
# Split the flow across two scripts (e.g. two DAO votes)
ens:register mydao @me 1y --secret @hash("my registration secret") --step only-commit
ens:register mydao @me 1y --secret @hash("my registration secret") --step only-reveal
  • Registration is a commit/reveal flow. By default the command emits the commit transaction, a real-time wait for the controller's minimum commitment age (plus a small margin), and the reveal transaction. In fork simulations the wait is instant — the fork's clock is warped instead.
  • --step selects which part runs: commit-wait-reveal (default), only-commit, only-reveal, only-commit-and-wait, only-wait-and-reveal. All steps must use identical arguments and --secret, otherwise the reveal won't find the commitment.
  • The reveal sends the rent price plus a 2% buffer; the controller refunds any excess.
  • --reverse-record also sets the owner's primary ENS name.