Skip to content

Commit

Permalink
Update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
LikoIlya committed May 21, 2024
1 parent cb0e4af commit 598c175
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 150 deletions.
146 changes: 1 addition & 145 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"peerDependencies": {
"@nomicfoundation/hardhat-toolbox": "^2.0.1",
"@openzeppelin/contracts-upgradeable": "^4.9.6",
"@openzeppelin/hardhat-upgrades": "^1.26.0",
"@openzeppelin/hardhat-upgrades": "^1.28.0",
"ethers": "^5.7.2",
"hardhat": "^2.12.6"
},
Expand Down
4 changes: 2 additions & 2 deletions src/deploying/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {_contractFromDeployment, _loadDeployments, Deployment,} from "../deploym
import {GetARGsTypeFromFactory, GetContractTypeFromFactory,} from "./common-types";
import * as path from "path";
import {getFullyQualifiedName} from "hardhat/utils/contract-names";
import type {DeployProxyOptions} from "@openzeppelin/hardhat-upgrades/src/utils";
import type {DeployProxyOptions} from "@openzeppelin/hardhat-upgrades/src/utils/options";


// returns initialize method arguments type if contract has `initialize` method
Expand Down Expand Up @@ -40,7 +40,7 @@ export async function deploy<N extends ContractFactory>(
proxyOptions = {kind: "uups"}
}: DeployOptions<N>
): Promise<GetContractTypeFromFactory<N>> {
const {artifacts, ethers, upgrades} = await import("hardhat");
const {artifacts, ethers, upgrades} = await import("hardhat") as any;
if (!networkId) networkId = (await ethers.provider.getNetwork()).chainId;

const deployments = _loadDeployments(networkId);
Expand Down
4 changes: 2 additions & 2 deletions src/deploying/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as fs from "fs";
import {_loadDeployments,} from "../deployments";
import {GetContractTypeFromFactory,} from "./common-types";
import * as path from "path";
import {UpgradeProxyOptions} from "@openzeppelin/hardhat-upgrades/src/utils";
import {UpgradeProxyOptions} from "@openzeppelin/hardhat-upgrades/src/utils/options";


interface UpgradeOptions<Factory> {
Expand All @@ -24,7 +24,7 @@ export async function upgrade<N extends ContractFactory>(
signer,
}: UpgradeOptions<N>
): Promise<GetContractTypeFromFactory<N>> {
const {ethers, upgrades} = await import("hardhat");
const {ethers, upgrades} = await import("hardhat") as any;
if (!networkId) networkId = (await ethers.provider.getNetwork()).chainId;

const deployments = _loadDeployments(networkId);
Expand Down

0 comments on commit 598c175

Please sign in to comment.