ens:create-resolver
Deploy an ENSv2 resolver (PermissionedResolver) through ENS's VerifiableFactory and bind its predicted address to
Smart blocks: build-time inputs only. The resolver's address is predicted from its salt and deployer when the script is built.
Syntax
Section titled “Syntax”ens:create-resolver <variable>Arguments
Section titled “Arguments”| Name | Type | Evaluation | Description |
|---|---|---|---|
variable | variable | Build time | Variable to bind the new resolver's address to |
Options
Section titled “Options”| Name | Type | Evaluation | Description |
|---|---|---|---|
--admin | address | Build time | Account given every role on the resolver (default: the transaction sender) |
--salt | bytes32 | Build time | Salt of the resolver's address, with the sender (default: random) |
Examples
Section titled “Examples”load ens
# A resolver of your own, then a name that uses itens:create-resolver $resolverens:set-resolver mydao.eth $resolverens:set-text mydao.eth url "https://mydao.example"
# Or register a name with it from the startens:create-resolver $resolver --salt @hash("mydao resolver")ens:register mydao @me 1y --secret @hash("my registration secret") --resolver $resolver- ENSv2 names keep their records in a resolver of their owner's, an ENSv2 PermissionedResolver deployed through ENS's VerifiableFactory. One resolver can serve many names.
- The admin (the sender by default) gets every role on it, as the ENS app grants: it can set any record of any name that uses the resolver, and grant those roles to others.
- The address follows from the sender and the salt, so it is known before
the deployment: a script can use
$resolverright after this line. The salt is random unless--saltgives one; reusing a sender and salt fails.
See Also
Section titled “See Also”- ens:set-resolver — point a name at it
- ens:set-text, ens:set-addr, ens:set-contenthash — set its records