Skip to content

Commit

Permalink
feat: added DNS encoding calculaton in a script
Browse files Browse the repository at this point in the history
  • Loading branch information
Julink-eth committed Aug 22, 2024
1 parent c292aa4 commit 1b896c9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ const domainNamehash = ethers.utils.namehash(domainName)

// Log the namehash
console.log(`The namehash of '${domainName}' is: ${domainNamehash}`)

// Calculate the DNS encoded name of the provided domain name
const encodedDnsName = ethers.utils.dnsEncode(domainName)

// Log the encoded DNS name
console.log(`The DNS encoded name of '${domainName}' is: ${encodedDnsName}`)

0 comments on commit 1b896c9

Please sign in to comment.