import type { Contract } from 'web3-eth-contract';
import type { ContractABI, Nullable, Logger } from '../../utils';
import type { EthWeb3Manager } from '../ethWeb3Manager';
import { Web3Manager } from '../web3Manager';
import { ProviderSelection } from './ProviderSelection';
export declare type GetRegistryAddress = (key: string) => Promise<string>;
export declare class ContractClient {
    web3Manager: Web3Manager | EthWeb3Manager;
    contractABI: ContractABI['abi'];
    contractRegistryKey: string;
    getRegistryAddress: GetRegistryAddress;
    _contractAddress: Nullable<string>;
    _nethermindContractAddress: Nullable<string>;
    _contract: Nullable<Contract>;
    _isInitialized: boolean;
    _isInitializing: boolean;
    _initAttempts: number;
    providerSelector: Nullable<ProviderSelection>;
    logger: Logger;
    constructor(web3Manager: Web3Manager | EthWeb3Manager, contractABI: ContractABI['abi'], contractRegistryKey: string, getRegistryAddress: GetRegistryAddress, logger?: Logger, contractAddress?: Nullable<string>);
    /** Inits the contract if necessary */
    init(): Promise<void>;
    retryInit(selectNewEndpoint?: boolean): Promise<void>;
    /**
     * Adds current provider into unhealthy set and selects the next healthy provider
     */
    selectNewEndpoint(): Promise<void>;
    /** Gets the contract address and ensures that the contract has initted. */
    getAddress(): Promise<string>;
    getNethermindAddress(): Promise<string>;
    /**
     * Gets a contract method and ensures that the contract has initted
     * The contract can then be invoked with .call() or be passed to a sendTransaction.
     * @param methodName the name of the contract method
     */
    getMethod(methodName: string, ...args: any[]): Promise<any>;
    getEthChainId(): Promise<number>;
    getContract(): Promise<Contract>;
}
