From fdb6f2ade3ba6f094e4faeec90884e745a882046 Mon Sep 17 00:00:00 2001 From: Thomas Marchand Date: Sat, 16 Nov 2024 20:52:39 +0700 Subject: [PATCH] fix: deployment --- .gitignore | 2 ++ hardhat.config.ts | 11 +++++++---- package-lock.json | 29 ++++++++++++++++++++++++++++- package.json | 1 + 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 7bd63a3..1189539 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +ignition + node_modules .env bun.lockb diff --git a/hardhat.config.ts b/hardhat.config.ts index 33dbe57..0742d2f 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,9 +1,12 @@ -import { vars, HardhatUserConfig } from "hardhat/config"; +import { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; +import * as dotenv from "dotenv"; -const INFURA_API_KEY = vars.get("INFURA_API_KEY"); -const PRIVATE_KEY = vars.get("PRIVATE_KEY"); -const ETHERSCAN_API_KEY = vars.get("ETHERSCAN_API_KEY"); +dotenv.config(); + +const INFURA_API_KEY = process.env.INFURA_API_KEY; +const PRIVATE_KEY = process.env.PRIVATE_KEY; +const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY; const config: HardhatUserConfig = { solidity: "0.8.24", diff --git a/package-lock.json b/package-lock.json index a11dbef..e2f2450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,10 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "hardhat": "^2.22.3" + "@openzeppelin/contracts": "^5.0.2", + "dotenv": "^16.4.5", + "hardhat": "^2.22.3", + "install": "^0.13.0" }, "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^5.0.0" @@ -1546,6 +1549,11 @@ "node": ">= 10" } }, + "node_modules/@openzeppelin/contracts": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.1.0.tgz", + "integrity": "sha512-p1ULhl7BXzjjbha5aqst+QMLY+4/LCWADXOCsmLHRM77AqiPjnd9vvUN9sosUfhL9JGKpZ0TjEGxgvnizmWGSA==" + }, "node_modules/@scure/base": { "version": "1.1.6", "license": "MIT", @@ -2911,6 +2919,17 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/elliptic": { "version": "6.5.5", "license": "MIT", @@ -3973,6 +3992,14 @@ "dev": true, "peer": true }, + "node_modules/install": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", diff --git a/package.json b/package.json index 142b329..40f66c4 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "@openzeppelin/contracts": "^5.0.2", + "dotenv": "^16.4.5", "hardhat": "^2.22.3", "install": "^0.13.0" },