From 8b385977c3338640a608fa36116f4bfd230da9ff Mon Sep 17 00:00:00 2001 From: Noah Jelich <12912633+njelich@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:55:04 +0000 Subject: [PATCH 1/2] add hardhat-deploy back --- deploy/deploy.ts | 3 ++- hardhat.config.ts | 1 + package.json | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/deploy.ts b/deploy/deploy.ts index ab022ca..fb20988 100644 --- a/deploy/deploy.ts +++ b/deploy/deploy.ts @@ -1,10 +1,11 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; const DAY_IN_SECONDS = 60 * 60 * 24; const NOW_IN_SECONDS = Math.round(Date.now() / 1000); const UNLOCK_IN_X_DAYS = NOW_IN_SECONDS + DAY_IN_SECONDS * 1; // 1 DAY -const func = async function (hre: HardhatRuntimeEnvironment) { +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployer } = await hre.getNamedAccounts(); const { deploy } = hre.deployments; const lockedAmount = hre.ethers.parseEther("0.01").toString(); diff --git a/hardhat.config.ts b/hardhat.config.ts index 0d85b5b..11fbf4d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,5 +1,6 @@ import "@nomicfoundation/hardhat-toolbox"; import type { HardhatUserConfig } from "hardhat/config"; +import "hardhat-deploy"; import { vars } from "hardhat/config"; import type { NetworkUserConfig } from "hardhat/types"; diff --git a/package.json b/package.json index 8cdb8da..f4605af 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "ethers": "^6.9.0", "fs-extra": "^11.2.0", "hardhat": "^2.19.2", + "hardhat-deploy": "^0.12.1", "hardhat-gas-reporter": "^1.0.9", "lodash": "^4.17.21", "mocha": "^10.2.0", From 8bf95fc122e4c09bc4bf038f9d4fa212a384f063 Mon Sep 17 00:00:00 2001 From: Noah Jelich <12912633+njelich@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:58:49 +0000 Subject: [PATCH 2/2] linter fixes --- deploy/deploy.ts | 2 +- hardhat.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/deploy.ts b/deploy/deploy.ts index fb20988..f09cf43 100644 --- a/deploy/deploy.ts +++ b/deploy/deploy.ts @@ -1,5 +1,5 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; const DAY_IN_SECONDS = 60 * 60 * 24; const NOW_IN_SECONDS = Math.round(Date.now() / 1000); diff --git a/hardhat.config.ts b/hardhat.config.ts index 11fbf4d..1e91016 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,6 +1,6 @@ import "@nomicfoundation/hardhat-toolbox"; -import type { HardhatUserConfig } from "hardhat/config"; import "hardhat-deploy"; +import type { HardhatUserConfig } from "hardhat/config"; import { vars } from "hardhat/config"; import type { NetworkUserConfig } from "hardhat/types";