import type * as ethers from "ethers"; import type { Abi, Artifact, StringWithArtifactContractNamesAutocompletion, } from "hardhat/types/artifacts"; export type HardhatEthers = typeof ethers & HardhatEthersHelpers; export interface Libraries { [libraryName: string]: string | ethers.Addressable; } export interface FactoryOptions { signer?: ethers.Signer; libraries?: Libraries; } export type DeployContractOptions = FactoryOptions & ethers.Overrides; export type HardhatEthersProvider = ethers.Provider & { getSigner(address?: number | string): Promise; send(method: string, params?: any[]): Promise; }; export type HardhatEthersSigner = ethers.Signer & { address: string; }; export interface HardhatEthersHelpers { provider: HardhatEthersProvider; getContractFactory( name: StringWithArtifactContractNamesAutocompletion, signerOrOptions?: ethers.Signer | FactoryOptions, ): Promise>; getContractFactory( abi: any[] | Abi, bytecode: ethers.BytesLike, signer?: ethers.Signer, ): Promise>; getContractFactoryFromArtifact( artifact: Artifact, signerOrOptions?: ethers.Signer | FactoryOptions, ): Promise>; getContractAt( nameOrAbi: StringWithArtifactContractNamesAutocompletion | any[] | Abi, address: string | ethers.Addressable, signer?: ethers.Signer, ): Promise; getContractAtFromArtifact: ( artifact: Artifact, address: string, signer?: ethers.Signer, ) => Promise; deployContract( name: StringWithArtifactContractNamesAutocompletion, signerOrOptions?: ethers.Signer | DeployContractOptions, ): Promise; deployContract( name: StringWithArtifactContractNamesAutocompletion, args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions, ): Promise; getSigner: (address: string) => Promise; getSigners: () => Promise; getImpersonatedSigner: (address: string) => Promise; }