Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

ens confusable

node v16.18.0
version: 1.0.0
endpointsharetweet
const { isConfusing, confusables, rectifyConfusion } = require('@ensdomains/unicode-confusables');
const { ethers, utils } = require('ethers');
const ensName = '⌐◨‐◨.eth';
isConfusing(ensName)
confusables(ensName)
const rectifiedEnsName = rectifyConfusion(ensName)
const labelhash = (label) => utils.keccak256(utils.toUtf8Bytes(label)); const lhexIdOld = labelhash(ensName.replace('.eth', '')); const lintIdOld = ethers.BigNumber.from(lhexIdOld).toString(); console.log(lintIdOld) const lhexIdNew = labelhash(rectifiedEnsName.replace('.eth', '')); const lintIdNew = ethers.BigNumber.from(lhexIdNew).toString(); console.log(lintIdNew)
Loading…

no comments

    sign in to comment