/** * ContractProvider — small helper that wraps a provider/signer pair and * caches the chain ID it's connected to. * * Used by ByzantineClient and the adapter clients to look up * chain-specific addresses without re-querying `eth_chainId` on every call. * * It does NOT build `ethers.Contract` instances anymore — callers create * them directly with `new Contract(addr, abi, provider.runner)`. The * thin wrapper is more honest about what it actually does. */ import type { ethers } from "ethers"; import type { ChainsOptions, NetworkConfig } from "../types"; export declare class ContractProvider { readonly provider: ethers.Provider; signer?: ethers.Signer; private chainIdCache?; constructor(provider: ethers.Provider, signer?: ethers.Signer); /** Signer if set, else the read-only provider. */ get runner(): ethers.ContractRunner; /** Detect the chain ID, validate it's supported, and cache the result. */ getChainId(): Promise; /** Get the full network configuration for the current chain. */ getNetworkConfig(): Promise; }