import { Contract, PopulatedTransaction, ethers } from 'ethers'; import { Logger } from 'pino'; import { ITransparentUpgradeableProxy, MailboxClient, Ownable, ProxyAdmin, TimelockController } from '@hyperlane-xyz/core'; import { Address } from '@hyperlane-xyz/utils'; import { HyperlaneAddressesMap, HyperlaneContracts, HyperlaneContractsMap, HyperlaneFactories } from '../contracts/types.js'; import { HookConfig } from '../hook/types.js'; import type { HyperlaneIsmFactory } from '../ism/HyperlaneIsmFactory.js'; import { IsmConfig } from '../ism/types.js'; import { InterchainAccount } from '../middleware/account/InterchainAccount.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { MailboxClientConfig } from '../router/types.js'; import { ChainMap, ChainName, OwnableConfig } from '../types.js'; import { UpgradeConfig } from './proxy.js'; import { ContractVerifier } from './verify/ContractVerifier.js'; import { ContractVerificationInput } from './verify/types.js'; export interface DeployerOptions { logger?: Logger; chainTimeoutMs?: number; ismFactory?: HyperlaneIsmFactory; icaApp?: InterchainAccount; contractVerifier?: ContractVerifier; concurrentDeploy?: boolean; } export declare abstract class HyperlaneDeployer { protected readonly multiProvider: MultiProvider; protected readonly factories: Factories; protected readonly options: DeployerOptions; protected readonly recoverVerificationInputs: boolean; protected readonly icaAddresses: {}; verificationInputs: ChainMap; cachedAddresses: HyperlaneAddressesMap; deployedContracts: HyperlaneContractsMap; protected cachingEnabled: boolean; protected logger: Logger; chainTimeoutMs: number; private zkSyncContractVerifier; constructor(multiProvider: MultiProvider, factories: Factories, options?: DeployerOptions, recoverVerificationInputs?: boolean, icaAddresses?: {}); cacheAddressesMap(addressesMap: HyperlaneAddressesMap): void; verifyContract(chain: ChainName, input: ContractVerificationInput, logger?: Logger): Promise; abstract deployContracts(chain: ChainName, config: Config): Promise>; deploy(configMap: ChainMap): Promise>; protected addDeployedContracts(chain: ChainName, contracts: HyperlaneContracts, verificationInputs?: ContractVerificationInput[]): void; protected addVerificationArtifacts(chain: ChainName, artifacts: ContractVerificationInput[]): void; protected runIf(chain: ChainName, address: string, fn: () => Promise, label?: string): Promise; protected runIfOwner(chain: ChainName, ownable: Ownable, fn: () => Promise): Promise; protected runIfAdmin(chain: ChainName, proxy: Contract, signerAdminFn: () => Promise, proxyAdminOwnerFn: (proxyAdmin: ProxyAdmin) => Promise): Promise; protected configureIsm(chain: ChainName, contract: C, config: IsmConfig, getIsm: (contract: C) => Promise
, setIsm: (contract: C, ism: Address) => Promise): Promise; protected configureHook(chain: ChainName, contract: C, config: HookConfig, getHook: (contract: C) => Promise
, setHook: (contract: C, hook: Address) => Promise): Promise; protected configureClient(local: ChainName, client: MailboxClient, config: MailboxClientConfig): Promise; initializeFnSignature(_contractName: string): string; deployContractFromFactory(chain: ChainName, factory: F, contractName: string, constructorArgs: Parameters, initializeArgs?: Parameters>['initialize']>, shouldRecover?: boolean, implementationAddress?: Address): Promise>; /** * Deploys a contract with a specified name. * * This is a generic function capable of deploying any contract type, defined within the `Factories` type, to a specified chain. * * @param {ChainName} chain - The name of the chain on which the contract is to be deployed. * @param {K} contractKey - The key identifying the factory to use for deployment. * @param {string} contractName - The name of the contract to deploy. This must match the contract source code. * @param {Parameters} constructorArgs - Arguments for the contract's constructor. * @param {Parameters>['initialize']>?} initializeArgs - Optional arguments for the contract's initialization function. * @param {boolean} shouldRecover - Flag indicating whether to attempt recovery if deployment fails. * @returns {Promise[K]>} A promise that resolves to the deployed contract instance. */ deployContractWithName(chain: ChainName, contractKey: K, contractName: string, constructorArgs: Parameters, initializeArgs?: Parameters>['initialize']>, shouldRecover?: boolean): Promise[K]>; deployContract(chain: ChainName, contractKey: K, constructorArgs: Parameters, initializeArgs?: Parameters>['initialize']>, shouldRecover?: boolean): Promise[K]>; protected changeAdmin(chain: ChainName, proxy: ITransparentUpgradeableProxy, admin: string): Promise; protected upgradeAndInitialize(chain: ChainName, proxy: ITransparentUpgradeableProxy, implementation: C, initializeArgs: Parameters): Promise; protected deployProxy(chain: ChainName, implementation: C, proxyAdmin: string, initializeArgs?: Parameters, contractName?: string): Promise; deployTimelock(chain: ChainName, timelockConfig: UpgradeConfig['timelock']): Promise; writeCache(chain: ChainName, contractName: K, address: Address): void; readCache(chain: ChainName, factory: F, contractName: string): Awaited> | undefined; recoverVerificationArtifacts(chain: ChainName, contractName: string, cachedContract: C, constructorArgs: Parameters, initializeArgs?: Parameters): Promise; /** * Deploys the Implementation and Proxy for a given contract * */ deployProxiedContract(chain: ChainName, contractKey: K, contractName: string, proxyAdmin: string, constructorArgs: Parameters, initializeArgs?: Parameters[K]['initialize']>): Promise[K]>; mergeWithExistingVerificationInputs(existingInputsMap: ChainMap): ChainMap; transferOwnershipOfContracts(chain: ChainName, config: OwnableConfig, ownables: Partial>): Promise; } //# sourceMappingURL=HyperlaneDeployer.d.ts.map