UNPKG

hardhat

Version:

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

16 lines 881 B
import type { EthereumProvider, JsonRpcRequest, JsonRpcResponse } from "../../../../../../types/providers.js"; import type { RequestHandler } from "../../types.js"; import { ChainId } from "./chain-id.js"; /** * This class validates that the current provider's chain ID matches * an expected value. If the actual chain ID differs from the expected one, it throws a * HardhatError to signal a network configuration mismatch. Once validated, further checks * are skipped to avoid redundant validations. */ export declare class ChainIdValidatorHandler extends ChainId implements RequestHandler { #private; constructor(provider: EthereumProvider, expectedChainId: number); isSupportedMethod(jsonRpcRequest: JsonRpcRequest): boolean; handle(jsonRpcRequest: JsonRpcRequest): Promise<JsonRpcRequest | JsonRpcResponse>; } //# sourceMappingURL=chain-id-handler.d.ts.map