@ens:text
Read a text record from an ENS name.
Returns: string
Syntax
Section titled “Syntax”@ens:text(name key)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
name | string | ENS name (e.g. vitalik.eth) |
key | string | Text record key (e.g. "url", "com.twitter", "description") |
Examples
Section titled “Examples”# Read a URL text recordset $url @ens:text("vitalik.eth" "url")print $url
# Read a Twitter handleset $twitter @ens:text("vitalik.eth" "com.twitter")print $twitterSee Also
Section titled “See Also”- @ens:name — reverse-resolve an address
- @ens:avatar — get the avatar URI