@openzeppelin/hardhat-upgrades
Advanced tools
Comparing version 1.3.0 to 1.3.1
# Changelog | ||
## 1.3.1 (2020-11-18) | ||
- Allow ommitting `args` in `deployProxy` when it's an empty array. | ||
## 1.3.0 (2020-11-13) | ||
@@ -4,0 +8,0 @@ |
import type { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import type { ContractFactory, Contract } from 'ethers'; | ||
import { ValidationOptions } from '@openzeppelin/upgrades-core'; | ||
export declare type DeployFunction = (ImplFactory: ContractFactory, args?: unknown[], opts?: DeployOptions) => Promise<Contract>; | ||
export interface DeployFunction { | ||
(ImplFactory: ContractFactory, args?: unknown[], opts?: DeployOptions): Promise<Contract>; | ||
(ImplFactory: ContractFactory, opts?: DeployOptions): Promise<Contract>; | ||
} | ||
export interface DeployOptions extends ValidationOptions { | ||
@@ -6,0 +9,0 @@ initializer?: string | false; |
@@ -10,2 +10,6 @@ "use strict"; | ||
return async function deployProxy(ImplFactory, args = [], opts = {}) { | ||
if (!Array.isArray(args)) { | ||
opts = args; | ||
args = []; | ||
} | ||
const { provider } = hre.network; | ||
@@ -12,0 +16,0 @@ const validations = await validations_1.readValidations(hre); |
{ | ||
"name": "@openzeppelin/hardhat-upgrades", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "", | ||
@@ -19,3 +19,3 @@ "repository": "https://github.com/OpenZeppelin/openzeppelin-upgrades/tree/master/packages/plugin-hardhat", | ||
"test": "tsc -b && bash scripts/test.sh", | ||
"test:watch": "fgbg 'bash scripts/test.sh --watch' 'tsc -b --watch'", | ||
"test:watch": "fgbg 'bash scripts/test.sh --watch' 'tsc -b --watch' --", | ||
"version": "node ../../scripts/bump-changelog.js" | ||
@@ -40,3 +40,4 @@ }, | ||
"hardhat": "^2.0.2" | ||
} | ||
}, | ||
"gitHead": "5ff07ae4a543df406ef8e4a864a2a41a711eebc8" | ||
} |
@@ -18,7 +18,6 @@ import type { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
export type DeployFunction = ( | ||
ImplFactory: ContractFactory, | ||
args?: unknown[], | ||
opts?: DeployOptions, | ||
) => Promise<Contract>; | ||
export interface DeployFunction { | ||
(ImplFactory: ContractFactory, args?: unknown[], opts?: DeployOptions): Promise<Contract>; | ||
(ImplFactory: ContractFactory, opts?: DeployOptions): Promise<Contract>; | ||
} | ||
@@ -30,3 +29,12 @@ export interface DeployOptions extends ValidationOptions { | ||
export function makeDeployProxy(hre: HardhatRuntimeEnvironment): DeployFunction { | ||
return async function deployProxy(ImplFactory, args = [], opts = {}) { | ||
return async function deployProxy( | ||
ImplFactory: ContractFactory, | ||
args: unknown[] | DeployOptions = [], | ||
opts: DeployOptions = {}, | ||
) { | ||
if (!Array.isArray(args)) { | ||
opts = args; | ||
args = []; | ||
} | ||
const { provider } = hre.network; | ||
@@ -33,0 +41,0 @@ const validations = await readValidations(hre); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48277
49
581