ethers.getContract is not a function #5574
-
|
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
May 31, 2023
Replies: 3 comments 1 reply
-
@kaushikc44 you forgot to import ethers |
Beta Was this translation helpful? Give feedback.
0 replies
-
@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 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alymurtazamemon
-
Thanks it worked. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kaushikc44 getContract is the function of hardhat deploy. Follow these guidelines;
Install this;
Add this in hardhat config file
override hardhat ethers with hardhat deploy ethers