This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
ENS is not a constructor #92
Comments
shaojiankui
changed the title
const ens = new ENS({ provider, ensAddress: getEnsAddress(1) })
ENS is not a constructor
Apr 27, 2022
i have the same error, did you resolve it? |
Any update? |
use ethersjs instead of ensjs, with the latest updates it has integrated almost all ensjs functions and it works perfectly |
Is it just me or the query is extremely slow... like 2 seconds to fetch ENS name of an address. Does that make sense? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to get address using ens domain but when I use the below code snippet it gives me TypeError: ENS is not a constructor, have I written it in the right way?
import ENS, { getEnsAddress } from '@ensdomains/ensjs';
const provider = "https://ropsten.infura.io/v3/project_id";
const ens = new ENS({ provider, ensAddress: getEnsAddress('1') });
const name = ens.name('abcd.eth').getAddress();
name.then((str) => {
console.log(str);
});
The text was updated successfully, but these errors were encountered: