UNPKG

hardhat

Version:

Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.

60 lines 3.12 kB
import type { CoverageConfig } from "./types/coverage.js"; import type { LoggerConfig } from "./types/logger.js"; import type { ChainDescriptorsConfig, EdrNetworkConfig } from "../../../../types/config.js"; import type { RequestArguments, SuccessfulJsonRpcResponse } from "../../../../types/providers.js"; import type { RequireField } from "../../../../types/utils.js"; import type { JsonRpcRequestWrapperFunction } from "../network-manager.js"; import type { SubscriptionEvent, ProviderConfig, TracingConfigWithBuffers, GasReportConfig } from "@nomicfoundation/edr"; import { ContractDecoder, IncludeTraces } from "@nomicfoundation/edr"; import { BaseProvider } from "../base-provider.js"; interface EdrProviderConfig { chainDescriptors: ChainDescriptorsConfig; networkConfig: RequireField<EdrNetworkConfig, "chainType">; loggerConfig?: LoggerConfig; contractDecoder: ContractDecoder; jsonRpcRequestWrapper?: JsonRpcRequestWrapperFunction; coverageConfig?: CoverageConfig; gasReportConfig?: GasReportConfig; includeCallTraces?: IncludeTraces; connectionId: number; networkName: string; verbosity: number; } export declare class EdrProvider extends BaseProvider { #private; /** * The value the underlying EDR provider was configured with, applied to * RPC call and transaction requests that omit a `gas` field. Exposed so * that the automatic gas handler's estimation fallback can reuse it * instead of recomputing it. */ readonly defaultTransactionGasLimit: bigint; /** * Whether the network rejects transactions whose gas limit exceeds the block * gas limit. It is false only for networks configured with * `blockGasLimit: false`. * * `evm_setBlockGasLimit` turns this on permanently. */ get isBlockGasLimitEnforced(): boolean; static createContractDecoder(tracingConfig: TracingConfigWithBuffers): Promise<ContractDecoder>; /** * Creates a new instance of `EdrProvider`. */ static create({ chainDescriptors, networkConfig, loggerConfig, contractDecoder, jsonRpcRequestWrapper, coverageConfig, gasReportConfig, includeCallTraces, verbosity, connectionId, networkName, }: EdrProviderConfig): Promise<EdrProvider>; /** * @private * * This constructor is intended for internal use only. * Use the static method {@link EdrProvider.create} to create an instance of * `EdrProvider`. */ private constructor(); request(requestArguments: RequestArguments): Promise<SuccessfulJsonRpcResponse["result"]>; close(): Promise<void>; addCompilationResult(solcVersion: string, compilerInput: any, compilerOutput: any): Promise<void>; onSubscriptionEvent(event: SubscriptionEvent): void; } export declare function getProviderConfig(networkConfig: RequireField<EdrNetworkConfig, "chainType">, coverageConfig: CoverageConfig | undefined, gasReportConfig: GasReportConfig | undefined, chainDescriptors: ChainDescriptorsConfig, includeCallTraces?: IncludeTraces): Promise<ProviderConfig>; export {}; //# sourceMappingURL=edr-provider.d.ts.map