Closed highHumann closed 11 months ago
maybe you could share your whole repo or just package.json file it seems that ethers 6 Basecontract don't have method deployed while the method is still available in ethers 5 you can look up the offcial document
Thanks for replying ya the issue was i was using the latest version of ethers now it is working
I encountered the same problem,May I ask how to solve it
by installing the dependencies recommended in package.json other than the latest
{
"name": "hardhat-simple-storage-fcc",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.4",
"@nomiclabs/hardhat-etherscan": "^3.0.0",
"@nomiclabs/hardhat-waffle": "^2.0.2",
"chai": "^4.3.4",
"ethereum-waffle": "^3.4.0",
"ethers": "^5.5.3",
"hardhat": "^2.8.3",
"hardhat-gas-reporter": "^1.0.7",
"solidity-coverage": "^0.7.18"
},
"dependencies": {
"dotenv": "^14.2.0",
"prettier-plugin-solidity": "^1.0.0-beta.19"
},
"scripts": {
"lint": "yarn prettier --check .",
"lint:fix": "yarn prettier --write ."
}
}
paste this file in your package.json then run yarn or npx i
in the terminal for installing the dependencies
Thanks for replying,but I encountered another problem, when I executed yarn hardhat run srcipts/deploy.js, I was prompted to install @nomicfoundation/hardhat-toolbox and other related modules,when I finish installing, reminder again simpleStorage.deployed is not a function. my version of node is 16.14.2, version of npm is 9.8.1
This is my code
and I am still getting the same error even I am trying to do it with github's
deploy.js
but it is still giving the same error