import type { HardhatRuntimeEnvironment, Artifact } from "hardhat/types"; import type { ContractSendMethod, Contract, EventData } from "web3-eth-contract"; import type Web3 from "web3"; import type { DeploymentsExtension } from "hardhat-deploy/types"; export interface ContractFactory extends Artifact { deployed: () => Promise; new: (...args: any[]) => ContractSendMethod; at: (address: string) => Contract; link: (libraries: { [libraryName: string]: string; }) => string; } type FindEventFunction = (txnResult: { blockNumber: number; }, contract: Contract, eventName: string, fn: (eventValues: EventData["returnValues"]) => boolean) => Promise<{ match: EventData | undefined; allEvents: EventData["returnValues"][]; }>; export interface Extension { _artifactCache: { [name: string]: Artifact; }; getContract: (name: string, artifactOverrides?: { abi?: any[]; bytecode?: string; [key: string]: any; }) => ContractFactory; findEvent: FindEventFunction; assertEventEmitted: (...args: Parameters) => void; assertEventNotEmitted: (...args: Parameters) => void; } interface OtherExtensions { web3: Web3; deployments: DeploymentsExtension; } export type HRE = Extension & OtherExtensions & HardhatRuntimeEnvironment; export {};