nameHash

The namehash function takes a ENS name as input and generates a hashed version of that name. The hashed name can be used for various purposes, such as storing the name in a database or comparing it with other names.

The function takes a single parameter, name, which is the ENS name to be hashed. The function returns the hashed name as a string.

It's important to note that ENS names can have certain forbidden characters and validation rules, so it's recommended to normalize ENS names with UTS-46 normalization before passing them to namehash. The built-in normalize function can be used for this.

The namehash function is useful for a variety of use cases, such as:

  • Storing ENS names in a database: By hashing the names, you can store them in a compact and efficient manner, while still being able to compare them with other names.
  • Comparing ENS names: The hashed names can be compared with other hashed names to determine if they are the same or not.
  • Generating ENS names: The hashed names can be used as a starting point for generating new ENS names, by appending or prepending characters to the hashed name.

Overall, the namehash function is a useful tool for working with ENS names in a secure and efficient manner.

Output will appear here. You can scroll the text if it becomes too long.

Tired of checking the chain? 😅

Webhooks, Alerts, and a simple API.

Join L3MBDA, it's free!