UNPKG

863 BPlain TextView Raw
1import type { ethers } from "ethers";
2import type {
3 FactoryOptions as FactoryOptionsT,
4 getContractFactory as getContractFactoryT,
5 HardhatEthersHelpers,
6 Libraries as LibrariesT,
7} from "../types";
8
9import "hardhat/types/runtime";
10
11declare module "hardhat/types/runtime" {
12 interface HardhatRuntimeEnvironment {
13 // We omit the ethers field because it is redundant.
14 ethers: typeof ethers & HardhatEthersHelpers;
15 }
16
17 // Beware, adding new types to any hardhat type submodule is not a good practice in a Hardhat plugin.
18 // Doing so increases the risk of a type clash with another plugin.
19 // Removing any of these three types is a breaking change.
20 type Libraries = LibrariesT;
21 type FactoryOptions = FactoryOptionsT;
22 // eslint-disable-next-line @typescript-eslint/naming-convention
23 type getContractFactory = typeof getContractFactoryT;
24}