/** * Unified deployer — auto-routes to EVM or Tron based on network name. * * Usage in hardhat tasks: * const deployer = createDeployer(hre, { autoVerify: true }); * let addr = await deployer.deploy("Gateway", [admin], salt); * let { proxy, implementation } = await deployer.deployProxy("Gateway", [admin], salt); * let newImpl = await deployer.upgrade("Gateway", proxyAddr); */ export interface DeployerOptions { /** * Auto-verify contracts after deploy/upgrade. * Failures are logged as warnings, never thrown — call deployer.verify() for explicit error handling. * Defaults to false. */ autoVerify?: boolean; } export interface DeployResult { address: string; hex?: string; } export interface DeployProxyResult { proxy: string; implementation: string; proxyHex?: string; implementationHex?: string; } export interface Deployer { /** * Deploy a contract. * @param contractName - artifact name * @param args - constructor arguments as raw values * @param salt - "" or omitted = direct deploy; non-empty string = CREATE2 factory (deterministic address) */ deploy(contractName: string, args?: any[], salt?: string): Promise; deployProxy(contractName: string, initArgs?: any[], salt?: string): Promise; upgrade(contractName: string, proxyAddr: string): Promise; /** Verify explicitly (throws on failure, unlike autoVerify which only warns). */ verify(contractName: string, address: string, constructorArgs?: any[], contractPath?: string): Promise; isTron: boolean; network: string; } /** * Create a unified deployer that auto-routes to EVM or Tron based on network. * @param hre - hardhat runtime environment * @param opts - options (autoVerify: auto-verify after deploy, defaults to false) */ export declare function createDeployer(hre: any, opts?: DeployerOptions): Deployer;