import { BaseContract, ContractFactory, type Signer } from "ethers";
import type { IDeployCloneArgs } from "../../ts/types";
import type { ConfigurableTaskDefinition, HardhatRuntimeEnvironment, TaskArguments } from "hardhat/types";
import { type TAbi, type IDeployContractParams, type IDeployContractWithLinkedLibrariesParams, type IDeployParams, type IDeployStep, type IGetContractParams, EContracts } from "./types";
/**
 * @notice Deployment helper class to run sequential deploy using steps and deploy contracts.
 */
export declare class Deployment {
    /**
     * Singleton instance for class
     */
    private static INSTANCE?;
    /**
     * Hardhat runtime environment
     */
    private hre?;
    /**
     * Step catalog to create sequential tasks
     */
    private stepCatalog;
    /**
     * Json file database instance
     */
    private config;
    /**
     * Contract storage
     */
    private storage;
    /**
     * Contracts name mapping
     */
    private contractNames;
    /**
     * Initialize class properties only once
     */
    private constructor();
    /**
     * Get singleton object
     *
     * @returns {ContractStorage} singleton object
     */
    static getInstance({ contractNames, hre, }?: {
        contractNames?: Record<EContracts, string>;
        hre?: HardhatRuntimeEnvironment;
    }): Deployment;
    /**
     * Start deploy with console log information
     *
     * @param catalog - deploy steps catalog
     * @param {IDeployParams} params - deploy params
     * @returns deploy steps for selected catalog
     */
    start(catolog: string, { incremental, verify }: IDeployParams): Promise<IDeployStep[]>;
    /**
     * Run deploy steps
     *
     * @param steps - deploy steps
     * @param skip - skip steps with less or equal index
     */
    runSteps(steps: IDeployStep[], skip: number): Promise<void>;
    /**
     * Print deployment results and check warnings
     *
     * @param strict - fail on warnings is enabled
     * @throws error if strict is enabled and warning is found
     */
    checkResults(strict?: boolean): Promise<void>;
    /**
     * Finish deployment with console log information
     *
     * @param startBalance - start deployer balance
     * @param isSuccess - success or not
     */
    finish(startBalance: bigint, isSuccess: boolean): Promise<void>;
    /**
     * Get deployer (first signer) from hardhat runtime environment
     *
     * @returns {Promise<Signer>} - signer
     */
    getDeployer(): Promise<Signer>;
    /**
     * Set hardhat runtime environment
     *
     * @param hre - hardhat runtime environment
     */
    setHre(hre: HardhatRuntimeEnvironment): void;
    /**
     * Set contract names
     *
     * @param contractNames - contract names
     */
    setContractNames(contractNames: Record<EContracts, string>): void;
    /**
     * Check if hardhat runtime environment is set
     *
     * @throws {Error} error if there is no hardhat runtime environment set
     */
    private checkHre;
    /**
     * Register deploy task by updating step catalog and return task definition
     *
     * @param taskName - unique task name
     * @param stepName - task description
     * @param paramsFn - optional function to override default task arguments
     * @returns {Promise<ConfigurableTaskDefinition>} hardhat task definition
     */
    deployTask(taskName: string, stepName: string, paramsFn?: (params: IDeployParams) => Promise<TaskArguments>): Promise<ConfigurableTaskDefinition>;
    /**
     * Register deployment step
     *
     * @param deployType - deploy type
     * @param {IDeployStepCatalog} - deploy step catalog name, description and param mapper
     */
    private addStep;
    /**
     * Get default params from hardhat task
     *
     * @param {IDeployParams} params - hardhat task arguments
     * @returns {Promise<TaskArguments>} params for deploy workflow
     */
    private getDefaultParams;
    /**
     * Get deploy step sequence
     *
     * @param deployType - deploy type
     * @param {IDeployParams} params - deploy params
     * @returns {Promise<IDeployStep[]>} deploy steps
     */
    private getDeploySteps;
    /**
     * Deploy contract and return it
     *
     * @param {IDeployContractParams} params - parameters of deploy contract
     * @param args - constructor arguments
     * @returns deployed contract
     */
    deployContract<T extends BaseContract, ID = EContracts>({ name, abi, bytecode, signer }: IDeployContractParams<ID>, ...args: unknown[]): Promise<T>;
    /**
     * Deploy proxy clone instance.
     *
     * @param args deploy proxy clone arguments
     * @returns clone contract
     */
    deployProxyClone<C extends BaseContract, Args extends unknown[] = unknown[]>({ proxyFactory, factory, args, signer, }: IDeployCloneArgs<Args>): Promise<C>;
    /**
     * Deploy contract with linked libraries using contract factory
     *
     * @param {IDeployContractWithLinkedLibrariesParams} params - parameters of deploy contract with linked libraries
     * @param args - constructor arguments
     * @returns deployed contract
     */
    deployContractWithLinkedLibraries<T extends BaseContract>({ contractFactory, signer }: IDeployContractWithLinkedLibrariesParams, ...args: unknown[]): Promise<T>;
    /**
     * Creates contract factory from abi and bytecode
     *
     * @param name - contract name
     * @param abi - Contract abi
     * @param bytecode - Contract linked bytecode
     * @param signer - signer
     * @returns contract factory with linked libraries
     */
    createContractFactory(abi: TAbi, bytecode: string, signer?: Signer): Promise<ContractFactory>;
    /**
     * Get deploy config field (see deploy-config.json)
     *
     * @param id - contract name
     * @param field - config field key
     * @returns config field value or null
     */
    getDeployConfigField<T = string | number | boolean, ID extends string = EContracts>(id: ID, field: string, mustGet?: boolean): T;
    /**
     * Update deploy config field (see deploy-config.json)
     * @param id - contract name
     * @param field - config field key
     * @param value - config field value
     */
    updateDeployConfig<T = string | number | boolean, ID extends string = EContracts>(id: ID, field: string, value: T): void;
    /**
     * Get contract by name and group key
     *
     * @param {IGetContractParams} params - params
     * @returns contract wrapper
     */
    getContract<T extends BaseContract>({ name, key, address, abi, signer }: IGetContractParams): Promise<T>;
}
//# sourceMappingURL=Deployment.d.ts.map