UNPKG

@openzeppelin/hardhat-upgrades

Version:

[![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-blue)](https://docs.openzeppelin.com/upgrades-plugins/hardhat-upgrades) [![NPM Package](https://img.shields.io/npm/v/@openzeppelin/hardhat-upgrades.svg)](https://www.npmjs.org/package/@openzeppelin/h

69 lines • 2.76 kB
import { DeployOpts, ProxyKindOption, StandaloneValidationOptions, ValidationOptions } from '@openzeppelin/upgrades-core'; /** * Client-neutral options shared by both the ethers and viem bindings. The engine reads only * these fields; each binding extends them with its own client-specific options (e.g. the * ethers binding's `txOverrides`, the viem binding's `gas`/`value`/`client`). * * This module references neither `ethers` nor `viem`, so it is safe to import from either * binding's type chain. */ /** * Options for functions that can deploy an implementation contract. */ export type StandaloneOptions = StandaloneValidationOptions & DeployOpts & { constructorArgs?: unknown[]; /** * @deprecated Use `redeployImplementation = 'never'` instead. */ useDeployedImplementation?: boolean; redeployImplementation?: 'always' | 'never' | 'onchange'; }; /** * Options for functions that can deploy a new version of an implementation contract for upgrading. */ export type UpgradeOptions = ValidationOptions & StandaloneOptions; /** * Option for functions that support getting a transaction response. */ export type GetTxResponse = { getTxResponse?: boolean; }; export type Initializer = { initializer?: string | false; }; export type InitialOwner = { initialOwner?: string; /** * Skips checking the `initialOwner` option when deploying a transparent proxy. */ unsafeSkipProxyAdminCheck?: boolean; }; /** * The optional initializer/upgrade call for `upgradeProxy`. */ export type Call = { fn: string; args?: unknown[]; } | string; export type { ProxyKindOption, StandaloneValidationOptions, ValidationOptions, DeployOpts }; export type DeployProxyOptions = StandaloneOptions & Initializer & InitialOwner; export type DeployBeaconOptions = StandaloneOptions & InitialOwner; export type DeployBeaconProxyOptions = DeployOpts & ProxyKindOption & Initializer; export type DeployImplementationOptions = StandaloneOptions & GetTxResponse; export type ForceImportOptions = ProxyKindOption; export type PrepareUpgradeOptions = UpgradeOptions & GetTxResponse; export type UpgradeBeaconOptions = UpgradeOptions; export type UpgradeProxyOptions = UpgradeOptions & { call?: Call; }; export type ValidateImplementationOptions = StandaloneValidationOptions; export type ValidateUpgradeOptions = ValidationOptions; export type AdminOptions = { silent?: boolean; }; /** * Fills in the engine-relevant defaults for the upgrade options. The client-specific transaction * options (ethers `txOverrides`, viem `gas`/`value`/...) are handled by the bindings, not here. */ export declare function withDefaults(opts?: UpgradeOptions): Required<UpgradeOptions>; //# sourceMappingURL=options.d.ts.map