Skip to content

Hey guys i am unable to run me test please help. #5375

Discussion options

You must be logged in to vote

@PUNEETSHEKHAR15 You did not have ethers from hardhat-deploy dependency due to that it were giving ethers.getContract function not found error because getContract is the function of hardhat-deploy dependency.

yarn add --dev hardhat-deploy @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers@^5

Also you should now use toolbox dependency with hardhat not the old hardhat-waffle. Change this in hardhat-config.js file.

// require("hardhat-gas-reporter")
// require("@nomiclabs/hardhat-etherscan")
require("dotenv").config();
// require("solidity-coverage")
require("hardhat-deploy");
require("@nomicfoundation/hardhat-toolbox");
// require("ethereum-waffle")

Also update your test;

it("sets t…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

You must be logged in to vote
2 replies
@alymurtazamemon
Comment options

Answer selected by alymurtazamemon
@PUNEETSHEKHAR15
Comment options

Comment options

You must be logged in to vote
0 replies
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
2 participants