Hi everybody,
I'm new in openzeppellin. I was trying to deploy an ERC777 upgradable contract with hardhat (following the guide) but I get an error
- TypeError: Cannot read property 'readFile' of undefined
at readValidations (.../node_modules/@openzeppelin/hardhat-upgrades/src/validations.ts:34:38)
at OverriddenTaskDefinition.config_1.subtask [as _action] (.../node_modules/@openzeppelin/hardhat-upgrades/src/index.ts:34:11)
Any help will be appreciated.
Environment
Version used:
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@openzeppelin/hardhat-upgrades": "^1.6.0",
"ethers": "^5.0.29",
"hardhat": "^2.0.8"
},
"dependencies": {
"@openzeppelin/contracts-upgradeable": "^3.4.0
}
Details
This is my hardhat.config.js
require('@openzeppelin/hardhat-upgrades');
require('@nomiclabs/hardhat-ethers');
module.exports = {
solidity: "0.7.3",
};
This is my scripts/deploy.js
const { ethers, upgrades } = require("hardhat");
async function main() {
// We get the contract to deploy
const Token = await ethers.getContractFactory("IARS");
console.log("Deploying IARS...");
const token = await upgrades.deployProxy(Token);
await token.deployed();
console.log("IARS deployed to:", token.address);
}
Code to reproduce
npx hardhat run --network localhost scripts/deploy.js