import type { ContractBase } from 'dequanto/contracts/ContractBase'; import type { TAbiItem } from 'dequanto/types/TAbi'; import type { TEth } from 'dequanto/models/TEth'; import { EoAccount } from 'dequanto/models/TAccount'; import { HardhatWeb3Client } from 'dequanto/hardhat/HardhatWeb3Client'; import { Web3Client } from 'dequanto/clients/Web3Client'; import { IGeneratorSources } from 'dequanto/gen/Generator'; import { IContractWrapped } from 'dequanto/contracts/ContractClassFactory'; import { IWeb3EndpointOptions } from 'dequanto/clients/interfaces/IWeb3EndpointOptions'; import { TPlatform } from 'dequanto/models/TPlatform'; import { ContractDeployment } from 'dequanto/contracts/deploy/ContractDeployment'; import { TAddress } from 'dequanto/models/TAddress'; import { Constructor } from 'dequanto/utils/types'; import { BlockchainExplorer } from 'dequanto/explorer/BlockchainExplorer'; type THardhatLib = typeof import('hardhat'); export declare class HardhatProvider { client(network?: 'hardhat' | 'localhost', opts?: IWeb3EndpointOptions): HardhatWeb3Client; /** * Creates an independent in-memory fork and returns its HardhatWeb3Client. * Each call creates a new provider with the requested chainId and fork state, * allowing multiple forks to coexist without resetting the shared instance. * Use this when a separate chainId is needed, since hardhat_reset preserves * the existing provider's chainId. Supports Hardhat 2 and 3. */ createFork(params: { chainId: number; platform?: TPlatform; url?: string; block?: number | 'latest'; }): Promise; forked(params: { platform: TPlatform; url?: string; block?: number | 'latest'; }): Promise; explorer(network?: 'hardhat' | 'localhost'): Promise; deployer(index?: number): EoAccount; getFactoryForClass(Ctor: Constructor, options?: { deployer?: EoAccount; arguments?: any[]; client?: Web3Client; }): Promise<{ factory: ContractDeployment; abi: TAbiItem[]; bytecode: TEth.Hex; deployedBytecode: TEth.Hex; }>; deployClass(Ctor: Constructor, options?: { deployer?: EoAccount; arguments?: any[]; client?: Web3Client; tx?: TEth.Hex; }): Promise<{ contract: T; receipt: TEth.TxReceipt; abi: TAbiItem[]; bytecode: TEth.Hex; deployedBytecode: TEth.Hex; }>; deploySol(solContractPath: string, options?: { client?: Web3Client; arguments?: any[]; deployer?: EoAccount; paths?: { root?: string; artifacts?: string; }; contractName?: string; tmpDir?: string; }): Promise<{ contract: TReturn; ContractCtor: Constructor; receipt: TEth.TxReceipt; abi: TAbiItem[]; bytecode: TEth.Hex; source: IGeneratorSources; }>; deployBytecode(hex: TEth.Hex, options?: { client?: Web3Client; arguments?: any[]; deployer?: EoAccount; paths?: { root?: string; artifacts?: string; }; contractName?: string; abi?: TAbiItem[]; }): Promise<{ contract: TReturn; ContractCtor: Constructor; receipt: TEth.TxReceipt; abi: TAbiItem[]; bytecode: TEth.Hex; }>; compileSolDirectory(dir: string, options?: { paths?: { root?: string; artifacts?: string; }; contractName?: string; tsgen?: boolean; install?: string; }): Promise<{ abi: TAbiItem[]; bytecode: TEth.Hex; output: string; artifact: string; source: IGeneratorSources; ContractCtor: Constructor; linkReferences?: Record>; }[]>; compileSol(solContractPath: string, options?: { paths?: { root?: string; artifacts?: string; }; contractName?: string; tsgen?: boolean; install?: string; }): Promise<{ abi: TAbiItem[]; bytecode: TEth.Hex; output: string; artifact: string; source: IGeneratorSources; ContractCtor: Constructor; linkReferences?: Record>; }>; deployCode(solidityCode: string, options?: Parameters[1]): Promise<{ contract: TReturn; ContractCtor: Constructor; receipt: TEth.TxReceipt; abi: TAbiItem[]; bytecode: TEth.Hex; source: IGeneratorSources; }>; linkReferences(bytecode: TEth.Hex, linkReferences: Record>, addresses: Record): Promise; compileCode(solidityCode: string, options?: Parameters[1]): Promise<{ abi: TAbiItem[]; bytecode: TEth.Hex; output: string; artifact: string; source: IGeneratorSources; ContractCtor: Constructor; linkReferences?: Record>; }>; private createTmpFile; private getFactory; getHardhat(): Promise; private getHardhatProvider; private getArtifactJsonPath; private getPaths; private getSolFileContent; getContractFromSolPath(solContractPath: string, options?: { contractName?: string; paths: { sources?: string; root?: string; artifacts?: string; }; }): Promise<{ abi: TEth.Abi.Item[]; bytecode: `0x${string}`; output: string; artifact: string; source: { contractName: string; files: { [key: string]: { content: string; }; }; }; linkReferences: Record>; ContractCtor: Constructor; }>; private getRpcUrl; } export {};