Skip to content

ethers.getContract is not a function #5574

Closed Answered by alymurtazamemon
kaushikc44 asked this question in Q&A
Discussion options

You must be logged in to vote

@kaushikc44 getContract is the function of hardhat deploy. Follow these guidelines;

Install this;

npm install -D hardhat-deploy --force

Add this in hardhat config file

require('hardhat-deploy');

override hardhat ethers with hardhat deploy ethers

npm install --save-dev  @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers@^5 --force

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eik-1
Comment options

Answer selected by alymurtazamemon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants