ens:set-primary-name
Set the primary ENS name (reverse record) of the calling account.
Syntax
Section titled “Syntax”ens:set-primary-name <name>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
name |
string |
ENS name (e.g. mydao.eth) |
Options
Section titled “Options”| Name | Type | Description |
|---|---|---|
--for |
address |
Set the primary name of this contract instead (the caller must be the contract, its Ownable owner, or an approved operator) |
Examples
Section titled “Examples”load ens
# Name the executing account (e.g. a DAO agent or Safe running this script)ens:set-primary-name mydao.eth
# Name a contract owned by the executing accountens:set-primary-name treasury.mydao.eth --for 0x1234567890abcdef1234567890abcdef12345678- The reverse record only counts as a primary name when the forward record
matches: make sure
mydao.ethresolves to the account first (seeens:set-addr). - With
--for, the caller must be the target contract itself, itsOwnableowner, or an approved operator on the Reverse Registrar.
See Also
Section titled “See Also”- ens:set-addr — set the forward address record