I'm creating my first project for etherum tokens. This project was initialized with Typescript+Viem+Hardhat.
After creating some contracts, I wrote an Ignition module. Then, I was about writing the hardhat.config.ts file but I'm having an issue. This is my current implementation:
import type { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-ethers";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "@nomicfoundation/hardhat-ignition";
import MyModule from "./ignition/modules/MyModule";
const INFURA_PROJECT_ID = "YOUR_INFURA_PROJECT_ID";
const PRIVATE_KEY = "YOUR_PRIVATE_KEY";
const config: HardhatUserConfig = {
solidity: "0.8.28",
networks: {
ropsten: {
url: `/${INFURA_PROJECT_ID}`,
accounts: [PRIVATE_KEY]
}
},
typechain: {
outDir: "typechain",
target: "ethers-v6",
},
ignition: {}
};
export default config;
Within ignition, Copilot proposes me to write:
ignition: {
modules: [MyModule]
}
but then I see the following error:
Object literal may only specify known properties, and 'modules' does not exist in type 'Partial & { strategyConfig?: Partial | undefined; }'.ts(2353) type-extensions.d.ts(48, 9): The expected type comes from property 'ignition' which is declared here on type 'HardhatUserConfig'