Categories
Cryptocurrency Ethereum Mastering Development

ethers is not defined

In hardhat, I want to access a contract outside my project in my tests.

In my hardhat.config.js I am able to reference external contracts no problem with an ABI and a contract address, like so:

const tkn1 = new ethers.Contract(ADDRESS, ABI, signer)

However, in my test files, I am getting ethers is not defined when trying to do the same thing. Where am I going wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *