Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added dotenv pkg, env template #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GOERLI_DEPLOYER_PK=<YOUR_DEPLOYER_PRIVATE_KEY_without_0x>
12 changes: 8 additions & 4 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require("@nomiclabs/hardhat-waffle");
require("@developerdao/hardhat-fe");

require("dotenv").config({
path: require("path").resolve(__dirname, "./.env"),
});

// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
Expand All @@ -20,12 +24,12 @@ task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
module.exports = {
solidity: "0.8.4",
fe: {
version: "0.18.0-alpha"
version: "0.18.0-alpha",
},
networks: {
goerli: {
url: `http://goerli.prylabs.net/`,
accounts: [`${process.env.GOERLI_DEPLOYER_PK}`]
}
}
accounts: [`0x${process.env.GOERLI_DEPLOYER_PK}`],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assumption is that the 0x part goes into the environment variable

},
},
};
16 changes: 16 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"chai": "^4.3.4",
"dotenv": "^16.0.1",
"ethereum-waffle": "^3.4.0",
"ethers": "^5.4.6",
"hardhat": "^2.6.1"
Expand Down