diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..134bbdb --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +GOERLI_DEPLOYER_PK= \ No newline at end of file diff --git a/hardhat.config.js b/hardhat.config.js index 1b64492..8125312 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -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) => { @@ -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}`], + }, + }, }; diff --git a/package-lock.json b/package-lock.json index cf10085..819f549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,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" @@ -2557,6 +2558,15 @@ "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", "dev": true }, + "node_modules/dotenv": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", + "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -17751,6 +17761,12 @@ "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", "dev": true }, + "dotenv": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", + "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==", + "dev": true + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", diff --git a/package.json b/package.json index 1303593..88fb9a8 100644 --- a/package.json +++ b/package.json @@ -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"