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

18 lines • 911 B
import { deployUpgradeableImpl } from './engine/deploy-impl.js'; import { enableDefender } from './defender/utils.js'; import { makeEthersBinding, contractInfo, txResponseOf } from './ethers-binding.js'; export function makeDeployImplementation(hre, defenderModule, connection) { return async function deployImplementation(ImplFactory, opts = {}) { opts = enableDefender(hre, defenderModule, opts); const binding = makeEthersBinding(hre, connection, ImplFactory.runner, opts); const deployedImpl = await deployUpgradeableImpl(binding, contractInfo(ImplFactory), opts, undefined); if (opts.getTxResponse) { const txResponse = await txResponseOf(deployedImpl.deployment, connection); if (txResponse) { return txResponse; } } return deployedImpl.impl; }; } //# sourceMappingURL=deploy-implementation.js.map