ens:set-text
Set a text record on an ENS name.
Supports runtime fields inside smart blocks. Use explicit @helper! expressions or captured outputs; other fields are evaluated at build time.
Syntax
Section titled “Syntax”ens:set-text <name> <key> <value>Arguments
Section titled “Arguments”| Name | Type | Evaluation | Description |
|---|---|---|---|
name | string | Build time | ENS name (e.g. mydao.eth) |
key | string | Runtime in smart blocks | Text record key (e.g. "url", "com.twitter") |
value | string | Runtime in smart blocks | Text record value |
Examples
Section titled “Examples”load ens
# Set common text records on a name you ownens:set-text mydao.eth url "https://mydao.example"ens:set-text mydao.eth com.twitter "mydao"ens:set-text mydao.eth description "Community-owned treasury"- The action is sent to the name's current resolver; on ENS v1 the executing account must own (or operate) the name.
- On an ENSv2 name the record is written to the name's resolver in ENSv2's ETHRegistry, which must be an ENSv2 resolver (see ens:create-resolver), by an account with the role to set it there. Subnames of ENSv2 names are not supported yet.
See Also
Section titled “See Also”- @ens:text — read a text record