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

33 lines • 1.99 kB
import { Interface } from 'ethers'; import type { ContractRunner, TransactionResponse } from 'ethers'; import type { HardhatRuntimeEnvironment } from 'hardhat/types/hre'; import type { NetworkConnection } from 'hardhat/types/network'; import type { ContractInfo, DeployedContract, EngineBinding } from './engine/binding.js'; import type { DeployFactoryOpts, DefenderDeployOptions, EthersDeployOptions, UpgradeOptions } from './utils/options.js'; /** * The options the ethers binding needs from the public ethers API: the engine-neutral options * plus ethers/Defender-specific transaction overrides and the proxy escape hatches. */ export type EthersBindingOptions = UpgradeOptions & EthersDeployOptions & DefenderDeployOptions & DeployFactoryOpts; /** * Builds the client-neutral engine binding for the ethers API. Deployments still go through the * ethers `ContractFactory` (preserving the existing behavior, including the Defender path and the * `proxyFactory`/`deployFunction` escape hatches), while the engine drives the orchestration. * * @param runner the contract factory's runner, whose signer signs the plugin's transactions */ export declare function makeEthersBinding(hre: HardhatRuntimeEnvironment, connection: NetworkConnection, runner: ContractRunner | null | undefined, opts: EthersBindingOptions): EngineBinding; /** * Builds the engine's client-neutral {@link ContractInfo} from an ethers `ContractFactory`. */ export declare function contractInfo(factory: { interface: Interface; bytecode: string; }): ContractInfo; /** * Resolves the ethers `TransactionResponse` of an implementation deployment for the `getTxResponse` * option: the deployment's own transaction when freshly deployed, or otherwise the transaction * looked up from the manifest's recorded hash. */ export declare function txResponseOf(deployment: DeployedContract, connection: NetworkConnection): Promise<TransactionResponse | undefined>; //# sourceMappingURL=ethers-binding.d.ts.map